IceKey::IceKey
0x00bbac70 · 538 bytes · __thiscall
_ZN6IceKeyC2Ei
Decompiled
undefined (2 params)
/* IceKey::IceKey(int) */
void __thiscall IceKey::IceKey(IceKey *this,int param_1)
{
void *pvVar1;
int iVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint *puVar6;
uint uVar7;
uint uVar8;
if (ice_sboxes_initialised == 0) {
uVar5 = 0;
do {
uVar4 = (int)uVar5 >> 1 & 0xff;
uVar7 = 0;
uVar8 = (int)(uVar5 & 0x200) >> 8 | uVar5 & 1;
if ((uVar4 ^ (&ice_sxor)[uVar8]) != 0) {
iVar2 = gf_exp7(uVar4 ^ (&ice_sxor)[uVar8],(&ice_smod)[uVar8]);
uVar3 = iVar2 << 0x18;
if (uVar3 != 0) {
puVar6 = &ice_pbox;
do {
if ((uVar3 & 1) != 0) {
uVar7 = uVar7 | *puVar6;
}
puVar6 = puVar6 + 1;
uVar3 = uVar3 >> 1;
} while (uVar3 != 0);
}
}
(&ice_sbox)[uVar5] = uVar7;
uVar7 = 0;
if ((uVar4 ^ (&ice_sxor)[uVar8 + 4]) != 0) {
iVar2 = gf_exp7(uVar4 ^ (&ice_sxor)[uVar8 + 4],(&ice_smod)[uVar8 + 4]);
uVar3 = iVar2 << 0x10;
if (uVar3 != 0) {
puVar6 = &ice_pbox;
do {
if ((uVar3 & 1) != 0) {
uVar7 = uVar7 | *puVar6;
}
puVar6 = puVar6 + 1;
uVar3 = uVar3 >> 1;
} while (uVar3 != 0);
}
}
(&DAT_01050920)[uVar5] = uVar7;
uVar7 = 0;
if ((uVar4 ^ (&ice_sxor)[uVar8 + 8]) != 0) {
iVar2 = gf_exp7(uVar4 ^ (&ice_sxor)[uVar8 + 8],(&ice_smod)[uVar8 + 8]);
uVar3 = iVar2 << 8;
if (uVar3 != 0) {
puVar6 = &ice_pbox;
do {
if ((uVar3 & 1) != 0) {
uVar7 = uVar7 | *puVar6;
}
puVar6 = puVar6 + 1;
uVar3 = uVar3 >> 1;
} while (uVar3 != 0);
}
}
(&DAT_01051920)[uVar5] = uVar7;
uVar7 = 0;
if (((uVar4 ^ (&ice_sxor)[uVar8 + 0xc]) != 0) &&
(uVar4 = gf_exp7(uVar4 ^ (&ice_sxor)[uVar8 + 0xc],(&ice_smod)[uVar8 + 0xc]), uVar4 != 0)) {
puVar6 = &ice_pbox;
do {
if ((uVar4 & 1) != 0) {
uVar7 = uVar7 | *puVar6;
}
puVar6 = puVar6 + 1;
uVar4 = uVar4 >> 1;
} while (uVar4 != 0);
}
(&DAT_01052920)[uVar5] = uVar7;
uVar5 = uVar5 + 1;
} while (uVar5 != 0x400);
ice_sboxes_initialised = 1;
}
if (param_1 < 1) {
*(undefined4 *)this = 1;
uVar5 = 0x60;
*(undefined4 *)(this + 4) = 8;
}
else {
uVar5 = 0xffffffff;
*(int *)this = param_1;
*(int *)(this + 4) = param_1 * 0x10;
if ((uint)(param_1 * 0x10) < 0xaa00001) {
uVar5 = param_1 * 0xc0;
}
}
pvVar1 = operator_new__(uVar5);
*(void **)(this + 8) = pvVar1;
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.