{"type": "func", "start": 5373008896, "end": 5373009049, "name": "SetupCollisionTriggerPopup::updateItemID", "pseudocode": "// \n// SetupCollisionTriggerPopup::updateItemID from 0x140419c00 to 0x140419c99 (153 bytes)\n// \n// 6 xrefs:\n// > SetupCollisionTriggerPopup::onItemIDArrow @ 0x14041972a\n// > SetupCollisionTriggerPopup::textChanged @ 0x140419875\n// > SetupCountTriggerPopup::onItemIDArrow @ 0x14041c2ba\n// > SetupCountTriggerPopup::textChanged @ 0x14041c405\n// > SetupInstantCountPopup::textChanged @ 0x140423575\n// > <???> @ 0x1406d91c4\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Merged with: SetupCollisionTriggerPopup::updateItemID, SetupCountTriggerPopup::updateItemID, SetupInstantCountPopup::updateItemID\nint __fastcall SetupCollisionTriggerPopup::updateItemID(__int64 a1)\n{\n  int v1; // eax\n  unsigned int v3; // ebx\n  int v4; // ecx\n  __int64 v5; // rax\n  cocos2d::CCArray *v6; // rcx\n  struct cocos2d::CCObject *v7; // rax\n\n  v1 = *(_DWORD *)(a1 + 960);\n  v3 = 0;\n  v4 = 0;\n  if ( v1 >= 0 )\n    v4 = v1;\n  if ( v4 > 9999 )\n    v4 = 9999;\n  v5 = *(_QWORD *)(a1 + 656);\n  *(_DWORD *)(a1 + 960) = v4;\n  if ( v5 )\n  {\n    *(_DWORD *)(v5 + 1696) = v4;\n  }\n  else\n  {\n    v6 = *(cocos2d::CCArray **)(a1 + 664);\n    if ( v6 )\n    {\n      LODWORD(v5) = cocos2d::CCArray::count(v6);\n      if ( (_DWORD)v5 )\n      {\n        do\n        {\n          v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 664), v3++);\n          v7[30].m_nTag = *(_DWORD *)(a1 + 960);\n          LODWORD(v5) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 664));\n        }\n        while ( v3 < (unsigned int)v5 );\n      }\n    }\n  }\n  return v5;\n}", "assembly": "; \n; SetupCollisionTriggerPopup::updateItemID from 0x140419c00 to 0x140419c99 (153 bytes)\n; \n; 6 xrefs:\n; > SetupCollisionTriggerPopup::onItemIDArrow @ 0x14041972a\n; > SetupCollisionTriggerPopup::textChanged @ 0x140419875\n; > SetupCountTriggerPopup::onItemIDArrow @ 0x14041c2ba\n; > SetupCountTriggerPopup::textChanged @ 0x14041c405\n; > SetupInstantCountPopup::textChanged @ 0x140423575\n; > <???> @ 0x1406d91c4\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140419c00\npush    rdi                                                            ; +0x5, 0x140419c05\nsub     rsp, 20h                                                       ; +0x6, 0x140419c06\nmov     eax, [rcx+3C0h]                                                ; +0xa, 0x140419c0a\nmov     rdi, rcx                                                       ; +0x10, 0x140419c10\nxor     ebx, ebx                                                       ; +0x13, 0x140419c13\ntest    eax, eax                                                       ; +0x15, 0x140419c15\nmov     ecx, ebx                                                       ; +0x17, 0x140419c17\ncmovns  ecx, eax                                                       ; +0x19, 0x140419c19\nmov     eax, 270Fh                                                     ; +0x1c, 0x140419c1c\ncmp     ecx, eax                                                       ; +0x21, 0x140419c21\ncmovg   ecx, eax                                                       ; +0x23, 0x140419c23\nmov     rax, [rdi+290h]                                                ; +0x26, 0x140419c26\nmov     [rdi+3C0h], ecx                                                ; +0x2d, 0x140419c2d\ntest    rax, rax                                                       ; +0x33, 0x140419c33\njz      short loc_140419C49                                            ; +0x36, 0x140419c36\nmov     [rax+6A0h], ecx                                                ; +0x38, 0x140419c38\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x3e, 0x140419c3e\nadd     rsp, 20h                                                       ; +0x43, 0x140419c43\npop     rdi                                                            ; +0x47, 0x140419c47\nretn                                                                   ; +0x48, 0x140419c48\nmov     rcx, [rdi+298h]                                                ; +0x49, 0x140419c49\ntest    rcx, rcx                                                       ; +0x50, 0x140419c50\njz      short loc_140419C8E                                            ; +0x53, 0x140419c53\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x55, 0x140419c55\ntest    eax, eax                                                       ; +0x5b, 0x140419c5b\njz      short loc_140419C8E                                            ; +0x5d, 0x140419c5d\nnop                                                                    ; +0x5f, 0x140419c5f\nmov     rcx, [rdi+298h]                                                ; +0x60, 0x140419c60\nmov     edx, ebx                                                       ; +0x67, 0x140419c67\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x140419c69\nmov     ecx, [rdi+3C0h]                                                ; +0x6f, 0x140419c6f\ninc     ebx                                                            ; +0x75, 0x140419c75\nmov     [rax+6A0h], ecx                                                ; +0x77, 0x140419c77\nmov     rcx, [rdi+298h]                                                ; +0x7d, 0x140419c7d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x84, 0x140419c84\ncmp     ebx, eax                                                       ; +0x8a, 0x140419c8a\njb      short loc_140419C60                                            ; +0x8c, 0x140419c8c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8e, 0x140419c8e\nadd     rsp, 20h                                                       ; +0x93, 0x140419c93\npop     rdi                                                            ; +0x97, 0x140419c97\nretn                                                                   ; +0x98, 0x140419c98", "xrefs": ["SetupCollisionTriggerPopup::onItemIDArrow @ 0x14041972a", "SetupCollisionTriggerPopup::textChanged @ 0x140419875", "SetupCountTriggerPopup::onItemIDArrow @ 0x14041c2ba", "SetupCountTriggerPopup::textChanged @ 0x14041c405", "SetupInstantCountPopup::textChanged @ 0x140423575", "<???> @ 0x1406d91c4"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}