//
// FMOD_OS_CriticalSection_Create from 0x1800c0b50 to 0x1800c0bce (126 bytes)
//
// 24 xrefs:
// > sub_1800B2E30 @ 0x1800b2f46
// > sub_1800B6530 @ 0x1800b658b
// > sub_1800B6AA0 @ 0x1800b6ace
// > sub_1800B6C70 @ 0x1800b6d4d
// > sub_1800B6E80 @ 0x1800b6f11
// > sub_1800C23B0 @ 0x1800c250f
// > sub_1800C6FD0 @ 0x1800c709d
// > sub_1800D11B0 @ 0x1800d11e0
// > sub_1800D11B0 @ 0x1800d11fd
// > sub_1800D45C0 @ 0x1800d45d7
// > sub_1800D45C0 @ 0x1800d45e9
// > sub_1800D45C0 @ 0x1800d45fb
// > sub_1800D9EB0 @ 0x1800d9f92
// > sub_1800E4E00 @ 0x1800e4e6f
// > sub_1800F5010 @ 0x1800f5067
// > sub_1800F5010 @ 0x1800f5129
// > sub_180109120 @ 0x180109137
// > sub_180111FC0 @ 0x180112013
// > sub_1801120C0 @ 0x18011212e
// > sub_180113950 @ 0x180113a76
// > sub_18011C140 @ 0x18011c151
// > sub_18011C160 @ 0x18011c25e
// > ??> @ 0x180194348
// > ??> @ 0x1801fdae8
//
// 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:03 +0000
//
__int64 __fastcall FMOD_OS_CriticalSection_Create(struct _RTL_CRITICAL_SECTION **a1, char a2)
{
struct _RTL_CRITICAL_SECTION *v3; // rbx
if ( a2 )
{
v3 = &CriticalSection;
LABEL_3:
InitializeCriticalSection(v3);
*a1 = v3;
return 0;
}
v3 = (struct _RTL_CRITICAL_SECTION *)sub_1800B6530(
*((_QWORD *)off_1801AED20 + 52),
40,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\platforms\\win\\src\\fmod_os_misc.cpp",
779,
0x200000,
0,
1);
if ( v3 )
goto LABEL_3;
return 38;
}