![]() |
|
#1
|
|||
|
|||
|
Functions within a Dll
Hey members..I have a dilemma...I have a dll (semcomn.dll) and I
dont know anything of the dll other than it has a few functions inside of it..two functions mainly I'm interested in the Decrypt and Encrypt functions. The dilemma is I dont know what are the parameters that are being passed to these two functions... Here's the code for the program Code:
#include <stdio.h>
#include <windows.h>
// Compile with:
//
// cl /c agent_pwd.c
// link agent_pwd.obj
// Run in ...\Program Files\Microsoft SQL Server\80\Tools\Binn OR place SEMCOMN.RLL in Resources\<LANGID>\ dir below current
// This is host_login_password from msdb.dbo.sp_get_sqlagent_properties
#define EncStr "\x7c\x3b\x57\x65\xee\xe0\x7c\x11\x3a\x5a\xe0\x41\xf8\xa3\x21\x16\x63\xb8\xf6\xbe\xf7\xd6\xfd\x3f\xb5\x19\x4b\xbe\x6b\xc0\xd9\x53"
int main(int argc, char * argv[])
{
BYTE Buff[100];
FARPROC pDecrypt;
HINSTANCE hSEMCOMN;
DWORD dwSize, i;
hSEMCOMN = LoadLibrary("SEMCOMN.DLL");
if(hSEMCOMN!=NULL){
pDecrypt = GetProcAddress(hSEMCOMN, "Decrypt");
if(pDecrypt!=NULL){
dwSize = sizeof(Buff);
// Actually, I do not know format of this function, but beleive that it is:
// Decrypt(EncryptedData, EncryptedDataSize, ClearData, SizeOfClearData)
// Last two params are pointers, as usual
(pDecrypt)(EncStr, sizeof(EncStr), Buff, &dwSize);
printf("PASSWORD: ");
for(i=0;i<dwSize;i++)
printf("%c", Buff[i]);
printf("\n");
} else {
printf("Cannot get address of Decrypt(...), %d\n", GetLastError());
}
} else {
printf("Cannot load SEMCOMN.DLL, %d\n", GetLastError());
}
if(hSEMCOMN)
FreeLibrary(hSEMCOMN);
return 0;
}
reply...but any assistance from any of the members here will be great help!! Thnx in advance SOLAR
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Execryptor EC functions | LaBBa | General Discussion | 1 | 04-02-2010 00:21 |
| Timer Functions | bedrock | General Discussion | 9 | 05-24-2005 23:09 |
| where are second level dll functions | raygun | General Discussion | 2 | 01-24-2005 05:56 |