bf_write::WriteLongLong
0x000998b0 · 291 bytes · __cdecl
_ZN8bf_write13WriteLongLongEx
Decompiled
undefined (1 param)
/* bf_write::WriteLongLong(long long) */
void bf_write::WriteLongLong(longlong param_1)
{
int iVar1;
uint uVar2;
uint uVar3;
uint *puVar4;
int iVar5;
uint in_stack_0000000c;
uVar2 = ((int *)param_1)[3];
uVar3 = ((int *)param_1)[2];
if ((int)uVar3 < (int)(uVar2 + 0x20)) {
((int *)param_1)[3] = uVar3;
*(undefined1 *)((int *)param_1 + 4) = 1;
uVar2 = uVar3;
}
else {
iVar1 = ((int)uVar2 >> 5) * 4;
uVar2 = uVar2 & 0x1f;
puVar4 = (uint *)(*(int *)param_1 + iVar1);
*puVar4 = *puVar4 & *(uint *)(&DAT_000d6b40 + uVar2 * 0x84) | param_1._4_4_ << (sbyte)uVar2;
iVar5 = 0x20 - uVar2;
if (iVar5 != 0x20) {
puVar4 = (uint *)(*(int *)param_1 + 4 + iVar1);
*puVar4 = (&g_BitWriteMasks)[0x20 - iVar5] & *puVar4 | param_1._4_4_ >> ((byte)iVar5 & 0x1f);
}
iVar1 = ((int *)param_1)[3];
uVar3 = ((int *)param_1)[2];
((int *)param_1)[3] = iVar1 + 0x20U;
uVar2 = iVar1 + 0x20U;
}
if ((int)(uVar2 + 0x20) <= (int)uVar3) {
iVar1 = ((int)uVar2 >> 5) * 4;
uVar2 = uVar2 & 0x1f;
puVar4 = (uint *)(*(int *)param_1 + iVar1);
*puVar4 = *puVar4 & *(uint *)(&DAT_000d6b40 + uVar2 * 0x84) | in_stack_0000000c << (sbyte)uVar2;
iVar5 = 0x20 - uVar2;
if (iVar5 != 0x20) {
puVar4 = (uint *)(*(int *)param_1 + 4 + iVar1);
*puVar4 = (&g_BitWriteMasks)[0x20 - iVar5] & *puVar4 |
in_stack_0000000c >> ((byte)iVar5 & 0x1f);
}
((int *)param_1)[3] = ((int *)param_1)[3] + 0x20;
return;
}
((int *)param_1)[3] = uVar3;
*(undefined1 *)((int *)param_1 + 4) = 1;
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.