//
// sub_100704DCC from 0x100704dcc to 0x100704e34 (104 bytes)
//
// 6 xrefs:
// > sub_1006B0580 @ 0x1006b05cc
// > sub_1006B1D60 @ 0x1006b1e48
// > sub_1006B1D60 @ 0x1006b1e54
// > sub_100737A90 @ 0x100737aa4
// > sub_100737A90 @ 0x100737ab0
// > sub_100704C88 @ 0x100704cf0
//
// 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 11:12:50 +0000
//
unsigned __int64 __fastcall sub_100704DCC(_BYTE *a1)
{
unsigned int v1; // w12
unsigned __int64 v2; // x10
unsigned __int8 *v3; // x8
__int64 v4; // x9
unsigned __int64 v5; // x13
unsigned int v6; // t1
if ( !a1 )
return 0;
v1 = (unsigned __int8)*a1;
if ( !*a1 )
return 0;
v2 = 0;
v3 = a1 + 1;
v4 = 256;
do
{
v5 = (char)v1 | (unsigned __int64)v4;
v4 += 256;
v2 = ((unsigned int)(v2 >> (32 - ((v1 ^ (v1 >> 2)) & 0xF))) | (unsigned int)(v2 << ((v1 ^ (v1 >> 2)) & 0xF)))
^ (v5 * v5);
v6 = *v3++;
v1 = v6;
}
while ( v6 );
return v2 ^ (v2 >> 16);
}