//
// sub_100620868 from 0x100620868 to 0x100620a0c (420 bytes)
//
// 1 xrefs:
// > ??> @ 0x100868b70
//
// 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
//
__int64 __fastcall sub_100620868(char *a1, _DWORD *a2, const char *a3, __int64 *a4, __int64 a5)
{
char *v7; // x23
__int64 v8; // x0
__int64 (__fastcall *v9)(const char *, _QWORD, _QWORD, __int64); // x8
__int64 v10; // x21
int v11; // w0
__int64 v13; // x0
_QWORD **v14; // x22
_BYTE *v15; // x23
int v16; // w24
if ( a1 )
{
if ( *a1 )
v7 = a1;
else
v7 = nullptr;
}
else
{
v7 = nullptr;
}
if ( a5 )
{
v9 = *(__int64 (__fastcall **)(const char *, _QWORD, _QWORD, __int64))a5;
v8 = *(_QWORD *)(a5 + 8);
v10 = *(_QWORD *)(a5 + 16);
}
else
{
v9 = nullptr;
v10 = 0;
v8 = 0;
}
if ( a4 )
{
if ( *a4 )
{
v9 = nullptr;
v8 = *a4;
}
if ( a4[1] )
v10 = a4[1];
}
if ( v9 || v8 )
{
if ( v8 )
{
v13 = sub_100617220(v8);
v14 = (_QWORD **)v13;
if ( v13 )
{
v15 = sub_100617A5C(v13, "pass phrase", v7);
v16 = sub_100617360((__int64)v14, (__int64)v15, 2, (__int64)a3, 0, *a2 - 1);
sub_100617B88((__int64)v14, v10);
sub_100617D88((__int64)v14, 1, 1);
if ( (v16 & 0x80000000) == 0 )
{
while ( (sub_100617BCC((__int64)v14) & 0x80000000) != 0 )
{
if ( !(unsigned int)sub_100617D88((__int64)v14, 2, 0) )
goto LABEL_27;
}
*a2 = strlen(a3);
}
LABEL_27:
sub_1006172BC(v14);
sub_100588C44(v15);
}
}
else
{
*a2 = v9(a3, (unsigned int)*a2, 0, v10);
}
if ( *a2 )
return 0;
else
return 0xFFFFFFFFLL;
}
else
{
v11 = dword_100885AA4;
if ( !dword_100885AA4 )
{
v11 = sub_1005E197C();
dword_100885AA4 = v11;
}
sub_1005E0E48(v11, 102, 108, (__int64)"e_chil.c", 1208);
return 0xFFFFFFFFLL;
}
}