//
// fmt::BasicWriter::write_str from 0x81c46c to 0x81c4e0 (116 bytes)
//
// 3 xrefs:
// > fmt::BasicWriter::write_str @ 0x81c516
// > fmt::BasicWriter::FormatDouble @ 0x81c5ee
// > fmt::BasicWriter::FormatDouble @ 0x81c86e
//
// 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:46 +0000
//
char *__fastcall fmt::BasicWriter::write_str(
unsigned int *a1,
unsigned __int8 *a2,
unsigned int a3,
int *a4)
{
char *v7; // r0
int v8; // r1
int v9; // r3
char *v10; // r2
char *v11; // r0
unsigned __int8 *v12; // r4
unsigned __int8 *v13; // r3
char *v14; // r1
int v15; // t1
if ( *a4 <= a3 )
{
v11 = (char *)fmt::BasicWriter::GrowBuffer(a1, a3);
goto LABEL_8;
}
v7 = (char *)fmt::BasicWriter::GrowBuffer(a1, *a4);
v8 = a4[2];
v9 = a4[1];
v10 = v7;
if ( v8 != 2 )
{
if ( v8 != 3 )
{
memset32(&v7[4 * a3], v9, *a4 - a3);
goto LABEL_9;
}
v11 = (char *)fmt::BasicWriter::FillPadding(v7, *a4, a3, v9);
LABEL_8:
v10 = v11;
goto LABEL_9;
}
memset32(v7, v9, *a4 - a3);
v10 = &v7[4 * (*a4 - a3)];
LABEL_9:
v12 = &a2[a3];
v13 = a2;
v14 = v10;
while ( v13 != v12 )
{
v15 = *v13++;
*(_DWORD *)v14 = v15;
v14 += 4;
}
return v10;
}