{"type": "func", "start": 5373047520, "end": 5373047874, "name": "SetupInstantCountPopup::determineStartValues", "pseudocode": "// \n// SetupInstantCountPopup::determineStartValues from 0x1404232e0 to 0x140423442 (354 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405e51c0\n// > <???> @ 0x1406a077c\n// > <???> @ 0x1406a078c\n// > <???> @ 0x1406d9620\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\nvoid SetupInstantCountPopup::determineStartValues(SetupInstantCountPopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rsi\n  unsigned int v4; // edi\n  struct cocos2d::CCObject *v5; // rax\n  int m_itemID; // edx\n  int m_nTag; // ecx\n  int m_targetID; // edx\n  int m_uAutoReleaseCount; // ecx\n  int m_mode; // edx\n  int m_nLuaID; // ecx\n  int m_targetCount; // edx\n  int m_uID; // ecx\n\n  SetupTriggerPopup::determineStartValues(a1);\n  if ( a1->m_gameObject )\n  {\n    m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);\n    cocos2d::CCArray::addObject(m_gameObjects, a1->m_gameObject);\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n  }\n  if ( m_gameObjects )\n  {\n    v4 = 0;\n    *(_QWORD *)&a1->m_itemID = -1;\n    a1->m_targetCount = 99999;\n    a1->m_activateGroup = 1;\n    for ( a1->m_mode = -1; v4 < cocos2d::CCArray::count(m_gameObjects); ++v4 )\n    {\n      v5 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);\n      if ( !BYTE1(v5[29].m_eObjType) )\n        a1->m_activateGroup = 0;\n      m_itemID = a1->m_itemID;\n      m_nTag = v5[30].m_nTag;\n      if ( m_itemID == -1 )\n      {\n        a1->m_itemID = m_nTag;\n      }\n      else if ( m_itemID != m_nTag )\n      {\n        a1->m_itemID = 0;\n      }\n      m_targetID = a1->m_targetID;\n      m_uAutoReleaseCount = v5[26].m_uAutoReleaseCount;\n      if ( m_targetID == -1 )\n      {\n        a1->m_targetID = m_uAutoReleaseCount;\n      }\n      else if ( m_targetID != m_uAutoReleaseCount )\n      {\n        a1->m_targetID = 0;\n      }\n      m_mode = a1->m_mode;\n      m_nLuaID = v5[33].m_nLuaID;\n      if ( m_mode == -1 )\n      {\n        a1->m_mode = m_nLuaID;\n      }\n      else if ( m_mode != m_nLuaID )\n      {\n        a1->m_mode = 0;\n      }\n      m_targetCount = a1->m_targetCount;\n      m_uID = v5[33].m_uID;\n      if ( m_targetCount == 99999 )\n      {\n        a1->m_targetCount = m_uID;\n      }\n      else if ( m_targetCount != m_uID )\n      {\n        a1->m_targetCount = 0;\n      }\n    }\n  }\n}", "assembly": "; \n; SetupInstantCountPopup::determineStartValues from 0x1404232e0 to 0x140423442 (354 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405e51c0\n; > <???> @ 0x1406a077c\n; > <???> @ 0x1406a078c\n; > <???> @ 0x1406d9620\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_10], rbx                                              ; +0x0, 0x1404232e0\npush    rsi                                                            ; +0x5, 0x1404232e5\nsub     rsp, 20h                                                       ; +0x6, 0x1404232e6\nmov     rbx, rcx                                                       ; +0xa, 0x1404232ea\ncall    SetupTriggerPopup__determineStartValues                        ; +0xd, 0x1404232ed\ncmp     qword ptr [rbx+290h], 0                                        ; +0x12, 0x1404232f2\njz      short loc_140423317                                            ; +0x1a, 0x1404232fa\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1c, 0x1404232fc\nmov     rdx, [rbx+290h]                                                ; +0x22, 0x140423302\nmov     rcx, rax                                                       ; +0x29, 0x140423309\nmov     rsi, rax                                                       ; +0x2c, 0x14042330c\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2f, 0x14042330f\njmp     short loc_14042331E                                            ; +0x35, 0x140423315\nmov     rsi, [rbx+298h]                                                ; +0x37, 0x140423317\ntest    rsi, rsi                                                       ; +0x3e, 0x14042331e\njz      loc_140423437                                                  ; +0x41, 0x140423321\nmov     [rsp+28h+arg_0], rbp                                           ; +0x47, 0x140423327\nmov     rcx, rsi                                                       ; +0x4c, 0x14042332c\nxor     ebp, ebp                                                       ; +0x4f, 0x14042332f\nmov     [rsp+28h+arg_8], rdi                                           ; +0x51, 0x140423331\nmov     edi, ebp                                                       ; +0x56, 0x140423336\nmov     qword ptr [rbx+3C0h], 0FFFFFFFFFFFFFFFFh                       ; +0x58, 0x140423338\nmov     dword ptr [rbx+3C8h], 1869Fh                                   ; +0x63, 0x140423343\nmov     byte ptr [rbx+3CCh], 1                                         ; +0x6d, 0x14042334d\nmov     dword ptr [rbx+3D0h], 0FFFFFFFFh                               ; +0x74, 0x140423354\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7e, 0x14042335e\ntest    eax, eax                                                       ; +0x84, 0x140423364\njz      loc_14042342D                                                  ; +0x86, 0x140423366\nnop     dword ptr [rax+00h]                                            ; +0x8c, 0x14042336c\nmov     edx, edi                                                       ; +0x90, 0x140423370\nmov     rcx, rsi                                                       ; +0x92, 0x140423372\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x95, 0x140423375\ncmp     [rax+675h], bpl                                                ; +0x9b, 0x14042337b\njnz     short loc_14042338B                                            ; +0xa2, 0x140423382\nmov     [rbx+3CCh], bpl                                                ; +0xa4, 0x140423384\nmov     edx, [rbx+3C0h]                                                ; +0xab, 0x14042338b\nmov     ecx, [rax+6A0h]                                                ; +0xb1, 0x140423391\ncmp     edx, 0FFFFFFFFh                                                ; +0xb7, 0x140423397\njnz     short loc_1404233A4                                            ; +0xba, 0x14042339a\nmov     [rbx+3C0h], ecx                                                ; +0xbc, 0x14042339c\njmp     short loc_1404233AE                                            ; +0xc2, 0x1404233a2\ncmp     edx, ecx                                                       ; +0xc4, 0x1404233a4\njz      short loc_1404233AE                                            ; +0xc6, 0x1404233a6\nmov     [rbx+3C0h], ebp                                                ; +0xc8, 0x1404233a8\nmov     edx, [rbx+3C4h]                                                ; +0xce, 0x1404233ae\nmov     ecx, [rax+5C8h]                                                ; +0xd4, 0x1404233b4\ncmp     edx, 0FFFFFFFFh                                                ; +0xda, 0x1404233ba\njnz     short loc_1404233C7                                            ; +0xdd, 0x1404233bd\nmov     [rbx+3C4h], ecx                                                ; +0xdf, 0x1404233bf\njmp     short loc_1404233D1                                            ; +0xe5, 0x1404233c5\ncmp     edx, ecx                                                       ; +0xe7, 0x1404233c7\njz      short loc_1404233D1                                            ; +0xe9, 0x1404233c9\nmov     [rbx+3C4h], ebp                                                ; +0xeb, 0x1404233cb\nmov     edx, [rbx+3D0h]                                                ; +0xf1, 0x1404233d1\nmov     ecx, [rax+744h]                                                ; +0xf7, 0x1404233d7\ncmp     edx, 0FFFFFFFFh                                                ; +0xfd, 0x1404233dd\njnz     short loc_1404233EA                                            ; +0x100, 0x1404233e0\nmov     [rbx+3D0h], ecx                                                ; +0x102, 0x1404233e2\njmp     short loc_1404233F4                                            ; +0x108, 0x1404233e8\ncmp     edx, ecx                                                       ; +0x10a, 0x1404233ea\njz      short loc_1404233F4                                            ; +0x10c, 0x1404233ec\nmov     [rbx+3D0h], ebp                                                ; +0x10e, 0x1404233ee\nmov     edx, [rbx+3C8h]                                                ; +0x114, 0x1404233f4\nmov     ecx, [rax+740h]                                                ; +0x11a, 0x1404233fa\ncmp     edx, 1869Fh                                                    ; +0x120, 0x140423400\njnz     short loc_140423410                                            ; +0x126, 0x140423406\nmov     [rbx+3C8h], ecx                                                ; +0x128, 0x140423408\njmp     short loc_14042341A                                            ; +0x12e, 0x14042340e\ncmp     edx, ecx                                                       ; +0x130, 0x140423410\njz      short loc_14042341A                                            ; +0x132, 0x140423412\nmov     [rbx+3C8h], ebp                                                ; +0x134, 0x140423414\nmov     rcx, rsi                                                       ; +0x13a, 0x14042341a\ninc     edi                                                            ; +0x13d, 0x14042341d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x13f, 0x14042341f\ncmp     edi, eax                                                       ; +0x145, 0x140423425\njb      loc_140423370                                                  ; +0x147, 0x140423427\nmov     rbp, [rsp+28h+arg_0]                                           ; +0x14d, 0x14042342d\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x152, 0x140423432\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x157, 0x140423437\nadd     rsp, 20h                                                       ; +0x15c, 0x14042343c\npop     rsi                                                            ; +0x160, 0x140423440\nretn                                                                   ; +0x161, 0x140423441", "xrefs": ["<???> @ 0x1405e51c0", "<???> @ 0x1406a077c", "<???> @ 0x1406a078c", "<???> @ 0x1406d9620"], "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"}