//
// sub_100616694 from 0x100616694 to 0x100616828 (404 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x100585b84
//
// 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_100616694(int *a1, int *a2, __int64 a3, __int64 a4)
{
__int64 v8; // x22
__int16 v9; // w2
int v10; // w4
__int16 v11; // w2
int v12; // w4
time_t v14; // [xsp+0h] [xbp-40h] BYREF
time_t v15; // [xsp+8h] [xbp-38h] BYREF
time(&v15);
if ( !sub_1005EF654(a1) )
{
v9 = 123;
v10 = 338;
LABEL_9:
sub_1005E0E48(39, 115, v9, (__int64)"ocsp_cl.c", v10);
v8 = 0;
goto LABEL_10;
}
v14 = v15 + a3;
if ( (int)sub_100600B08(a1, &v14) < 1 )
{
v8 = 1;
}
else
{
sub_1005E0E48(39, 115, 126, (__int64)"ocsp_cl.c", 343);
v8 = 0;
}
if ( (a4 & 0x8000000000000000LL) == 0 )
{
v14 = v15 - a4;
if ( (sub_100600B08(a1, &v14) & 0x80000000) != 0 )
{
v9 = 127;
v10 = 354;
goto LABEL_9;
}
}
LABEL_10:
if ( !a2 )
return v8;
if ( sub_1005EF654(a2) )
{
v14 = v15 - a3;
if ( (sub_100600B08(a2, &v14) & 0x80000000) == 0 )
goto LABEL_16;
v11 = 125;
v12 = 370;
}
else
{
v11 = 122;
v12 = 365;
}
sub_1005E0E48(39, 115, v11, (__int64)"ocsp_cl.c", v12);
v8 = 0;
LABEL_16:
if ( (sub_1005FBBB8((const void **)a2, (__int64)a1) & 0x80000000) != 0 )
{
sub_1005E0E48(39, 115, 124, (__int64)"ocsp_cl.c", 378);
return 0;
}
return v8;
}