CMapReslistGenerator::BuildEngineLogFromReslist
0x0018cb20 · 446 bytes · __thiscall
_ZN20CMapReslistGenerator25BuildEngineLogFromReslistEv
Decompiled
undefined (1 param)
/* CMapReslistGenerator::BuildEngineLogFromReslist() */
void __thiscall CMapReslistGenerator::BuildEngineLogFromReslist(CMapReslistGenerator *this)
{
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*this_00;
code *pcVar1;
char cVar2;
undefined4 uVar3;
int iVar4;
int in_GS_OFFSET;
CUtlString local_284 [16];
CUtlString local_274 [16];
CUtlBuffer local_264 [56];
characterset_t local_22c [256];
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
this_00 = (CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*)(this + 0x198);
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::RemoveAll(this_00);
CUtlBuffer::CUtlBuffer(local_264,0,0,1);
pcVar1 = *(code **)(*(int *)(g_pFileSystem + 4) + 0x38);
/* try { // try from 0018cb88 to 0018cc2b has its CatchHandler @ 0018cd21 */
uVar3 = CUtlString::Get((CUtlString *)(this + 0x1bc));
CFmtStrN<256>::CFmtStrN(local_12c,"%s\\%s",uVar3,"engine.lst");
cVar2 = (*pcVar1)(g_pFileSystem + 4,local_127,"DEFAULT_WRITE_PATH",local_264,0,0,0);
if (cVar2 != '\0') {
CharacterSetBuild(local_22c,"");
while( true ) {
/* try { // try from 0018cc74 to 0018ccc1 has its CatchHandler @ 0018cd21 */
iVar4 = CUtlBuffer::ParseToken(local_264,local_22c,(char *)local_12c,0x104,true);
if (iVar4 < 1) break;
CUtlString::CUtlString(local_284,(char *)local_12c);
/* try { // try from 0018cc39 to 0018cc3d has its CatchHandler @ 0018cd13 */
iVar4 = CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::Find(this_00,local_284);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_284);
if (iVar4 == -1) {
CUtlString::CUtlString(local_274,(char *)local_12c);
/* try { // try from 0018ccd5 to 0018ccd9 has its CatchHandler @ 0018cced */
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::Insert(this_00,local_274);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_274);
}
}
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_264);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.