//
// fmt::SystemError::init from 0x81f144 to 0x81f23a (246 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
//
void __fastcall fmt::SystemError::init(int a1, int a2, char *a3, int a4, _DWORD *a5)
{
_DWORD *v7; // r2
size_t v8; // r3
int v9; // [sp+10h] [bp-24h] BYREF
size_t v10; // [sp+14h] [bp-20h]
_DWORD *v11; // [sp+18h] [bp-1Ch]
_DWORD *v12[6]; // [sp+1Ch] [bp-18h] BYREF
unsigned int v13[2]; // [sp+34h] [bp+0h] BYREF
char *v14; // [sp+3Ch] [bp+8h]
char v15; // [sp+40h] [bp+Ch] BYREF
size_t v16; // [sp+234h] [bp+200h] BYREF
int v17; // [sp+238h] [bp+204h]
char *v18; // [sp+23Ch] [bp+208h]
char v19; // [sp+240h] [bp+20Ch] BYREF
v13[1] = 500;
v17 = 500;
v18 = &v19;
*(_DWORD *)(a1 + 8) = a2;
v14 = &v15;
v13[0] = 0;
v16 = 0;
v12[0] = &v16;
v12[2] = nullptr;
fmt::BasicFormatter::Format(v12, a3, a4, a5);
v9 = 0;
v10 = 0;
v11 = nullptr;
std::string::__init(&v9, v18, v16);
fmt::internal::Array::free((int)&v16);
if ( (v9 & 1) != 0 )
v7 = v11;
else
v7 = (int *)((char *)&v9 + 1);
v12[0] = v7;
if ( (v9 & 1) != 0 )
v8 = v10;
else
v8 = (int)(unsigned __int8)v9 >> 1;
v12[1] = (_DWORD *)v8;
fmt::internal::FormatSystemErrorMessage(v13, a2, (const char *)v12[0], v8);
std::string::~string((int)&v9);
v16 = 0;
v17 = 0;
v18 = nullptr;
std::string::__init((int *)&v16, v14, v13[0]);
std::runtime_error::runtime_error(v12, &v16);
std::runtime_error::operator=(a1, v12);
std::runtime_error::~runtime_error((std::runtime_error *)v12);
std::string::~string((int)&v16);
fmt::internal::Array::free((int)v13);
}