//
// sub_100601140 from 0x100601140 to 0x100601260 (288 bytes)
//
// 1 xrefs:
// > sub_10060112C @ 0x10060113c
//
// 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_100601140(__int64 a1, __int64 a2, unsigned int a3, __int64 a4)
{
__int64 v7; // x21
__int64 v8; // x0
int v9; // w8
__int16 v10; // w2
int v11; // w4
__int64 v12; // x9
__int64 v13; // x8
if ( a3 )
v7 = a3;
else
v7 = (unsigned int)a2;
if ( (_DWORD)v7 )
{
if ( (unsigned int)sub_10060CF08(v7) == -1 )
{
v10 = 121;
v11 = 2220;
goto LABEL_25;
}
v8 = sub_10060CF60();
if ( *(_DWORD *)(v8 + 4) == -1 )
{
if ( (unsigned int)sub_10060CF08(a2) == -1 )
{
v10 = 121;
v11 = 2228;
goto LABEL_25;
}
v8 = sub_10060CF60();
}
if ( (_DWORD)a4 )
{
LABEL_12:
if ( (unsigned int)sub_10060491C(a4) != -1 )
{
v9 = 1;
goto LABEL_17;
}
v10 = 120;
v11 = 2241;
LABEL_25:
sub_1005E0E48(11, 134, v10, (__int64)"x509_vfy.c", v11);
return 0;
}
a4 = *(unsigned int *)(v8 + 4);
}
if ( (_DWORD)a4 )
goto LABEL_12;
v9 = 0;
LODWORD(a4) = 0;
LABEL_17:
if ( (_DWORD)v7 )
{
v12 = *(_QWORD *)(a1 + 40);
if ( !*(_DWORD *)(v12 + 32) )
*(_DWORD *)(v12 + 32) = v7;
}
if ( v9 )
{
v13 = *(_QWORD *)(a1 + 40);
if ( !*(_DWORD *)(v13 + 36) )
*(_DWORD *)(v13 + 36) = a4;
}
return 1;
}