//
// sub_100095080 from 0x100095080 to 0x100095164 (228 bytes)
//
// 2 xrefs:
// > sub_1005DE5A0 @ 0x1005de67f
// > sub_1005DE5A0 @ 0x1005de68e
//
// 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_100095080(__int64 a1, _BYTE *a2)
{
__int64 v2; // rbx
__int64 result; // rax
__int64 v5; // rax
__int64 v6; // r15
_BYTE *v7; // rax
_BYTE *v8; // rcx
char v9; // si
_BYTE *v10; // rdx
__int64 v11; // rdx
v2 = *(_QWORD *)(a1 + 48);
if ( !v2 )
return 0;
if ( !a2 )
{
while ( 1 )
{
result = (**(__int64 (__fastcall ***)(__int64))v2)(v2);
if ( result )
break;
v2 = *(_QWORD *)(v2 + 72);
if ( !v2 )
return 0;
}
return result;
}
while ( 1 )
{
v5 = (**(__int64 (__fastcall ***)(__int64))v2)(v2);
if ( v5 )
break;
LABEL_8:
v2 = *(_QWORD *)(v2 + 72);
if ( !v2 )
return 0;
}
v6 = v5;
v7 = (_BYTE *)sub_100093910((int *)(v5 + 24));
if ( v7 == a2 )
return v6;
v8 = v7;
v9 = *v7;
v10 = a2;
result = v6;
if ( !v9 )
{
LABEL_7:
if ( !*v10 )
return result;
goto LABEL_8;
}
v11 = 0;
while ( v9 == a2[v11] && (_DWORD)v11 != 0x7FFFFFFF )
{
v9 = v8[++v11];
if ( !v9 )
{
if ( (_DWORD)v11 == 0x7FFFFFFF )
return result;
v10 = &a2[v11];
goto LABEL_7;
}
}
if ( (_DWORD)v11 != 0x7FFFFFFF )
goto LABEL_8;
return result;
}