L L4D2node

Host_ReadPreStartupConfiguration

0x00175ea0 · 264 bytes · unknown

_Z32Host_ReadPreStartupConfigurationv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Host_ReadPreStartupConfiguration() */

void Host_ReadPreStartupConfiguration(void)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  char *pcVar4;
  char *pcVar5;
  int *piVar6;
  
  iVar2 = (**(code **)(*(int *)(g_pFileSystem + 4) + 8))
                    (g_pFileSystem + 4,"//mod/cfg/config.cfg","rt",0);
  if (iVar2 != 0) {
    iVar3 = (**(code **)(*(int *)(g_pFileSystem + 4) + 0x18))(g_pFileSystem + 4,iVar2);
    pcVar4 = operator_new__(iVar3 + 1);
    (*(code *)**(undefined4 **)(g_pFileSystem + 4))(g_pFileSystem + 4,pcVar4,iVar3,iVar2);
    pcVar4[iVar3] = '\0';
    iVar3 = 0;
    (**(code **)(*(int *)(g_pFileSystem + 4) + 0xc))(g_pFileSystem + 4,iVar2);
    do {
      pcVar1 = (&Host_ReadPreStartupConfiguration()::s_PreStartupConfigConVars)[iVar3];
      pcVar5 = (char *)V_stristr(pcVar4,pcVar1);
      if (pcVar5 != (char *)0x0) {
        pcVar5 = (char *)COM_Parse(pcVar5);
        COM_Parse(pcVar5);
        piVar6 = (int *)(**(code **)(*g_pCVar + 0x30))(g_pCVar,pcVar1);
        if (piVar6 != (int *)0x0) {
          (**(code **)(*piVar6 + 0x3c))(piVar6,&com_token);
        }
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != 6);
    if (pcVar4 != (char *)0x0) {
      operator_delete__(pcVar4);
    }
  }
  return;
}

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)