// // sub_14051C0B0 from 0x14051c0b0 to 0x14051c247 (407 bytes) // // 2 xrefs: // > sub_140514770 @ 0x1405155b8 // > @ 0x14092afec // // 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:33:36 +0000 // char *__fastcall sub_14051C0B0(char **a1, char *a2, unsigned __int64 a3) { char *v3; // rdi unsigned __int64 v6; // r8 unsigned __int64 v8; // rdx unsigned __int64 v9; // rcx unsigned __int64 v10; // rbx size_t v11; // rbx char *v12; // rax char *v13; // rdx char *result; // rax unsigned __int64 v15; // rbx v3 = *a1; v6 = 0xC30C30C30C30C30DuLL; v8 = (a1[2] - *a1) / 168; if ( a3 <= v8 ) { v15 = (a1[1] - v3) / 168; if ( a3 > v15 ) { memmove(v3, a2, 168 * v15); v3 = a1[1]; v13 = &a2[168 * v15]; a3 -= v15; goto LABEL_15; } } else { if ( a3 > 0x186186186186186LL ) sub_14005A170(); v9 = v8 >> 1; if ( v8 <= 0x186186186186186LL - (v8 >> 1) ) { v10 = v8 + v9; if ( v8 + v9 < a3 ) v10 = a3; } else { v10 = 0x186186186186186LL; } if ( v3 ) { if ( 168 * v8 >= 0x1000 ) { if ( (unsigned __int64)&v3[-*((_QWORD *)v3 - 1) - 8] > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); v3 = *((char **)v3 - 1); } j_j_free(v3); *a1 = nullptr; a1[1] = nullptr; a1[2] = nullptr; } if ( v10 > 0x186186186186186LL ) sub_140009CF0(v9, v8, v6); v11 = 168 * v10; v12 = (char *)sub_14003D460(v11); *a1 = v12; v3 = v12; a1[1] = v12; a1[2] = &v12[v11]; } v13 = a2; LABEL_15: memmove(v3, v13, 168 * a3); result = &v3[168 * a3]; a1[1] = result; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source