//
// OPENSSL_sk_sort from 0x838c28 to 0x838c6c (68 bytes)
//
// 14 xrefs:
// > sub_792978 @ 0x792a04
// > ssl_create_cipher_list @ 0x794398
// > EVP_PKEY_asn1_add0 @ 0x7c22d8
// > EVP_PKEY_meth_add0 @ 0x806fd0
// > OBJ_add_sigid @ 0x81d5a0
// > OBJ_add_sigid @ 0x81d5ac
// > OPENSSL_sk_find_ex @ 0x838c8c
// > OPENSSL_sk_find @ 0x838d48
// > X509_CRL_sort @ 0x8474d0
// > sub_8491EC @ 0x849348
// > X509v3_addr_canonize @ 0x84ef80
// > X509v3_addr_canonize @ 0x84f3d0
// > sub_8522B4 @ 0x8522c4
// > ??> @ 0x5b55c
//
// 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
//
void __fastcall OPENSSL_sk_sort(int a1)
{
int (*v1)(const void *, const void *); // r3
if ( a1 && !*(_DWORD *)(a1 + 8) )
{
v1 = *(int (**)(const void *, const void *))(a1 + 16);
if ( v1 )
{
qsort(*(void **)(a1 + 4), *(_DWORD *)a1, 4u, v1);
*(_DWORD *)(a1 + 8) = 1;
}
}
}