L L4D2node

CGameServer::CreateEngineStringTables

0x001fefd0 · 814 bytes · __thiscall

_ZN11CGameServer24CreateEngineStringTablesEv

Decompiled

undefined (1 param)

/* CGameServer::CreateEngineStringTables() */

void __thiscall CGameServer::CreateEngineStringTables(CGameServer *this)

{
  INetworkStringTable *pIVar1;
  undefined4 uVar2;
  int iVar3;
  CDownloadListGenerator *this_00;
  int iVar4;
  int in_GS_OFFSET;
  CGameServer *this_01;
  char local_28 [8];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  CNetworkStringTableContainer::SetTick
            (*(CNetworkStringTableContainer **)(this + 0xbc),*(int *)(this + 0xc));
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"downloadables",0x2000,0,0,1);
  *(undefined4 *)(this + 0xd0) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"modelprecache",0x800,1,2,1);
  *(undefined4 *)(this + 0x2d364) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"genericprecache",0x200,1,2,1);
  *(undefined4 *)(this + 0x2d36c) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"soundprecache",20000,1,2,1);
  *(undefined4 *)(this + 0x2d368) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"decalprecache",0x200,1,2,1);
  *(undefined4 *)(this + 0x2d370) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"instancebaseline",0x400,0,0,0);
  *(undefined4 *)(this + 0xc0) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))
                    (*(int **)(this + 0xbc),"lightstyles",0x40,0,0,0);
  *(undefined4 *)(this + 0xc4) = uVar2;
  uVar2 = (**(code **)(**(int **)(this + 0xbc) + 8))(*(int **)(this + 0xbc),"userinfo",0x20,0,0,0);
  *(undefined4 *)(this + 200) = uVar2;
  this_01 = *(CGameServer **)(this + 0xbc);
  iVar3 = (**(code **)(*(int *)this_01 + 8))(this_01,"server_query_info",4,0,0,0);
  *(int *)(this + 0xcc) = iVar3;
  if (iVar3 != 0) {
    SetQueryPortFromSteamServer(this_01);
  }
  CopyPureServerWhitelistToStringTable(this);
  iVar3 = 0;
  do {
    iVar4 = iVar3 + 1;
    V_snprintf(local_28,8,"%i",iVar3);
    (**(code **)(**(int **)(this + 0xc4) + 0x24))(*(int **)(this + 0xc4),1,local_28,0xffffffff,0);
    iVar3 = iVar4;
  } while (iVar4 != 0x40);
  iVar3 = 0;
  do {
    iVar4 = iVar3 + 1;
    V_snprintf(local_28,8,"%i",iVar3);
    (**(code **)(**(int **)(this + 200) + 0x24))(*(int **)(this + 200),1,local_28,0xffffffff,0);
    iVar3 = iVar4;
  } while (iVar4 != 0x20);
  pIVar1 = *(INetworkStringTable **)(this + 0xd0);
  this_00 = (CDownloadListGenerator *)DownloadListGenerator();
  CDownloadListGenerator::SetStringTable(this_00,pIVar1);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)