// // sub_55578 from 0x55578 to 0x559ec (1140 bytes) // // 1 xrefs: // > sub_5442A @ 0x54446 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:40:45 +0000 // int __fastcall sub_55578(int a1, int a2, int a3, int a4) { int v4; // r10 int v6; // r0 int v7; // r0 int v8; // r0 int v9; // r0 int v10; // r6 unsigned int *v11; // r5 unsigned int v12; // r0 int v13; // r1 int v14; // r2 int v15; // r0 int v16; // r0 int v17; // r3 int v18; // r0 _DWORD *v19; // r1 int v20; // r1 int v21; // r1 int v22; // r9 int v23; // r11 int v24; // r0 int v25; // r1 int v26; // r0 unsigned int v27; // r0 unsigned int v28; // r0 int v29; // r0 int v30; // r2 bool v31; // zf unsigned int v32; // r0 int v33; // r2 int v34; // r1 int v35; // r10 int i; // r8 int v37; // r1 int v38; // r0 int v39; // r0 int v40; // r1 int v41; // r0 _DWORD *v42; // r0 int v43; // r0 int j; // r1 int v45; // r2 int v46; // r1 int v47; // r0 int v48; // r1 int v49; // r0 int v50; // r1 _DWORD *v51; // r5 _DWORD *v52; // r1 int v53; // r0 int v54; // r0 int k; // r1 int v56; // r3 int v57; // r1 _DWORD *v58; // r2 _DWORD *v59; // r2 _DWORD *v61; // r1 _DWORD *v62; // r0 int v63; // [sp+0h] [bp-38h] int v64; // [sp+4h] [bp-34h] int v65; // [sp+4h] [bp-34h] int v66; // [sp+8h] [bp-30h] int v67; // [sp+8h] [bp-30h] _DWORD v68[2]; // [sp+10h] [bp-28h] BYREF char v69; // [sp+18h] [bp-20h] v63 = a2; v64 = a3; v66 = a4; v4 = a2; v68[0] = *(_DWORD *)(a1 + 156); v68[1] = 10; v69 = 0; sub_44998((int)v68); v6 = *(_DWORD *)(a1 + 64); __dmb(0xBu); if ( (v6 & 0x20) != 0 ) { v10 = 30; goto LABEL_99; } v7 = *(_DWORD *)(a1 + 124); if ( v7 ) { if ( v7 == a1 ) { v8 = *(_DWORD *)(a1 + 136); if ( v8 ) { v9 = *(_DWORD *)(v8 + 64); __dmb(0xBu); if ( (v9 & 0x20) == 0 ) { v10 = 62; goto LABEL_99; } } } } v11 = (unsigned int *)(a1 + 64); __dmb(0xBu); do v12 = __ldrex(v11); while ( __strex(v12 | 0x20, v11) ); __dmb(0xBu); sub_449B4((int)v68); v15 = *(_DWORD *)(a1 + 72); if ( v15 ) { v16 = *(_DWORD *)(v15 + 220); if ( v16 ) sub_BB470(v16, v13, v14); } sub_554FE(a1); v18 = *(_DWORD *)(a1 + 156); if ( !v18 || (v10 = sub_640F0(v18, a1)) == 0 ) { v19 = *(_DWORD **)(a1 + 172); if ( v19 ) { while ( *(_DWORD *)(a1 + 176) != *v19 ) { sub_55A10(a1, *v19, 1, v17, v63, v64, v66); v19 = *(_DWORD **)(a1 + 172); } sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v19, "../../src/fmod_soundi.cpp", 528, 1); *(_DWORD *)(a1 + 172) = 0; *(_DWORD *)(a1 + 176) = 0; } v20 = *(_DWORD *)(a1 + 168); if ( v20 ) { sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v20, "../../src/fmod_soundi.cpp", 535, 1); *(_DWORD *)(a1 + 168) = 0; } v21 = *(_DWORD *)(a1 + 180); if ( v21 ) { sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v21, "../../src/fmod_soundi.cpp", 541, 1); *(_DWORD *)(a1 + 180) = 0; } v22 = *(_DWORD *)(a1 + 72); v23 = *(_DWORD *)(a1 + 184); if ( (**(int (__fastcall ***)(int))a1)(a1) && (v24 = *(_DWORD *)(a1 + 72)) != 0 && ((v25 = *(_DWORD *)(a1 + 136)) == 0 || v25 == a1 || v24 != *(_DWORD *)(v25 + 72)) ) { v26 = *(_DWORD *)(a1 + 244); if ( v26 ) { *(_BYTE *)(v26 + 88) = 1; v27 = *v11; __dmb(0xBu); if ( (v27 & 4) == 0 ) { __dmb(0xBu); do v28 = __ldrex(v11); while ( __strex(v28 | 0x40, v11) ); __dmb(0xBu); } } v29 = *(_DWORD *)(a1 + 156); if ( !(*(unsigned __int8 *)(v29 + 60) << 31) ) { v30 = *(_DWORD *)(a1 + 232); v31 = v30 == a1 + 232; if ( v30 == a1 + 232 ) v31 = *(_DWORD *)(a1 + 236) == a1 + 232; if ( !v31 ) { while ( 1 ) { v32 = *v11; __dmb(0xBu); if ( (v32 & 0x40) != 0 ) break; j_FMOD_OS_Time_Sleep(2); } v29 = *(_DWORD *)(a1 + 156); } } sub_64EC0(v29, 10); v61 = *(_DWORD **)(a1 + 236); *v61 = *(_DWORD *)(a1 + 232); *(_DWORD *)(*(_DWORD *)(a1 + 232) + 4) = v61; *(_DWORD *)(a1 + 232) = a1 + 232; *(_DWORD *)(a1 + 236) = a1 + 232; *(_DWORD *)(a1 + 240) = 0; sub_64ED8(*(_DWORD *)(a1 + 156), 10); v67 = *(_DWORD *)(a1 + 244); v62 = *(_DWORD **)(a1 + 248); if ( v62 ) { v62[18] = 0; (*(void (__fastcall **)(_DWORD *, int))(*v62 + 12))(v62, 1); *(_DWORD *)(a1 + 248) = 0; } } else { v67 = 0; } v33 = *(_DWORD *)(a1 + 128); if ( v33 ) { v34 = *(_DWORD *)(a1 + 120); if ( v34 ) { if ( *(_DWORD *)(a1 + 132) ) { v65 = v4; v35 = 1; for ( i = 0; i < v33; ++i ) { v37 = *(_DWORD *)(a1 + 120); v38 = *(_DWORD *)(v37 + 4 * i); if ( v38 ) { if ( *(_DWORD *)(v38 + 72) == v22 ) { *(_DWORD *)(v38 + 72) = 0; v38 = *(_DWORD *)(v37 + 4 * i); } if ( *(_DWORD *)(v38 + 184) == v23 ) { *(_DWORD *)(v38 + 184) = 0; v38 = *(_DWORD *)(v37 + 4 * i); } v39 = (**(int (__fastcall ***)(int))v38)(v38); v40 = *(_DWORD *)(a1 + 120); if ( v39 ) { v41 = *(_DWORD *)(v40 + 4 * i); if ( *(_DWORD *)(v41 + 244) == v67 ) *(_DWORD *)(v41 + 244) = 0; } v42 = *(_DWORD **)(v40 + 4 * i); if ( v42[31] ) { v43 = *(_DWORD *)(a1 + 128); for ( j = v35; ; ++j ) { v45 = *(_DWORD *)(a1 + 120); if ( j >= v43 ) break; if ( *(_DWORD *)(v45 + 4 * j) == *(_DWORD *)(v45 + 4 * i) ) *(_DWORD *)(v45 + 4 * j) = 0; } v42 = *(_DWORD **)(v45 + 4 * i); } (*(void (__fastcall **)(_DWORD *, int))(*v42 + 12))(v42, 1); *(_DWORD *)(*(_DWORD *)(a1 + 120) + 4 * i) = 0; v33 = *(_DWORD *)(a1 + 128); } ++v35; } v34 = *(_DWORD *)(a1 + 120); v4 = v65; } sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v34, "../../src/fmod_soundi.cpp", 666, 1); *(_DWORD *)(a1 + 120) = 0; v46 = *(_DWORD *)(a1 + 124); if ( v46 ) { sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v46, "../../src/fmod_soundi.cpp", 671, 1); *(_DWORD *)(a1 + 124) = 0; } } } v47 = *(_DWORD *)(a1 + 72); if ( v47 ) { v48 = *(_DWORD *)(a1 + 136); if ( !v48 || v48 == a1 || v47 != *(_DWORD *)(v48 + 72) ) { sub_B04EC(); *(_DWORD *)(a1 + 72) = 0; } } if ( !(**(int (__fastcall ***)(int))a1)(a1) ) goto LABEL_79; v49 = *(_DWORD *)(a1 + 136); if ( v49 ) { v51 = (_DWORD *)(a1 + 244); v50 = *(_DWORD *)(a1 + 244); if ( *(_DWORD *)(v49 + 244) == v50 ) goto LABEL_78; } else { v51 = (_DWORD *)(a1 + 244); v50 = *(_DWORD *)(a1 + 244); } if ( !v50 ) { LABEL_79: v52 = *(_DWORD **)(a1 + 184); if ( v52 ) { v53 = *(_DWORD *)(a1 + 136); if ( !v53 || *(_DWORD **)(v53 + 184) != v52 ) { if ( *v52 ) { sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), *v52, "../../src/fmod_soundi.cpp", 714, 1); v52 = *(_DWORD **)(a1 + 184); } sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v52, "../../src/fmod_soundi.cpp", 716, 1); } *(_DWORD *)(a1 + 184) = 0; } v54 = *(_DWORD *)(a1 + 136); if ( v54 ) { for ( k = 0; k < *(_DWORD *)(v54 + 128); ++k ) { v56 = *(_DWORD *)(v54 + 120); if ( v56 && *(_DWORD *)(v56 + 4 * k) == a1 ) { sub_551CE(v54, k, nullptr, 1); break; } } } v57 = *(_DWORD *)(a1 + 36); if ( v57 ) { sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v57, "../../src/fmod_soundi.cpp", 741, 1); *(_DWORD *)(a1 + 36) = 0; } v10 = 0; *(_DWORD *)(a1 + 32) = 0; j_FMOD_OS_CriticalSection_Enter(*(int *)((char *)&dword_10C + (_DWORD)off_E8000)); v58 = *(_DWORD **)(a1 + 8); *v58 = *(_DWORD *)(a1 + 4); *(_DWORD *)(*(_DWORD *)(a1 + 4) + 4) = v58; *(_DWORD *)(a1 + 8) = a1 + 4; *(_DWORD *)(a1 + 4) = a1 + 4; v59 = *(_DWORD **)(a1 + 200); *v59 = *(_DWORD *)(a1 + 196); *(_DWORD *)(*(_DWORD *)(a1 + 196) + 4) = v59; *(_DWORD *)(a1 + 196) = a1 + 196; *(_DWORD *)(a1 + 200) = a1 + 196; j_FMOD_OS_CriticalSection_Leave(*(int *)((char *)&dword_10C + (_DWORD)off_E8000)); if ( v4 ) { if ( !*(_DWORD *)(a1 + 124) ) { *(_DWORD *)(a1 + 16) = -559063315; sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), a1, "../../src/fmod_soundi.cpp", 756, 1); } v10 = 0; } goto LABEL_99; } sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v50, "../../src/fmod_soundi.cpp", 701, 1); LABEL_78: *v51 = 0; goto LABEL_79; } LABEL_99: sub_448CC((int)v68); return v10; }
GD Web Decomp Icon

GD Web Decomp

Raw Source