// myLoadLibrary.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
typedef WORD (*pEncryptBuffer)(WORD wMainCmdID, WORD wSubCmdID, void * pData, WORD wDataSize);
unsigned char mycbDataBuffer[16384]="\x03\x00\x06\x06\x39\x00\x32\x00\x30\x00\x33\x00\x41\x00\x37\x00\x41\x00\x36\x00\x31\x00\x46\x00\x38\x00\x33\x00\x30\x00\x32\x00\x42\x00\x32\x00\x31\x00\x41\x00\x44\x00\x33\x00\x41\x00\x33\x00\x43\x00\x37\x00\x42\x00\x35\x00\x31\x00\x46\x00\x35\x00\x34\x00\x34\x00\x34\x00\x00\x00\x33\x00\x41\x00\x38\x00\x31\x00\x42\x00\x36\x00\x31\x00\x45\x00\x34\x00\x42\x00\x43\x00\x39\x00\x31\x00\x32\x00\x46\x00\x42\x00\x44\x00\x30\x00\x30\x00\x34\x00\x30\x00\x31\x00\x41\x00\x31\x00\x43\x00\x41\x00\x44\x00\x32\x00\x34\x00\x38\x00\x30\x00\x45\x00\x00\x00\x34\x00\x35\x00\x34\x00\x36\x00\x33\x00\x35\x00\x38\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFE\xFF\xFF\xFF\xFE\xFF\xFF\xFF\xFC\x04\x00\x00\x51\x01\x00\x00\x0C\x00\x00\x00\x01\x00\x00\x00\x03\x05";
WORD mywDataSize=0;
unsigned char ecxaddress[16384]="\x24\x45\x0E\x04\x07";
HMODULE hDLLServiceCore = LoadLibrary("C:\\vc\\OriginalWHSocketEncrypt\\ServiceCore.dll");
HMODULE hDLL = LoadLibrary("C:\\vc\\OriginalWHSocketEncrypt\\WHSocket.dll"); //加载dll文件
if(hDLL != NULL)
{
int kkk=(int)hDLL+0x14d0;
pEncryptBuffer myEncryptBuffer=pEncryptBuffer(kkk);
if(myEncryptBuffer != NULL)
{
mywDataSize=0xc9;
__asm
{
mov ax,mywDataSize
push eax
lea eax,mycbDataBuffer
push eax
push 2
push 1
lea ecx,ecxaddress
mov eax,myEncryptBuffer
call eax
}
}
FreeLibrary(hDLL);
}
else
{
std::cout<<"Cannot Find "<<"testdll"<<std::endl;
}
return 0;
}
//
#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
typedef WORD (*pEncryptBuffer)(WORD wMainCmdID, WORD wSubCmdID, void * pData, WORD wDataSize);
unsigned char mycbDataBuffer[16384]="\x03\x00\x06\x06\x39\x00\x32\x00\x30\x00\x33\x00\x41\x00\x37\x00\x41\x00\x36\x00\x31\x00\x46\x00\x38\x00\x33\x00\x30\x00\x32\x00\x42\x00\x32\x00\x31\x00\x41\x00\x44\x00\x33\x00\x41\x00\x33\x00\x43\x00\x37\x00\x42\x00\x35\x00\x31\x00\x46\x00\x35\x00\x34\x00\x34\x00\x34\x00\x00\x00\x33\x00\x41\x00\x38\x00\x31\x00\x42\x00\x36\x00\x31\x00\x45\x00\x34\x00\x42\x00\x43\x00\x39\x00\x31\x00\x32\x00\x46\x00\x42\x00\x44\x00\x30\x00\x30\x00\x34\x00\x30\x00\x31\x00\x41\x00\x31\x00\x43\x00\x41\x00\x44\x00\x32\x00\x34\x00\x38\x00\x30\x00\x45\x00\x00\x00\x34\x00\x35\x00\x34\x00\x36\x00\x33\x00\x35\x00\x38\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFE\xFF\xFF\xFF\xFE\xFF\xFF\xFF\xFC\x04\x00\x00\x51\x01\x00\x00\x0C\x00\x00\x00\x01\x00\x00\x00\x03\x05";
WORD mywDataSize=0;
unsigned char ecxaddress[16384]="\x24\x45\x0E\x04\x07";
HMODULE hDLLServiceCore = LoadLibrary("C:\\vc\\OriginalWHSocketEncrypt\\ServiceCore.dll");
HMODULE hDLL = LoadLibrary("C:\\vc\\OriginalWHSocketEncrypt\\WHSocket.dll"); //加载dll文件
if(hDLL != NULL)
{
int kkk=(int)hDLL+0x14d0;
pEncryptBuffer myEncryptBuffer=pEncryptBuffer(kkk);
if(myEncryptBuffer != NULL)
{
mywDataSize=0xc9;
__asm
{
mov ax,mywDataSize
push eax
lea eax,mycbDataBuffer
push eax
push 2
push 1
lea ecx,ecxaddress
mov eax,myEncryptBuffer
call eax
}
}
FreeLibrary(hDLL);
}
else
{
std::cout<<"Cannot Find "<<"testdll"<<std::endl;
}
return 0;
}