//
// sub_1000D98C0 from 0x1000d98c0 to 0x1000d99cc (268 bytes)
//
// 2 xrefs:
// > IDNameBrowserPopup::onFormAdd @ 0x10090b096
// > sub_10090C4C0 @ 0x10090c674
//
// 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:20:57 +0000
//
__int64 __fastcall sub_1000D98C0(__int64 a1, __int64 a2, int a3)
{
__int64 *v4; // r15
int v5; // ebx
unsigned __int8 v6; // r12
size_t v7; // rdx
unsigned int v8; // eax
bool v9; // r13
char *v10; // rdi
char *v11; // rsi
unsigned __int8 v13; // [rsp+8h] [rbp-58h] BYREF
char v14; // [rsp+9h] [rbp-57h] BYREF
size_t v15; // [rsp+10h] [rbp-50h]
void *__s1; // [rsp+18h] [rbp-48h]
unsigned __int8 v17; // [rsp+20h] [rbp-40h] BYREF
char v18; // [rsp+21h] [rbp-3Fh] BYREF
__int64 v19; // [rsp+28h] [rbp-38h]
void *__s2; // [rsp+30h] [rbp-30h]
sub_1004EE4C0(&v17);
v4 = *((__int64 **)sub_1000BEF90(a1, a3) + 2);
v5 = 0;
if ( v4 )
{
while ( v5 > 0 && *((_DWORD *)v4 + 4) > v5 )
{
LABEL_3:
v4 = (__int64 *)*v4;
if ( !v4 )
goto LABEL_21;
}
sub_1004EE4C0(&v13);
v6 = v13;
if ( (v13 & 1) != 0 )
{
v7 = v15;
v8 = v17;
if ( (v17 & 1) == 0 )
goto LABEL_8;
}
else
{
v7 = v13 >> 1;
v8 = v17;
if ( (v17 & 1) == 0 )
{
LABEL_8:
if ( v7 != v8 >> 1 )
goto LABEL_9;
goto LABEL_13;
}
}
if ( v7 != v19 )
{
LABEL_9:
v9 = 0;
if ( (v13 & 1) == 0 )
{
LABEL_19:
if ( v9 )
v5 = *((_DWORD *)v4 + 4);
goto LABEL_3;
}
LABEL_18:
operator delete(__s1);
goto LABEL_19;
}
LABEL_13:
v10 = &v14;
if ( (v13 & 1) != 0 )
v10 = (char *)__s1;
v11 = &v18;
if ( (v8 & 1) != 0 )
v11 = (char *)__s2;
v9 = memcmp(v10, v11, v7) == 0;
if ( (v6 & 1) == 0 )
goto LABEL_19;
goto LABEL_18;
}
LABEL_21:
if ( (v17 & 1) != 0 )
operator delete(__s2);
return (unsigned int)v5;
}