//
// sub_DE9254 from 0xde9254 to 0xde93f0 (412 bytes)
//
// 2 xrefs:
// > sub_DEA1A8 @ 0xdea404
// > sub_DEA1A8 @ 0xdea584
//
// 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:13 +0000
//
__int64 __fastcall sub_DE9254(const char *a1, char *a2, _QWORD **a3, _QWORD *a4)
{
const char *v4; // x19
char *v7; // x23
size_t v8; // x0
const char *v9; // x0
int v10; // w4
const char *v11; // x5
char *v12; // x7
int v13; // t1
_BYTE *v14; // x6
char *v15; // x6
int v16; // t1
char *v17; // x22
unsigned int v18; // w21
const char *v20; // x0
char *v21; // x22
char *(*v22)(const char *); // x19
char *v23; // x0
v4 = a2;
v7 = nullptr;
if ( !a2 )
{
v20 = off_154A3D8(a1);
v21 = (char *)v20;
if ( !v20 )
return 27;
v22 = off_154A3D8;
v23 = basename(v20);
v7 = v22(v23);
off_154A3C8(v21);
if ( !v7 )
return 27;
v4 = v7;
}
if ( !strchr(v4, 92) )
{
v17 = strchr(v4, 34);
if ( !v17 )
{
v9 = v4;
LABEL_11:
v18 = sub_DE9150(a3, a4, (__int64)"; filename=\"%s\"", v9);
off_154A3C8(v17);
off_154A3C8(v7);
return v18;
}
}
v8 = strlen(v4);
v9 = (const char *)off_154A3C0(2 * v8 + 1);
if ( v9 )
{
v10 = *(unsigned __int8 *)v4;
v11 = v4;
v12 = (char *)v9;
if ( *v4 )
{
do
{
while ( 1 )
{
v14 = v12;
if ( v10 == 34 || v10 == 92 )
break;
++v12;
*v14 = *v11;
v13 = *(unsigned __int8 *)++v11;
v10 = v13;
if ( !v13 )
goto LABEL_10;
}
*v12 = 92;
v15 = v12 + 1;
v12 += 2;
*v15 = *v11;
v16 = *(unsigned __int8 *)++v11;
v10 = v16;
}
while ( v16 );
}
LABEL_10:
*v12 = 0;
v17 = (char *)v9;
goto LABEL_11;
}
off_154A3C8(v7);
return 27;
}