// // sub_CD7234 from 0xcd7234 to 0xcd7550 (796 bytes) // // 2 xrefs: // > sub_CD1368 @ 0xcd13b4 // > sub_CD1368 @ 0xcd13f4 // // 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 // unsigned __int64 *__fastcall sub_CD7234(unsigned __int64 *a1, _BYTE *a2, __int64 a3, unsigned __int8 a4) { int v7; // w24 unsigned __int64 *v8; // x20 unsigned __int8 *v9; // x0 int v10; // w0 unsigned __int64 v11; // x1 __int64 v12; // x4 _BYTE *v13; // x25 __int64 v14; // x1 signed __int64 v15; // x19 _BYTE *v16; // x0 bool v17; // zf signed __int64 v18; // x0 void *v19; // x0 unsigned __int64 v20; // x2 unsigned __int64 v21; // x1 unsigned __int64 v22; // x3 int v23; // w1 unsigned __int64 v24; // x0 unsigned __int64 v25; // x1 unsigned __int64 v27; // x0 unsigned __int64 v28; // x2 unsigned __int8 *v29; // x0 char v30; // [xsp+68h] [xbp+68h] BYREF a1[1] = 0; v7 = a4; sub_CD14C0(&v30, a1, 1); if ( !v30 ) { LABEL_18: v23 = 0; goto LABEL_19; } v8 = *(unsigned __int64 **)((char *)a1 + *(_QWORD *)(*a1 - 24) + 232); v9 = (unsigned __int8 *)v8[2]; if ( (unsigned __int64)v9 >= v8[3] ) v10 = (*(__int64 (__fastcall **)(_QWORD))(*v8 + 72))(*(unsigned __int64 *)((char *)a1 + *(_QWORD *)(*a1 - 24) + 232)); else v10 = *v9; while ( 1 ) { v11 = a1[1]; LABEL_5: v12 = v11 + 1; if ( v10 == v7 || v10 == -1 ) break; while ( 1 ) { if ( v12 >= a3 ) goto LABEL_14; v13 = (_BYTE *)v8[2]; v14 = a3 - v11 - 1; v15 = v8[3] - (_QWORD)v13; if ( v14 <= v15 ) v15 = v14; if ( v15 <= 1 ) break; v16 = memchr((const void *)v8[2], v7, v15); v17 = v16 == nullptr; v18 = v16 - v13; if ( !v17 ) v15 = v18; v19 = a2; a2 += v15; memcpy(v19, v13, v15); v20 = v8[2]; v21 = a1[1]; v22 = v8[3]; v8[2] = v20 + v15; v11 = v15 + v21; a1[1] = v11; if ( v20 + v15 >= v22 ) goto LABEL_31; v10 = *(unsigned __int8 *)(v20 + v15); v12 = v11 + 1; if ( v10 == v7 || v10 == -1 ) goto LABEL_14; } *a2++ = v10; v27 = v8[2]; v28 = v8[3]; ++a1[1]; if ( v27 < v28 ) { v29 = (unsigned __int8 *)(v27 + 1); v8[2] = (unsigned __int64)v29; goto LABEL_29; } v10 = (*(__int64 (__fastcall **)(unsigned __int64 *))(*v8 + 80))(v8); if ( v10 != -1 ) { v29 = (unsigned __int8 *)v8[2]; v28 = v8[3]; LABEL_29: if ( (unsigned __int64)v29 < v28 ) { v10 = *v29; v11 = a1[1]; goto LABEL_5; } LABEL_31: v10 = (*(__int64 (__fastcall **)(unsigned __int64 *))(*v8 + 72))(v8); continue; } } LABEL_14: if ( v10 != -1 ) { v23 = 4; if ( v7 != v10 ) goto LABEL_19; v24 = v8[2]; v25 = v8[3]; a1[1] = v12; if ( v24 < v25 ) { v23 = 0; v8[2] = v24 + 1; goto LABEL_19; } (*(void (__fastcall **)(unsigned __int64 *))(*v8 + 80))(v8); goto LABEL_18; } v23 = 2; LABEL_19: if ( a3 > 0 ) *a2 = 0; if ( !a1[1] ) { v23 |= 4u; LABEL_23: sub_CCE830((__int64)a1 + *(_QWORD *)(*a1 - 24), v23 | *(_DWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24) + 32)); return a1; } if ( v23 ) goto LABEL_23; return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source