MD5_PseudoRandom
0x00245e20 · 124 bytes · __cdecl
_Z16MD5_PseudoRandomj
Decompiled
undefined (1 param)
/* MD5_PseudoRandom(unsigned int) */
undefined4 MD5_PseudoRandom(uint param_1)
{
int iVar1;
MD5Context_t *pMVar2;
int in_GS_OFFSET;
uchar local_78 [6];
undefined4 local_72;
undefined4 local_68 [22];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
pMVar2 = (MD5Context_t *)local_68;
for (iVar1 = 0x16; iVar1 != 0; iVar1 = iVar1 + -1) {
*(undefined4 *)pMVar2 = 0;
pMVar2 = pMVar2 + 4;
}
local_68[0] = 0x67452301;
local_68[1] = 0xefcdab89;
local_68[2] = 0x98badcfe;
local_68[3] = 0x10325476;
MD5Update((MD5Context_t *)local_68,(uchar *)¶m_1,4);
MD5Final(local_78,(MD5Context_t *)local_68);
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return local_72;
}
/* WARNING: Subroutine does not return */
__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.