CBaseClientState::ProcessGetCvarValue
0x00100110 · 1049 bytes · __thiscall
_ZN16CBaseClientState19ProcessGetCvarValueEP16SVC_GetCvarValue
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseClientState::ProcessGetCvarValue(SVC_GetCvarValue*) */
undefined4 __thiscall
CBaseClientState::ProcessGetCvarValue(CBaseClientState *this,SVC_GetCvarValue *param_1)
{
float fVar1;
char cVar2;
int *piVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
undefined4 local_394;
undefined4 local_390;
undefined4 local_388;
undefined4 local_384;
int *local_380;
char local_37c [256];
undefined **local_27c;
undefined1 local_278;
undefined4 local_274;
undefined4 local_270;
undefined4 local_26c;
undefined8 local_268;
undefined4 local_260;
undefined4 local_25c;
undefined8 local_258;
undefined4 local_250;
undefined4 local_24c;
undefined1 local_248;
undefined8 local_244;
undefined4 local_23c;
undefined4 local_238;
undefined4 local_230;
undefined4 local_22c;
char *local_228;
int local_224;
int local_20;
local_394 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_390 = 0;
if (_exit == (int *)0x0) {
local_380 = (int *)0x0;
}
else {
(*(code *)_exit[0x14])
(_exit,&local_394,0,0,0,0,"/data/src/engine/./baseclientstate.cpp",0x8b8,
&ProcessGetCvarValue(SVC_GetCvarValue*)::tm_fmt,"(%s)%s","Unaccounted",
"ProcessGetCvarValue");
local_380 = _exit;
}
iVar5 = _DAT_0040b9d4;
local_388 = local_394;
local_384 = local_390;
/* try { // try from 001003c6 to 00100414 has its CatchHandler @ 00100582 */
if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
if ((char *)*_DAT_0040b030 != "ProcessGetCvarValue") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a6db6,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
local_230 = *(undefined4 *)(param_1 + 0x4c);
local_270 = 0;
local_22c = *(undefined4 *)(param_1 + 0x50);
local_268 = 0;
local_26c = 0;
local_260 = 0;
local_25c = 0;
local_258 = 0;
local_250 = 0;
local_24c = 0;
local_248 = 0;
local_244 = 0;
local_23c = 0;
local_238 = 0;
local_278 = 1;
local_274 = 0;
local_27c = &PTR__CLC_RespondCvarValue_002a1528;
local_228 = "";
local_224 = 1;
/* try { // try from 001002af to 00100305 has its CatchHandler @ 00100554 */
piVar3 = (int *)(**(code **)(*g_pCVar + 0x30))(g_pCVar,local_22c);
if (piVar3 == (int *)0x0) {
iVar5 = (**(code **)(*g_pCVar + 0x38))(g_pCVar,*(undefined4 *)(param_1 + 0x50));
local_224 = 2 - (uint)(iVar5 == 0);
}
else {
cVar2 = (**(code **)(*piVar3 + 0xc))(piVar3,0x20000000);
if (cVar2 == '\0') {
local_224 = 0;
/* try { // try from 0010044f to 00100549 has its CatchHandler @ 00100554 */
cVar2 = (**(code **)(*piVar3 + 0xc))(piVar3,0x1000);
if (cVar2 == '\0') {
local_228 = "FCVAR_NEVER_AS_STRING";
if ((*(byte *)((int)piVar3 + 0x15) & 0x10) == 0) {
local_228 = "";
if (*(char **)(piVar3[7] + 0x24) != (char *)0x0) {
local_228 = *(char **)(piVar3[7] + 0x24);
}
}
}
else {
fVar1 = *(float *)(piVar3[7] + 0x2c);
iVar5 = *(int *)(piVar3[7] + 0x30);
if (0.001 <= ABS(fVar1 - (float)iVar5)) {
V_snprintf(local_37c,0x100,"%f",(double)fVar1);
}
else {
V_snprintf(local_37c,0x100,"%d",iVar5);
}
local_228 = local_37c;
}
}
else {
local_224 = 3;
}
}
piVar3 = *(int **)(this + 0x10);
(**(code **)(*piVar3 + 0xa8))(piVar3,&local_27c,0,0);
iVar5 = _DAT_0040b9d4;
local_27c = &PTR__INetMessage_002a1188;
if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
piVar3 = _DAT_0040b030;
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
if (local_380 != (int *)0x0) {
piVar3 = local_380;
(*(code *)local_380[0x15])(local_380,local_388,local_384,0,0,0);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail(piVar3);
}
return 1;
}
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.