//
// sub_1800B2E30 from 0x1800b2e30 to 0x1800b3033 (515 bytes)
//
// 2 xrefs:
// > sub_1800B2770 @ 0x1800b2843
// > ??> @ 0x1801fcdbc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1800B2E30(__int64 a1)
{
int v2; // ebp
char v3; // r14
_QWORD *v4; // rbx
__int64 v5; // rdi
_QWORD *v6; // rax
__int64 v7; // r12
unsigned int v8; // ebp
__int64 v10; // rcx
int v11; // [rsp+20h] [rbp-48h]
v2 = 4;
v3 = 0;
if ( (unsigned int)sub_1800B7FF0("http://", a1 + 68, 7) )
{
v4 = *((_QWORD **)off_1801AED20 + 5);
if ( v4 != (_QWORD *)((char *)off_1801AED20 + 40) )
{
while ( *((_DWORD *)v4 + 104) != 4 )
{
v4 = (_QWORD *)*v4;
if ( v4 == (_QWORD *)((char *)off_1801AED20 + 40) )
goto LABEL_6;
}
LABEL_15:
*(_QWORD *)(a1 + 392) = v4;
return 0;
}
}
else
{
v2 = 3;
v3 = 1;
}
LABEL_6:
v5 = 0;
v6 = (_QWORD *)sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
424,
(unsigned int)"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_file.cpp",
272,
0,
0,
1);
v4 = v6;
if ( v6 )
{
v6[1] = v6;
*v6 = v6;
v6[2] = 0;
sub_1800B8400(v6 + 3);
v4[49] = 0;
v4[47] = v4 + 46;
v4[46] = v4 + 46;
v4[48] = 0;
v4[51] = 0;
v4[50] = 0;
*((_DWORD *)v4 + 104) = 0;
*((_BYTE *)v4 + 420) = 0;
*((_BYTE *)v4 + 360) = 0;
v7 = *(_QWORD *)(a1 + 408);
*((_DWORD *)v4 + 104) = v2;
*((_BYTE *)v4 + 420) = v3;
v8 = FMOD_OS_CriticalSection_Create(v4 + 51, 0);
if ( v8 )
goto LABEL_11;
if ( v3 )
v5 = v7;
v8 = sub_1800B8690((int)v4 + 24, 3, 0, 10, v5, 1);
if ( v8 )
{
LABEL_11:
LOBYTE(v11) = 1;
sub_1800B6AA0(
*((_QWORD *)off_1801AED20 + 52),
v4,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_file.cpp",
281,
v11);
return v8;
}
if ( !*((_BYTE *)v4 + 420) )
*((_QWORD *)off_1801AED20 + 8) = v4[37];
*((_BYTE *)v4 + 360) = 1;
v10 = *((_QWORD *)off_1801AED20 + 5);
v4[1] = (char *)off_1801AED20 + 40;
*v4 = v10;
*(_QWORD *)(v10 + 8) = v4;
*(_QWORD *)v4[1] = v4;
goto LABEL_15;
}
return 38;
}