//
// LevelSettingsObject::removeFromIDUseOrder from 0x465c2c to 0x465cc2 (150 bytes)
//
// 2 xrefs:
// > LevelSettingsObject::setIDName @ 0x46f854
// > IDNameBrowserPopup::onDeleteRow @ 0x7933f0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:48:56 +0000
//
unsigned int __fastcall LevelSettingsObject::removeFromIDUseOrder(unsigned int this, int a2, unsigned int a3)
{
unsigned int v3; // r4
unsigned int v4; // r5
unsigned int v6; // r7
unsigned int v7; // r10
_DWORD *v8; // r3
_DWORD *i; // r4
int v10; // r1
_BYTE *v11; // r5
_DWORD *v12; // r1
_DWORD *v13; // r3
size_t v14; // r5
char *v15; // r5
char *v16; // r3
v3 = this;
v4 = *(_DWORD *)(this + 436);
if ( v4 )
{
v6 = v4 - 1;
if ( ((v4 - 1) & v4) != 0 )
{
this = a3 / v4;
v7 = a3 % v4;
}
else
{
v7 = v6 & a3;
}
v8 = *(_DWORD **)(*(_DWORD *)(v3 + 432) + 4 * v7);
if ( v8 )
{
for ( i = (_DWORD *)*v8; i; i = (_DWORD *)*i )
{
this = i[1];
if ( ((v4 - 1) & v4) != 0 )
{
v10 = this % v4;
this /= v4;
}
else
{
v10 = v6 & this;
}
if ( v10 != v7 )
break;
if ( i[2] == a3 )
{
v11 = (_BYTE *)i[4];
v12 = (_DWORD *)i[3];
while ( 1 )
{
v13 = v12;
if ( v12 == (_DWORD *)v11 )
break;
++v12;
if ( *v13 == a2 )
{
v14 = v11 - (_BYTE *)v12;
if ( v14 >> 2 )
{
this = (unsigned int)memmove(v13, v12, v14);
v13 = (_DWORD *)this;
}
v15 = (char *)v13 + v14;
while ( 1 )
{
v16 = (char *)i[4];
if ( v15 == v16 )
break;
i[4] = v16 - 4;
}
return this;
}
}
return this;
}
}
}
}
return this;
}