CUtlHash<CGameSaveRestoreInfo::CHashElement,CGameSaveRestoreInfo::CHashFuncs,CGameSaveRestoreInfo::CHashFuncs>::CUtlHash
0x004ad3e0 · 206 bytes · __cdecl
_ZN8CUtlHashIN20CGameSaveRestoreInfo12CHashElementENS0_10CHashFuncsES2_EC1EiiiS2_S2_
Decompiled
undefined (5 params)
/* CUtlHash<CGameSaveRestoreInfo::CHashElement, CGameSaveRestoreInfo::CHashFuncs,
CGameSaveRestoreInfo::CHashFuncs>::CUtlHash(int, int, int, CGameSaveRestoreInfo::CHashFuncs,
CGameSaveRestoreInfo::CHashFuncs) */
void CUtlHash<CGameSaveRestoreInfo::CHashElement,CGameSaveRestoreInfo::CHashFuncs,CGameSaveRestoreInfo::CHashFuncs>
::CUtlHash(CUtlVector<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,CUtlMemory<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,int>>
*param_1,uint param_2,undefined4 param_3,int param_4)
{
CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>
*this;
uint uVar1;
int iVar2;
CUtlVector<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,CUtlMemory<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,int>>
CVar3;
if (0x10000 < (int)param_2) {
param_2 = 0x10000;
}
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 0;
*(undefined4 *)(param_1 + 0x10) = 0;
/* try { // try from 004ad42a to 004ad494 has its CatchHandler @ 004ad4c0 */
CUtlVector<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,CUtlMemory<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,int>>
::SetCount(param_1,param_2);
uVar1 = 0;
if (0 < (int)param_2) {
do {
iVar2 = uVar1 * 0x14;
this = (CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>
*)(*(int *)param_1 + iVar2);
*(undefined4 *)(this + 0xc) = 0;
if (param_4 != 0) {
CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>
::GrowVector(this,param_4);
CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>
::ShiftElementsRight(this,0,param_4);
}
uVar1 = uVar1 + 1;
*(undefined4 *)(*(int *)param_1 + 8 + iVar2) = param_3;
} while (uVar1 != param_2);
}
CVar3 = (CUtlVector<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,CUtlMemory<CUtlVector<CGameSaveRestoreInfo::CHashElement,CUtlMemory<CGameSaveRestoreInfo::CHashElement,int>>,int>>
)((param_2 & param_2 - 1) == 0);
param_1[0x16] = CVar3;
uVar1 = 0;
if ((bool)CVar3) {
uVar1 = param_2 - 1;
}
*(uint *)(param_1 + 0x18) = uVar1;
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.