//
// sub_D769C from 0xd769c to 0xd77a8 (268 bytes)
//
// 2 xrefs:
// > sub_6A544 @ 0x6a6ec
// > sub_769EC @ 0x76a7c
//
// 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:53 +0000
//
__int64 __fastcall sub_D769C(__int64 a1)
{
unsigned int v2; // w20
__int64 v3; // x0
__int64 v4; // x22
__int64 i; // x21
__int64 v6; // x24
__int64 v7; // x0
__int64 v8; // x22
_QWORD *v9; // x21
v2 = sub_E4458(a1 + 448);
if ( !v2 )
{
v3 = sub_E4458(a1 + 112);
v2 = v3;
if ( !(_DWORD)v3 )
{
if ( !*(_QWORD *)(a1 + 856) || (v3 = sub_D7BA0(v3), (v2 = v3) == 0) )
{
v4 = *(int *)(*(_QWORD *)(a1 + 72) + 74064LL);
for ( i = 0; i < v4; ++i )
{
v6 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 72) + 74056LL) + 8 * i);
if ( *(_QWORD *)(v6 + 24) )
{
v3 = (*(__int64 (__fastcall **)(__int64))(a1 + 912))(a1 + 8);
*(_QWORD *)(v6 + 24) = 0;
}
}
if ( *(_QWORD *)(a1 + 936) )
{
v7 = sub_D7AEC(v3);
v8 = *(_QWORD *)(a1 + 72) + 1728LL;
v9 = (_QWORD *)v8;
while ( 1 )
{
v9 = (_QWORD *)*v9;
if ( v9 == (_QWORD *)v8 )
break;
v7 = sub_D70E8(a1, (__int64)v9);
if ( (_DWORD)v7 )
{
v2 = v7;
sub_D7BE0(v7);
return v2;
}
}
sub_D7BE0(v7);
}
return 0;
}
}
}
return v2;
}