//
// sub_619654 from 0x619654 to 0x61973e (234 bytes)
//
// 2 xrefs:
// > sub_61ABE8 @ 0x61b0e0
// > sub_61ABE8 @ 0x61b8e6
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_619654(int a1, int a2)
{
int v3; // r0
const char *v4; // r2
int result; // r0
const char *v6; // r2
int v7; // r0
const char *v8; // r2
v3 = *(_DWORD *)a1;
if ( a2 == 331 )
{
if ( *(_DWORD *)(a1 + 1192) != 3 )
goto LABEL_4;
v6 = *(const char **)(*(_DWORD *)(v3 + 332) + 8);
if ( !v6 )
v6 = &byte_9B1912;
result = sub_63A7E4(a1 + 1088, "PASS %s", v6);
if ( !result )
*(_DWORD *)(a1 + 1192) = 4;
}
else if ( (unsigned int)(a2 - 200) <= 0x63 )
{
v7 = a1 + 1088;
if ( *(_BYTE *)(a1 + 452) )
{
result = sub_63A7E4(v7, "PBSZ %d", 0);
if ( !result )
*(_DWORD *)(a1 + 1192) = 6;
}
else
{
result = sub_63A7E4(v7, "%s", "PWD");
if ( !result )
*(_DWORD *)(a1 + 1192) = 9;
}
}
else
{
if ( a2 != 332 )
{
LABEL_4:
v4 = *(const char **)(v3 + 1004);
if ( v4 && !*(_BYTE *)(v3 + 34652) )
{
result = sub_63A7E4(a1 + 1088, "%s", v4);
if ( !result )
{
*(_BYTE *)(*(_DWORD *)a1 + 34652) = 1;
*(_DWORD *)(a1 + 1192) = 3;
}
}
else
{
sub_6180F8(v3, "Access denied: %03d", a2);
return 67;
}
return result;
}
v8 = *(const char **)(v3 + 1000);
if ( v8 )
{
result = sub_63A7E4(a1 + 1088, "ACCT %s", v8);
if ( !result )
*(_DWORD *)(a1 + 1192) = 5;
}
else
{
sub_6180F8(v3, "ACCT requested but none available");
return 67;
}
}
return result;
}