HidingSpot::Save
0x0073edd0 · 941 bytes · __cdecl
_ZNK10HidingSpot4SaveER10CUtlBufferj
Decompiled
undefined (2 params)
/* HidingSpot::Save(CUtlBuffer&, unsigned int) const */
void HidingSpot::Save(CUtlBuffer *param_1,uint param_2)
{
byte bVar1;
CUtlBuffer CVar2;
undefined4 uVar3;
char cVar4;
int iVar5;
void *pvVar6;
float fVar7;
undefined1 local_30;
undefined1 uStack_2f;
undefined1 uStack_2e;
undefined1 uStack_2d;
undefined1 local_2c;
undefined1 uStack_2b;
undefined1 uStack_2a;
undefined1 uStack_29;
undefined1 local_28;
undefined1 uStack_27;
undefined1 uStack_26;
undefined1 uStack_25;
undefined1 local_24;
undefined1 uStack_23;
undefined1 uStack_22;
undefined1 uStack_21;
undefined1 local_20;
undefined1 local_1f;
undefined1 local_1e;
undefined1 local_1d;
uVar3 = *(undefined4 *)(param_1 + 0x10);
if ((*(byte *)(param_2 + 0x15) & 1) == 0) {
cVar4 = CUtlBuffer::CheckPut((CUtlBuffer *)param_2,4);
if (cVar4 == '\0') goto LAB_0073ee00;
if ((*(byte *)(param_2 + 0x34) & 1) == 0) {
*(undefined4 *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) =
uVar3;
iVar5 = *(int *)(param_2 + 0x10);
}
else {
iVar5 = *(int *)(param_2 + 0x10);
pvVar6 = (void *)((iVar5 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar6 != (void *)0x0) {
uStack_2d = (undefined1)((uint)uVar3 >> 0x18);
local_20 = uStack_2d;
uStack_2e = (undefined1)((uint)uVar3 >> 0x10);
local_1f = uStack_2e;
uStack_2f = (undefined1)((uint)uVar3 >> 8);
local_1e = uStack_2f;
local_30 = (undefined1)uVar3;
local_1d = local_30;
_V_memcpy(pvVar6,&local_20,4);
iVar5 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar5 + 4;
CUtlBuffer::AddNullTermination((CUtlBuffer *)param_2);
fVar7 = *(float *)(param_1 + 4);
if ((*(byte *)(param_2 + 0x15) & 1) != 0) goto LAB_0073ee0f;
LAB_0073ef00:
cVar4 = CUtlBuffer::CheckPut((CUtlBuffer *)param_2,4);
if (cVar4 == '\0') goto LAB_0073ee2b;
if ((*(byte *)(param_2 + 0x34) & 1) == 0) {
*(float *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = fVar7;
iVar5 = *(int *)(param_2 + 0x10);
}
else {
iVar5 = *(int *)(param_2 + 0x10);
pvVar6 = (void *)((iVar5 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar6 != (void *)0x0) {
uStack_29 = (undefined1)((uint)fVar7 >> 0x18);
local_20 = uStack_29;
uStack_2a = (undefined1)((uint)fVar7 >> 0x10);
local_1f = uStack_2a;
uStack_2b = (undefined1)((uint)fVar7 >> 8);
local_1e = uStack_2b;
local_2c = SUB41(fVar7,0);
local_1d = local_2c;
_V_memcpy(pvVar6,&local_20,4);
iVar5 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar5 + 4;
CUtlBuffer::AddNullTermination((CUtlBuffer *)param_2);
fVar7 = *(float *)(param_1 + 8);
if ((*(byte *)(param_2 + 0x15) & 1) == 0) goto LAB_0073ef5e;
LAB_0073ee3a:
CUtlBuffer::Printf((CUtlBuffer *)param_2,"%f",(double)fVar7);
LAB_0073ee56:
fVar7 = *(float *)(param_1 + 0xc);
if ((*(byte *)(param_2 + 0x15) & 1) == 0) goto LAB_0073efbc;
LAB_0073ee65:
CUtlBuffer::Printf((CUtlBuffer *)param_2,"%f",(double)fVar7);
}
else {
CUtlBuffer::Printf((CUtlBuffer *)param_2,"%u",uVar3);
LAB_0073ee00:
fVar7 = *(float *)(param_1 + 4);
if ((*(byte *)(param_2 + 0x15) & 1) == 0) goto LAB_0073ef00;
LAB_0073ee0f:
CUtlBuffer::Printf((CUtlBuffer *)param_2,"%f",(double)fVar7);
LAB_0073ee2b:
fVar7 = *(float *)(param_1 + 8);
if ((*(byte *)(param_2 + 0x15) & 1) != 0) goto LAB_0073ee3a;
LAB_0073ef5e:
cVar4 = CUtlBuffer::CheckPut((CUtlBuffer *)param_2,4);
if (cVar4 == '\0') goto LAB_0073ee56;
if ((*(byte *)(param_2 + 0x34) & 1) == 0) {
*(float *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = fVar7;
iVar5 = *(int *)(param_2 + 0x10);
}
else {
iVar5 = *(int *)(param_2 + 0x10);
pvVar6 = (void *)((iVar5 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar6 != (void *)0x0) {
uStack_25 = (undefined1)((uint)fVar7 >> 0x18);
local_20 = uStack_25;
uStack_26 = (undefined1)((uint)fVar7 >> 0x10);
local_1f = uStack_26;
uStack_27 = (undefined1)((uint)fVar7 >> 8);
local_1e = uStack_27;
local_28 = SUB41(fVar7,0);
local_1d = local_28;
_V_memcpy(pvVar6,&local_20,4);
iVar5 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar5 + 4;
CUtlBuffer::AddNullTermination((CUtlBuffer *)param_2);
fVar7 = *(float *)(param_1 + 0xc);
if ((*(byte *)(param_2 + 0x15) & 1) != 0) goto LAB_0073ee65;
LAB_0073efbc:
cVar4 = CUtlBuffer::CheckPut((CUtlBuffer *)param_2,4);
if (cVar4 != '\0') {
if ((*(byte *)(param_2 + 0x34) & 1) == 0) {
*(float *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) = fVar7;
iVar5 = *(int *)(param_2 + 0x10);
}
else {
iVar5 = *(int *)(param_2 + 0x10);
pvVar6 = (void *)((iVar5 - *(int *)(param_2 + 0x20)) + *(int *)param_2);
if (pvVar6 != (void *)0x0) {
uStack_21 = (undefined1)((uint)fVar7 >> 0x18);
local_20 = uStack_21;
uStack_22 = (undefined1)((uint)fVar7 >> 0x10);
local_1f = uStack_22;
uStack_23 = (undefined1)((uint)fVar7 >> 8);
local_1e = uStack_23;
local_24 = SUB41(fVar7,0);
local_1d = local_24;
_V_memcpy(pvVar6,&local_20,4);
iVar5 = *(int *)(param_2 + 0x10);
}
}
*(int *)(param_2 + 0x10) = iVar5 + 4;
CUtlBuffer::AddNullTermination((CUtlBuffer *)param_2);
bVar1 = *(byte *)(param_2 + 0x15);
CVar2 = param_1[0x1c];
goto joined_r0x0073f013;
}
}
bVar1 = *(byte *)(param_2 + 0x15);
CVar2 = param_1[0x1c];
joined_r0x0073f013:
if ((bVar1 & 1) == 0) {
cVar4 = CUtlBuffer::CheckPut((CUtlBuffer *)param_2,1);
if (cVar4 != '\0') {
*(CUtlBuffer *)(*(int *)param_2 + (*(int *)(param_2 + 0x10) - *(int *)(param_2 + 0x20))) =
CVar2;
*(int *)(param_2 + 0x10) = *(int *)(param_2 + 0x10) + 1;
CUtlBuffer::AddNullTermination((CUtlBuffer *)param_2);
return;
}
}
else {
CUtlBuffer::Printf((CUtlBuffer *)param_2,"%u",(uint)(byte)CVar2);
}
return;
}
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.