// // sub_1402FA2A0 from 0x1402fa2a0 to 0x1402fa5bc (796 bytes) // // 4 xrefs: // > sub_1402F9D80 @ 0x1402f9dd8 // > @ 0x1408b33c4 // > @ 0x1408b33f8 // > @ 0x14091e2c0 // // This function is hookable on this platform (idp: pc, 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:30:05 +0000 // char **__fastcall sub_1402FA2A0(char **a1, char *a2, char *a3) { __int64 v6; // rax __int64 v7; // rax __int64 v8; // rbx char *v9; // rdi __int64 v10; // r10 __int64 v11; // r11 __int64 v12; // r11 __int64 v13; // rdx __int64 v14; // r10 char *v15; // r10 char *v16; // r8 int v17; // edx char *v18; // rcx int v19; // r9d bool v20; // al int v22; // edx int v23; // ecx bool v24; // al char *v26; // rdx char *v27; // r11 int v28; // ecx int v29; // r9d bool v30; // al bool v31; // al int v32; // ecx int v33; // eax int v34; // ecx bool v35; // zf char *v36; // r9 int v37; // ecx int v38; // ebx bool v40; // al int v41; // ecx int v42; // eax int v43; // ecx int v44; // ecx int v45; // eax int v46; // ecx int v47; // ecx int v48; // eax int v49; // ecx int v50; // ecx int v51; // eax int v52; // ecx int v53; // eax int v54; // ecx int v55; // eax int v56; // ecx int v57; // ecx int v58; // eax int v59; // ecx v6 = (a3 - 8 - a2) >> 3; if ( v6 <= 40 ) { sub_1402FA780(a2, &a2[8 * ((a3 - a2) >> 4)], a3 - 8); } else { v7 = (v6 + 1) >> 3; v8 = 16 * v7; v9 = &a2[8 * v7]; sub_1402FA780(a2, v9, &a2[16 * v7]); sub_1402FA780(v10 - v11, v10, v11 + v10); sub_1402FA780(&a3[-v8 - 8], &a3[-v12 - 8], a3 - 8); sub_1402FA780(v9, v14, v13); } v16 = v15 + 8; if ( a2 < v15 ) { do { v17 = *((_DWORD *)v15 + 1); v18 = v15 - 8; v19 = *((_DWORD *)v15 - 1); if ( v19 == v17 ) v20 = *(_DWORD *)v18 < *(_DWORD *)v15; else v20 = v19 > v17; if ( v20 ) break; if ( v17 == v19 ? *(_DWORD *)v15 < *(_DWORD *)v18 : v17 > v19 ) break; v15 -= 8; } while ( a2 < v18 ); } if ( v16 < a3 ) { v22 = *((_DWORD *)v15 + 1); do { v23 = *((_DWORD *)v16 + 1); if ( v23 == v22 ) v24 = *(_DWORD *)v16 < *(_DWORD *)v15; else v24 = v23 > v22; if ( v24 ) break; if ( v22 == v23 ? *(_DWORD *)v15 < *(_DWORD *)v16 : v22 > v23 ) break; v16 += 8; } while ( v16 < a3 ); } v26 = v16; v27 = v15; while ( 2 ) { while ( 2 ) { while ( v26 < a3 ) { v28 = *((_DWORD *)v26 + 1); v29 = *((_DWORD *)v15 + 1); if ( v29 == v28 ) v30 = *(_DWORD *)v15 < *(_DWORD *)v26; else v30 = v29 > v28; if ( !v30 ) { if ( v28 == v29 ) v31 = *(_DWORD *)v26 < *(_DWORD *)v15; else v31 = v28 > v29; if ( v31 ) break; if ( v16 != v26 ) { v32 = *(_DWORD *)v16; *(_DWORD *)v16 = *(_DWORD *)v26; v33 = *((_DWORD *)v26 + 1); *(_DWORD *)v26 = v32; v34 = *((_DWORD *)v16 + 1); *((_DWORD *)v16 + 1) = v33; *((_DWORD *)v26 + 1) = v34; } v16 += 8; } v26 += 8; } v35 = v27 == a2; if ( v27 <= a2 ) goto LABEL_53; v36 = v27 - 8; while ( 1 ) { v37 = *((_DWORD *)v15 + 1); v38 = *((_DWORD *)v36 + 1); if ( !(v38 == v37 ? *(_DWORD *)v36 < *(_DWORD *)v15 : v38 > v37) ) break; LABEL_51: v27 -= 8; v36 -= 8; if ( a2 >= v27 ) goto LABEL_52; } if ( v37 == v38 ) v40 = *(_DWORD *)v15 < *(_DWORD *)v36; else v40 = v37 > v38; if ( !v40 ) { v15 -= 8; if ( v15 != v36 ) { v41 = *(_DWORD *)v15; *(_DWORD *)v15 = *(_DWORD *)v36; v42 = *((_DWORD *)v36 + 1); *(_DWORD *)v36 = v41; v43 = *((_DWORD *)v15 + 1); *((_DWORD *)v15 + 1) = v42; *((_DWORD *)v36 + 1) = v43; } goto LABEL_51; } LABEL_52: v35 = v27 == a2; LABEL_53: if ( !v35 ) { v27 -= 8; if ( v26 == a3 ) { v15 -= 8; if ( v27 != v15 ) { v50 = *(_DWORD *)v27; *(_DWORD *)v27 = *(_DWORD *)v15; v51 = *((_DWORD *)v15 + 1); *(_DWORD *)v15 = v50; v52 = *((_DWORD *)v27 + 1); *((_DWORD *)v27 + 1) = v51; *((_DWORD *)v15 + 1) = v52; } v53 = *((_DWORD *)v16 - 2); v16 -= 8; v54 = *(_DWORD *)v15; *(_DWORD *)v15 = v53; v55 = *((_DWORD *)v16 + 1); *(_DWORD *)v16 = v54; v56 = *((_DWORD *)v15 + 1); *((_DWORD *)v15 + 1) = v55; *((_DWORD *)v16 + 1) = v56; } else { v57 = *(_DWORD *)v26; *(_DWORD *)v26 = *(_DWORD *)v27; v58 = *((_DWORD *)v27 + 1); *(_DWORD *)v27 = v57; v59 = *((_DWORD *)v26 + 1); *((_DWORD *)v26 + 1) = v58; v26 += 8; *((_DWORD *)v27 + 1) = v59; } continue; } break; } if ( v26 != a3 ) { if ( v16 != v26 ) { v44 = *(_DWORD *)v15; *(_DWORD *)v15 = *(_DWORD *)v16; v45 = *((_DWORD *)v16 + 1); *(_DWORD *)v16 = v44; v46 = *((_DWORD *)v15 + 1); *((_DWORD *)v15 + 1) = v45; *((_DWORD *)v16 + 1) = v46; } v47 = *(_DWORD *)v15; v16 += 8; *(_DWORD *)v15 = *(_DWORD *)v26; v48 = *((_DWORD *)v26 + 1); *(_DWORD *)v26 = v47; v49 = *((_DWORD *)v15 + 1); *((_DWORD *)v15 + 1) = v48; v15 += 8; *((_DWORD *)v26 + 1) = v49; v26 += 8; continue; } break; } *a1 = v15; a1[1] = v16; return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source