//
// sub_10066F41C from 0x10066f41c to 0x10066f62c (528 bytes)
//
// 1 xrefs:
// > sub_10066F410 @ 0x10066f418
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 11:11:06 +0000
//
__int64 __fastcall sub_10066F41C(int a1, char *__s, size_t a3, const char **a4, size_t *a5)
{
size_t v7; // x27
char *v8; // x22
const char *v9; // x0
const char *v10; // x23
const char *v11; // x25
int v12; // w11
v7 = a3;
v8 = __s;
*a4 = nullptr;
*a5 = 0;
if ( !a3 )
v7 = strlen(__s);
v9 = (const char *)off_1009E5FD0(4 * v7 / 3 + 4);
v10 = v9;
if ( !v9 )
return 27;
v11 = v9;
if ( v7 )
{
v11 = v9;
do
{
if ( v7 == 1 )
{
v7 = 0;
v12 = 1;
++v8;
}
else if ( v7 == 2 )
{
v7 = 0;
v8 += 2;
v12 = 2;
}
else
{
v8 += 3;
v7 -= 3LL;
v12 = 3;
}
if ( v12 == 1 )
{
sub_1006889EC(v11, 5, "%c%c==");
}
else if ( v12 == 2 )
{
sub_1006889EC(v11, 5, "%c%c%c=");
}
else
{
sub_1006889EC(v11, 5, "%c%c%c%c");
}
v11 += 4;
}
while ( v7 );
}
*v11 = 0;
*a4 = v10;
off_1009E5FD8(nullptr);
*a5 = strlen(v10);
return 0;
}