L L4D2node

CRegistry::ReadString

0x000dac90 · 154 bytes · __thiscall

_ZN9CRegistry10ReadStringEPKcS1_S1_

Decompiled

undefined (4 params)

/* CRegistry::ReadString(char const*, char const*, char const*) */

void __thiscall CRegistry::ReadString(CRegistry *this,char *param_1,char *param_2,char *param_3)

{
  int iVar1;
  code *pcVar2;
  int iVar3;
  char *pcVar4;
  size_t sVar5;
  size_t sVar6;
  int in_GS_OFFSET;
  int iStack_50;
  char *local_34;
  char *local_30 [4];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_34 = param_3;
  local_30[0] = param_1;
  iStack_50 = 0xdacbe;
  sVar5 = strlen(param_1);
  iStack_50 = 0xdacc8;
  sVar6 = strlen(param_2);
  pcVar4 = local_30[0];
  iVar3 = -((sVar6 + sVar5 + 0x11 & 0xfffffff0) + 0x10);
  *(char **)(&stack0xffffffc4 + iVar3) = param_2;
  *(char **)(&stack0xffffffc0 + iVar3) = pcVar4;
  *(char **)(&stack0xffffffbc + iVar3) = "%s\\%s";
  *(size_t *)(&stack0xffffffb8 + iVar3) = sVar6 + sVar5 + 2;
  *(int *)((int)local_30 + iVar3 + -0x1c) = (int)local_30 + iVar3;
  *(undefined4 *)((int)&iStack_50 + iVar3) = 0xdacfe;
  V_snprintf(*(char **)((int)local_30 + iVar3 + -0x1c),*(int *)(&stack0xffffffb8 + iVar3),
             *(char **)(&stack0xffffffbc + iVar3));
  pcVar4 = local_34;
  iVar1 = *(int *)this;
  *(int *)(&stack0xffffffb8 + iVar3) = (int)local_30 + iVar3;
  *(CRegistry **)((int)local_30 + iVar3 + -0x1c) = this;
  *(char **)(&stack0xffffffbc + iVar3) = pcVar4;
  pcVar2 = *(code **)(iVar1 + 0x18);
  *(undefined4 *)((int)&iStack_50 + iVar3) = 0xdad11;
  (*pcVar2)();
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  *(undefined **)((int)&iStack_50 + iVar3) = &UNK_000dad2a;
  __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)