DecodeICE
0x00bbb2d0 · 248 bytes · __cdecl
_Z9DecodeICEPhiPKh
Decompiled
undefined (3 params)
/* DecodeICE(unsigned char*, int, unsigned char const*) */
void DecodeICE(uchar *param_1,int param_2,uchar *param_3)
{
int iVar1;
uint uVar2;
IceKey *pIVar3;
int iVar4;
int in_GS_OFFSET;
int iStackY_50;
uint local_40;
uint local_3c;
uchar *local_38;
int local_34;
uchar *local_30;
IceKey local_2c [12];
int local_20;
pIVar3 = (IceKey *)&stack0xffffffb4;
local_38 = param_1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_3 != (uchar *)0x0) {
iStackY_50 = 0xbbb30a;
IceKey::IceKey(local_2c,0);
iStackY_50 = 0xbbb316;
IceKey::set(local_2c,param_3);
uVar2 = param_2 + 7U;
if ((int)(param_2 + 7U) < 0) {
uVar2 = param_2 + 0xe;
}
iVar1 = -(((uVar2 & 0xfffffff8) + 0xf & 0xfffffff0) + 0x10);
pIVar3 = local_2c + iVar1 + -0x20;
iVar4 = (int)&local_40 + iVar1;
local_34 = iVar4;
if (param_2 < 8) {
iVar4 = 0;
}
else {
local_40 = param_2 - 8U;
local_3c = param_2 - 8U >> 3;
local_30 = param_1 + local_3c * 8 + 8;
do {
*(int *)(&stack0xffffffbc + iVar1) = iVar4;
iVar4 = iVar4 + 8;
*(uchar **)(local_2c + iVar1 + -0x1c) = param_1;
param_1 = param_1 + 8;
*(IceKey **)(local_2c + iVar1 + -0x20) = local_2c;
*(undefined4 *)((int)&iStackY_50 + iVar1) = 0xbbb376;
IceKey::decrypt(*(IceKey **)(local_2c + iVar1 + -0x20),*(uchar **)(local_2c + iVar1 + -0x1c)
,*(uchar **)(&stack0xffffffbc + iVar1));
} while (param_1 != local_30);
iVar4 = param_2 - (local_40 + local_3c * -8);
}
*(int *)(&stack0xffffffbc + iVar1) = iVar4;
*(int *)(local_2c + iVar1 + -0x1c) = local_34;
*(uchar **)(local_2c + iVar1 + -0x20) = local_38;
/* try { // try from 00bbb39e to 00bbb3a2 has its CatchHandler @ 00bbb3c8 */
*(undefined4 *)((int)&iStackY_50 + iVar1) = 0xbbb3a3;
_V_memcpy(*(void **)(local_2c + iVar1 + -0x20),*(void **)(local_2c + iVar1 + -0x1c),
*(int *)(&stack0xffffffbc + iVar1));
*(IceKey **)(local_2c + iVar1 + -0x20) = local_2c;
*(undefined4 *)((int)&iStackY_50 + iVar1) = 0xbbb3ab;
IceKey::~IceKey(*(IceKey **)(local_2c + iVar1 + -0x20));
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined1 **)(pIVar3 + -4) = &LAB_00bbb3c8;
__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.