CVariantBase<CVariantDefaultAllocator>::CopyData
0x00375ac4 · 57 bytes · __regparm3
_ZN12CVariantBaseI24CVariantDefaultAllocatorE8CopyDataEPKcb.part.111
Decompiled
undefined (2 params)
/* CVariantBase<CVariantDefaultAllocator>::CopyData(char const*, bool) [clone .part.111] */
void __regparm3 CVariantBase<CVariantDefaultAllocator>::CopyData(char *param_1,bool param_2)
{
int iVar1;
char *pcVar2;
size_t __size;
undefined3 in_register_00000009;
char *pcVar3;
byte bVar4;
bVar4 = 0;
iVar1 = _V_strlen((char *)CONCAT31(in_register_00000009,param_2));
__size = iVar1 + 1;
pcVar2 = malloc(__size);
*(char **)param_1 = pcVar2;
pcVar3 = (char *)CONCAT31(in_register_00000009,param_2);
for (; __size != 0; __size = __size - 1) {
*pcVar2 = *pcVar3;
pcVar3 = pcVar3 + (uint)bVar4 * -2 + 1;
pcVar2 = pcVar2 + (uint)bVar4 * -2 + 1;
}
*(ushort *)(param_1 + 10) = *(ushort *)(param_1 + 10) | 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.