// // fmt::internal::PrintfParser::Format from 0x81ed7c to 0x81f122 (934 bytes) // // 0 xrefs: // // 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:49 +0000 // int __fastcall fmt::internal::PrintfParser::Format(_DWORD *a1, int *a2, _DWORD *a3, int a4, _DWORD *a5) { _DWORD *v7; // r6 int v8; // r1 _DWORD *v9; // r2 int v10; // r7 int v11; // r0 unsigned int v12; // r6 _DWORD *v13; // r2 _DWORD *v14; // r0 int v15; // r3 int v16; // r3 _DWORD *v17; // r0 unsigned __int64 v18; // r2 bool v19; // cf _DWORD *v20; // r3 int v21; // r2 int v22; // r0 int *v23; // r0 int *v24; // r0 unsigned int v25; // r6 int *v26; // r7 int v27; // r3 const char *v28; // r2 int v29; // r3 bool v30; // zf char *v31; // r3 fmt::internal *v32; // r0 _DWORD *v33; // r0 _DWORD *v34; // r2 _DWORD *v35; // r0 unsigned int v36; // r1 int *i; // r0 int v38; // r3 int v40; // [sp+14h] [bp-40h] _DWORD *v41; // [sp+24h] [bp-30h] BYREF const char *v42; // [sp+28h] [bp-2Ch] BYREF _DWORD v43[2]; // [sp+2Ch] [bp-28h] BYREF unsigned int v44; // [sp+34h] [bp-20h] BYREF int v45; // [sp+38h] [bp-1Ch] int v46; // [sp+3Ch] [bp-18h] unsigned int v47; // [sp+40h] [bp-14h] int v48; // [sp+44h] [bp-10h] char v49; // [sp+48h] [bp-Ch] v7 = a3; v8 = a5[1]; *a1 = *a5; a1[1] = v8; a1[2] = 0; v41 = a3; while ( 1 ) { v9 = v41; if ( !*v41 ) return fmt::internal::Array::append(a2, v7, (int)v41); ++v41; if ( *v9 != 37 ) continue; if ( v9[1] == 37 ) { fmt::internal::Array::append(a2, v7, (int)(v9 + 1)); v7 = ++v41; continue; } fmt::internal::Array::append(a2, v7, (int)v9); v44 = 0; v47 = 0; v49 = 0; v42 = nullptr; v45 = 32; v48 = -1; v46 = 2; v10 = *v41; if ( (unsigned int)(*v41 - 48) <= 9 ) { v11 = sub_81B8B0(&v41, (int *)&v42); v12 = v11; if ( *v41 == 36 ) { ++v41; goto LABEL_15; } if ( v10 == 48 ) v45 = 48; if ( v11 ) { v44 = v11; v12 = -1; goto LABEL_43; } } v12 = -1; while ( 1 ) { while ( 1 ) { while ( 1 ) { LABEL_15: v13 = v41; v14 = ++v41; v15 = *v13; if ( *v13 == 43 ) { v16 = v47 | 3; goto LABEL_26; } if ( *v13 > 0x2Bu ) break; if ( v15 == 32 ) { v16 = v47 | 1; } else { if ( v15 != 35 ) goto LABEL_27; v16 = v47 | 4; } LABEL_26: v47 = v16; } if ( v15 != 45 ) break; v46 = 1; } if ( v15 != 48 ) break; v45 = 48; } LABEL_27: v41 = v13; if ( (unsigned int)(*v13 - 48) > 9 ) { if ( *v13 == 42 ) { v41 = v14; v17 = fmt::internal::PrintfParser::HandleArgIndex(a1, 0xFFFFFFFF, &v42); switch ( *v17 ) { case 0: v18 = (int)v17[2]; if ( (int)v17[2] >= 0 ) goto LABEL_39; goto LABEL_35; case 1: v18 = (unsigned int)v17[2]; goto LABEL_39; case 2: v18 = *((_QWORD *)v17 + 1); if ( (int)v17[3] < 0 ) { LABEL_35: v19 = (_DWORD)v18 == 0; LODWORD(v18) = -(int)v18; HIDWORD(v18) -= 2 * HIDWORD(v18) + !v19; v46 = 1; } goto LABEL_39; case 3: v18 = *((_QWORD *)v17 + 1); LABEL_39: if ( v18 < 0x80000000 ) goto LABEL_40; if ( !v42 ) v42 = "number is too big in format"; break; default: if ( !v42 ) v42 = "width is not integer"; LODWORD(v18) = 0; LABEL_40: v44 = v18; break; } } } else { v44 = sub_81B8B0(&v41, (int *)&v42); } LABEL_43: v20 = v41; if ( *v41 == 46 ) { ++v41; v21 = v20[1]; if ( (unsigned int)(v21 - 48) <= 9 ) { v22 = sub_81B8B0(&v41, (int *)&v42); goto LABEL_49; } if ( v21 == 42 ) { v41 = v20 + 2; v23 = (int *)fmt::internal::PrintfParser::HandleArgIndex(a1, 0xFFFFFFFF, &v42); if ( *v23 > 3 ) { if ( !v42 ) v42 = "precision is not integer"; } else { v22 = sub_81B842(v23); LABEL_49: v48 = v22; } } } v24 = (int *)fmt::internal::PrintfParser::HandleArgIndex(a1, v12, &v42); v25 = v47; v26 = v24; if ( (v47 & 4) != 0 && !sub_81B842(v24) ) v47 = v25 & 0xFFFFFFFB; if ( v45 == 48 ) { if ( *v26 > 5 ) v27 = 32; else v27 = 4; if ( *v26 > 5 ) v45 = v27; else v46 = v27; } v28 = (const char *)v41; v29 = *v41; if ( *v41 == 106 ) goto LABEL_71; if ( *v41 <= 0x6Au ) { if ( v29 != 76 ) { v30 = v29 == 104; goto LABEL_69; } goto LABEL_71; } if ( v29 == 116 || v29 == 122 ) goto LABEL_71; v30 = v29 == 108; LABEL_69: if ( v30 ) LABEL_71: v28 = (const char *)++v41; v31 = (char *)v41; v7 = ++v41; v32 = (fmt::internal *)(unsigned __int8)*v31; v49 = *v31; switch ( *v26 ) { case 0: fmt::BasicWriter::FormatInt((unsigned int *)a2, v26[2], (int)&v44); continue; case 1: goto LABEL_98; case 2: fmt::BasicWriter::FormatInt( (unsigned int *)a2, *((_QWORD *)v26 + 1), (int)&v44); continue; case 3: fmt::BasicWriter::FormatInt( (unsigned int *)a2, *((_QWORD *)v26 + 1), (int)&v44); continue; case 4: fmt::BasicWriter::FormatDouble((unsigned int *)a2, *((double *)v26 + 1), (int)&v44); continue; case 5: fmt::BasicWriter::FormatDouble((unsigned int *)a2, *((double *)v26 + 1), (int)&v44); continue; case 6: if ( v32 && v32 != (fmt::internal *)((char *)&dword_60 + 3) ) fmt::internal::ReportUnknownType(v32, (char)"char", v28); if ( v44 <= 1 ) { v35 = (_DWORD *)fmt::BasicWriter::GrowBuffer((unsigned int *)a2, 1); goto LABEL_90; } v40 = v45; v33 = (_DWORD *)fmt::BasicWriter::GrowBuffer((unsigned int *)a2, v44); v34 = v33; if ( v46 == 2 ) { memset32(v33, v40, v44 - 1); v34 = &v33[v44 - 1]; goto LABEL_91; } if ( v46 == 3 ) { v35 = (_DWORD *)fmt::BasicWriter::FillPadding((char *)v33, v44, 1, v40); LABEL_90: v34 = v35; goto LABEL_91; } v36 = v44; for ( i = v33 + 1; --v36; ++i ) *i = v40; LABEL_91: *v34 = v26[2]; break; case 7: fmt::BasicWriter::write_str((unsigned int *)a2, (int)(v26 + 2), (int)&v44); continue; case 8: v38 = v26[3]; v43[0] = v26[2]; v43[1] = v38; fmt::BasicWriter::write_str((unsigned int *)a2, (int)v43, (int)&v44); continue; case 9: if ( v32 && v32 != (fmt::internal *)&dword_70 ) fmt::internal::ReportUnknownType(v32, (char)"pointer", v28); v47 = 4; v49 = 120; LABEL_98: fmt::BasicWriter::FormatInt( (unsigned int *)a2, (fmt::internal *)v26[2], (int *)&v44); continue; case 10: if ( v32 ) fmt::internal::ReportUnknownType(v32, (char)"object", v28); ((void (__fastcall *)(int *, int, __int16 *))v26[3])(a2, v26[2], &a1i2r3e45s789g[8]); continue; default: continue; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source