//
// sub_1005451C8 from 0x1005451c8 to 0x100545244 (124 bytes)
//
// 1 xrefs:
// > sub_1005229BC @ 0x100522ef0
//
// 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
//
_DWORD *__fastcall sub_1005451C8(__int64 a1, int a2)
{
_DWORD *result; // x0
int v5; // w21
__int64 v6; // x22
result = nullptr;
if ( a1 && a2 )
{
v5 = sub_1005DEA4C(a1);
if ( v5 <= 0 )
{
return nullptr;
}
else
{
v6 = 0;
while ( 1 )
{
result = (_DWORD *)sub_1005DEA60(a1, v6);
if ( *result == a2 )
break;
v6 = (unsigned int)(v6 + 1);
if ( (int)v6 >= v5 )
return nullptr;
}
}
}
return result;
}