// // fmt::BasicFormatter::format from 0x81e9cc to 0x81ecc4 (760 bytes) // // 1 xrefs: // > fmt::BasicFormatter::Format @ 0x81ed54 // // 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:48 +0000 // char *__fastcall fmt::BasicFormatter::format(int a1, char *a2, int *a3) { int v4; // r1 char *v7; // r1 int v8; // r3 char *v9; // r0 int v10; // r2 int v11; // t1 int v13; // lr char *v14; // r7 char *v15; // r12 char *v16; // r0 int v17; // r1 int v18; // r2 int v19; // r3 int v20; // r3 char *v21; // r3 int v22; // r2 _DWORD *v23; // r0 __int64 v24; // r2 char *v25; // r3 char *v26; // r2 int v27; // r7 _DWORD *v28; // r0 _DWORD *v29; // r2 _DWORD *v30; // r0 unsigned int v31; // r1 int *i; // r3 int v33; // r3 unsigned int *v34; // r0 char *v35; // [sp+Ch] [bp-2Ch] BYREF int v36; // [sp+10h] [bp-28h] BYREF _DWORD v37[2]; // [sp+14h] [bp-24h] BYREF unsigned int v38; // [sp+1Ch] [bp-1Ch] BYREF int v39; // [sp+20h] [bp-18h] int v40; // [sp+24h] [bp-14h] int v41; // [sp+28h] [bp-10h] int v42; // [sp+2Ch] [bp-Ch] fmt::internal *v43; // [sp+30h] [bp-8h] v35 = a2; v39 = 32; v42 = -1; v4 = *(_DWORD *)a2; v36 = 0; v38 = 0; v40 = 0; v41 = 0; LOBYTE(v43) = 0; if ( v4 != 58 ) goto LABEL_53; if ( *a3 != 10 ) { v13 = *((_DWORD *)a2 + 1); v14 = a2 + 4; v35 = a2 + 4; if ( !v13 ) goto LABEL_28; v15 = a2 + 8; while ( 1 ) { v16 = v15; v15 -= 4; v17 = *(_DWORD *)v16; if ( *(_DWORD *)v16 == 61 ) { v18 = 4; goto LABEL_22; } if ( *(_DWORD *)v16 > 0x3Du ) { if ( v17 == 62 ) { v18 = 2; goto LABEL_22; } if ( v17 == 94 ) { v18 = 3; goto LABEL_22; } } else if ( v17 == 60 ) { v18 = 1; LABEL_22: v40 = v18; if ( v16 == v14 ) { v35 = a2 + 8; } else if ( v13 != 125 ) { v39 = v13; v35 = a2 + 12; } LABEL_28: v19 = *(_DWORD *)v35; if ( *(_DWORD *)v35 == 43 ) { fmt::BasicFormatter::CheckSign(a1, (int **)&v35, a3); v20 = v41 | 3; LABEL_34: v41 = v20; } else if ( v19 == 45 ) { fmt::BasicFormatter::CheckSign(a1, (int **)&v35, a3); } else if ( v19 == 32 ) { fmt::BasicFormatter::CheckSign(a1, (int **)&v35, a3); v20 = v41 | 1; goto LABEL_34; } if ( *(_DWORD *)v35 == 35 ) { v35 += 4; v41 |= 4u; } if ( (unsigned int)(*(_DWORD *)v35 - 48) <= 9 ) { if ( *(_DWORD *)v35 == 48 ) { v39 = 48; v40 = 4; } v38 = sub_81B8B0((_DWORD **)&v35, &v36); } v21 = v35; if ( *(_DWORD *)v35 == 46 ) { v35 += 4; v42 = 0; v22 = *((_DWORD *)v21 + 1); if ( (unsigned int)(v22 - 48) > 9 ) { if ( v22 == 123 ) { v35 = v21 + 8; ++*(_DWORD *)(a1 + 20); v23 = (_DWORD *)fmt::BasicFormatter::ParseArgIndex(a1, (_DWORD **)&v35, 123); switch ( *v23 ) { case 0: case 1: LODWORD(v24) = v23[2]; break; case 2: case 3: v24 = *((_QWORD *)v23 + 1); break; default: LODWORD(v24) = 0; break; } HIDWORD(v24) = *(_DWORD *)(a1 + 20); v42 = v24; *(_DWORD *)(a1 + 20) = HIDWORD(v24) - 1; } } else { v42 = sub_81B8B0((_DWORD **)&v35, &v36); } } v25 = v35; if ( *(_DWORD *)v35 != 125 && *(_DWORD *)v35 ) { v35 += 4; LOBYTE(v43) = *(_DWORD *)v25; } LABEL_53: v26 = v35; *(_DWORD *)(a1 + 16) = v35; switch ( *a3 ) { case 0: fmt::BasicWriter::FormatInt(*(unsigned int **)a1, a3[2], (int)&v38); return v35; case 1: goto LABEL_79; case 2: fmt::BasicWriter::FormatInt( *(unsigned int **)a1, *((_QWORD *)a3 + 1), (int)&v38); return v35; case 3: fmt::BasicWriter::FormatInt( *(unsigned int **)a1, *((_QWORD *)a3 + 1), (int)&v38); return v35; case 4: fmt::BasicWriter::FormatDouble(*(unsigned int **)a1, *((double *)a3 + 1), (int)&v38); return v35; case 5: fmt::BasicWriter::FormatDouble(*(unsigned int **)a1, *((double *)a3 + 1), (int)&v38); return v35; case 6: if ( (_BYTE)v43 && (unsigned __int8)v43 != 99 ) fmt::internal::ReportUnknownType((fmt::internal *)(unsigned __int8)v43, (char)"char", v26); if ( v38 <= 1 ) { v30 = (_DWORD *)fmt::BasicWriter::GrowBuffer(*(unsigned int **)a1, 1); } else { v27 = v39; v28 = (_DWORD *)fmt::BasicWriter::GrowBuffer(*(unsigned int **)a1, v38); v29 = v28; if ( v40 == 2 ) { memset32(v28, v27, v38 - 1); v29 = &v28[v38 - 1]; goto LABEL_72; } if ( v40 != 3 ) { v31 = v38; for ( i = v28 + 1; --v31; ++i ) *i = v27; LABEL_72: *v29 = a3[2]; return v35; } v30 = (_DWORD *)fmt::BasicWriter::FillPadding((char *)v28, v38, 1, v27); } v29 = v30; goto LABEL_72; case 7: fmt::BasicWriter::write_str(*(unsigned int **)a1, (int)(a3 + 2), (int)&v38); return v35; case 8: v33 = a3[3]; v34 = *(unsigned int **)a1; v37[0] = a3[2]; v37[1] = v33; fmt::BasicWriter::write_str(v34, (int)v37, (int)&v38); return v35; case 9: if ( (_BYTE)v43 && (unsigned __int8)v43 != 112 ) fmt::internal::ReportUnknownType((fmt::internal *)(unsigned __int8)v43, (char)"pointer", v26); v41 = 4; LOBYTE(v43) = 120; LABEL_79: fmt::BasicWriter::FormatInt( *(unsigned int **)a1, (fmt::internal *)a3[2], (int *)&v38); return v35; case 10: ((void (__fastcall *)(int, int, char *))a3[3])(a1, a3[2], v26 - 4); return v35; default: return v35; } } if ( v14 > v15 ) { v40 = 0; goto LABEL_28; } } } ((void (__fastcall *)(int, int, char *))a3[3])(a1, a3[2], a2); v7 = v35; v8 = 1; while ( 1 ) { v9 = v7; v11 = *(_DWORD *)v7; v7 += 4; v10 = v11; if ( !v11 ) break; if ( v10 == 123 ) { ++v8; } else if ( v10 == 125 && !--v8 ) { return v9 + 4; } } return v9 + 4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source