LzmaDecodeProperties
0x00252c30 · 106 bytes · __cdecl
_Z20LzmaDecodePropertiesP16_CLzmaPropertiesPKhi
Decompiled
undefined (3 params)
/* LzmaDecodeProperties(_CLzmaProperties*, unsigned char const*, int) */
undefined4 LzmaDecodeProperties(_CLzmaProperties *param_1,uchar *param_2,int param_3)
{
undefined4 uVar1;
int iVar2;
int iVar3;
byte bVar4;
uVar1 = 1;
if (4 < param_3) {
bVar4 = *param_2;
if (bVar4 < 0xe1) {
*(undefined4 *)(param_1 + 8) = 0;
if (0x2c < bVar4) {
iVar2 = 0;
do {
bVar4 = bVar4 - 0x2d;
iVar2 = iVar2 + 1;
} while (0x2c < bVar4);
*(int *)(param_1 + 8) = iVar2;
}
*(undefined4 *)(param_1 + 4) = 0;
if (8 < bVar4) {
iVar2 = 1;
do {
iVar3 = iVar2;
bVar4 = bVar4 - 9;
iVar2 = iVar3 + 1;
} while (8 < bVar4);
*(int *)(param_1 + 4) = iVar3;
}
uVar1 = 0;
*(uint *)param_1 = (uint)bVar4;
}
}
return uVar1;
}
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.