// // sub_180041060 from 0x180041060 to 0x1800411ca (362 bytes) // // 3 xrefs: // > fmt::internal::PrintfParser::Format @ 0x180042c70 // > fmt::BasicFormatter::format @ 0x18004443c // > @ 0x1801bb4b8 // // 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:21:39 +0000 // char *__fastcall sub_180041060(__int64 *a1, const void *a2, unsigned __int64 a3, unsigned int *a4) { unsigned __int64 v6; // rcx __int64 v9; // r14 unsigned __int64 v10; // rax __int64 v11; // rbx __int64 v12; // rax unsigned __int16 v13; // di unsigned int v14; // ecx char *v15; // rbx __int64 v16; // rax unsigned __int64 v17; // rdx __int16 v18; // ax unsigned __int64 v19; // rcx _WORD *v20; // rdi __int64 v21; // rdx __int16 v22; // ax __int64 v23; // rcx char *v24; // rdi __int64 v25; // rbx v6 = *a4; v9 = *a1; v10 = a1[1]; if ( v6 <= a3 ) { v25 = v9 + a3; if ( v9 + a3 > v10 ) sub_180044610(a1); *a1 = v25; v15 = (char *)(a1[2] + 2 * v9); } else { v11 = v9 + v6; if ( v9 + v6 > v10 ) sub_180044610(a1); *a1 = v11; v12 = a1[2]; v13 = *((_WORD *)a4 + 2); v14 = a4[2]; v15 = (char *)(v12 + 2 * v9); v16 = *a4; if ( v14 == 2 ) { v17 = (unsigned int)v16 - a3; if ( (unsigned int)v16 != a3 ) { if ( !v13 ) { memset(v15, 0, 2 * v17); v15 += 2 * (*a4 - a3); goto LABEL_24; } v18 = *((_WORD *)a4 + 2); v19 = v17; v20 = v15; while ( v19 ) { *v20++ = v18; --v19; } } v15 += 2 * (*a4 - a3); goto LABEL_24; } if ( v14 == 3 ) { v15 = (char *)fmt::BasicWriter::FillPadding(v15, (unsigned int)v16, a3, v13); } else { v21 = v16 - a3; if ( v16 != a3 ) { if ( v13 ) { v22 = *((_WORD *)a4 + 2); v23 = v21; v24 = &v15[2 * a3]; while ( v23 ) { *(_WORD *)v24 = v22; v24 += 2; --v23; } } else { memset(&v15[2 * a3], 0, 2 * v21); } } } } LABEL_24: memmove(v15, a2, 2 * a3); return v15; }
GD Web Decomp Icon

GD Web Decomp

Raw Source