// // sub_10065F920 from 0x10065f920 to 0x10065fadb (443 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 // bool __fastcall sub_10065F920(int a1, unsigned __int8 *a2, void **a3, char **a4) { unsigned int v7; // ecx __int64 v8; // rcx unsigned __int64 v9; // rsi char *v10; // rax unsigned int v11; // eax __int64 v12; // rax unsigned __int64 v13; // rsi char *v14; // rcx unsigned int v15; // r12d size_t v16; // r12 _WORD *v17; // rdx int v18; // eax char *v19; // r13 char *v20; // r14 __int64 v21; // rbx unsigned int v22; // eax __int64 v23; // rax _WORD *v24; // rdx char *__src; // [rsp+10h] [rbp-40h] char *v29; // [rsp+18h] [rbp-38h] BYREF _WORD *v30[6]; // [rsp+20h] [rbp-30h] BYREF switch ( a1 ) { case 1: v15 = *a2; if ( (v15 & 1) != 0 ) { __src = *((char **)a2 + 2); v16 = *((_QWORD *)a2 + 1); if ( !v16 ) goto LABEL_20; } else { __src = (char *)(a2 + 1); v16 = v15 >> 1; if ( !v16 ) { LABEL_20: memcpy(*a3, __src, v16); v22 = *a2; if ( (v22 & 1) != 0 ) v23 = *((_QWORD *)a2 + 1); else v23 = v22 >> 1; *a3 = (char *)*a3 + v23; v18 = 0; return v18 == 0; } } v19 = __src; v20 = &__src[v16]; while ( 1 ) { v21 = byte_1008230B0[(unsigned __int8)*v19] + 1LL; if ( v20 - v19 < v21 || !sub_10065F320(v19, v21) ) break; v19 += v21; if ( v19 == v20 ) goto LABEL_20; } *a4 = v19; v18 = 3; return v18 == 0; case 2: v11 = *a2; if ( (v11 & 1) != 0 ) { v14 = *((char **)a2 + 2); v12 = *((_QWORD *)a2 + 1); v13 = (unsigned __int64)&v14[v12]; } else { v12 = v11 >> 1; v13 = (unsigned __int64)&a2[v12 + 1]; v14 = (char *)(a2 + 1); } v17 = *a3; v29 = v14; v30[0] = v17; v18 = sub_10065F540(&v29, v13, v30, (unsigned __int64)&v17[2 * v12], 0); if ( !v18 ) { LABEL_24: *a3 = v30[0]; return v18 == 0; } break; case 4: v7 = *a2; if ( (v7 & 1) != 0 ) { v10 = *((char **)a2 + 2); v8 = *((_QWORD *)a2 + 1); v9 = (unsigned __int64)&v10[v8]; } else { v8 = v7 >> 1; v9 = (unsigned __int64)&a2[v8 + 1]; v10 = (char *)(a2 + 1); } v24 = *a3; v29 = v10; v30[0] = v24; v18 = sub_10065F750(&v29, v9, (unsigned int **)v30, (unsigned __int64)&v24[8 * v8], 0); if ( !v18 ) goto LABEL_24; break; default: sub_1007CEE80(); } *a4 = v29; if ( v18 == 2 ) sub_1007CEE50(); return v18 == 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source