1
0
mirror of synced 2024-11-15 07:17:35 +01:00

Merge pull request #19 from nzgamer41/master

fixed crashing bug with wmmt5
This commit is contained in:
Reaver 2018-12-26 04:02:18 +02:00 committed by GitHub
commit 17f3b906a9

View File

@ -252,18 +252,6 @@ unsigned int Hook_hasp_write(int hasp_handle, int hasp_fileid, unsigned int offs
return HASP_STATUS_OK;
}
typedef int (WINAPI *BIND)(SOCKET, CONST SOCKADDR *, INT);
BIND pbind = NULL;
unsigned int WINAPI hookBind(SOCKET s, const sockaddr *addr, int namelen) {
std::string networkip = config["General"]["NetworkAdapterIP"];
sockaddr_in gbindAddr = { 0 };
gbindAddr.sin_family = AF_INET;
gbindAddr.sin_addr.s_addr = inet_addr(networkip.c_str());
gbindAddr.sin_port = htons(50765);
return pbind(s, (sockaddr*)&gbindAddr, sizeof(gbindAddr));
}
unsigned char saveData[0x2000];
// BASE: 0x24E0
@ -956,9 +944,6 @@ static InitFunction Wmmt5Func([]()
MH_CreateHookApi(L"hasp_windows_x64_109906.dll", "hasp_logout", Hook_hasp_logout, NULL);
MH_CreateHookApi(L"hasp_windows_x64_109906.dll", "hasp_login", Hook_hasp_login, NULL);
//hook bind function
MH_CreateHookApi(L"Ws2_32", "bind", hookBind, reinterpret_cast<LPVOID*>(&pbind));
GenerateDongleData(isTerminal);