Unserialize
0x00bdd5f0 · 150 bytes · __cdecl
_Z11UnserializeR10CUtlBufferR10UniqueId_t
Decompiled
undefined (2 params)
/* Unserialize(CUtlBuffer&, UniqueId_t&) */
bool Unserialize(CUtlBuffer *param_1,UniqueId_t *param_2)
{
int iVar1;
int iVar2;
undefined1 *puVar3;
int in_GS_OFFSET;
undefined4 uStackY_40;
undefined1 local_30 [16];
int local_20;
puVar3 = &stack0xffffffc4;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (((byte)param_1[0x15] & 1) == 0) {
uStackY_40 = 0xbdd624;
CUtlBuffer::Get(param_1,param_2,0x10);
}
else {
uStackY_40 = 0xbdd648;
iVar2 = CUtlBuffer::PeekStringLength(param_1);
iVar1 = -((iVar2 + 0xfU & 0xfffffff0) + 0x10);
puVar3 = &stack0xffffffc4 + iVar1;
*(int *)(&stack0xffffffcc + iVar1) = iVar2;
*(CUtlBuffer **)(&stack0xffffffc4 + iVar1) = param_1;
*(undefined1 **)(&stack0xffffffc8 + iVar1) = local_30 + iVar1;
*(undefined4 *)((int)&uStackY_40 + iVar1) = 0xbdd66d;
CUtlBuffer::GetString
(*(CUtlBuffer **)(&stack0xffffffc4 + iVar1),*(char **)(&stack0xffffffc8 + iVar1),
*(uint *)(&stack0xffffffcc + iVar1));
*(undefined1 **)(&stack0xffffffc8 + iVar1) = local_30 + iVar1;
*(UniqueId_t **)(&stack0xffffffc4 + iVar1) = param_2;
*(int *)(&stack0xffffffcc + iVar1) = iVar2;
*(undefined4 *)((int)&uStackY_40 + iVar1) = 0xbdd680;
UniqueIdFromString(*(UniqueId_t **)(&stack0xffffffc4 + iVar1),
*(char **)(&stack0xffffffc8 + iVar1),*(int *)(&stack0xffffffcc + iVar1));
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return param_1[0x14] == (CUtlBuffer)0x0;
}
/* WARNING: Subroutine does not return */
*(undefined **)(puVar3 + -4) = &UNK_00bdd687;
__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.