//
// sub_1009342D0 from 0x1009342d0 to 0x100934359 (137 bytes)
//
// 1 xrefs:
// > sub_10092F790 @ 0x10092f874
//
// This function is hookable on this platform (idp: pc, 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 12:38:25 +0000
//
__int64 __fastcall sub_1009342D0(unsigned __int8 *a1, char *a2, unsigned __int64 a3)
{
unsigned int v4; // r13d
char *v5; // r14
unsigned __int64 v6; // r13
size_t v7; // r12
__int64 result; // rax
bool v9; // cc
unsigned __int64 v10; // r13
unsigned __int8 *v11; // rbx
v4 = *a1;
if ( (v4 & 1) != 0 )
{
v6 = *((_QWORD *)a1 + 1);
v5 = *((char **)a1 + 2);
}
else
{
v5 = (char *)(a1 + 1);
v6 = v4 >> 1;
}
v7 = strlen(a2);
result = -1;
v9 = v6 <= a3;
v10 = v6 - a3;
if ( !v9 )
{
v11 = (unsigned __int8 *)&v5[a3];
if ( v7 )
{
while ( memchr(a2, (char)*v11, v7) )
{
++v11;
if ( !--v10 )
return -1;
}
}
return v11 - (unsigned __int8 *)v5;
}
return result;
}