// // sub_10054D788 from 0x10054d788 to 0x10054d934 (428 bytes) // // 1 xrefs: // > sub_10054D164 @ 0x10054d3d4 // // 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 11:07:51 +0000 // __int64 __fastcall sub_10054D788(__int64 a1, __int64 *a2, char *a3, _BYTE *a4) { int v6; // w9 int v9; // w8 __int64 v10; // x1 __int64 result; // x0 __int64 v12; // x22 int *v13; // x23 int v14; // w9 __int64 v15; // x8 __int64 v16; // x23 int v17; // t1 int v18; // w21 __int64 v19; // x8 char v20; // w20 int v21; // w8 int v22; // w9 int v23; // w8 __int64 v24; // x1 __int64 v25; // x8 if ( !a4 ) return 28; *a4 = 0; v6 = *(_DWORD *)(a1 + 36); if ( v6 == -1 ) return 28; v9 = *(_DWORD *)(a1 + 8); if ( v6 == v9 ) { if ( v6 >= 2 ) v10 = (unsigned int)(2 * v6); else v10 = 4; result = sub_10054E004(a1, v10); if ( (_DWORD)result ) return result; v9 = *(_DWORD *)(a1 + 8); } if ( !v9 ) return 28; v12 = *a2; v13 = (int *)(*(_QWORD *)a1 + 4LL * (int)((v9 - 1) & (HIDWORD(v12) ^ v12))); v14 = *v13; if ( *v13 == -1 ) { LABEL_14: v18 = *(_DWORD *)(a1 + 32); if ( v18 == -1 ) { v20 = *a3; v18 = *(_DWORD *)(a1 + 24); v21 = *(_DWORD *)(a1 + 28); if ( v21 < 0 ) v21 = -v21; v22 = *(_DWORD *)(a1 + 24); if ( v21 <= v18 ) { v23 = (int)(float)((float)v21 * 1.5); if ( v23 <= v18 + 1 ) v23 = v18 + 1; if ( v23 <= 4 ) v24 = 4; else v24 = (unsigned int)v23; result = sub_10054DD10(a1 + 16, v24); if ( (_DWORD)result ) return result; v22 = *(_DWORD *)(a1 + 24); } v25 = *(_QWORD *)(a1 + 16) + 16LL * v22; *(_QWORD *)v25 = v12; *(_DWORD *)(v25 + 8) = -1; *(_BYTE *)(v25 + 12) = v20; ++*(_DWORD *)(a1 + 24); } else { v19 = *(_QWORD *)(a1 + 16) + 16LL * v18; *(_DWORD *)(a1 + 32) = *(_DWORD *)(v19 + 8); *(_DWORD *)(v19 + 8) = -1; *(_QWORD *)v19 = v12; *(_BYTE *)(v19 + 12) = *a3; } *v13 = v18; ++*(_DWORD *)(a1 + 36); return 0; } v15 = *(_QWORD *)(a1 + 16); while ( *(_QWORD *)(v15 + 16LL * v14) != v12 ) { v16 = v15 + 16LL * v14; v17 = *(_DWORD *)(v16 + 8); v13 = (int *)(v16 + 8); v14 = v17; if ( v17 == -1 ) goto LABEL_14; } *a4 = *(_BYTE *)(v15 + 16LL * v14 + 12); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source