Fixes + some cleanup
This commit is contained in:
parent
886d384b8a
commit
8efcb7b8bc
@ -213,33 +213,36 @@ namespace auth
|
|||||||
// Patch steam id bit check
|
// Patch steam id bit check
|
||||||
if (game::environment::is_sp())
|
if (game::environment::is_sp())
|
||||||
{
|
{
|
||||||
utils::hook::jump(0x140475C17, 0x140475C6A); // H1(1.4)
|
//utils::hook::jump(0x140475C17, 0x140475C6A); // H1(1.4)
|
||||||
utils::hook::jump(0x140476AFF, 0x140476B40); // H1(1.4)
|
//utils::hook::jump(0x140476AFF, 0x140476B40); // H1(1.4)
|
||||||
utils::hook::jump(0x140476FA4, 0x140476FF2); // H1(1.4)
|
//utils::hook::jump(0x140476FA4, 0x140476FF2); // H1(1.4)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
utils::hook::jump(0x1D6193_b, 0x1D61FA_b); // STEAM
|
// kill "disconnected from steam" error
|
||||||
utils::hook::jump(0x60153_b, 0x60426_b); // STEAM
|
utils::hook::nop(0x1D61DF_b, 0x11);
|
||||||
utils::hook::jump(0x603E1_b, 0x60426_b); // STEAM
|
|
||||||
utils::hook::jump(0x1D7542_b, 0x1D7587_b); // STEAM MAYBE `1401D7553` ON FIRST
|
/*utils::hook::nop(0x1D6193_b, 103); // STEAM
|
||||||
utils::hook::jump(0x1D7A82_b, 0x1D7AC8_b); // STEAM
|
utils::hook::nop(0x60153_b, 0x60426 - 0x60153); // STEAM
|
||||||
|
utils::hook::nop(0x603E1_b, 0x60426 - 0x603E1); // STEAM
|
||||||
|
utils::hook::nop(0x1D7553_b, 0x1D7587 - 0x1D7553); // STEAM MAYBE `1401D7553` ON FIRST
|
||||||
|
utils::hook::nop(0x1D7A82_b, 0x1D7AC8 - 0x1D7A82); // STEAM*/
|
||||||
|
|
||||||
//utils::hook::jump(0x140488BC1, get_direct_connect_stub(), true); // H1(1.4) can't find
|
//utils::hook::jump(0x140488BC1, get_direct_connect_stub(), true); // H1(1.4) can't find
|
||||||
utils::hook::call(0x12D437_b, send_connect_data_stub); // H1(1.4)
|
//utils::hook::call(0x12D437_b, send_connect_data_stub); // H1(1.4)
|
||||||
|
|
||||||
// Skip checks for sending connect packet
|
// Skip checks for sending connect packet
|
||||||
utils::hook::jump(0x1402508FC, 0x140250946);
|
//utils::hook::jump(0x1402508FC, 0x140250946);
|
||||||
// Don't instantly timeout the connecting client ? not sure about this
|
// Don't instantly timeout the connecting client ? not sure about this
|
||||||
utils::hook::set(0x14025136B, 0xC3);
|
//utils::hook::set(0x14025136B, 0xC3);
|
||||||
}
|
}
|
||||||
|
|
||||||
command::add("guid", []()
|
//command::add("guid", []()
|
||||||
{
|
//{
|
||||||
printf("Your guid: %llX\n", steam::SteamUser()->GetSteamID().bits);
|
// printf("Your guid: %llX\n", steam::SteamUser()->GetSteamID().bits);
|
||||||
});
|
//});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//REGISTER_COMPONENT(auth::component)
|
REGISTER_COMPONENT(auth::component)
|
||||||
|
@ -482,14 +482,15 @@ namespace demonware
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
utils::hook::detour kekw_hook;
|
utils::hook::detour handle_auth_reply_hook;
|
||||||
bool kekw_stub(__int64 a1, __int64 a2, __int64* a3)
|
bool handle_auth_reply_stub(void* a1, void* a2, void* a3)
|
||||||
{
|
{
|
||||||
// Checks X-Signature header or something
|
// Skip bdAuth::validateResponseSignature
|
||||||
utils::hook::set(0x7D4AB0_b, 0xC301B0);
|
utils::hook::set(0x7D4AB0_b, 0xC301B0);
|
||||||
// Checks extended_data and extra_data in json object
|
// Skip bdAuth::processPlatformData
|
||||||
utils::hook::set(0x7D55C0_b, 0xC301B0);
|
utils::hook::set(0x7D55C0_b, 0xC301B0);
|
||||||
return kekw_hook.invoke<bool>(a1, a2, a3);
|
|
||||||
|
return handle_auth_reply_hook.invoke<bool>(a1, a2, a3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* allocate_somewhere_near(uint8_t* base_address)
|
void* allocate_somewhere_near(uint8_t* base_address)
|
||||||
@ -563,13 +564,6 @@ namespace demonware
|
|||||||
|
|
||||||
void post_unpack() override
|
void post_unpack() override
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
mwr has upgraded some networking methods and the gethostbyname import from winsock library is no longer used
|
|
||||||
gethostbyname has been replaced with getaddrinfo
|
|
||||||
btw, still you can't get online..
|
|
||||||
*/
|
|
||||||
//utils::hook::jump(SELECT_VALUE(0, 0x7EBC20_b), bd_logger_stub);
|
|
||||||
|
|
||||||
if (game::environment::is_sp())
|
if (game::environment::is_sp())
|
||||||
{
|
{
|
||||||
// utils::hook::set<uint8_t>(0x1405FCA00, 0xC3); // bdAuthSteam H1(1.4)
|
// utils::hook::set<uint8_t>(0x1405FCA00, 0xC3); // bdAuthSteam H1(1.4)
|
||||||
@ -577,9 +571,9 @@ namespace demonware
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
utils::hook::set<uint8_t>(0x7C0AD9_b, 0x0); // CURLOPT_SSL_VERIFYPEER H1MP64(1.15)
|
utils::hook::set<uint8_t>(0x7C0AD9_b, 0x0); // CURLOPT_SSL_VERIFYPEER
|
||||||
utils::hook::set<uint8_t>(0x7C0AC5_b, 0xAF); // CURLOPT_SSL_VERIFYHOST H1MP64(1.15)
|
utils::hook::set<uint8_t>(0x7C0AC5_b, 0xAF); // CURLOPT_SSL_VERIFYHOST
|
||||||
utils::hook::set<uint8_t>(0xA1327C_b, 0x0); // HTTPS -> HTTP [MWR OK][S1X: 0x14088D0E8]
|
utils::hook::set<uint8_t>(0xA1327C_b, 0x0); // HTTPS -> HTTP
|
||||||
|
|
||||||
// HTTPS -> HTTP
|
// HTTPS -> HTTP
|
||||||
char* umbrella = (char*)allocate_somewhere_near((uint8_t*)game::base_address);
|
char* umbrella = (char*)allocate_somewhere_near((uint8_t*)game::base_address);
|
||||||
@ -597,8 +591,10 @@ namespace demonware
|
|||||||
BYTE bytes[] = { 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x25, 0x73, 0x3A, 0x25, 0x64, 0x2F, 0x61, 0x75, 0x74, 0x68, 0x2F, 0x0 }; // KEKW
|
BYTE bytes[] = { 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x25, 0x73, 0x3A, 0x25, 0x64, 0x2F, 0x61, 0x75, 0x74, 0x68, 0x2F, 0x0 }; // KEKW
|
||||||
std::memcpy((void*)0x9EDB08_b, bytes, sizeof(bytes)); //utils::hook::inject(0x140728170, "http://%s:%d/auth/"); :DDD
|
std::memcpy((void*)0x9EDB08_b, bytes, sizeof(bytes)); //utils::hook::inject(0x140728170, "http://%s:%d/auth/"); :DDD
|
||||||
|
|
||||||
//utils::hook::set<uint8_t>(0x14047F290, 0xC3); // SV_SendMatchData H1MP64(1.4)
|
// utils::hook::set(0x4DCCE0_b, 0xC301B0);
|
||||||
//utils::hook::set<uint8_t>(0x140598990, 0xC3); // Live_CheckForFullDisconnect H1MP64(1.4)
|
|
||||||
|
// utils::hook::set<uint8_t>(0x19F8C0_b, 0xC3); SV_SendMatchData, not sure
|
||||||
|
utils::hook::set<uint8_t>(0x1A3340_b, 0xC3); // Live_CheckForFullDisconnect
|
||||||
|
|
||||||
//#ifdef DEBUG
|
//#ifdef DEBUG
|
||||||
// // yes
|
// // yes
|
||||||
@ -613,19 +609,15 @@ namespace demonware
|
|||||||
// utils::hook::call(0x140727C82, b);
|
// utils::hook::call(0x140727C82, b);
|
||||||
// utils::hook::call(0x140727E6A, a);
|
// utils::hook::call(0x140727E6A, a);
|
||||||
//#endif
|
//#endif
|
||||||
// Checks X-Signature header or something
|
// Remove some while loop that freezes the rendering for a few secs while connecting
|
||||||
//utils::hook::set(0x7D4AB0_b, 0xC301B0);
|
utils::hook::nop(0x625555_b, 5);
|
||||||
// Checks extended_data and extra_data in json object
|
|
||||||
//utils::hook::set(0x7D55C0_b, 0xC301B0);
|
|
||||||
// Update check
|
|
||||||
//utils::hook::set(0x1403A5390, 0xC301B0);
|
|
||||||
|
|
||||||
// Remove some while loop in demonware that freezes the rendering for a few secs at launch
|
handle_auth_reply_hook.create(0x7AC600_b, handle_auth_reply_stub);
|
||||||
//utils::hook::nop(0x14057DBC5, 5);
|
|
||||||
|
|
||||||
MessageBoxA(0, "TEST", "", 0);
|
// Skip update check in Live_SyncOnlineDataFlags
|
||||||
kekw_hook.create(0x7AC600_b, kekw_stub);
|
utils::hook::set(0x47A6D0_b, 0xC301B0);
|
||||||
MessageBoxA(0, "TEST2", "", 0);
|
// Remove update failed popup
|
||||||
|
utils::hook::set(0x47B2B0_b, 0xC301B0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pre_destroy() override
|
void pre_destroy() override
|
||||||
|
@ -174,27 +174,6 @@ namespace demonware
|
|||||||
|
|
||||||
auto* info = new bdFile2;
|
auto* info = new bdFile2;
|
||||||
|
|
||||||
// int
|
|
||||||
// int
|
|
||||||
// int
|
|
||||||
// byte (priv)
|
|
||||||
// int64 (owner)
|
|
||||||
// string (platform)
|
|
||||||
// string (file)
|
|
||||||
// blob
|
|
||||||
// size
|
|
||||||
// data
|
|
||||||
// int
|
|
||||||
// int
|
|
||||||
// int
|
|
||||||
// byte
|
|
||||||
// int64
|
|
||||||
// string (platform)
|
|
||||||
// string (file)
|
|
||||||
// blob
|
|
||||||
// size
|
|
||||||
// data
|
|
||||||
|
|
||||||
info->unk1 = 0;
|
info->unk1 = 0;
|
||||||
info->unk2 = 0;
|
info->unk2 = 0;
|
||||||
info->unk3 = 0;
|
info->unk3 = 0;
|
||||||
@ -204,14 +183,6 @@ namespace demonware
|
|||||||
info->filename = filename;
|
info->filename = filename;
|
||||||
info->data = data;
|
info->data = data;
|
||||||
|
|
||||||
/*info->file_id = *reinterpret_cast<const uint64_t*>(utils::cryptography::sha1::compute(filename).data());
|
|
||||||
info->filename = filename;
|
|
||||||
info->create_time = uint32_t(time(nullptr));
|
|
||||||
info->modified_time = info->create_time;
|
|
||||||
info->file_size = uint32_t(data.size());
|
|
||||||
info->owner_id = uint64_t(owner);
|
|
||||||
info->priv = priv;*/
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("[DW]: [bdStorage]: set user file: %s\n", filename.data());
|
printf("[DW]: [bdStorage]: set user file: %s\n", filename.data());
|
||||||
#endif
|
#endif
|
||||||
@ -243,8 +214,6 @@ namespace demonware
|
|||||||
|
|
||||||
auto reply = server->create_reply(this->task_id());
|
auto reply = server->create_reply(this->task_id());
|
||||||
|
|
||||||
printf("%i\n", numfiles);
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < numfiles; i++)
|
for (uint32_t i = 0; i < numfiles; i++)
|
||||||
{
|
{
|
||||||
std::string filename, data;
|
std::string filename, data;
|
||||||
|
@ -5,7 +5,8 @@ namespace demonware
|
|||||||
{
|
{
|
||||||
bdUNK80::bdUNK80() : service(80, "bdUNK80")
|
bdUNK80::bdUNK80() : service(80, "bdUNK80")
|
||||||
{
|
{
|
||||||
this->register_task(42, &bdUNK80::unk42);
|
this->register_task(42, &bdUNK80::unk42); // COD POINTS purchase ?
|
||||||
|
// this->register_task(43, &bdUNK80::unk43); COD POINTS purchase ?
|
||||||
this->register_task(49, &bdUNK80::unk49);
|
this->register_task(49, &bdUNK80::unk49);
|
||||||
this->register_task(60, &bdUNK80::unk60);
|
this->register_task(60, &bdUNK80::unk60);
|
||||||
this->register_task(130, &bdUNK80::unk130);
|
this->register_task(130, &bdUNK80::unk130);
|
||||||
|
Loading…
Reference in New Issue
Block a user