{"type": "func", "start": 5373042704, "end": 5373042896, "name": "SetupGradientPopup::onBlending", "pseudocode": "// \n// SetupGradientPopup::onBlending from 0x140422010 to 0x1404220d0 (192 bytes)\n// \n// 2 xrefs:\n// > SetupGradientPopup::init @ 0x140421714\n// > <???> @ 0x1406d95e4\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::onBlending(SetupGradientPopup *a1, cocos2d::CCObject *a2)\n{\n  int v3; // eax\n  int m_blendingMode; // edx\n  int v5; // r8d\n  int v6; // edx\n  unsigned int v7; // ebx\n  int v8; // eax\n  EffectGameObject *m_gameObject; // rcx\n  struct cocos2d::CCObject *v10; // rax\n\n  v3 = a2->getTag(a2);\n  m_blendingMode = a1->m_blendingMode;\n  v5 = m_blendingMode - 1;\n  v6 = m_blendingMode + 1;\n  if ( v3 != 1 )\n    v6 = v5;\n  v7 = 0;\n  v8 = 0;\n  if ( v6 >= 0 )\n    v8 = v6;\n  if ( v8 > 3 )\n    v8 = 3;\n  m_gameObject = a1->m_gameObject;\n  a1->m_blendingMode = v8;\n  if ( m_gameObject )\n  {\n    HIDWORD(m_gameObject[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable) = v8;\n    SetupGradientPopup::updateBlendingLabel(a1);\n  }\n  else\n  {\n    if ( cocos2d::CCArray::count(a1->m_gameObjects) )\n    {\n      do\n      {\n        v10 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v7++);\n        v10[33].m_nLuaID = a1->m_blendingMode;\n      }\n      while ( v7 < cocos2d::CCArray::count(a1->m_gameObjects) );\n    }\n    SetupGradientPopup::updateBlendingLabel(a1);\n  }\n}", "assembly": "; \n; SetupGradientPopup::onBlending from 0x140422010 to 0x1404220d0 (192 bytes)\n; \n; 2 xrefs:\n; > SetupGradientPopup::init @ 0x140421714\n; > <???> @ 0x1406d95e4\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, 0x140422010\npush    rdi                                                            ; +0x5, 0x140422015\nsub     rsp, 20h                                                       ; +0x6, 0x140422016\nmov     rax, [rdx]                                                     ; +0xa, 0x14042201a\nmov     rdi, rcx                                                       ; +0xd, 0x14042201d\nmov     rcx, rdx                                                       ; +0x10, 0x140422020\ncall    qword ptr [rax+38h]                                            ; +0x13, 0x140422023\nmov     edx, [rdi+3B0h]                                                ; +0x16, 0x140422026\nmov     ecx, 3                                                         ; +0x1c, 0x14042202c\nlea     r8d, [rdx-1]                                                   ; +0x21, 0x140422031\ninc     edx                                                            ; +0x25, 0x140422035\ncmp     eax, 1                                                         ; +0x27, 0x140422037\ncmovnz  edx, r8d                                                       ; +0x2a, 0x14042203a\nxor     ebx, ebx                                                       ; +0x2e, 0x14042203e\ntest    edx, edx                                                       ; +0x30, 0x140422040\nmov     eax, ebx                                                       ; +0x32, 0x140422042\ncmovns  eax, edx                                                       ; +0x34, 0x140422044\ncmp     eax, ecx                                                       ; +0x37, 0x140422047\ncmovg   eax, ecx                                                       ; +0x39, 0x140422049\nmov     rcx, [rdi+290h]                                                ; +0x3c, 0x14042204c\nmov     [rdi+3B0h], eax                                                ; +0x43, 0x140422053\ntest    rcx, rcx                                                       ; +0x49, 0x140422059\njz      short loc_140422076                                            ; +0x4c, 0x14042205c\nmov     [rcx+744h], eax                                                ; +0x4e, 0x14042205e\nmov     rcx, rdi                                                       ; +0x54, 0x140422064\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x57, 0x140422067\nadd     rsp, 20h                                                       ; +0x5c, 0x14042206c\npop     rdi                                                            ; +0x60, 0x140422070\njmp     SetupGradientPopup__updateBlendingLabel                        ; +0x61, 0x140422071\nmov     rcx, [rdi+298h]                                                ; +0x66, 0x140422076\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x6d, 0x14042207d\ntest    eax, eax                                                       ; +0x73, 0x140422083\njz      short loc_1404220BE                                            ; +0x75, 0x140422085\nnop     word ptr [rax+rax+00000000h]                                   ; +0x77, 0x140422087\nmov     rcx, [rdi+298h]                                                ; +0x80, 0x140422090\nmov     edx, ebx                                                       ; +0x87, 0x140422097\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x89, 0x140422099\nmov     ecx, [rdi+3B0h]                                                ; +0x8f, 0x14042209f\ninc     ebx                                                            ; +0x95, 0x1404220a5\nmov     [rax+744h], ecx                                                ; +0x97, 0x1404220a7\nmov     rcx, [rdi+298h]                                                ; +0x9d, 0x1404220ad\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa4, 0x1404220b4\ncmp     ebx, eax                                                       ; +0xaa, 0x1404220ba\njb      short loc_140422090                                            ; +0xac, 0x1404220bc\nmov     rcx, rdi                                                       ; +0xae, 0x1404220be\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb1, 0x1404220c1\nadd     rsp, 20h                                                       ; +0xb6, 0x1404220c6\npop     rdi                                                            ; +0xba, 0x1404220ca\njmp     $+5                                                            ; +0xbb, 0x1404220cb", "xrefs": ["SetupGradientPopup::init @ 0x140421714", "<???> @ 0x1406d95e4"], "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"}