L L4D2node

CRegistry::WriteInt

0x000dabf0 · 148 bytes · __thiscall

_ZN9CRegistry8WriteIntEPKcS1_i

Decompiled

undefined (4 params)

/* CRegistry::WriteInt(char const*, char const*, int) */

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

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