//
// LevelCell::updateCellMode from 0x1002364a0 to 0x100236635 (405 bytes)
//
// 2 xrefs:
// > CustomListView::reloadAll @ 0x100235ec2
// > LevelCell::loadCustomLevelCell @ 0x1002383d6
//
// 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:12 +0000
//
__int64 __fastcall LevelCell::updateCellMode(__int64 a1, int a2)
{
__int64 v2; // rax
__int64 v3; // r14
_BOOL4 v4; // r15d
__int64 v5; // rax
__int64 v6; // r14
_BOOL4 v7; // r15d
__int64 v8; // rax
__int64 v9; // r14
_BOOL4 v10; // r15d
__int64 v11; // rax
__int64 v12; // r14
_BOOL4 v13; // r15d
__int64 result; // rax
__int64 v15; // r14
_BOOL4 v16; // r15d
*(_DWORD *)(a1 + 604) = a2;
v2 = (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 592) + 480LL))(*(_QWORD *)(a1 + 592), 0);
if ( v2 )
{
v3 = v2;
v4 = *(_DWORD *)(a1 + 604) == 0;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v2 + 344LL))(v2, *(_DWORD *)(a1 + 604) == 0);
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v3 + 1056LL))(v3, v4);
}
v5 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 592) + 480LL))(*(_QWORD *)(a1 + 592), 1);
if ( v5 )
{
v6 = v5;
v7 = *(_DWORD *)(a1 + 604) == 1;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v5 + 344LL))(v5, *(_DWORD *)(a1 + 604) == 1);
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v6 + 1056LL))(v6, v7);
}
v8 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 592) + 480LL))(*(_QWORD *)(a1 + 592), 2);
if ( v8 )
{
v9 = v8;
v10 = *(_DWORD *)(a1 + 604) == 1;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 344LL))(v8, *(_DWORD *)(a1 + 604) == 1);
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v9 + 1056LL))(v9, v10);
}
v11 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 592) + 480LL))(*(_QWORD *)(a1 + 592), 3);
if ( v11 )
{
v12 = v11;
v13 = *(_DWORD *)(a1 + 604) == 1;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v11 + 344LL))(v11, *(_DWORD *)(a1 + 604) == 1);
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v12 + 1056LL))(v12, v13);
}
result = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 592) + 480LL))(*(_QWORD *)(a1 + 592), 4);
if ( result )
{
v15 = result;
v16 = *(_DWORD *)(a1 + 604) == 2;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)result + 344LL))(result, *(_DWORD *)(a1 + 604) == 2);
return (*(__int64 (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v15 + 1056LL))(v15, v16);
}
return result;
}