//
// SetupInstantCountPopup::updateItemID from 0x1006bd540 to 0x1006bd5d1 (145 bytes)
//
// 0 xrefs:
//
// 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:35:30 +0000
//
__int64 __fastcall SetupInstantCountPopup::updateItemID(__int64 a1)
{
int v1; // ecx
__int64 result; // rax
__int64 v3; // rcx
__int64 v5; // rdi
unsigned int v6; // r14d
v1 = 0;
if ( *(int *)(a1 + 1040) > 0 )
v1 = *(_DWORD *)(a1 + 1040);
result = 9999;
if ( v1 < 9999 )
result = (unsigned int)v1;
*(_DWORD *)(a1 + 1040) = result;
v3 = *(_QWORD *)(a1 + 680);
if ( v3 )
{
*(_DWORD *)(v3 + 1680) = result;
}
else
{
v5 = *(_QWORD *)(a1 + 688);
if ( v5 )
{
result = sub_1007FEF90(v5);
if ( (_DWORD)result )
{
v6 = 0;
do
{
*(_DWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 688), v6++) + 1680) = *(_DWORD *)(a1 + 1040);
result = sub_1007FEF90(*(_QWORD *)(a1 + 688));
}
while ( v6 < (unsigned int)result );
}
}
}
return result;
}