AreBitArraysEqual
0x00142160 · 150 bytes · __cdecl
_Z17AreBitArraysEqualPKvS0_i
Decompiled
undefined (3 params)
/* AreBitArraysEqual(void const*, void const*, int) */
undefined4 AreBitArraysEqual(void *param_1,void *param_2,int param_3)
{
int iVar1;
uint uVar2;
undefined4 uVar3;
size_t __n;
__n = param_3 >> 3;
iVar1 = memcmp(param_1,param_2,__n);
uVar3 = 0;
if (iVar1 == 0) {
iVar1 = __n * 8;
if (iVar1 < param_3) {
if ((*(byte *)((int)param_2 + __n) & 1) != (*(byte *)((int)param_1 + __n) & 1)) {
return 0;
}
while (iVar1 = iVar1 + 1, iVar1 != param_3) {
uVar2 = 1 << ((byte)iVar1 & 7);
if ((*(byte *)((int)param_1 + (iVar1 >> 3)) & uVar2) !=
(*(byte *)((int)param_2 + (iVar1 >> 3)) & uVar2)) {
return 0;
}
}
}
uVar3 = 1;
}
return uVar3;
}
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.