CMemberScriptBinding1<CScriptConvarAccessor*,CVariantBase<CVariantDefaultAllocator>(CScriptConvarAccessor::*)(char_const*),CVariantBase<CVariantDefaultAllocator>,char_const*>::Call
0x00b5ad00 · 615 bytes · __cdecl
_ZN21CMemberScriptBinding1IP21CScriptConvarAccessorMS0_F12CVariantBaseI24CVariantDefaultAllocatorEPKcES4_S6_E4CallEPvSA_PS4_iSB_
Decompiled
undefined (5 params)
/* CMemberScriptBinding1<CScriptConvarAccessor*, CVariantBase<CVariantDefaultAllocator>
(CScriptConvarAccessor::*)(char const*), CVariantBase<CVariantDefaultAllocator>, char
const*>::Call(void*, void*, CVariantBase<CVariantDefaultAllocator>*, int,
CVariantBase<CVariantDefaultAllocator>*) */
undefined1
CMemberScriptBinding1<CScriptConvarAccessor*,CVariantBase<CVariantDefaultAllocator>(CScriptConvarAccessor::*)(char_const*),CVariantBase<CVariantDefaultAllocator>,char_const*>
::Call(void *param_1,void *param_2,CVariantBase *param_3,int param_4,CVariantBase *param_5)
{
short sVar1;
char *__src;
undefined4 *puVar2;
int iVar3;
void *__dest;
char *local_28;
undefined4 local_24;
undefined2 local_20;
byte local_1e;
if (param_5 == (CVariantBase *)0x0 || param_4 != 1) {
return 0;
}
if (param_2 == (void *)0x0) {
return 0;
}
if (((uint)param_1 & 1) != 0) {
param_1 = *(void **)(*(int *)param_2 + -1 + (int)param_1);
}
(*param_1)(&local_28,param_2,*(undefined4 *)param_3);
if (((byte)param_5[10] & 1) != 0) {
free(*(void **)param_5);
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
__src = local_28;
*(undefined4 *)param_5 = 0;
*(undefined2 *)(param_5 + 8) = 0;
*(undefined4 *)(param_5 + 4) = 0;
switch(local_20) {
case 3:
if ((*(ushort *)(param_5 + 10) & 1) != 0) {
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
*(undefined2 *)(param_5 + 8) = 3;
goto LAB_00b5ae2b;
case 4:
if ((*(ushort *)(param_5 + 10) & 1) != 0) {
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
*(undefined2 *)(param_5 + 8) = 4;
puVar2 = malloc(0x10);
*(undefined4 **)param_5 = puVar2;
*puVar2 = *(undefined4 *)__src;
puVar2[1] = *(undefined4 *)(__src + 4);
puVar2[2] = *(undefined4 *)(__src + 8);
puVar2[3] = *(undefined4 *)(__src + 0xc);
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) | 1;
break;
default:
*(undefined2 *)(param_5 + 8) = local_20;
*(char **)param_5 = local_28;
*(undefined4 *)(param_5 + 4) = local_24;
break;
case 0x1c:
if ((*(ushort *)(param_5 + 10) & 1) != 0) {
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
*(undefined2 *)(param_5 + 8) = 0x1c;
puVar2 = malloc(8);
*(undefined4 **)param_5 = puVar2;
*puVar2 = *(undefined4 *)__src;
puVar2[1] = *(undefined4 *)(__src + 4);
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) | 1;
break;
case 0x1f:
if ((*(ushort *)(param_5 + 10) & 1) != 0) {
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
*(undefined2 *)(param_5 + 8) = 0x1f;
/* try { // try from 00b5ae7e to 00b5ae82 has its CatchHandler @ 00b5af8e */
iVar3 = _V_strlen(local_28);
__dest = malloc(iVar3 + 1U);
*(void **)param_5 = __dest;
memcpy(__dest,__src,iVar3 + 1U);
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) | 1;
break;
case 0x28:
if ((*(ushort *)(param_5 + 10) & 1) != 0) {
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) & 0xfffe;
}
*(undefined2 *)(param_5 + 8) = 0x28;
LAB_00b5ae2b:
puVar2 = malloc(0xc);
*(undefined4 **)param_5 = puVar2;
*puVar2 = *(undefined4 *)__src;
puVar2[1] = *(undefined4 *)(__src + 4);
puVar2[2] = *(undefined4 *)(__src + 8);
*(ushort *)(param_5 + 10) = *(ushort *)(param_5 + 10) | 1;
}
if ((local_1e & 1) != 0) {
free(local_28);
}
sVar1 = *(short *)(param_5 + 8);
if ((((sVar1 == 0x1c) || ((ushort)(sVar1 - 3U) < 2)) || (sVar1 == 0x28)) &&
(((byte)param_5[10] & 1) == 0)) {
CVariantBase<CVariantDefaultAllocator>::ConvertToCopiedData(SUB41(param_5,0));
return 1;
}
return 1;
}
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.