//
// sub_180113950 from 0x180113950 to 0x180113b1d (461 bytes)
//
// 6 xrefs:
// > FMOD::SystemI::createClientProfile @ 0x1800e2d6a
// > sub_1800E4E00 @ 0x1800e59b7
// > ??> @ 0x180190e44
// > ??> @ 0x180190e58
// > ??> @ 0x180190e68
// > ??> @ 0x180201d48
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:36 +0000
//
__int64 __fastcall sub_180113950(__int64 a1)
{
_QWORD *v2; // rax
_QWORD *v3; // rdi
_DWORD *v4; // rax
_DWORD *v5; // rbx
unsigned int v6; // esi
__int64 v8; // [rsp+30h] [rbp-18h]
v2 = sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
176,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_profile_remotefile.cpp",
123,
0,
0,
1);
v3 = v2;
if ( !v2 )
return 38;
v2[4] = 0;
v2[2] = v2 + 1;
*v2 = off_18016F550;
v2[1] = v2 + 1;
v2[3] = 0;
v2[10] = 0;
v2[11] = 0;
v2[12] = 0;
v2[13] = 0;
*((_DWORD *)v2 + 28) = -1;
*((_DWORD *)v2 + 29) = 0;
v2[15] = 0;
v2[16] = 0;
v2[17] = 0;
v2[18] = 0;
*((_DWORD *)v2 + 38) = -1;
*((_DWORD *)v2 + 39) = 0;
LOBYTE(v8) = 1;
v4 = sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
65568,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_profile_remotefile.cpp",
131,
0,
0,
v8);
v3[5] = v4;
v5 = v4;
if ( !v4 )
{
v6 = 38;
LABEL_7:
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v3 + 96LL))(v3, 0);
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), v3);
return v6;
}
v3[6] = 0;
v3[8] = 0;
v3[4] = a1;
*((_DWORD *)v3 + 18) = 1;
v3[20] = 0;
v3[21] = 0;
v6 = FMOD_OS_CriticalSection_Create((struct _RTL_CRITICAL_SECTION **)v3 + 7, 0);
if ( v6 || (v6 = (*(__int64 (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)a1 + 8LL))(a1, v3)) != 0 )
{
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), v5);
goto LABEL_7;
}
return 0;
}