//
// fmt::BasicFormatter::Format from 0x81d6d8 to 0x81d77e (166 bytes)
//
// 5 xrefs:
// > fmt::format @ 0x81d7bc
// > fmt::print @ 0x81d98e
// > fmt::print @ 0x81da34
// > fmt::print @ 0x81da98
// > fmt::SystemError::init @ 0x81f1a2
//
// 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
//
char *__fastcall fmt::BasicFormatter::Format(_DWORD **a1, char *a2, int a3, _DWORD *a4)
{
_DWORD *v5; // r1
char *v6; // r2
int v7; // r3
_DWORD *v8; // r0
_DWORD *v9; // r1
int v10; // r2
_DWORD *v11; // r0
int v12; // r1
int v13; // r2
int v14; // r3
char *v16; // [sp+Ch] [bp-1Ch] BYREF
_DWORD v17[5]; // [sp+10h] [bp-18h] BYREF
a1[4] = a2;
v16 = a2;
v5 = (_DWORD *)a4[1];
a1[1] = (_DWORD *)*a4;
a1[2] = v5;
a1[3] = nullptr;
while ( 1 )
{
v6 = v16;
if ( !*v16 )
break;
++v16;
v7 = (unsigned __int8)*v6;
if ( v7 == 123 || v7 == 125 )
{
if ( (unsigned __int8)v6[1] == v7 )
{
fmt::internal::Array::append(*a1, a1[4], (int)(v6 + 1));
a1[4] = ++v16;
}
else
{
v8 = *a1;
v9 = a1[4];
a1[5] = &dword_0 + 1;
fmt::internal::Array::append(v8, v9, (int)v6);
v11 = (_DWORD *)fmt::BasicFormatter::ParseArgIndex((int)a1, &v16, v10);
v12 = v11[1];
v13 = v11[2];
v14 = v11[3];
v17[0] = *v11;
v17[1] = v12;
v17[2] = v13;
v17[3] = v14;
v16 = fmt::BasicFormatter::format((int)a1, v16, (int)v17);
}
}
}
return fmt::internal::Array::append(*a1, a1[4], (int)v16);
}