{"type": "func", "start": 8653144, "end": 8653356, "name": "CustomizeObjectLayer::hsvPopupClosed", "pseudocode": "// \n// CustomizeObjectLayer::hsvPopupClosed from 0x840958 to 0x840a2c (212 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'CustomizeObjectLayer::hsvPopupClosed @ 0x840a30\n// > <???> @ 0x851e8\n// > <???> @ 0x118c938\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 CustomizeObjectLayer::hsvPopupClosed(CustomizeObjectLayer *a1, HSVWidgetPopup *a2, cocos2d::ccHSVValue a3)\n{\n  __int64 v4; // x22\n  __int64 v5; // x23\n  int v6; // w21\n  GJSpriteColor *RelativeSpriteColor; // x0\n  unsigned int v8; // w19\n  bool v9; // cf\n  unsigned int v10; // w1\n  GameObject *v11; // x0\n  GJSpriteColor *v12; // x0\n\n  v4 = *(_QWORD *)&a3.h;\n  v5 = *(_QWORD *)&a3.v;\n  if ( a2->getTag(a2) == 1 )\n    v6 = 1;\n  else\n    v6 = 2;\n  if ( a1->m_targetObject )\n  {\n    RelativeSpriteColor = GameObject::getRelativeSpriteColor(a1->m_targetObject, v6);\n    if ( RelativeSpriteColor )\n    {\n      *(_QWORD *)&RelativeSpriteColor->m_hsv.h = v4;\n      *(_QWORD *)&RelativeSpriteColor->m_hsv.v = v5;\n    }\n  }\n  else\n  {\n    v8 = 0;\n    while ( 1 )\n    {\n      v9 = v8 >= (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects);\n      v10 = v8++;\n      if ( v9 )\n        break;\n      while ( 1 )\n      {\n        v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v10);\n        v12 = GameObject::getRelativeSpriteColor(v11, v6);\n        if ( !v12 )\n          break;\n        *(_QWORD *)&v12->m_hsv.h = v4;\n        *(_QWORD *)&v12->m_hsv.v = v5;\n        v9 = v8 >= (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects);\n        v10 = v8++;\n        if ( v9 )\n          goto LABEL_7;\n      }\n    }\n  }\nLABEL_7:\n  CustomizeObjectLayer::updateHSVButtons(a1);\n}", "assembly": "; \n; CustomizeObjectLayer::hsvPopupClosed from 0x840958 to 0x840a2c (212 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'CustomizeObjectLayer::hsvPopupClosed @ 0x840a30\n; > <???> @ 0x851e8\n; > <???> @ 0x118c938\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x840958\nMOV             X29, SP                                                ; +0x4, 0x84095c\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x840960\nMOV             X20, X0                                                ; +0xc, 0x840964\nMOV             X0, X1                                                 ; +0x10, 0x840968\nLDR             X1, [X1]                                               ; +0x14, 0x84096c\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x18, 0x840970\nSTR             X23, [SP,#0x40+var_10]                                 ; +0x1c, 0x840974\nMOV             X22, X2                                                ; +0x20, 0x840978\nLDR             X1, [X1,#0x40]                                         ; +0x24, 0x84097c\nMOV             X23, X3                                                ; +0x28, 0x840980\nMOV             W21, #2                                                ; +0x2c, 0x840984\nBLR             X1                                                     ; +0x30, 0x840988\nCMP             W0, #1                                                 ; +0x34, 0x84098c\nLDR             X1, [X20,#0x298]                                       ; +0x38, 0x840990\nCSINC           W21, W21, WZR, NE                                      ; +0x3c, 0x840994\nCBZ             X1, loc_8409C8                                         ; +0x40, 0x840998\nMOV             X0, X1; this                                           ; +0x44, 0x84099c\nMOV             W1, W21; int                                           ; +0x48, 0x8409a0\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x4c, 0x8409a4\nCBZ             X0, loc_8409B0                                         ; +0x50, 0x8409a8\nSTP             X22, X23, [X0,#0x10]                                   ; +0x54, 0x8409ac\nMOV             X0, X20; this                                          ; +0x58, 0x8409b0\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x5c, 0x8409b4\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x60, 0x8409b8\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x64, 0x8409bc\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x68, 0x8409c0\nB               _ZN20CustomizeObjectLayer16updateHSVButtonsEv; CustomizeObjectLayer::updateHSVButtons(void) ; +0x6c, 0x8409c4\nMOV             W19, #0                                                ; +0x70, 0x8409c8\nLDR             X0, [X20,#0x2A0]; this                                 ; +0x74, 0x8409cc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x78, 0x8409d0\nCMP             W19, W0                                                ; +0x7c, 0x8409d4\nMOV             W1, W19; unsigned int                                  ; +0x80, 0x8409d8\nADD             W19, W19, #1                                           ; +0x84, 0x8409dc\nB.CS            loc_8409B0                                             ; +0x88, 0x8409e0\nLDR             X0, [X20,#0x2A0]; this                                 ; +0x8c, 0x8409e4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x90, 0x8409e8\nMOV             W1, W21; int                                           ; +0x94, 0x8409ec\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x98, 0x8409f0\nCBZ             X0, loc_8409CC                                         ; +0x9c, 0x8409f4\nSTP             X22, X23, [X0,#0x10]                                   ; +0xa0, 0x8409f8\nLDR             X0, [X20,#0x2A0]; this                                 ; +0xa4, 0x8409fc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xa8, 0x840a00\nCMP             W19, W0                                                ; +0xac, 0x840a04\nMOV             W1, W19                                                ; +0xb0, 0x840a08\nADD             W19, W19, #1                                           ; +0xb4, 0x840a0c\nB.CC            loc_8409E4                                             ; +0xb8, 0x840a10\nMOV             X0, X20; this                                          ; +0xbc, 0x840a14\nLDR             X23, [SP,#0x40+var_10]                                 ; +0xc0, 0x840a18\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xc4, 0x840a1c\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xc8, 0x840a20\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xcc, 0x840a24\nB               _ZN20CustomizeObjectLayer16updateHSVButtonsEv; CustomizeObjectLayer::updateHSVButtons(void) ; +0xd0, 0x840a28", "xrefs": ["`non-virtual thunk to'CustomizeObjectLayer::hsvPopupClosed @ 0x840a30", "<???> @ 0x851e8", "<???> @ 0x118c938"], "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"}