// // sub_76C170 from 0x76c170 to 0x76c2b2 (322 bytes) // // 5 xrefs: // > sub_76C170 @ 0x76c278 // > sub_76C170 @ 0x76c28a // > sub_76C2B2 @ 0x76c380 // > sub_76C2B2 @ 0x76c398 // > DeathMarkerLayer::init @ 0x76d17e // // 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:59:11 +0000 // int __fastcall sub_76C170(int result, int *a2, int *a3, int a4, int *a5, int a6) { int *v7; // r5 int *v10; // r4 int *v11; // r10 int v12; // r4 int v13; // r6 int *v14; // r6 int *v15; // r4 int v16; // r9 int v17; // t1 int v18; // r10 int v19; // r9 int *v20; // r11 int *v21; // r6 int *v22; // r5 int *v23; // r8 int v24; // t1 int v25; // r9 int v26; // r11 int v27; // t1 int v28; // [sp+14h] [bp-8h] v7 = (int *)result; v10 = a5; v11 = (int *)result; if ( a4 < 0 ) goto LABEL_6; if ( a4 <= 1 ) return result; if ( a4 == 2 ) { v12 = *(_DWORD *)result; v13 = *(a2 - 1); result = sub_7690F6((int)a3, v13, *(_DWORD *)result); if ( result ) { *v7 = v13; *(a2 - 1) = v12; } } else { LABEL_6: if ( a4 > 128 ) { v19 = a4 - (a4 >> 1); v28 = a4 >> 1; v20 = (int *)(result + v28 * 4); if ( a4 > a6 ) { sub_76C170(result, result + v28 * 4, a3, a4 >> 1, a5, a6); sub_76C170(v20, a2, a3, a4 - (a4 >> 1), a5, a6); return sub_76BEAC((int)v7, v20, a2, a3, a4 >> 1, a4 - (a4 >> 1), a5, a6); } else { sub_76C2B2(result, result + v28 * 4, a3, a4 >> 1, a5); v21 = &a5[a4]; v22 = &a5[v28]; result = sub_76C2B2(v20, a2, a3, v19, &a5[v28]); v23 = &a5[v28]; while ( v10 != v22 ) { if ( v23 == v21 ) { do { v24 = *v10++; *v11++ = v24; } while ( v22 != v10 ); return result; } v25 = *v23; v26 = *v10; result = sub_7690F6((int)a3, *v23, *v10); if ( result ) { ++v23; } else { ++v10; v25 = v26; } *v11++ = v25; } while ( v23 != v21 ) { v27 = *v23++; *v11++ = v27; } } } else if ( (int *)result != a2 ) { v14 = (int *)(result + 4); while ( 1 ) { v15 = v14; if ( v14 == a2 ) break; v17 = *v14++; v16 = v17; while ( v15 != v7 ) { v18 = *(v15 - 1); result = sub_7690F6((int)a3, v16, v18); if ( !result ) break; *v15-- = v18; } *v15 = v16; } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source