CLC_VoiceData::ReadFromBuffer
0x000adf10 · 821 bytes · __thiscall
_ZN13CLC_VoiceData14ReadFromBufferER7bf_read
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CLC_VoiceData::ReadFromBuffer(bf_read&) */
undefined4 __thiscall CLC_VoiceData::ReadFromBuffer(CLC_VoiceData *this,bf_read *param_1)
{
uint *puVar1;
undefined4 *puVar2;
uint uVar3;
uint uVar4;
char cVar5;
int iVar6;
uint uVar7;
undefined4 uVar8;
int iVar9;
undefined8 uVar10;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_exit == 0) {
local_20 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_34,0,0,0,0,"/data/src/engine/../common/netmessages.cpp",0x4d,
&ReadFromBuffer(bf_read&)::tm_fmt,"(%s)%s","Unaccounted",
"CLC_VoiceData::ReadFromBuffer");
local_20 = _exit;
}
iVar9 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
/* try { // try from 000adfc5 to 000adfc9 has its CatchHandler @ 000ae29a */
iVar6 = ThreadGetCurrentId();
if (iVar9 == iVar6) {
if ((char *)*_DAT_0040b030 != "CLC_VoiceData::ReadFromBuffer") {
/* try { // try from 000ae1d0 to 000ae1e1 has its CatchHandler @ 000ae29a */
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a05cd,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
}
iVar9 = *(int *)(param_1 + 0x14);
if (iVar9 < 0x10) {
uVar7 = *(uint *)(param_1 + 0x10);
puVar1 = *(uint **)(param_1 + 0x18);
if (puVar1 == *(uint **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(uint **)(param_1 + 0x18) = puVar1 + 1;
uVar7 = 0;
*(undefined4 *)(param_1 + 0x10) = 0;
param_1[4] = (bf_read)0x1;
}
else {
if (*(uint **)(param_1 + 0x1c) < puVar1) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
}
else {
*(uint **)(param_1 + 0x18) = puVar1 + 1;
uVar3 = *puVar1;
*(uint *)(param_1 + 0x10) = uVar3;
if (param_1[4] == (bf_read)0x0) {
uVar4 = (&CBitBuffer::s_nMaskTable)[0x10 - iVar9];
*(int *)(param_1 + 0x14) = iVar9 + 0x10;
uVar7 = (uVar4 & uVar3) << ((byte)iVar9 & 0x1f) | uVar7;
*(uint *)(param_1 + 0x10) = uVar3 >> ((byte)(0x10 - iVar9) & 0x1f);
goto LAB_000adffc;
}
}
uVar7 = 0;
}
}
else {
*(int *)(param_1 + 0x14) = iVar9 + -0x10;
uVar7 = *(uint *)(param_1 + 0x10) & 0xffff;
if (iVar9 + -0x10 == 0) {
puVar2 = *(undefined4 **)(param_1 + 0x18);
*(undefined4 *)(param_1 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(undefined4 *)(param_1 + 0x10) = 0;
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(param_1 + 0x1c) < puVar2) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
}
else {
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
*(undefined4 *)(param_1 + 0x10) = *puVar2;
}
}
else {
*(uint *)(param_1 + 0x10) = *(uint *)(param_1 + 0x10) >> 0x10;
}
}
LAB_000adffc:
*(uint *)(this + 0x4c) = uVar7;
/* try { // try from 000ae002 to 000ae082 has its CatchHandler @ 000ae279 */
uVar10 = CBitRead::ReadLongLong((CBitRead *)param_1);
*(undefined8 *)(this + 0x8c) = uVar10;
*(undefined4 *)(this + 0x50) = *(undefined4 *)param_1;
*(undefined4 *)(this + 0x54) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(this + 0x5c) = *(undefined4 *)(param_1 + 0xc);
*(undefined4 *)(this + 0x60) = *(undefined4 *)(param_1 + 0x10);
*(undefined4 *)(this + 100) = *(undefined4 *)(param_1 + 0x14);
*(undefined4 *)(this + 0x68) = *(undefined4 *)(param_1 + 0x18);
*(undefined4 *)(this + 0x6c) = *(undefined4 *)(param_1 + 0x1c);
*(undefined4 *)(this + 0x70) = *(undefined4 *)(param_1 + 0x20);
if (*(int *)(param_1 + 0x20) == 0) {
iVar9 = 0;
}
else {
iVar6 = (((uint)(*(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x20)) >> 2) * 0x20 -
*(int *)(param_1 + 0x14)) + (*(uint *)(param_1 + 0xc) & 3) * 8;
iVar9 = *(int *)(param_1 + 8);
if (iVar6 <= *(int *)(param_1 + 8)) {
iVar9 = iVar6;
}
}
uVar8 = CBitRead::Seek((CBitRead *)param_1,*(int *)(this + 0x4c) + iVar9);
iVar9 = _DAT_0040b9d4;
if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
iVar6 = ThreadGetCurrentId();
if (iVar9 == iVar6) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
}
return uVar8;
}
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.