{"type": "func", "start": 5373041536, "end": 5373041806, "name": "SetupGradientPopup::determineStartValues", "pseudocode": "// \n// SetupGradientPopup::determineStartValues from 0x140421b80 to 0x140421c8e (270 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405e4a68\n// > <???> @ 0x1406a05b8\n// > <???> @ 0x1406a05f4\n// > <???> @ 0x1406d953c\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 SetupGradientPopup::determineStartValues(SetupGradientPopup *a1)\n{\n  __int64 v2; // rcx\n  cocos2d::CCArray *m_gameObjects; // rsi\n  unsigned int v4; // ebp\n  int m_nLuaID; // edi\n  int v6; // ebx\n  struct cocos2d::CCObject *v7; // rax\n  unsigned int m_uID; // eax\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 && cocos2d::CCArray::count(m_gameObjects) )\n  {\n    v4 = 0;\n    m_nLuaID = -99999;\n    v6 = -99999;\n    if ( !cocos2d::CCArray::count(m_gameObjects) )\n      goto LABEL_17;\n    do\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v4);\n      if ( m_nLuaID == -99999 )\n      {\n        m_nLuaID = v7[33].m_nLuaID;\n      }\n      else if ( m_nLuaID != v7[33].m_nLuaID )\n      {\n        m_nLuaID = -9991;\n      }\n      m_uID = v7[33].m_uID;\n      if ( v6 == -99999 )\n      {\n        v6 = m_uID;\n      }\n      else if ( v6 != m_uID )\n      {\n        v6 = -9991;\n      }\n      ++v4;\n    }\n    while ( v4 < cocos2d::CCArray::count(m_gameObjects) );\n    if ( m_nLuaID != -9991 )\nLABEL_17:\n      a1->m_blendingMode = m_nLuaID;\n    if ( v6 != -9991 )\n      a1->m_blendingLayer = v6;\n  }\n}", "assembly": "; \n; SetupGradientPopup::determineStartValues from 0x140421b80 to 0x140421c8e (270 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405e4a68\n; > <???> @ 0x1406a05b8\n; > <???> @ 0x1406a05f4\n; > <???> @ 0x1406d953c\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\npush    rsi                                                            ; +0x0, 0x140421b80\npush    r14                                                            ; +0x2, 0x140421b82\nsub     rsp, 28h                                                       ; +0x4, 0x140421b84\nmov     r14, rcx                                                       ; +0x8, 0x140421b88\ncall    SetupTriggerPopup__determineStartValues                        ; +0xb, 0x140421b8b\ncmp     qword ptr [r14+290h], 0                                        ; +0x10, 0x140421b90\njz      short loc_140421BB5                                            ; +0x18, 0x140421b98\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1a, 0x140421b9a\nmov     rdx, [r14+290h]                                                ; +0x20, 0x140421ba0\nmov     rcx, rax                                                       ; +0x27, 0x140421ba7\nmov     rsi, rax                                                       ; +0x2a, 0x140421baa\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x2d, 0x140421bad\njmp     short loc_140421BBC                                            ; +0x33, 0x140421bb3\nmov     rsi, [r14+298h]                                                ; +0x35, 0x140421bb5\ntest    rsi, rsi                                                       ; +0x3c, 0x140421bbc\njz      loc_140421C86                                                  ; +0x3f, 0x140421bbf\nmov     rcx, rsi                                                       ; +0x45, 0x140421bc5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x48, 0x140421bc8\ntest    eax, eax                                                       ; +0x4e, 0x140421bce\njz      loc_140421C86                                                  ; +0x50, 0x140421bd0\nmov     [rsp+38h+arg_0], rbx                                           ; +0x56, 0x140421bd6\nmov     rcx, rsi                                                       ; +0x5b, 0x140421bdb\nmov     [rsp+38h+arg_8], rbp                                           ; +0x5e, 0x140421bde\nxor     ebp, ebp                                                       ; +0x63, 0x140421be3\nmov     [rsp+38h+arg_10], rdi                                          ; +0x65, 0x140421be5\nmov     edi, 0FFFE7961h                                                ; +0x6a, 0x140421bea\nmov     ebx, edi                                                       ; +0x6f, 0x140421bef\nmov     [rsp+38h+var_18], r15                                          ; +0x71, 0x140421bf1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x76, 0x140421bf6\nmov     r15d, 0FFFFD8F9h                                               ; +0x7c, 0x140421bfc\ntest    eax, eax                                                       ; +0x82, 0x140421c02\njz      short loc_140421C5F                                            ; +0x84, 0x140421c04\nnop     word ptr [rax+rax+00000000h]                                   ; +0x86, 0x140421c06\nmov     edx, ebp                                                       ; +0x90, 0x140421c10\nmov     rcx, rsi                                                       ; +0x92, 0x140421c12\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x95, 0x140421c15\nmov     ecx, [rax+744h]                                                ; +0x9b, 0x140421c1b\ncmp     edi, 0FFFE7961h                                                ; +0xa1, 0x140421c21\njnz     short loc_140421C2D                                            ; +0xa7, 0x140421c27\nmov     edi, ecx                                                       ; +0xa9, 0x140421c29\njmp     short loc_140421C33                                            ; +0xab, 0x140421c2b\ncmp     edi, ecx                                                       ; +0xad, 0x140421c2d\ncmovnz  edi, r15d                                                      ; +0xaf, 0x140421c2f\nmov     eax, [rax+740h]                                                ; +0xb3, 0x140421c33\ncmp     ebx, 0FFFE7961h                                                ; +0xb9, 0x140421c39\njnz     short loc_140421C45                                            ; +0xbf, 0x140421c3f\nmov     ebx, eax                                                       ; +0xc1, 0x140421c41\njmp     short loc_140421C4B                                            ; +0xc3, 0x140421c43\ncmp     ebx, eax                                                       ; +0xc5, 0x140421c45\ncmovnz  ebx, r15d                                                      ; +0xc7, 0x140421c47\nmov     rcx, rsi                                                       ; +0xcb, 0x140421c4b\ninc     ebp                                                            ; +0xce, 0x140421c4e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd0, 0x140421c50\ncmp     ebp, eax                                                       ; +0xd6, 0x140421c56\njb      short loc_140421C10                                            ; +0xd8, 0x140421c58\ncmp     edi, r15d                                                      ; +0xda, 0x140421c5a\njz      short loc_140421C66                                            ; +0xdd, 0x140421c5d\nmov     [r14+3B0h], edi                                                ; +0xdf, 0x140421c5f\nmov     rdi, [rsp+38h+arg_10]                                          ; +0xe6, 0x140421c66\ncmp     ebx, r15d                                                      ; +0xeb, 0x140421c6b\nmov     r15, [rsp+38h+var_18]                                          ; +0xee, 0x140421c6e\nmov     rbp, [rsp+38h+arg_8]                                           ; +0xf3, 0x140421c73\njz      short loc_140421C81                                            ; +0xf8, 0x140421c78\nmov     [r14+3C0h], ebx                                                ; +0xfa, 0x140421c7a\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x101, 0x140421c81\nadd     rsp, 28h                                                       ; +0x106, 0x140421c86\npop     r14                                                            ; +0x10a, 0x140421c8a\npop     rsi                                                            ; +0x10c, 0x140421c8c\nretn                                                                   ; +0x10d, 0x140421c8d", "xrefs": ["<???> @ 0x1405e4a68", "<???> @ 0x1406a05b8", "<???> @ 0x1406a05f4", "<???> @ 0x1406d953c"], "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"}