//
// sub_81B790 from 0x81b790 to 0x81b804 (116 bytes)
//
// 3 xrefs:
// > OBJ_NAME_init @ 0x81b834
// > OBJ_NAME_init @ 0x81b83c
// > ??> @ 0x81b868
//
// 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
//
int __fastcall sub_81B790(int a1, int a2)
{
int v5; // r0
if ( *(_DWORD *)a1 != *(_DWORD *)a2 )
return *(_DWORD *)a1 - *(_DWORD *)a2;
if ( !dword_AD4504 || *(_DWORD *)a1 >= OPENSSL_sk_num(dword_AD4504) )
return strcmp(*(const char **)(a1 + 8), *(const char **)(a2 + 8));
v5 = OPENSSL_sk_value(dword_AD4504, *(_DWORD *)a1);
return (*(int (__fastcall **)(_DWORD, _DWORD))(v5 + 4))(*(_DWORD *)(a1 + 8), *(_DWORD *)(a2 + 8));
}