{"type": "func", "start": 5373018208, "end": 5373018548, "name": "SetupCountTriggerPopup::determineStartValues", "pseudocode": "// \n// SetupCountTriggerPopup::determineStartValues from 0x14041c060 to 0x14041c1b4 (340 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405e22d0\n// > <???> @ 0x1406a0128\n// > <???> @ 0x1406a0138\n// > <???> @ 0x1406d92a8\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 SetupCountTriggerPopup::determineStartValues(SetupCountTriggerPopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v4; // esi\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_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    if ( cocos2d::CCArray::count(m_gameObjects) )\n    {\n      v4 = 0;\n      *(_QWORD *)&a1->m_itemID = -1;\n      a1->m_targetCount = 99999;\n      for ( *(_WORD *)&a1->m_activateGroup = 257; 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        if ( !LOBYTE(v5[33].m_nTag) )\n          a1->m_multiActivate = 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_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  }\n}", "assembly": "; \n; SetupCountTriggerPopup::determineStartValues from 0x14041c060 to 0x14041c1b4 (340 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405e22d0\n; > <???> @ 0x1406a0128\n; > <???> @ 0x1406a0138\n; > <???> @ 0x1406d92a8\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, 0x14041c060\npush    rdi                                                            ; +0x5, 0x14041c065\nsub     rsp, 20h                                                       ; +0x6, 0x14041c066\nmov     rbx, rcx                                                       ; +0xa, 0x14041c06a\ncall    SetupTriggerPopup__determineStartValues                        ; +0xd, 0x14041c06d\ncmp     qword ptr [rbx+290h], 0                                        ; +0x12, 0x14041c072\njz      short loc_14041C097                                            ; +0x1a, 0x14041c07a\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1c, 0x14041c07c\nmov     rdx, [rbx+290h]                                                ; +0x22, 0x14041c082\nmov     rcx, rax                                                       ; +0x29, 0x14041c089\nmov     rdi, rax                                                       ; +0x2c, 0x14041c08c\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2f, 0x14041c08f\njmp     short loc_14041C09E                                            ; +0x35, 0x14041c095\nmov     rdi, [rbx+298h]                                                ; +0x37, 0x14041c097\ntest    rdi, rdi                                                       ; +0x3e, 0x14041c09e\njz      loc_14041C1A9                                                  ; +0x41, 0x14041c0a1\nmov     rcx, rdi                                                       ; +0x47, 0x14041c0a7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x14041c0aa\ntest    eax, eax                                                       ; +0x50, 0x14041c0b0\njz      loc_14041C1A9                                                  ; +0x52, 0x14041c0b2\nmov     [rsp+28h+arg_0], rbp                                           ; +0x58, 0x14041c0b8\nmov     rcx, rdi                                                       ; +0x5d, 0x14041c0bd\nxor     ebp, ebp                                                       ; +0x60, 0x14041c0c0\nmov     [rsp+28h+arg_8], rsi                                           ; +0x62, 0x14041c0c2\nmov     esi, ebp                                                       ; +0x67, 0x14041c0c7\nmov     qword ptr [rbx+3C0h], 0FFFFFFFFFFFFFFFFh                       ; +0x69, 0x14041c0c9\nmov     dword ptr [rbx+3C8h], 1869Fh                                   ; +0x74, 0x14041c0d4\nmov     word ptr [rbx+3CCh], 101h                                      ; +0x7e, 0x14041c0de\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x87, 0x14041c0e7\ntest    eax, eax                                                       ; +0x8d, 0x14041c0ed\njz      loc_14041C19F                                                  ; +0x8f, 0x14041c0ef\nmov     edx, esi                                                       ; +0x95, 0x14041c0f5\nmov     rcx, rdi                                                       ; +0x97, 0x14041c0f7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x9a, 0x14041c0fa\ncmp     [rax+675h], bpl                                                ; +0xa0, 0x14041c100\njnz     short loc_14041C110                                            ; +0xa7, 0x14041c107\nmov     [rbx+3CCh], bpl                                                ; +0xa9, 0x14041c109\ncmp     [rax+748h], bpl                                                ; +0xb0, 0x14041c110\njnz     short loc_14041C120                                            ; +0xb7, 0x14041c117\nmov     [rbx+3CDh], bpl                                                ; +0xb9, 0x14041c119\nmov     edx, [rbx+3C0h]                                                ; +0xc0, 0x14041c120\nmov     ecx, [rax+6A0h]                                                ; +0xc6, 0x14041c126\ncmp     edx, 0FFFFFFFFh                                                ; +0xcc, 0x14041c12c\njnz     short loc_14041C139                                            ; +0xcf, 0x14041c12f\nmov     [rbx+3C0h], ecx                                                ; +0xd1, 0x14041c131\njmp     short loc_14041C143                                            ; +0xd7, 0x14041c137\ncmp     edx, ecx                                                       ; +0xd9, 0x14041c139\njz      short loc_14041C143                                            ; +0xdb, 0x14041c13b\nmov     [rbx+3C0h], ebp                                                ; +0xdd, 0x14041c13d\nmov     edx, [rbx+3C4h]                                                ; +0xe3, 0x14041c143\nmov     ecx, [rax+5C8h]                                                ; +0xe9, 0x14041c149\ncmp     edx, 0FFFFFFFFh                                                ; +0xef, 0x14041c14f\njnz     short loc_14041C15C                                            ; +0xf2, 0x14041c152\nmov     [rbx+3C4h], ecx                                                ; +0xf4, 0x14041c154\njmp     short loc_14041C166                                            ; +0xfa, 0x14041c15a\ncmp     edx, ecx                                                       ; +0xfc, 0x14041c15c\njz      short loc_14041C166                                            ; +0xfe, 0x14041c15e\nmov     [rbx+3C4h], ebp                                                ; +0x100, 0x14041c160\nmov     edx, [rbx+3C8h]                                                ; +0x106, 0x14041c166\nmov     ecx, [rax+740h]                                                ; +0x10c, 0x14041c16c\ncmp     edx, 1869Fh                                                    ; +0x112, 0x14041c172\njnz     short loc_14041C182                                            ; +0x118, 0x14041c178\nmov     [rbx+3C8h], ecx                                                ; +0x11a, 0x14041c17a\njmp     short loc_14041C18C                                            ; +0x120, 0x14041c180\ncmp     edx, ecx                                                       ; +0x122, 0x14041c182\njz      short loc_14041C18C                                            ; +0x124, 0x14041c184\nmov     [rbx+3C8h], ebp                                                ; +0x126, 0x14041c186\nmov     rcx, rdi                                                       ; +0x12c, 0x14041c18c\ninc     esi                                                            ; +0x12f, 0x14041c18f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x131, 0x14041c191\ncmp     esi, eax                                                       ; +0x137, 0x14041c197\njb      loc_14041C0F5                                                  ; +0x139, 0x14041c199\nmov     rbp, [rsp+28h+arg_0]                                           ; +0x13f, 0x14041c19f\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x144, 0x14041c1a4\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x149, 0x14041c1a9\nadd     rsp, 20h                                                       ; +0x14e, 0x14041c1ae\npop     rdi                                                            ; +0x152, 0x14041c1b2\nretn                                                                   ; +0x153, 0x14041c1b3", "xrefs": ["<???> @ 0x1405e22d0", "<???> @ 0x1406a0128", "<???> @ 0x1406a0138", "<???> @ 0x1406d92a8"], "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"}