//
// FMOD::Sound::unlock from 0xd83d8 to 0xd849c (196 bytes)
//
// 4 xrefs:
// > FMOD::Sound::unlock @ 0x10716c
// > ??> @ 0x6250
// > FMOD::Sound::unlock @ 0x107164
// > ??> @ 0x110178
//
// This function is hookable on this platform (idp: arm, 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 12:14:54 +0000
//
__int64 __fastcall FMOD::Sound::unlock(FMOD::Sound *this, void *a2, void *a3)
{
unsigned int v3; // w20
__int64 v4; // x23
__int64 v6; // x0
unsigned int v7; // w3
unsigned int v8; // w21
unsigned int v9; // w24
__int64 v10; // x0
char v11; // w8
__int64 v13; // x0
int v14; // w8
char v15; // zf
_BYTE v16[264]; // [xsp+8h] [xbp-148h] BYREF
__int64 v17; // [xsp+118h] [xbp-38h]
v6 = sub_DA5BC(this, a2);
v8 = v7;
v9 = sub_DA504(v6);
if ( !v9 )
{
v13 = sub_DA3A0();
if ( !v14 || (sub_DA358(v13), v15) )
{
v10 = (*(__int64 (__fastcall **)(__int64, __int64, void *, _QWORD, _QWORD))(*(_QWORD *)v17 + 48LL))(
v17,
v4,
a3,
v8,
v3);
v9 = v10;
if ( !(_DWORD)v10 )
goto LABEL_4;
}
else
{
v9 = 46;
}
}
v10 = sub_DA344();
if ( v11 < 0 )
{
sub_D849C(v16, 256, v4, a3, v8, v3);
v10 = sub_DA398(v9, 5);
}
LABEL_4:
sub_DA5F0(v10);
return v9;
}