// // fmt::BasicWriter::FormatInt from 0xb69b64 to 0xb69dfc (664 bytes) // // 3 xrefs: // > fmt::internal::PrintfParser::Format @ 0xb6ad08 // > fmt::BasicFormatter::format @ 0xb6b32c // > @ 0xc0858 // // 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::BasicWriter::FormatInt( size_t *a1, unsigned int a2, __int64 a3, int a4, int a5, int a6, int a7, int a8, char a9) { unsigned int v9; // w19 const char *v11; // x2 int v12; // w1 unsigned int v13; // w4 unsigned int v14; // w1 bool v15; // cc char v17; // w1 unsigned int v18; // w2 unsigned int v19; // w1 char *v20; // x0 char v21; // w1 unsigned int v22; // w2 unsigned int v23; // w1 char *v24; // x0 char v25; // w1 unsigned int *v26; // x2 unsigned int v27; // w21 char *v28; // x0 unsigned int v29; // w2 unsigned int v30; // w1 char *v31; // x0 const char *v32; // x2 __int64 v33; // x1 unsigned int v34; // w2 unsigned int v35; // w2 char *v36; // x1 _DWORD v37[2]; // [xsp+30h] [xbp+30h] BYREF v9 = a2; v11 = nullptr; v37[0] = 0; if ( (a2 & 0x80000000) != 0 ) { v9 = -a2; LOBYTE(v37[0]) = 45; v13 = 1; LABEL_3: v14 = *(unsigned __int8 *)(a3 + 20); v15 = v14 > 0x62; if ( v14 != 98 ) goto LABEL_4; LABEL_15: if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { *((_BYTE *)v37 + v13) = 48; v35 = v13 + 1; v13 += 2; *((_BYTE *)v37 + v35) = v14; } v18 = v9; v19 = 0; do { v18 >>= 1; ++v19; } while ( v18 ); v20 = fmt::BasicWriter::PrepareBufferForInt(a1, v19, (unsigned int *)a3, v37, v13); do { v21 = v9 & 1; v9 >>= 1; *v20-- = v21 + 48; } while ( v9 ); return _stack_chk_guard; } v12 = *(_DWORD *)(a3 + 12); v13 = 0; if ( (v12 & 1) == 0 ) goto LABEL_3; v11 = (const char *)&qword_20; if ( (v12 & 2) != 0 ) v17 = 43; else v17 = 32; LOBYTE(v37[0]) = v17; v14 = *(unsigned __int8 *)(a3 + 20); v13 = 1; v15 = v14 > 0x62; if ( v14 == 98 ) goto LABEL_15; LABEL_4: if ( !v15 ) { if ( v14 != 66 ) { if ( v14 != 88 ) { if ( !v14 ) goto LABEL_32; goto LABEL_9; } LABEL_36: if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { *((_BYTE *)v37 + v13) = 48; v34 = v13 + 1; v13 += 2; *((_BYTE *)v37 + v34) = v14; } v29 = v9; v30 = 0; do { v29 >>= 4; ++v30; } while ( v29 ); v31 = fmt::BasicWriter::PrepareBufferForInt(a1, v30, (unsigned int *)a3, v37, v13); if ( *(_BYTE *)(a3 + 20) == 120 ) v32 = "0123456789abcdef"; else v32 = "0123456789ABCDEF"; do { v33 = v9 & 0xF; v9 >>= 4; *v31-- = v32[v33]; } while ( v9 ); return _stack_chk_guard; } goto LABEL_15; } if ( v14 != 111 ) { if ( v14 != 120 ) { if ( v14 == 100 ) { LABEL_32: v26 = (unsigned int *)a3; v27 = (int)(1233 * (32 - __clz(v9 | 1))) >> 12; if ( v9 >= fmt::internal::POWERS_OF_10_32[v27] ) ++v27; v28 = fmt::BasicWriter::PrepareBufferForInt(a1, v27, v26, v37, v13); fmt::internal::FormatDecimal(&v28[1LL - v27], v9, v27); return _stack_chk_guard; } LABEL_9: fmt::internal::ReportUnknownType((fmt::internal *)v14, (char)"integer", v11); return _stack_chk_guard; } goto LABEL_36; } if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { v36 = &a9 + v13++; *(v36 - 16) = 48; } v22 = v9; v23 = 0; do { v22 >>= 3; ++v23; } while ( v22 ); v24 = fmt::BasicWriter::PrepareBufferForInt(a1, v23, (unsigned int *)a3, v37, v13); do { v25 = v9 & 7; v9 >>= 3; *v24-- = v25 + 48; } while ( v9 ); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source