// // fmt::internal::PrintfParser::ParseHeader from 0x180042f10 to 0x1800430e1 (465 bytes) // // 2 xrefs: // > @ 0x1801438a8 // > @ 0x1801b1554 // // 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 // __int64 __fastcall fmt::internal::PrintfParser::ParseHeader(__int64 a1, char **a2, __int64 a3, _QWORD *a4) { unsigned int v4; // ebp unsigned int v8; // r15d char v9; // si unsigned int v10; // ecx char *v11; // rcx char v12; // al __int64 v13; // r9 int v15; // eax _DWORD *v16; // r8 int v17; // eax _DWORD *v18; // r9 __int64 v19; // rcx bool v20; // sf v4 = -1; v8 = -1; v9 = **a2; if ( (unsigned __int8)(v9 - 48) <= 9u ) { v10 = sub_18003FD70(a2, a4); if ( **a2 == 36 ) { v8 = v10; ++*a2; } else { if ( v9 == 48 ) *(_WORD *)(a3 + 4) = 48; if ( v10 ) { *(_DWORD *)a3 = v10; return 0xFFFFFFFFLL; } } } while ( 1 ) { while ( 1 ) { while ( 1 ) { while ( 1 ) { while ( 1 ) { v11 = *a2; v12 = **a2; v13 = (__int64)(*a2 + 1); *a2 = (char *)v13; if ( v12 != 32 ) break; *(_DWORD *)(a3 + 12) |= 1u; } if ( v12 != 35 ) break; *(_DWORD *)(a3 + 12) |= 4u; } if ( v12 != 43 ) break; *(_DWORD *)(a3 + 12) |= 3u; } if ( v12 != 45 ) break; *(_DWORD *)(a3 + 8) = 1; } if ( v12 != 48 ) break; *(_WORD *)(a3 + 4) = 48; } *a2 = v11; if ( (unsigned __int8)(*v11 - 48) > 9u ) { if ( *v11 != 42 ) return v8; *a2 = (char *)v13; v17 = *(_DWORD *)(a1 + 16); if ( v17 < 0 ) { if ( !*a4 ) *a4 = "cannot switch from manual to automatic argument indexing"; } else { v4 = *(_DWORD *)(a1 + 16); *(_DWORD *)(a1 + 16) = v17 + 1; } if ( (unsigned __int64)v4 >= *(_QWORD *)(a1 + 8) ) { if ( !*a4 ) *a4 = "argument index is out of range in format"; v18 = &unk_1800EAB38; } else { v18 = (_DWORD *)(*(_QWORD *)a1 + 24LL * v4); } LODWORD(v19) = 0; if ( *v18 ) { if ( *v18 == 1 ) { v19 = (unsigned int)v18[2]; goto LABEL_42; } if ( *v18 != 2 ) { if ( *v18 != 3 ) { if ( !*a4 ) { *a4 = "width is not integer"; *(_DWORD *)a3 = 0; return v8; } LABEL_43: *(_DWORD *)a3 = v19; return v8; } v19 = *((_QWORD *)v18 + 1); LABEL_42: if ( (unsigned __int64)v19 > 0x7FFFFFFF ) { if ( !*a4 ) *a4 = "number is too big in format"; return v8; } goto LABEL_43; } v19 = *((_QWORD *)v18 + 1); v20 = v19 < 0; } else { v19 = (int)v18[2]; v20 = (int)v19 < 0; } if ( v20 ) { v19 = -v19; *(_DWORD *)(a3 + 8) = 1; } goto LABEL_42; } v15 = sub_18003FD70(a2, a4); *v16 = v15; return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source