//
// sub_1002235B0 from 0x1002235b0 to 0x10022366e (190 bytes)
//
// 5 xrefs:
// > AutoSaveSettingsLayer::init @ 0x1005bca16
// > AutoSaveSettingsLayer::init @ 0x1005bceda
// > GridSettingsLayer::onBuildWindowContent @ 0x100908809
// > sub_100982340 @ 0x10098267a
// > MoveStepPopup::onBuildWindowContent @ 0x10098da43
//
// 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:27:04 +0000
//
void __fastcall sub_1002235B0(__int64 a1, int a2, char a3)
{
_QWORD *v3; // rax
_QWORD *v4; // r13
_QWORD *v5; // r15
_QWORD *v6; // rbx
__int64 v7; // rax
char v8; // [rsp+0h] [rbp-2Ch]
v3 = *(_QWORD **)(a1 + 888);
if ( v3 )
{
while ( 1 )
{
while ( 1 )
{
v5 = v3;
if ( *((_DWORD *)v3 + 7) <= a2 )
break;
v3 = (_QWORD *)*v3;
v4 = v5;
if ( !*v5 )
goto LABEL_8;
}
if ( *((_DWORD *)v3 + 7) >= a2 )
break;
v3 = (_QWORD *)v3[1];
if ( !v3 )
{
v4 = v5 + 1;
goto LABEL_8;
}
}
}
else
{
v4 = (_QWORD *)(a1 + 888);
v5 = (_QWORD *)(a1 + 888);
LABEL_8:
v8 = a3;
v6 = v5;
v5 = operator new(0x28u);
*((_DWORD *)v5 + 7) = a2;
*((_BYTE *)v5 + 32) = 0;
*(_OWORD *)v5 = 0;
v5[2] = v6;
*v4 = v5;
v7 = **(_QWORD **)(a1 + 880);
if ( v7 )
*(_QWORD *)(a1 + 880) = v7;
sub_10001B680(*(__int64 **)(a1 + 888), v5);
++*(_QWORD *)(a1 + 896);
a3 = v8;
}
*((_BYTE *)v5 + 32) = a3;
}