//
// sub_DF380C from 0xdf380c to 0xdf3988 (380 bytes)
//
// 2 xrefs:
// > sub_DF5648 @ 0xdf5b34
// > sub_DF5648 @ 0xdf6764
//
// 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:19 +0000
//
__int64 __fastcall sub_DF380C(__int64 a1, int a2)
{
__int64 v3; // x0
const char *v4; // x3
__int64 result; // x0
const char *v6; // x2
int v7; // w0
__int64 v8; // x19
const char *v9; // x2
__int64 v10; // x19
v3 = *(_QWORD *)a1;
if ( a2 == 331 )
{
if ( *(_DWORD *)(a1 + 1736) != 3 )
goto LABEL_4;
v6 = *(const char **)(*(_QWORD *)(v3 + 536) + 16LL);
if ( !v6 )
v6 = &byte_11B8890;
result = sub_E20668(a1 + 1560, "PASS %s", v6);
if ( !(_DWORD)result )
*(_DWORD *)(a1 + 1736) = 4;
}
else if ( (unsigned int)(a2 - 200) <= 0x63 )
{
v7 = *(unsigned __int8 *)(a1 + 664);
v8 = a1 + 1560;
if ( v7 )
{
result = sub_E20668(v8, "PBSZ %d", 0);
if ( !(_DWORD)result )
*(_DWORD *)(v8 + 176) = 6;
}
else
{
result = sub_E20668(v8, "%s", "PWD");
if ( !(_DWORD)result )
*(_DWORD *)(v8 + 176) = 9;
}
}
else
{
if ( a2 != 332 )
{
LABEL_4:
v4 = *(const char **)(v3 + 1736);
if ( v4 && !*(_BYTE *)(v3 + 36000) )
{
result = sub_E20668(a1 + 1560, "%s", v4);
if ( !(_DWORD)result )
{
*(_BYTE *)(*(_QWORD *)a1 + 36000LL) = 1;
*(_DWORD *)(a1 + 1736) = 3;
}
}
else
{
sub_DF1848(v3, "Access denied: %03d", a2);
return 67;
}
return result;
}
v9 = *(const char **)(v3 + 1728);
if ( v9 )
{
v10 = a1 + 1560;
result = sub_E20668(v10, "ACCT %s", v9);
if ( !(_DWORD)result )
*(_DWORD *)(v10 + 176) = 5;
}
else
{
sub_DF1848(v3, "ACCT requested but none available");
return 67;
}
}
return result;
}