//
// sub_1006183B0 from 0x1006183b0 to 0x10061853c (396 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008661f0
//
// 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_1006183B0(__int64 a1, unsigned int *a2)
{
int v4; // w0
FILE *v5; // x21
const char *v6; // x0
char v7; // w0
__int64 result; // x0
const char *v9; // x20
const char *v10; // x0
const char *v11; // x0
__int64 v12; // x2
__int64 v13; // x3
const char *v14; // x0
const char *v15; // x0
char v16; // w0
v4 = sub_100617F64(a2);
if ( v4 == 1 )
{
v11 = (const char *)sub_100617F8C((__int64)a2);
fputs(v11, (FILE *)qword_100884EE8);
fflush((FILE *)qword_100884EE8);
v12 = sub_100617F78((__int64)a2) & 1;
v13 = 1;
return sub_1006185B0(a1, a2, v12, v13);
}
if ( v4 != 2 )
{
if ( v4 != 3 )
return 1;
v14 = (const char *)sub_100617F8C((__int64)a2);
fputs(v14, (FILE *)qword_100884EE8);
v15 = (const char *)sub_100617FA0((__int64)a2);
fputs(v15, (FILE *)qword_100884EE8);
fflush((FILE *)qword_100884EE8);
v16 = sub_100617F78((__int64)a2);
v13 = 0;
v12 = v16 & 1;
return sub_1006185B0(a1, a2, v12, v13);
}
v5 = (FILE *)qword_100884EE8;
v6 = (const char *)sub_100617F8C((__int64)a2);
fprintf(v5, "Verifying - %s", v6);
fflush((FILE *)qword_100884EE8);
v7 = sub_100617F78((__int64)a2);
result = sub_1006185B0(a1, a2, v7 & 1, 1);
if ( (int)result >= 1 )
{
v9 = (const char *)sub_100617BA0((__int64)a2);
v10 = (const char *)sub_100617FCC((__int64)a2);
if ( !strcmp(v9, v10) )
{
return 1;
}
else
{
fwrite("Verify failure\n", 0xFu, 1u, (FILE *)qword_100884EE8);
fflush((FILE *)qword_100884EE8);
return 0;
}
}
return result;
}