// // fmt::BasicWriter::FormatInt from 0x81cd00 to 0x81ce7c (380 bytes) // // 2 xrefs: // > fmt::BasicFormatter::format @ 0x81d5b0 // > fmt::internal::PrintfParser::Format @ 0x81ddb4 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:01:47 +0000 // void __fastcall fmt::BasicWriter::FormatInt(unsigned int *a1, int a2, int a3) { unsigned int v3; // r4 int v6; // r3 size_t v7; // r5 char v8; // r3 fmt::internal *v9; // r0 int v10; // r9 char *v11; // r0 size_t v12; // r3 char *v13; // r2 unsigned int v14; // r3 int v15; // r1 char *v16; // r0 const char *v17; // r3 int v18; // r2 size_t v19; // r3 char *v20; // r2 unsigned int v21; // r3 int v22; // r1 char *v23; // r0 char v24; // r3 int v25; // r1 char *v26; // r3 unsigned int v27; // r3 char *v28; // r0 char v29; // r3 _DWORD v30[3]; // [sp+8h] [bp-Ch] BYREF v3 = a2; v30[0] = 0; if ( a2 >= 0 ) { v6 = *(_DWORD *)(a3 + 12); v7 = v6 & 1; if ( (v6 & 1) == 0 ) goto LABEL_9; if ( (v6 & 2) != 0 ) v8 = 43; else v8 = 32; LOBYTE(v30[0]) = v8; } else { v3 = -a2; LOBYTE(v30[0]) = 45; } v7 = 1; LABEL_9: v9 = (fmt::internal *)*(unsigned __int8 *)(a3 + 20); if ( v9 == (fmt::internal *)((char *)&dword_60 + 2) ) { LABEL_28: if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { v19 = v7 + 1; v20 = (char *)&v30[2] + v7; v7 += 2; *(v20 - 8) = 48; *((_BYTE *)v30 + v19) = (_BYTE)v9; } v21 = v3; v22 = 0; do { v21 >>= 1; ++v22; } while ( v21 ); v23 = fmt::BasicWriter::PrepareBufferForInt(a1, v22, (int *)a3, v30, v7); do { v24 = v3 & 1; v3 >>= 1; *v23-- = v24 + 48; } while ( v3 ); return; } if ( (unsigned int)v9 <= 0x62 ) { if ( v9 != (fmt::internal *)((char *)&dword_40 + 2) ) { if ( v9 != (fmt::internal *)&dword_58 ) { if ( !*(_BYTE *)(a3 + 20) ) goto LABEL_18; LABEL_42: fmt::internal::ReportUnknownType(v9, (char)"integer", (const char *)a3); return; } LABEL_19: if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { v12 = v7 + 1; v13 = (char *)&v30[2] + v7; v7 += 2; *(v13 - 8) = 48; *((_BYTE *)v30 + v12) = (_BYTE)v9; } v14 = v3; v15 = 0; do { v14 >>= 4; ++v15; } while ( v14 ); v16 = fmt::BasicWriter::PrepareBufferForInt(a1, v15, (int *)a3, v30, v7); if ( *(_BYTE *)(a3 + 20) == 120 ) v17 = "0123456789abcdef"; else v17 = "0123456789ABCDEF"; do { v18 = v3 & 0xF; v3 >>= 4; *v16-- = v17[v18]; } while ( v3 ); return; } goto LABEL_28; } if ( v9 != (fmt::internal *)((char *)&dword_6C + 3) ) { if ( v9 != (fmt::internal *)&dword_78 ) { if ( v9 == (fmt::internal *)&dword_64 ) { LABEL_18: v10 = fmt::internal::CountDigits(v3, a2); v11 = fmt::BasicWriter::PrepareBufferForInt(a1, v10, (int *)a3, v30, v7); fmt::internal::FormatDecimal((unsigned int)&v11[1 - v10], v3, v10); return; } goto LABEL_42; } goto LABEL_19; } v25 = 0; if ( (*(_DWORD *)(a3 + 12) & 4) != 0 ) { v26 = (char *)&v30[2] + v7++; *(v26 - 8) = 48; } v27 = v3; do { v27 >>= 3; ++v25; } while ( v27 ); v28 = fmt::BasicWriter::PrepareBufferForInt(a1, v25, (int *)a3, v30, v7); do { v29 = v3 & 7; v3 >>= 3; *v28-- = v29 + 48; } while ( v3 ); }
GD Web Decomp Icon

GD Web Decomp

Raw Source