Mod_LoadLeafs
0x00198730 · 556 bytes · unknown
_Z13Mod_LoadLeafsv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadLeafs() */
void Mod_LoadLeafs(void)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
CMapLoadHelper local_380 [8];
int local_378;
int local_374;
CMapLoadHelper local_260 [12];
int local_254;
CMapLoadHelper local_140 [12];
int local_134;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper(local_380,10);
if (local_378 == 0) {
/* try { // try from 0019895b to 0019895f has its CatchHandler @ 001989f0 */
Mod_LoadLeafs_Version_0(local_380);
}
else if (local_378 == 1) {
/* try { // try from 0019881a to 00198859 has its CatchHandler @ 001989f0 */
iVar3 = (**(code **)(*g_pMaterialSystemHardwareConfig + 0x8c))(g_pMaterialSystemHardwareConfig);
if (iVar3 != 0) {
iVar3 = _DAT_003a8378;
if (_DAT_003a8364 == 0) {
iVar3 = _DAT_003a8a80;
}
if (0 < iVar3) {
CMapLoadHelper::CMapLoadHelper(local_260,0x37);
/* try { // try from 0019886b to 0019886f has its CatchHandler @ 00198965 */
CMapLoadHelper::CMapLoadHelper(local_140,0x33);
/* try { // try from 0019887b to 0019887f has its CatchHandler @ 001989f9 */
Mod_LoadLeafs_Version_1(local_380,local_260,local_140);
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
if (local_254 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_254);
}
goto LAB_00198780;
}
}
/* try { // try from 001988e1 to 001988e5 has its CatchHandler @ 001989f0 */
CMapLoadHelper::CMapLoadHelper(local_260,0x38);
/* try { // try from 001988f7 to 001988fb has its CatchHandler @ 001989ab */
CMapLoadHelper::CMapLoadHelper(local_140,0x34);
/* try { // try from 00198907 to 0019890b has its CatchHandler @ 001989cd */
Mod_LoadLeafs_Version_1(local_380,local_260,local_140);
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
if (local_254 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_254);
}
}
else {
/* try { // try from 0019877b to 0019877f has its CatchHandler @ 001989f0 */
Error("Unknown LUMP_LEAFS version\n");
}
LAB_00198780:
iVar3 = s_pMap;
iVar1 = 0;
iVar4 = DAT_00394398;
if (0 < *(int *)(s_pMap + 0xc)) {
do {
iVar2 = iVar1 + 1;
*(undefined2 *)(*(int *)(iVar3 + 0x10) + 0x3e + iVar1 * 0x40) = *(undefined2 *)(iVar4 + 0xe);
*(undefined2 *)(*(int *)(iVar3 + 0x10) + 0x3c + iVar1 * 0x40) = *(undefined2 *)(iVar4 + 0xc);
iVar1 = iVar2;
iVar4 = iVar4 + 0x10;
} while (iVar2 < *(int *)(iVar3 + 0xc));
}
*(undefined4 *)(iVar3 + 0xe0) = DAT_003943d0;
*(undefined4 *)(iVar3 + 0xdc) = DAT_003943cc;
if (local_374 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_374);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.