//
// sub_100620A0C from 0x100620a0c to 0x100620bc0 (436 bytes)
//
// 1 xrefs:
// > ??> @ 0x100868b78
//
// 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_100620A0C(const char *a1, const char *a2, __int64 *a3, __int64 a4)
{
__int64 v6; // x0
__int64 v7; // x19
_QWORD **v8; // x20
int v9; // w0
__int64 result; // x0
int v11; // w0
int v12; // w22
unsigned int v13; // w8
char v14; // [xsp+17h] [xbp-449h] BYREF
char __s[1032]; // [xsp+18h] [xbp-448h] BYREF
if ( a4 )
{
v6 = *(_QWORD *)(a4 + 8);
v7 = *(_QWORD *)(a4 + 16);
}
else
{
v7 = 0;
v6 = 0;
}
if ( a3 )
{
if ( *a3 )
v6 = *a3;
if ( a3[1] )
v7 = a3[1];
}
if ( v6 )
{
v8 = (_QWORD **)sub_100617220(v6);
if ( v8 )
{
if ( a2 && *a2 )
sub_1005DD744((__int64)__s, 0x3FFu, "Current card: \"%s\"\n", a2);
else
__s[0] = 0;
v11 = sub_10061793C((__int64)v8, __s);
v12 = v11;
if ( a1 && (v11 & 0x80000000) == 0 )
{
sub_1005DD744((__int64)__s, 0x3FFu, "Insert card \"%s\"", a1);
v12 = sub_1006177B0(
(__int64)v8,
__s,
"\n then hit or C to cancel\n",
"\r\n",
"Cc",
1,
(__int64)&v14);
}
sub_100617B88((__int64)v8, v7);
if ( (v12 & 0x80000000) == 0 )
v12 = sub_100617BCC((__int64)v8);
sub_1006172BC(v8);
result = 1;
if ( v12 != -2 )
{
if ( v14 == 67 )
v13 = 1;
else
v13 = v12 >> 31;
if ( v12 < 0 )
return (unsigned int)(v12 >> 31);
else
return v13;
}
}
else
{
return 0xFFFFFFFFLL;
}
}
else
{
v9 = dword_100885AA4;
if ( !dword_100885AA4 )
{
v9 = sub_1005E197C();
dword_100885AA4 = v9;
}
sub_1005E0E48(v9, 104, 108, (__int64)"e_chil.c", 1268);
return 0xFFFFFFFFLL;
}
return result;
}