//
// sub_DE6E2C from 0xde6e2c to 0xde7028 (508 bytes)
//
// 2 xrefs:
// > sub_DE724C @ 0xde7254
// > sub_DE7258 @ 0xde7264
//
// 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 13:09:12 +0000
//
__int64 __fastcall sub_DE6E2C(__int64 a1, char *a2, size_t a3, const char **a4, size_t *a5)
{
size_t v7; // x21
char *v9; // x22
const char *v10; // x23
const char *v11; // x19
const char *v12; // x0
unsigned __int8 v13; // w5
bool v14; // zf
char v15; // w4
__int64 v16; // x3
unsigned __int8 v17; // w6
__int64 v18; // x4
unsigned __int8 v19; // w7
size_t v21; // x19
const char *v22; // x0
*a4 = nullptr;
*a5 = 0;
v7 = a3;
v9 = a2;
if ( a3 )
{
v10 = (const char *)off_154A3C0(4 * a3 / 3 + 4);
if ( v10 )
goto LABEL_3;
}
else
{
v21 = strlen(a2);
v7 = v21;
v22 = (const char *)off_154A3C0(4 * v21 / 3 + 4);
v10 = v22;
if ( v22 )
{
if ( !v21 )
{
v11 = v22;
LABEL_9:
*v11 = 0;
*a4 = v10;
off_154A3C8(nullptr);
*a5 = strlen(v10);
return 0;
}
LABEL_3:
v11 = v10;
v12 = v10;
v13 = *v9;
if ( v7 == 1 )
{
LABEL_7:
sub_E02430(v11, 5, "%c%c==", *(unsigned __int8 *)(a1 + (v13 >> 2)), *(unsigned __int8 *)(a1 + 16LL * (v13 & 3)));
}
else
{
while ( 1 )
{
v14 = v7 == 2;
v15 = 16 * (v13 & 3);
v7 -= 3LL;
v16 = v13 >> 2;
if ( v14 )
break;
v17 = v15 | ((unsigned __int8)v9[1] >> 4);
v18 = v9[2] & 0x3F;
v11 += 4;
v19 = (4 * (v9[1] & 0xF)) | ((unsigned __int8)v9[2] >> 6);
v9 += 3;
sub_E02430(
v12,
5,
"%c%c%c%c",
*(unsigned __int8 *)(a1 + v16),
*(unsigned __int8 *)(a1 + v17),
*(unsigned __int8 *)(a1 + v19),
*(unsigned __int8 *)(a1 + v18));
if ( !v7 )
goto LABEL_9;
v12 = v11;
v13 = *v9;
if ( v7 == 1 )
goto LABEL_7;
}
sub_E02430(
v12,
5,
"%c%c%c=",
*(unsigned __int8 *)(a1 + v16),
*(unsigned __int8 *)(a1 + (unsigned __int8)(v15 | ((unsigned __int8)v9[1] >> 4))),
*(unsigned __int8 *)(a1 + 4LL * (v9[1] & 0xF)));
}
v11 += 4;
goto LABEL_9;
}
}
return 27;
}