//
// OPENSSL_LH_strhash from 0x1031704 to 0x1031770 (108 bytes)
//
// 9 xrefs:
// > sub_103F284 @ 0x103f2b4
// > sub_103FBE8 @ 0x103fc2c
// > sub_103FBE8 @ 0x103fc50
// > sub_10A1148 @ 0x10a115c
// > sub_10A1148 @ 0x10a1168
// > ??> @ 0x88150
// > OPENSSL_LH_new @ 0x1031824
// > OBJ_NAME_new_index @ 0x103f4d0
// > ??> @ 0x1543928
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:16:20 +0000
//
unsigned __int8 *__fastcall OPENSSL_LH_strhash(unsigned __int8 *result)
{
unsigned __int8 v1; // w4
__int64 v2; // x1
unsigned __int64 v3; // x3
__int64 v4; // x5
__int64 v5; // x2
int v6; // t1
unsigned __int64 v7; // x1
if ( result )
{
v1 = *result;
v2 = 0;
if ( *result )
{
v3 = 0;
v4 = 256;
do
{
v5 = v1;
v6 = *++result;
v1 = v6;
v7 = v4 | v5;
v4 += 256;
v3 = ((unsigned int)(v3 >> (32 - (((v7 >> 2) ^ v7) & 0xF))) | (unsigned int)(v3 << (((v7 >> 2) ^ v7) & 0xF)))
^ (v7 * v7);
}
while ( v6 );
return (unsigned __int8 *)(v3 ^ (v3 >> 16));
}
return (unsigned __int8 *)v2;
}
return result;
}