//
// sub_747F38 from 0x747f38 to 0x747fc0 (136 bytes)
//
// 0 xrefs:
//
// 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
//
int *__fastcall sub_747F38(int *a1, _DWORD *a2)
{
_BYTE *v4; // r0
int v5; // r3
char *v6; // r3
int *v7; // r2
int v8; // r6
int v9; // r7
char v11[4]; // [sp+1Ch] [bp-28h] BYREF
int v12; // [sp+20h] [bp-24h] BYREF
int v13; // [sp+24h] [bp-20h] BYREF
char v14[8]; // [sp+28h] [bp-1Ch] BYREF
int v15; // [sp+30h] [bp-14h]
int v16; // [sp+34h] [bp-10h]
int v17; // [sp+38h] [bp-Ch]
int v18; // [sp+3Ch] [bp-8h]
v4 = sub_747D3C(v11, a1, 0);
if ( !v11[0] )
return a1;
v5 = *a1;
v12 = 0;
v6 = (char *)a1 + *(_DWORD *)(v5 - 12);
v7 = *((int **)v6 + 34);
if ( !v7 )
sub_772FE4(v4);
v17 = 0;
v8 = *((_DWORD *)v6 + 31);
v9 = *v7;
v18 = -1;
v15 = v8;
v16 = -1;
(*(void (__fastcall **)(char *, int *, int, int, _DWORD, int, char *, int *, int *))(v9 + 12))(
v14,
v7,
v8,
-1,
0,
-1,
v6,
&v12,
&v13);
*a2 = v13;
if ( !v12 )
return a1;
sub_744C5C((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | v12);
return a1;
}