// // sub_10060CAB8 from 0x10060cab8 to 0x10060cd14 (604 bytes) // // 1 xrefs: // > sub_10060D2A8 @ 0x10060d3a8 // // 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:10:07 +0000 // __int64 __fastcall sub_10060CAB8(__int64 a1, __int64 a2, int a3, int a4) { int v8; // w8 __int64 v9; // x1 __int64 v10; // x8 unsigned int v11; // w9 int v12; // w13 __int64 v13; // x15 __int64 v14; // x13 unsigned int v15; // w14 __int64 v17; // x16 __int64 v18; // x17 int v19; // w0 char *v20; // x16 unsigned int v21; // w15 unsigned int *v22; // x8 __int64 v23; // x9 __int64 v24; // x8 int v25; // w9 int v26; // w12 int v27; // w16 int i; // w14 int v29; // w13 _OWORD v31[8]; // [xsp+0h] [xbp-B0h] BYREF int v32; // [xsp+80h] [xbp-30h] if ( a4 ) v8 = a4; else v8 = a3; v9 = sub_10059EDD4(a1, (unsigned int)(4 * v8)); if ( v9 ) { v32 = 0; memset(v31, 0, sizeof(v31)); if ( a3 >= 1 ) { v10 = 0; v11 = 0; do { v13 = *(unsigned int *)(a2 + 4 * v10); v12 = a4 == 0; if ( (int)v13 >= 1 ) { v14 = (int)v13; v15 = *((_DWORD *)v31 + v13); if ( (unsigned int)v13 <= 0x1F && v15 >> v13 != 0 ) goto LABEL_41; v17 = 0; *(_DWORD *)(v9 + 4LL * v11) = v15; while ( 1 ) { v18 = (unsigned int)(v13 + v17); v19 = *((_DWORD *)v31 + (unsigned int)v18); if ( (v19 & 1) != 0 ) break; *((_DWORD *)v31 + v18) = v19 + 1; if ( (int)v13 + (int)--v17 + 1 <= 1 ) goto LABEL_21; } if ( (_DWORD)v13 + (_DWORD)v17 != 1 ) { *((_DWORD *)v31 + v18) = 2 * *((_DWORD *)v31 + (unsigned int)(v13 - 1) + v17); LABEL_21: if ( (int)v13 > 31 ) goto LABEL_7; goto LABEL_22; } ++DWORD1(v31[0]); if ( (int)v13 > 31 ) goto LABEL_7; do { LABEL_22: v20 = (char *)v31 + 4 * v14; v21 = *((_DWORD *)v20 + 1); if ( v15 != v21 >> 1 ) break; *((_DWORD *)v20 + 1) = 2 * *((_DWORD *)v31 + v14++); v15 = v21; } while ( v14 != 32 ); LABEL_7: v12 = 1; } v11 += v12; ++v10; } while ( v10 != a3 ); } if ( a4 == 1 ) { LABEL_31: if ( a3 >= 1 ) { v24 = 0; v25 = 0; do { v26 = *(_DWORD *)(a2 + 4 * v24); if ( v26 < 1 ) { v29 = 0; } else { v27 = 0; for ( i = 0; i != v26; ++i ) { v29 = (*(_DWORD *)(v9 + 4LL * v25) >> i) & 1 | (2 * v27); v27 = v29; } } if ( a4 == 0 || v26 != 0 ) *(_DWORD *)(v9 + 4LL * v25++) = v29; ++v24; } while ( v24 != a3 ); } } else { v22 = (unsigned int *)v31 + 1; v23 = 31; while ( !(unsigned int)((unsigned __int64)*v22 << v23) ) { --v23; ++v22; if ( v23 == -1 ) goto LABEL_31; } LABEL_41: sub_10059EEE8(a1, v9); return 0; } } return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source