should be full [skip ci]

This commit is contained in:
Skull Merlin 2022-03-05 03:36:18 +02:00
parent fca5964740
commit 2614f7251f
7 changed files with 222 additions and 224 deletions

View File

@ -177,21 +177,22 @@ namespace auth
game::SV_DirectConnect(from);
}
void* get_direct_connect_stub()
{
return utils::hook::assemble([](utils::hook::assembler& a)
{
a.lea(rcx, qword_ptr(rsp, 0x20));
a.movaps(xmmword_ptr(rsp, 0x20), xmm0);
// CAN'T FIND
//void* get_direct_connect_stub()
//{
// return utils::hook::assemble([](utils::hook::assembler& a)
// {
// a.lea(rcx, qword_ptr(rsp, 0x20));
// a.movaps(xmmword_ptr(rsp, 0x20), xmm0);
a.pushad64();
a.mov(rdx, rsi);
a.call_aligned(direct_connect);
a.popad64();
// a.pushad64();
// a.mov(rdx, rsi);
// a.call_aligned(direct_connect);
// a.popad64();
a.jmp(0x140488CE2); // H1MP64(1.4)
});
}
// a.jmp(0x140488CE2); // H1MP64(1.4)
// });
//}
}
uint64_t get_guid()
@ -218,14 +219,14 @@ namespace auth
}
else
{
utils::hook::jump(0x140571E07, 0x140571E5A); // H1(1.4)
utils::hook::jump(0x14004B223, 0x14004B4F2); // H1(1.4)
utils::hook::jump(0x14004B4AD, 0x14004B4F2); // H1(1.4)
utils::hook::jump(0x140572F6F, 0x140572FB0); // H1(1.4)
utils::hook::jump(0x140573470, 0x1405734B6); // H1(1.4)
utils::hook::jump(0x1D6193_b, 0x1D61FA_b); // STEAM
utils::hook::jump(0x60153_b, 0x60426_b); // STEAM
utils::hook::jump(0x603E1_b, 0x60426_b); // STEAM
utils::hook::jump(0x1D7542_b, 0x1D7587_b); // STEAM MAYBE `1401D7553` ON FIRST
utils::hook::jump(0x1D7A82_b, 0x1D7AC8_b); // STEAM
utils::hook::jump(0x140488BC1, get_direct_connect_stub(), true); // H1(1.4)
utils::hook::call(0x140250ED2, send_connect_data_stub); // H1(1.4)
//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)
// Skip checks for sending connect packet
utils::hook::jump(0x1402508FC, 0x140250946);

View File

@ -45,8 +45,8 @@ namespace input
return;
}
cl_char_event_hook.create(SELECT_VALUE(0x1401871A0, 0x14024E810), cl_char_event_stub); // H1(1.4)
cl_key_event_hook.create(SELECT_VALUE(0x1401874D0, 0x14024EA60), cl_key_event_stub); // H1(1.4)
cl_char_event_hook.create(SELECT_VALUE(0, 0x12C8F0_b), cl_char_event_stub); // H1-STEAM(1.15)
cl_key_event_hook.create(SELECT_VALUE(0, 0x135A70_b), cl_key_event_stub); // H1-STEAM(1.15)
}
};
}

View File

@ -44,7 +44,7 @@ namespace localized_strings
void post_unpack() override
{
// Change some localized strings
seh_string_ed_get_string_hook.create(SELECT_VALUE(0x1403924A0, 0x1404BB2A0), &seh_string_ed_get_string);
seh_string_ed_get_string_hook.create(SELECT_VALUE(0, 0x585DA0_b), &seh_string_ed_get_string); // H1-STEAM(1.15)
}
};
}

View File

@ -67,11 +67,11 @@ namespace network
// Command handled
a.popad64();
a.mov(al, 1);
a.jmp(0x140252AF8); // H1MP64(1.4)
a.jmp(0x252AF8_b); // STEAM
a.bind(return_unhandled);
a.popad64();
a.jmp(0x14025234C); // H1MP64(1.4)
a.jmp(0x25234C_b); // STEAM
}
int net_compare_base_address(const game::netadr_s* a1, const game::netadr_s* a2)
@ -117,7 +117,7 @@ namespace network
if (net_interface && net_interface != "localhost"s)
{
// Sys_StringToSockaddr
utils::hook::invoke<void>(0x1404F6580, net_interface, &address);
utils::hook::invoke<void>(0x59E810_b, net_interface, &address);
}
address.sin_family = AF_INET;
@ -237,52 +237,52 @@ namespace network
// redirect dw_sendto to raw socket
//utils::hook::jump(0x1404D850A, reinterpret_cast<void*>(0x1404D849A));
utils::hook::call(0x140513467, dw_send_to_stub); // H1MP64(1.4)
utils::hook::jump(game::Sys_SendPacket, dw_send_to_stub); // H1MP64(1.4)
utils::hook::call(0x5BDB47_b, dw_send_to_stub); // STEAM
utils::hook::jump(game::Sys_SendPacket, dw_send_to_stub); // STEAM
// intercept command handling
utils::hook::jump(0x140252327, utils::hook::assemble(handle_command_stub), true); // H1MP64(1.4)
utils::hook::jump(0x12F387_b, utils::hook::assemble(handle_command_stub), true); // STEAM
// handle xuid without secure connection
utils::hook::nop(0x140486AAF, 6); // H1MP64(1.4)
utils::hook::nop(0x554222_b, 6); // STEAM
utils::hook::jump(0x140424F20, net_compare_address); // H1MP64(1.4)
utils::hook::jump(0x140424F70, net_compare_base_address); // H1MP64(1.4)
utils::hook::jump(0x4F1800_b, net_compare_address); // STEAM
utils::hook::jump(0x4F1850_b, net_compare_base_address); // STEAM
// don't establish secure conenction
utils::hook::set<uint8_t>(0x14027EA4D, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x14027EB1E, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x14027EF8D, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x14025081F, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x358C8D_b, 0xEB); // STEAM
utils::hook::set<uint8_t>(0x358D5E_b, 0xEB); // STEAM
utils::hook::set<uint8_t>(0x3591CD_b, 0xEB); // STEAM
utils::hook::set<uint8_t>(0x12CD0F_b, 0xEB); // STEAM
// ignore unregistered connection
utils::hook::jump(0x140480F46, 0x140480EE5); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x140480F3B, 0xEB); // H1MP64(1.4)
utils::hook::jump(0x54E2D1_b, 0x54E270_b); // STEAM
utils::hook::set<uint8_t>(0x54E2C6_b, 0xEB); // STEAM
// disable xuid verification
utils::hook::set<uint8_t>(0x14005B62D, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x14005B649, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x728BF_b, 0xEB); // STEAM NOT SURE AT ALL
utils::hook::set<uint8_t>(0x72903_b, 0xEB); // STEAM NOT SURE AT FKING ALL
// disable xuid verification
utils::hook::nop(0x14048382C, 2);
utils::hook::set<uint8_t>(0x140483889, 0xEB); // H1MP64(1.4)
utils::hook::nop(0x5509D9_b, 2); // STEAM SHOULD
utils::hook::set<uint8_t>(0x550A36_b, 0xEB); // STEAM SHOULD
// ignore configstring mismatch
utils::hook::set<uint8_t>(0x1402591C9, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x341261_b, 0xEB); // STEAM
// ignore dw handle in SV_PacketEvent
utils::hook::set<uint8_t>(0x1404898E2, 0xEB);
utils::hook::call(0x1404898D6, &net_compare_address); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x1CBC22_b, 0xEB); // STEAM
utils::hook::call(0x1CBC16_b, &net_compare_address); // STEAM
// ignore dw handle in SV_FindClientByAddress
utils::hook::set<uint8_t>(0x140488EFD, 0xEB);
utils::hook::call(0x140488EF1, &net_compare_address); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x1CB24D_b, 0xEB); // STEAM
utils::hook::call(0x1CB241_b, &net_compare_address); // STEAM
// ignore dw handle in SV_DirectConnect
utils::hook::set<uint8_t>(0x140480C58, 0xEB);
utils::hook::set<uint8_t>(0x140480E6F, 0xEB);
utils::hook::call(0x140480C4B, &net_compare_address);
utils::hook::call(0x140480E62, &net_compare_address);
utils::hook::set<uint8_t>(0x54DFE8_b, 0xEB); // STEAM
utils::hook::set<uint8_t>(0x54E1FD_b, 0xEB); // STEAM NOT_SURE
utils::hook::call(0x54DFDB_b, &net_compare_address); // STEAM
utils::hook::call(0x54E1F0_b, &net_compare_address); // STEAM
// increase cl_maxpackets
dvars::override::register_int("cl_maxpackets", 1000, 1, 1000, game::DVAR_FLAG_SAVED);
@ -291,32 +291,32 @@ namespace network
dvars::override::register_int("sv_remote_client_snapshot_msec", 33, 33, 100, game::DVAR_FLAG_NONE);
// ignore impure client
utils::hook::jump(0x140481B58, reinterpret_cast<void*>(0x140481BEE)); // H1MP64(1.4)
utils::hook::jump(0x481B58_b, reinterpret_cast<void*>(0x54EE69_b)); // STEAM
// don't send checksum
utils::hook::set<uint8_t>(0x140513433, 0); // H1MP64(1.4) mov: r8d, edi ; LEN
utils::hook::set<uint8_t>(0x14051345A, 0); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x513433_b, 0); // STEAM mov: r8d, edi ; LEN
utils::hook::set<uint8_t>(0x51345A_b, 0); // STEAM
// don't read checksum
utils::hook::set(0x1404F6620, 0xC301B0); // H1MP64(1.4)
utils::hook::set(0x513389_b, 0xC301B0); // STEAM
// don't try to reconnect client
utils::hook::call(0x140480DFF, reconnect_migratated_client); // H1MP64(1.4)
utils::hook::nop(0x140480DDB, 4); // H1MP64(1.4) this crashes when reconnecting for some reason
utils::hook::call(0x480DFF_b, reconnect_migratated_client); // STEAM
utils::hook::nop(0x480DDB_b, 4); // STEAM this crashes when reconnecting for some reason
// allow server owner to modify net_port before the socket bind
utils::hook::call(0x140512BE5, register_netport_stub); // H1MP64(1.4)
utils::hook::call(0x140512D20, register_netport_stub); // H1MP64(1.4)
utils::hook::call(0x512BE5_b, register_netport_stub); // STEAM
utils::hook::call(0x512D20_b, register_netport_stub); // STEAM
// increase allowed packet size
const auto max_packet_size = 0x20000;
utils::hook::set<int>(0x1404255F1, max_packet_size); // H1MP64(1.4)
utils::hook::set<int>(0x140425630, max_packet_size); // H1MP64(1.4)
utils::hook::set<int>(0x140425522, max_packet_size); // H1MP64(1.4)
utils::hook::set<int>(0x140425545, max_packet_size); // H1MP64(1.4)
utils::hook::set<int>(0x4255F0_b, max_packet_size); // STEAM
utils::hook::set<int>(0x42562E_b, max_packet_size); // STEAM
utils::hook::set<int>(0x425521_b, max_packet_size); // STEAM
utils::hook::set<int>(0x425549_b, max_packet_size); // STEAM
// ignore built in "print" oob command and add in our own
utils::hook::set<uint8_t>(0x14025280E, 0xEB); // H1MP64(1.4)
utils::hook::set<uint8_t>(0x25280E_b, 0xEB); // STEAM
on("print", [](const game::netadr_s&, const std::string_view& data)
{
const std::string message{data};
@ -325,7 +325,7 @@ namespace network
// Use our own socket since the game's socket doesn't work with non localhost addresses
// why? no idea
utils::hook::jump(0x140512B40, create_socket);
utils::hook::jump(0x5BD210_b, create_socket);
}
}
};

View File

@ -180,9 +180,9 @@ namespace scheduler
void post_unpack() override
{
r_end_frame_hook.create(SELECT_VALUE(0x1404F7310, 0x1405FE470), scheduler::r_end_frame_stub);
g_run_frame_hook.create(SELECT_VALUE(0x1402772D0, 0x14033A640), scheduler::server_frame_stub);
main_frame_hook.create(SELECT_VALUE(0x1401CE8D0, 0x1400D8310), scheduler::main_frame_stub);
r_end_frame_hook.create(SELECT_VALUE(0, 0x6A6300_b), scheduler::r_end_frame_stub); // H1-STEAM(1.15)
g_run_frame_hook.create(SELECT_VALUE(0, 0x417940_b), scheduler::server_frame_stub); // H1(1.15)
//main_frame_hook.create(SELECT_VALUE(0x1401CE8D0, 0x1400D8310), scheduler::main_frame_stub); can't find
}
void pre_destroy() override

View File

@ -30,9 +30,9 @@ namespace splash
void post_unpack() override
{
// Disable native splash screen
utils::hook::nop(SELECT_VALUE(0x1403E192E, 0x1405123E2), 5); // H1(1.4)
utils::hook::jump(SELECT_VALUE(0x1403E2E70, 0x140513AF0), destroy_stub); // H1(1.4)
utils::hook::jump(SELECT_VALUE(0x1403E2EB0, 0x140513B30), destroy_stub); // H1(1.4)
//utils::hook::nop(SELECT_VALUE(0x1403E192E, 0x1405123E2), 5); // winmain doesn't even exist in 1.15? lmao
utils::hook::jump(SELECT_VALUE(0, 0x5BE1D0_b), destroy_stub); // H1-STEAM(1.15)
utils::hook::jump(SELECT_VALUE(0, 0x5BE210_b), destroy_stub); // H1-STEAM(1.15)
}
void pre_destroy() override

View File

@ -8,99 +8,96 @@ namespace game
* Functions
**************************************************************/
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{0x14036E600, 0x14043C580};
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{0x1403700F0, 0x14043E090};
WEAK symbol<void(unsigned int id)> AddRefToObject{0x14036E5F0, 0x14043C570};
WEAK symbol<void(unsigned int id)> RemoveRefToObject{0x14036FFE0, 0x14043DF80};
WEAK symbol<unsigned int(unsigned int id)> AllocThread{0x14036E960, 0x14043C8E0};
WEAK symbol<void(int type, VariableUnion u)> AddRefToValue{0x36E600, 0x43C580};
WEAK symbol<void(int type, VariableUnion u)> RemoveRefToValue{0x3700F0, 0x43E090};
WEAK symbol<void(unsigned int id)> AddRefToObject{0x36E5F0, 0x43C570};
WEAK symbol<void(unsigned int id)> RemoveRefToObject{0x36FFE0, 0x43DF80};
WEAK symbol<unsigned int(unsigned int id)> AllocThread{0x36E960, 0x43C8E0};
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{0x140342EB0, 0x1404033B0};
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0x342EB0, 0x1CF480 }; // H1MP(1.15)
WEAK symbol<void(int localClientNum, int controllerIndex, const char* buffer,
void (int, int, const char*))> Cbuf_ExecuteBufferInternal{0x140342FC0, 0x1404034C0};
WEAK symbol<void(const char* message)> Conbuf_AppendText{0x1403E3300, 0x140513FF0};
WEAK symbol<char*(int start)> ConcatArgs{0x1402697F0, 0x140335D70};
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{0x140343980, 0x140403F60};
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{0x1403433E0, 0x140403950};
WEAK symbol<void(const char*)> Cmd_RemoveCommand{0x140343FF0, 0x1404045D0};
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{0x140344110, 0x1404046F0};
WEAK symbol<void()> Cmd_EndTokenizeString{0x140343630, 0x140403C20};
void (int, int, const char*))> Cbuf_ExecuteBufferInternal{0x342FC0, 0x4034C0};
WEAK symbol<void(const char* message)> Conbuf_AppendText{0x3E3300, 0x513FF0};
WEAK symbol<char*(int start)> ConcatArgs{0x2697F0, 0x335D70};
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{0x343980, 0x403F60};
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{0x3433E0, 0x403950};
WEAK symbol<void(const char*)> Cmd_RemoveCommand{0x343FF0, 0x4045D0};
WEAK symbol<void(const char* text_in)> Cmd_TokenizeString{0x344110, 0x4046F0};
WEAK symbol<void()> Cmd_EndTokenizeString{0x343630, 0x403C20};
WEAK symbol<void(void*, void*)> AimAssist_AddToTargetList{0, 0x14009D0F0};
WEAK symbol<void(void*, void*)> AimAssist_AddToTargetList{0, 0x9D0F0};
WEAK symbol<void(unsigned int weapon, bool isAlternate,
char* output, unsigned int maxStringLen)> BG_GetWeaponNameComplete{0x140430550, 0x1401F9670};
char* output, unsigned int maxStringLen)> BG_GetWeaponNameComplete{0x430550, 0x1F9670};
WEAK symbol<void()> Com_Frame_Try_Block_Function{0x1401CE8D0, 0x1400D8310};
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{0, 0x1405039A0};
WEAK symbol<bool()> Com_InFrontEnd{0x1400E4B30, 0x140176A30};
WEAK symbol<void(float, float, int)> Com_SetSlowMotion{0, 0x1400DB790};
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{0x1403509C0, 0x1400D78A0};
WEAK symbol<void()> Com_Quit_f{0x140352BE0, 0x1400DA830};
WEAK symbol<void()> Quit{0x140352D90, 0x1400DA830};
WEAK symbol<void()> Com_Frame_Try_Block_Function{0x1CE8D0, 0xD8310};
WEAK symbol<CodPlayMode()> Com_GetCurrentCoDPlayMode{0, 0x5039A0};
WEAK symbol<bool()> Com_InFrontEnd{0xE4B30, 0x176A30};
WEAK symbol<void(float, float, int)> Com_SetSlowMotion{0, 0xDB790};
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{0x3509C0, 0xD78A0};
WEAK symbol<void()> Com_Quit_f{0x352BE0, 0xDA830};
WEAK symbol<void()> Quit{0x352D90, 0xDA830};
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{0x1401389A0, 0x140220CC0};
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{0x140138750, 0x140220620};
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessage{0x1389A0, 0x220CC0};
WEAK symbol<void(int localClientNum, const char* message)> CG_GameMessageBold{0x138750, 0x220620};
WEAK symbol<bool()> CL_IsCgameInitialized{0x14017EE30, 0x140245650};
WEAK symbol<bool()> CL_IsCgameInitialized{0x17EE30, 0x245650};
WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x1403C72B0, 0x1404FD0A0};
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x1403C5D50, 0x1404FBB00};
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x140354DF0, 0x14041D830};
WEAK symbol<const char*(dvar_t* dvar, dvar_value value)> Dvar_ValueToString{0x1403C8560, 0x1404FE660};
WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x3C72B0, 0x4FD0A0};
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x3C5D50, 0x4FBB00};
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x354DF0, 0x41D830};
WEAK symbol<const char*(dvar_t* dvar, dvar_value value)> Dvar_ValueToString{0x3C8560, 0x4FE660};
WEAK symbol<dvar_t*(int hash, const char* name, bool value,
unsigned int flags)> Dvar_RegisterBool{0x1403C47E0, 0x1404FA540};
unsigned int flags)> Dvar_RegisterBool{0x3C47E0, 0x4FA540};
WEAK symbol<dvar_t*(int hash, const char* name, int value, int min, int max,
unsigned int flags)> Dvar_RegisterInt{0x1403C4CC0, 0x1404FAA20};
unsigned int flags)> Dvar_RegisterInt{0x3C4CC0, 0x4FAA20};
WEAK symbol<dvar_t*(int hash, const char* dvarName, float value, float min,
float max, unsigned int flags)> Dvar_RegisterFloat{0x1403C4BB0, 0x1404FA910};
float max, unsigned int flags)> Dvar_RegisterFloat{0x3C4BB0, 0x4FA910};
WEAK symbol<dvar_t*(int hash, const char* dvarName, const char* value,
unsigned int flags)> Dvar_RegisterString{0x1403C4DA0, 0x1404FAB00};
unsigned int flags)> Dvar_RegisterString{0x3C4DA0, 0x4FAB00};
WEAK symbol<dvar_t*(int dvarName, const char* a2, float x, float y, float z,
float w, float min, float max, unsigned int flags)> Dvar_RegisterVec4{0x1403C5220, 0x1404FAF40};
float w, float min, float max, unsigned int flags)> Dvar_RegisterVec4{0x3C5220, 0x4FAF40};
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{0x1403B9020, 0x1404EE720};
WEAK symbol<void(void* buffer)> FS_FreeFile{0x1403B9010, 0x1404EE710};
WEAK symbol<void(const char* gameName)> FS_Startup{0x1403B85D0, 0x1404EDD30};
WEAK symbol<void(const char* path, const char* dir)> FS_AddLocalizedGameDirectory{0x1403B6030, 0x1404EBE20};
WEAK symbol<long long(const char* qpath, char** buffer)> FS_ReadFile{0x3B9020, 0x4EE720};
WEAK symbol<void(void* buffer)> FS_FreeFile{0x3B9010, 0x4EE710};
WEAK symbol<void(const char* gameName)> FS_Startup{0x3B85D0, 0x4EDD30};
WEAK symbol<void(const char* path, const char* dir)> FS_AddLocalizedGameDirectory{0x3B6030, 0x4EBE20};
WEAK symbol<unsigned int(unsigned int, unsigned int)> GetVariable{0x14036FDD0, 0x1403F3730};
WEAK symbol<unsigned int(unsigned int, unsigned int)> GetVariable{0x36FDD0, 0x3F3730};
WEAK symbol<void()> GScr_LoadConsts{0x1402D13E0, 0x140393810};
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{0x14036F4B0, 0x14043D430};
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{0x14036F3B0, 0x14043D330};
WEAK symbol<void(unsigned int parentId, unsigned int index)> RemoveVariableValue{0x140370190, 0x14043E130};
WEAK symbol<void()> GScr_LoadConsts{0x2D13E0, 0x393810};
WEAK symbol<unsigned int(unsigned int parentId, unsigned int name)> FindVariable{0x36F4B0, 0x43D430};
WEAK symbol<unsigned int(int entnum, unsigned int classnum)> FindEntityId{0x36F3B0, 0x43D330};
WEAK symbol<void(unsigned int parentId, unsigned int index)> RemoveVariableValue{0x370190, 0x43E130};
WEAK symbol<void(VariableValue* result, unsigned int classnum,
int entnum, int offset)> GetEntityFieldValue{0x140373780, 0x140441780};
int entnum, int offset)> GetEntityFieldValue{0x373780, 0x441780};
WEAK symbol<int(const char* fname)> generateHashValue{0x1400FE8A0, 0x1401B1010};
WEAK symbol<int(const char* fname)> generateHashValue{ 0xFE8A0, 0x183F80 }; // STEEEEEEEEEEEEAM
WEAK symbol<void()> G_Glass_Update{0x14026C570, 0x14033A640};
WEAK symbol<int(int clientNum)> G_GetClientScore{0, 0x140342F90};
WEAK symbol<void()> G_Glass_Update{0x26C570, 0x33A640};
WEAK symbol<int(int clientNum)> G_GetClientScore{0, 0x342F90};
WEAK symbol<char*(char* string)> I_CleanStr{0x1403CD230, 0x140503D00};
WEAK symbol<char*(char* string)> I_CleanStr{0x3CD230, 0x503D00};
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{0x140187CC0, 0x14024FE10};
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{0x187CC0, 0x24FE10};
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0, 0x14059A700};
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0, 0x59A700};
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{0x1404E48B0, 0x1405EAB30};
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{0x4E48B0, 0x5EAB30};
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{0x1403C11C0, 0x1404F62F0};
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{0x140357560, 0x1404255D0};
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{0, 0x140425790};
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{0, 0x140425870};
WEAK symbol<void(netadr_s*, sockaddr*)> NetadrToSockadr{0x3C11C0, 0x4F62F0};
WEAK symbol<void(netsrc_t, netadr_s*, const char*)> NET_OutOfBandPrint{ 0x357560, 0x4F1DE0 }; // STEEAM
WEAK symbol<void(netsrc_t sock, int length, const void* data, const netadr_s* to)> NET_SendLoopPacket{0, 0x425790};
WEAK symbol<bool(const char* s, netadr_s* a)> NET_StringToAdr{0, 0x425870};
WEAK symbol<void(float x, float y, float width, float height, float s0, float t0, float s1, float t1,
float* color, Material* material)> R_AddCmdDrawStretchPic{0x14017E5C0, 0x1402443A0};
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{0x1404D4100, 0x1405D91E0};
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x1404D43B0, 0x1405D94A0};
WEAK symbol<int(void* font)> R_GetFontHeight{0x1405EA360, 0x1405D92C0};
WEAK symbol<void* (int a1)> R_DrawSomething{0x1404D37B0, 0x1405D8890};
WEAK symbol<void()> R_SyncRenderThread{0x1404F8240, 0x1405FF3A0};
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x,
float y, float xScale, float yScale, float rotation, float* color,
int style, int cursor_pos, char cursor_char,
void* style_unk)> H1_AddBaseDrawTextCmd{0x1404F3DC0, 0x1405FB1F0};
float* color, Material* material)> R_AddCmdDrawStretchPic{0x17E5C0, 0x2443A0};
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{ 0x4D4100, 0x67F630 }; // H1MP(1.15)
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x4D43B0, 0x5D94A0};
WEAK symbol<int(void* font)> R_GetFontHeight{0x5EA360, 0x5D92C0};
WEAK symbol<void* (int a1)> R_DrawSomething{0x4D37B0, 0x5D8890};
WEAK symbol<void()> R_SyncRenderThread{0x4F8240, 0x5FF3A0};
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x, float y, float xScale, float yScale, float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{ 0x4F3DC0,0x6A3080 }; // H1MP(1.15)
#define R_AddCmdDrawText(TXT, MC, F, X, Y, XS, YS, R, C, S) \
H1_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, S,-1, 0, game::R_DrawSomething(S))
@ -108,140 +105,140 @@ namespace game
H1_AddBaseDrawTextCmd(TXT, MC, F, game::R_GetFontHeight(F), X, Y, XS, YS, R, C, S, CP, CC, game::R_DrawSomething(S))
WEAK symbol<unsigned int(unsigned int localId, const char* pos,
unsigned int paramcount)> VM_Execute{0x140376360, 0x140444350};
unsigned int paramcount)> VM_Execute{0x376360, 0x444350};
WEAK symbol<void(unsigned int id, scr_string_t stringValue,
unsigned int paramcount)> Scr_NotifyId{0x140375800, 0x1404437E0};
WEAK symbol<const float*(const float* v)> Scr_AllocVector{0x140370930, 0x14043E7D0};
WEAK symbol<float(int index)> Scr_GetFloat{0x140374D20, 0x140442D10};
WEAK symbol<const char*(int index)> Scr_GetString{0x140375210, 0x140443150};
WEAK symbol<int()> Scr_GetNumParam{0x140374F30, 0x140442E70};
WEAK symbol<void()> Scr_ClearOutParams{0x140374460, 0x140442510};
WEAK symbol<scr_entref_t(unsigned int entId)> Scr_GetEntityIdRef{0x140372D50, 0x140440D80};
WEAK symbol<unsigned int(int classnum, unsigned int entnum)> Scr_GetEntityId{0x140372CA0, 0x140440CD0};
unsigned int paramcount)> Scr_NotifyId{0x375800, 0x4437E0};
WEAK symbol<const float*(const float* v)> Scr_AllocVector{0x370930, 0x43E7D0};
WEAK symbol<float(int index)> Scr_GetFloat{0x374D20, 0x442D10};
WEAK symbol<const char*(int index)> Scr_GetString{0x375210, 0x443150};
WEAK symbol<int()> Scr_GetNumParam{0x374F30, 0x442E70};
WEAK symbol<void()> Scr_ClearOutParams{0x374460, 0x442510};
WEAK symbol<scr_entref_t(unsigned int entId)> Scr_GetEntityIdRef{0x372D50, 0x440D80};
WEAK symbol<unsigned int(int classnum, unsigned int entnum)> Scr_GetEntityId{0x372CA0, 0x440CD0};
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{0x1401981F0, 0x140288550};
WEAK symbol<ScreenPlacement* ()> ScrPlace_GetViewPlacement{0x1981F0, 0x288550};
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{0x14019A3B0, 0x14028BE70};
WEAK symbol<int(XAssetType type)> DB_GetXAssetTypeSize{0x19A3B0, 0x28BE70};
WEAK symbol<void(int clientNum, const char* menu,
int a3, int a4, unsigned int a5)> LUI_OpenMenu{0x14039D5F0, 0x1404CD210};
int a3, int a4, unsigned int a5)> LUI_OpenMenu{0x39D5F0, 0x4CD210};
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0x1404709C0, 0x1404C7320};
WEAK symbol<bool(int clientNum, const char* menu)> Menu_IsMenuOpenAndVisible{0x4709C0, 0x4C7320};
WEAK symbol<scr_string_t(const char* str)> SL_FindString{0x14036D700, 0x14043B470};
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{0x14036D9A0, 0x14043B840};
WEAK symbol<const char* (scr_string_t stringValue)> SL_ConvertToString{0x14036D420, 0x14043B170};
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0x1402B9F60, 0x140385330};
WEAK symbol<scr_string_t(const char* str)> SL_FindString{0x36D700, 0x43B470};
WEAK symbol<scr_string_t(const char* str, unsigned int user)> SL_GetString{0x36D9A0, 0x43B840};
WEAK symbol<const char* (scr_string_t stringValue)> SL_ConvertToString{0x36D420, 0x43B170};
WEAK symbol<int(unsigned int classnum, int entnum, int offset)> Scr_SetObjectField{0x2B9F60, 0x385330};
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{0, 0x140480860};
WEAK symbol<void(int arg, char* buffer, int bufferLength)> SV_Cmd_ArgvBuffer{0x1403446C0, 0x140404CA0};
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{0x140344740, 0x140404D20};
WEAK symbol<void()> SV_Cmd_EndTokenizedString{0x140344700, 0x140404CE0};
WEAK symbol<void(netadr_s* from)> SV_DirectConnect{0, 0x480860};
WEAK symbol<void(int arg, char* buffer, int bufferLength)> SV_Cmd_ArgvBuffer{0x3446C0, 0x404CA0};
WEAK symbol<void(const char* text_in)> SV_Cmd_TokenizeString{0x344740, 0x404D20};
WEAK symbol<void()> SV_Cmd_EndTokenizedString{0x344700, 0x404CE0};
WEAK symbol<mp::gentity_s*(const char* name)> SV_AddBot{0, 0x140480190};
WEAK symbol<bool(int clientNum)> SV_BotIsBot{0, 0x14046E6C0};
WEAK symbol<const char* ()> SV_BotGetRandomName{0, 0x14046DBA0};
WEAK symbol<int(mp::gentity_s* ent)> SV_SpawnTestClient{0, 0x1404832A0};
WEAK symbol<mp::gentity_s*(const char* name)> SV_AddBot{0, 0x480190};
WEAK symbol<bool(int clientNum)> SV_BotIsBot{0, 0x46E6C0};
WEAK symbol<const char* ()> SV_BotGetRandomName{0, 0x46DBA0};
WEAK symbol<int(mp::gentity_s* ent)> SV_SpawnTestClient{0, 0x4832A0};
WEAK symbol<const char* (int clientNum)> SV_GetGuid{0, 0x140484B90};
WEAK symbol<int(int clientNum)> SV_GetClientPing{0, 0x140484B70};
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{0x1404426D0, 0x140484C10};
WEAK symbol<void(int index, const char* string)> SV_SetConfigstring{0, 0x140486720};
WEAK symbol<bool()> SV_Loaded{0x140442F60, 0x1404864A0};
WEAK symbol<void(int clientNum, const char* reason)> SV_KickClientNum{0, 0x14047ED00};
WEAK symbol<bool(const char* map)> SV_MapExists{0, 0x14047ED60};
WEAK symbol<void(mp::client_t*, const char*, int)> SV_ExecuteClientCommand{0, 0x140481870};
WEAK symbol<void(int localClientNum)> SV_FastRestart{0, 0x14047E990};
WEAK symbol<const char* (int clientNum)> SV_GetGuid{0, 0x484B90};
WEAK symbol<int(int clientNum)> SV_GetClientPing{0, 0x484B70};
WEAK symbol<playerState_s* (int num)> SV_GetPlayerstateForClientNum{0x4426D0, 0x484C10};
WEAK symbol<void(int index, const char* string)> SV_SetConfigstring{0, 0x486720};
WEAK symbol<bool()> SV_Loaded{0x442F60, 0x4864A0};
WEAK symbol<void(int clientNum, const char* reason)> SV_KickClientNum{0, 0x47ED00};
WEAK symbol<bool(const char* map)> SV_MapExists{0, 0x47ED60};
WEAK symbol<void(mp::client_t*, const char*, int)> SV_ExecuteClientCommand{0, 0x481870};
WEAK symbol<void(int localClientNum)> SV_FastRestart{0, 0x47E990};
WEAK symbol<void(int clientNum, svscmd_type type, const char* text)> SV_GameSendServerCommand{
0x1403F3A70, 0x140484AD0
0x3F3A70, 0x484AD0
};
WEAK symbol<void()> Sys_ShowConsole{0x1403E3B90, 0x140514910};
WEAK symbol<void(const char* error, ...)> Sys_Error{0x1403E0C40, 0x140511520};
WEAK symbol<void()> Sys_ShowConsole{0x3E3B90, 0x514910};
WEAK symbol<void(const char* error, ...)> Sys_Error{0x3E0C40, 0x511520};
WEAK symbol<void(char* path, int pathSize, Sys_Folder folder, const char* filename, const char* ext)>
Sys_BuildAbsPath{0x1403CFF90, 0x140507010};
WEAK symbol<int()> Sys_Milliseconds{0x1403E2B10, 0x140513710};
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x1403580B0, 0x14042B090};
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{0x1403E2820, 0x1405133B0};
WEAK symbol<bool(const char* path)> Sys_FileExists{0x1403E0CE0, 0x1405115E0};
Sys_BuildAbsPath{0x3CFF90, 0x507010};
WEAK symbol<int()> Sys_Milliseconds{0x3E2B10, 0x513710};
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x3580B0, 0x42B090};
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{0x3E2820, 0x5133B0};
WEAK symbol<bool(const char* path)> Sys_FileExists{0x3E0CE0, 0x5115E0};
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{0, 0x140408CC0};
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{0, 0x1404086A0};
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0x14039EFF0, 0x1404CFE60};
WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{0x1403A0F20, 0x1404D21A0};
WEAK symbol<const char* (const char*)> UI_GetMapDisplayName{0, 0x408CC0};
WEAK symbol<const char* (const char*)> UI_GetGameTypeDisplayName{0, 0x4086A0};
WEAK symbol<void(unsigned int localClientNum, const char** args)> UI_RunMenuScript{0x39EFF0, 0x4CFE60};
WEAK symbol<int(const char* text, int maxChars, Font_s* font, float scale)> UI_TextWidth{0x3A0F20, 0x4D21A0};
WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x140350430, 0x14041C580};
WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x350430, 0x41C580};
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{0x140648FD4, 0x140779F64};
WEAK symbol<int(jmp_buf* Buf)> _setjmp{0x1406BFD30, 0x1407F5F90};
WEAK symbol<void* (jmp_buf* Buf, int Value)> longjmp{0x648FD4, 0x779F64};
WEAK symbol<int(jmp_buf* Buf)> _setjmp{0x6BFD30, 0x7F5F90};
/***************************************************************
* Variables
**************************************************************/
WEAK symbol<CmdArgs> sv_cmd_args{0x14AD99A10, 0x14946BA20};
WEAK symbol<CmdArgs> sv_cmd_args{0xAD99A10, 0x946BA20};
WEAK symbol<int> g_script_error_level{0x14A1917A8, 0x14A33C824};
WEAK symbol<jmp_buf> g_script_error{0x14A1917B0, 0x14A33C940};
WEAK symbol<int> g_script_error_level{0xA1917A8, 0xA33C824};
WEAK symbol<jmp_buf> g_script_error{0xA1917B0, 0xA33C940};
WEAK symbol<unsigned int> levelEntityId{0x149AF55B0, 0x149CA0730};
WEAK symbol<unsigned int> gameEntityId{0x149CA0734, 0x14B65E3B4};
WEAK symbol<unsigned int> levelEntityId{0x9AF55B0, 0x9CA0730};
WEAK symbol<unsigned int> gameEntityId{0x9CA0734, 0xB65E3B4};
WEAK symbol<const char*> command_whitelist{0x141079A60, 0x14120C360};
WEAK symbol<cmd_function_s*> cmd_functions{0x14AD99AB8, 0x14946BAC8};
WEAK symbol<CmdArgs> cmd_args{0x14AD99960, 0x14946B970};
WEAK symbol<const char*> command_whitelist{0x1079A60, 0x120C360};
WEAK symbol<cmd_function_s*> cmd_functions{ 0xAD99AB8,0x344DF18 }; // H1MP(1.15)
WEAK symbol<CmdArgs> cmd_args{0xAD99960, 0x946B970};
WEAK symbol<int> g_poolSize{0, 0x140FEADF0};
WEAK symbol<scr_classStruct_t> g_classMap{0x14080A840, 0x1412106B0};
WEAK symbol<int> g_poolSize{0, 0xFEADF0};
WEAK symbol<scr_classStruct_t> g_classMap{0x80A840, 0x12106B0};
WEAK symbol<scrVarGlob_t> scr_VarGlob{0x14B686480, 0x149CC8800};
WEAK symbol<scrVmPub_t> scr_VmPub{0x14A1938C0, 0x14A33EA40};
WEAK symbol<function_stack_t> scr_function_stack{0x14BD06C40, 0x14A348FC0};
WEAK symbol<scrVarGlob_t> scr_VarGlob{0xB686480, 0x9CC8800};
WEAK symbol<scrVmPub_t> scr_VmPub{0xA1938C0, 0xA33EA40};
WEAK symbol<function_stack_t> scr_function_stack{0xBD06C40, 0xA348FC0};
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{0x14F05CE50, 0x14FD21180};
WEAK symbol<GfxDrawMethod_s> gfxDrawMethod{0xF05CE50, 0xFD21180};
WEAK symbol<int> dvarCount{0x14C217D10, 0x14D064CF4};
WEAK symbol<dvar_t*> dvarPool{0x14C217D20, 0x14D064D00};
WEAK symbol<int> dvarCount{0xC217D10, 0xD064CF4};
WEAK symbol<dvar_t*> dvarPool{0xC217D20, 0xD064D00};
WEAK symbol<void*> DB_XAssetPool{0x140DE8C80, 0x140FEB5D0};
WEAK symbol<void*> DB_XAssetPool{0xDE8C80, 0xFEB5D0};
WEAK symbol<int> keyCatchers{0x14243DAF0, 0x142D0BA9C};
WEAK symbol<PlayerKeyState> playerKeys{0x1422A873C, 0x142C19AFC};
WEAK symbol<int> keyCatchers{0x243DAF0, 0x2D0BA9C};
WEAK symbol<PlayerKeyState> playerKeys{0x22A873C, 0x2C19AFC};
WEAK symbol<SOCKET> query_socket{0, 0x14DDFBF98};
WEAK symbol<SOCKET> query_socket{0, 0xDDFBF98};
WEAK symbol<DWORD> threadIds{0x14B19B880, 0x149810E00};
WEAK symbol<DWORD> threadIds{0xB19B880, 0x9810E00};
namespace mp
{
WEAK symbol<gentity_s> g_entities{0, 0x14621E530};
WEAK symbol<client_t> svs_clients{0, 0x14B204A10};
WEAK symbol<int> svs_numclients{0, 0x14B204A0C};
WEAK symbol<int> gameTime{0, 0x14621BDBC};
WEAK symbol<gentity_s> g_entities{ 0, 0x71F19E0 }; // H1MP(1.15)
WEAK symbol<client_t> svs_clients{0, 0xB204A10};
WEAK symbol<int> svs_numclients{0, 0xB204A0C};
WEAK symbol<int> gameTime{0, 0x621BDBC};
WEAK symbol<int> sv_serverId_value{0, 0x14A3E99B8};
WEAK symbol<int> sv_serverId_value{0, 0xA3E99B8};
WEAK symbol<bool> virtualLobby_loaded{0, 0x142D077FD};
WEAK symbol<bool> virtualLobby_loaded{0, 0x2D077FD};
}
namespace sp
{
WEAK symbol<gentity_s> g_entities{0x14550DD90, 0};
WEAK symbol<gentity_s> g_entities{0x550DD90, 0};
}
namespace hks
{
WEAK symbol<lua_State*> lua_state{0x141E2C2F8, 0x1426D3D08};
WEAK symbol<void(lua_State* s, const char* str, unsigned int l)> hksi_lua_pushlstring{0x14004DA90, 0x1400624F0};
WEAK symbol<HksObject*(HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_getfield{0x14009C0A0, 0x14012C600};
WEAK symbol<void(lua_State* s, const HksObject* tbl, const HksObject* key, const HksObject* val)> hks_obj_settable{0x14009D240, 0x14012D820};
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_gettable{0x14009C580, 0x14012CAE0};
WEAK symbol<void(lua_State* s, int nargs, int nresults, const unsigned int* pc)> vm_call_internal{0x1400C87A0, 0x140159EB0};
WEAK symbol<HashTable*(lua_State* s, unsigned int arraySize, unsigned int hashSize)> Hashtable_Create{0x14008B3B0, 0x14011B320};
WEAK symbol<lua_State*> lua_state{0x1E2C2F8, 0x26D3D08};
WEAK symbol<void(lua_State* s, const char* str, unsigned int l)> hksi_lua_pushlstring{0x4DA90, 0x624F0};
WEAK symbol<HksObject*(HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_getfield{0x9C0A0, 0x12C600};
WEAK symbol<void(lua_State* s, const HksObject* tbl, const HksObject* key, const HksObject* val)> hks_obj_settable{0x9D240, 0x12D820};
WEAK symbol<HksObject* (HksObject* result, lua_State* s, const HksObject* table, const HksObject* key)> hks_obj_gettable{0x9C580, 0x12CAE0};
WEAK symbol<void(lua_State* s, int nargs, int nresults, const unsigned int* pc)> vm_call_internal{0xC87A0, 0x159EB0};
WEAK symbol<HashTable*(lua_State* s, unsigned int arraySize, unsigned int hashSize)> Hashtable_Create{0x8B3B0, 0x11B320};
WEAK symbol<cclosure*(lua_State* s, lua_function function, int num_upvalues,
int internal_, int profilerTreatClosureAsFunc)> cclosure_Create{0x14008B5D0, 0x14011B540};
WEAK symbol<int(lua_State* s, int t)> hksi_luaL_ref{0x1400A64D0, 0x140136D30};
WEAK symbol<void(lua_State* s, int t, int ref)> hksi_luaL_unref{0x14009EF10, 0x14012F610};
int internal_, int profilerTreatClosureAsFunc)> cclosure_Create{0x8B5D0, 0x11B540};
WEAK symbol<int(lua_State* s, int t)> hksi_luaL_ref{0xA64D0, 0x136D30};
WEAK symbol<void(lua_State* s, int t, int ref)> hksi_luaL_unref{0x9EF10, 0x12F610};
}
}