// // sub_1002942E0 from 0x1002942e0 to 0x1002946c2 (994 bytes) // // 0 xrefs: // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall sub_1002942E0(unsigned __int8 *a1, unsigned __int8 *a2, double a3) { unsigned int v5; // esi unsigned __int8 *v6; // r15 unsigned int v7; // ecx unsigned __int8 *v8; // rax __int64 v9; // rdx unsigned __int8 *v10; // rdi unsigned __int8 *v11; // rsi unsigned __int8 *v12; // r13 __int64 v13; // r8 __int64 v14; // r13 _QWORD *v15; // rax _QWORD *v16; // rax int v17; // eax unsigned int v18; // ebx unsigned int v19; // r13d unsigned int v20; // ebx unsigned int v21; // eax unsigned int v22; // eax _QWORD *v23; // rax unsigned int v24; // r13d unsigned __int64 v25; // r13 unsigned int v26; // ebx size_t v27; // r13 char *v28; // r12 unsigned int v29; // edx char *v30; // rsi __int64 v31; // rdx size_t v32; // rbx _QWORD *v33; // rax _QWORD *v34; // r15 unsigned int v35; // r12d unsigned __int64 v36; // r12 __int64 v37; // rcx unsigned __int8 *v38; // rsi size_t v39; // r12 char *v40; // r14 unsigned int v41; // edx char *v42; // rsi __int64 v43; // rdx __int64 v44; // r13 size_t v45; // rbx char *v46; // rax _QWORD *v47; // rax _QWORD *v48; // [rsp+10h] [rbp-60h] unsigned int v49; // [rsp+1Ch] [rbp-54h] unsigned int v50; // [rsp+2Ch] [rbp-44h] size_t __dst; // [rsp+30h] [rbp-40h] BYREF size_t v52; // [rsp+38h] [rbp-38h] void *__p; // [rsp+40h] [rbp-30h] v5 = *a1; v6 = a1 + 1; v7 = *a2; v8 = a2 + 1; if ( (v7 & 1) != 0 ) v8 = *((unsigned __int8 **)a2 + 2); v9 = v5 >> 1; v10 = *((unsigned __int8 **)a1 + 2); if ( (v5 & 1) != 0 ) v9 = *((_QWORD *)a1 + 1); else v10 = v6; v11 = v8; v12 = v10; if ( !v9 ) { LABEL_16: if ( v12 == &v10[v9] ) { LABEL_17: if ( (v7 & 1) != 0 ) { if ( v11 != &v8[*((_QWORD *)a2 + 1)] ) goto LABEL_19; } else if ( v11 != &v8[(unsigned __int8)v7 >> 1] ) { goto LABEL_19; } sub_100183CF0(&std::cout, (__int64)"The strings are identical.\n", 27); return; } LABEL_19: sub_100183CF0(&std::cout, (__int64)"The strings have different lengths.\n", 36); return; } if ( (v7 & 1) != 0 ) v13 = *((_QWORD *)a2 + 1); else v13 = v7 >> 1; v11 = &v8[v13]; v14 = 0; while ( 1 ) { if ( v13 == v14 ) { v12 = &v10[v14]; goto LABEL_16; } if ( v10[v14] != v8[v14] ) break; if ( v9 == ++v14 ) { v11 = &v8[v14]; goto LABEL_17; } } v15 = sub_100183CF0(&std::cout, (__int64)"Mismatch found at position ", 27); v16 = (_QWORD *)std::ostream::operator<<(v15, (unsigned int)v14); sub_100183CF0(v16, (__int64)":\n", 2); v17 = 100; if ( (int)v14 >= 101 ) v17 = v14; v18 = *a1; v19 = v14 + 100; if ( (v18 & 1) != 0 ) { v20 = *((_DWORD *)a1 + 2); if ( (int)v19 < (int)v20 ) LABEL_27: v20 = v19; } else { v20 = v18 >> 1; if ( v19 < v20 ) goto LABEL_27; } v50 = v17 - 100; v21 = *a2; if ( (v21 & 1) != 0 ) { v22 = *((_DWORD *)a2 + 2); if ( (int)v19 < (int)v22 ) LABEL_30: v22 = v19; } else { v22 = v21 >> 1; if ( v19 < v22 ) goto LABEL_30; } v49 = v22; v23 = sub_100183CF0(&std::cout, (__int64)"Str1: ", 6); v24 = *a1; if ( (v24 & 1) != 0 ) { v25 = *((_QWORD *)a1 + 1); if ( v25 < v50 ) goto LABEL_74; v6 = *((unsigned __int8 **)a1 + 2); } else { v25 = v24 >> 1; if ( v25 < v50 ) goto LABEL_74; } v26 = v20 - v50; v27 = v25 - v50; if ( v27 >= (int)v26 ) v27 = (int)v26; if ( v27 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_75; v48 = v23; if ( v27 >= 0x17 ) { v32 = 26; if ( (v27 | 7) != 0x17 ) v32 = (v27 | 7) + 1; v28 = (char *)operator new(v32); __p = v28; __dst = v32 + 1; v52 = v27; } else { LOBYTE(__dst) = 2 * v27; v28 = (char *)&__dst + 1; if ( !v27 ) { BYTE1(__dst) = 0; v29 = (unsigned __int8)__dst; if ( (__dst & 1) != 0 ) goto LABEL_46; LABEL_51: v30 = (char *)&__dst + 1; v31 = v29 >> 1; goto LABEL_52; } } memmove(v28, &v6[v50], v27); v28[v27] = 0; v29 = (unsigned __int8)__dst; if ( (__dst & 1) == 0 ) goto LABEL_51; LABEL_46: v30 = (char *)__p; v31 = v52; LABEL_52: v33 = sub_100183CF0(v48, (__int64)v30, v31); sub_100183CF0(v33, (__int64)"\n", 1); if ( (__dst & 1) != 0 ) operator delete(__p); v34 = sub_100183CF0(&std::cout, (__int64)"Str2: ", 6); v35 = *a2; if ( (v35 & 1) != 0 ) { v36 = *((_QWORD *)a2 + 1); v37 = v50; if ( v36 < v50 ) goto LABEL_74; v38 = *((unsigned __int8 **)a2 + 2); } else { v36 = v35 >> 1; v37 = v50; v38 = a2 + 1; if ( v36 < v50 ) LABEL_74: sub_1000547C0(); } v39 = v36 - v37; if ( v39 >= (int)(v49 - v50) ) v39 = (int)(v49 - v50); if ( v39 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_75: sub_100006BF0(a3); if ( v39 >= 0x17 ) { v44 = v37; v45 = 26; if ( (v39 | 7) != 0x17 ) v45 = (v39 | 7) + 1; v46 = (char *)operator new(v45); v37 = v44; v40 = v46; __p = v46; __dst = v45 + 1; v52 = v39; LABEL_69: memmove(v40, &v38[v37], v39); v40[v39] = 0; v41 = (unsigned __int8)__dst; if ( (__dst & 1) != 0 ) goto LABEL_65; goto LABEL_70; } LOBYTE(__dst) = 2 * v39; v40 = (char *)&__dst + 1; if ( v39 ) goto LABEL_69; BYTE1(__dst) = 0; v41 = (unsigned __int8)__dst; if ( (__dst & 1) != 0 ) { LABEL_65: v42 = (char *)__p; v43 = v52; goto LABEL_71; } LABEL_70: v43 = v41 >> 1; v42 = (char *)&__dst + 1; LABEL_71: v47 = sub_100183CF0(v34, (__int64)v42, v43); sub_100183CF0(v47, (__int64)"\n", 1); if ( (__dst & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source