{"type": "func", "start": 9977880, "end": 9978432, "name": "CustomizeObjectLayer::onSelectMode", "pseudocode": "// \n// CustomizeObjectLayer::onSelectMode from 0x984018 to 0x984240 (552 bytes)\n// \n// 6 xrefs:\n// > CustomizeObjectLayer::init @ 0x9865c4\n// > <???> @ 0xb7898\n// > CustomizeObjectLayer::init @ 0x985318\n// > CustomizeObjectLayer::init @ 0x9853f4\n// > CustomizeObjectLayer::init @ 0x986670\n// > <???> @ 0x15454c8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:57:52 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::onSelectMode(CustomizeObjectLayer *this, cocos2d::CCObject *a2)\n{\n  int v3; // w0\n  __int64 v4; // x2\n  ButtonSprite *v5; // x0\n  const char *v6; // x1\n  ButtonSprite *v7; // x0\n  const char *v8; // x1\n  __int64 v9; // x0\n  ButtonSprite *v10; // x0\n  const char *v11; // x1\n  __int64 v12; // x1\n  __int64 v13; // x2\n  int v14; // w3\n  unsigned int ActiveMode; // w0\n\n  v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);\n  *((_DWORD *)this + 186) = v3;\n  v4 = *((_QWORD *)this + 100);\n  if ( v3 == 1 )\n  {\n    (*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)v4 + 928LL))(*((_QWORD *)this + 100), \"Base Color\");\n  }\n  else if ( v3 == 2 )\n  {\n    (*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)v4 + 928LL))(*((_QWORD *)this + 100), \"Detail Color\");\n  }\n  else\n  {\n    (*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)v4 + 928LL))(*((_QWORD *)this + 100), \"Insert Text\");\n  }\n  v5 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 95) + 1072LL))(*((_QWORD *)this + 95));\n  if ( *((_DWORD *)this + 186) == 1 )\n    v6 = \"GJ_button_03.png\";\n  else\n    v6 = \"GJ_button_04.png\";\n  ButtonSprite::updateBGImage(v5, v6);\n  v7 = (ButtonSprite *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 96) + 1072LL))(*((_QWORD *)this + 96));\n  if ( *((_DWORD *)this + 186) == 2 )\n    v8 = \"GJ_button_03.png\";\n  else\n    v8 = \"GJ_button_04.png\";\n  ButtonSprite::updateBGImage(v7, v8);\n  v9 = *((_QWORD *)this + 97);\n  if ( v9 )\n  {\n    v10 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1072LL))(v9);\n    if ( *((_DWORD *)this + 186) == 3 )\n      v11 = \"GJ_button_03.png\";\n    else\n      v11 = \"GJ_button_04.png\";\n    ButtonSprite::updateBGImage(v10, v11);\n  }\n  CustomizeObjectLayer::toggleVisible(this);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 98) + 344LL))(\n    *((_QWORD *)this + 98),\n    *((_DWORD *)this + 186) == 1);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 98) + 1056LL))(\n    *((_QWORD *)this + 98),\n    *((_DWORD *)this + 186) == 1);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 99) + 344LL))(\n    *((_QWORD *)this + 99),\n    *((_DWORD *)this + 186) == 2);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 99) + 1056LL))(\n    *((_QWORD *)this + 99),\n    *((_DWORD *)this + 186) == 2);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 114) + 344LL))(\n    *((_QWORD *)this + 114),\n    *((_DWORD *)this + 186) != 3);\n  (*(void (__fastcall **)(_QWORD, bool))(**((_QWORD **)this + 114) + 1056LL))(\n    *((_QWORD *)this + 114),\n    *((_DWORD *)this + 186) != 3);\n  CustomizeObjectLayer::updateHSVButtons(this, v12, v13, v14);\n  CustomizeObjectLayer::updateColorSprite(this);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(this, 1u);\n  return CustomizeObjectLayer::updateChannelLabel(this, (GJSpecialColorSelect *)ActiveMode);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectMode from 0x984018 to 0x984240 (552 bytes)\n; \n; 6 xrefs:\n; > CustomizeObjectLayer::init @ 0x9865c4\n; > <???> @ 0xb7898\n; > CustomizeObjectLayer::init @ 0x985318\n; > CustomizeObjectLayer::init @ 0x9853f4\n; > CustomizeObjectLayer::init @ 0x986670\n; > <???> @ 0x15454c8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:57:52 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0x984018\nMOV             X29, SP                                                ; +0x4, 0x98401c\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x8, 0x984020\nMOV             X19, X0                                                ; +0xc, 0x984024\nMOV             X0, X1                                                 ; +0x10, 0x984028\nLDR             X1, [X1]                                               ; +0x14, 0x98402c\nLDR             X1, [X1,#0x40]                                         ; +0x18, 0x984030\nBLR             X1                                                     ; +0x1c, 0x984034\nCMP             W0, #1                                                 ; +0x20, 0x984038\nSTR             W0, [X19,#0x2E8]                                       ; +0x24, 0x98403c\nLDR             X2, [X19,#0x320]                                       ; +0x28, 0x984040\nB.EQ            loc_984224                                             ; +0x2c, 0x984044\nCMP             W0, #2                                                 ; +0x30, 0x984048\nB.EQ            loc_9841FC                                             ; +0x34, 0x98404c\nMOV             X0, X2                                                 ; +0x38, 0x984050\nLDR             X2, [X2]                                               ; +0x3c, 0x984054\nADRL            X1, aInsertText; \"Insert Text\"                         ; +0x40, 0x984058\nLDR             X2, [X2,#0x3A0]                                        ; +0x48, 0x984060\nBLR             X2                                                     ; +0x4c, 0x984064\nLDR             X1, [X19,#0x2F8]                                       ; +0x50, 0x984068\nMOV             X0, X1                                                 ; +0x54, 0x98406c\nLDR             X1, [X1]                                               ; +0x58, 0x984070\nLDR             X1, [X1,#0x430]                                        ; +0x5c, 0x984074\nBLR             X1                                                     ; +0x60, 0x984078\nLDR             W1, [X19,#0x2E8]                                       ; +0x64, 0x98407c\nCMP             W1, #1                                                 ; +0x68, 0x984080\nB.EQ            loc_9841E4                                             ; +0x6c, 0x984084\nADRL            X1, aGjButton04Png; \"GJ_button_04.png\"                 ; +0x70, 0x984088\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x78, 0x984090\nLDR             X1, [X19,#0x300]                                       ; +0x7c, 0x984094\nMOV             X0, X1                                                 ; +0x80, 0x984098\nLDR             X1, [X1]                                               ; +0x84, 0x98409c\nLDR             X1, [X1,#0x430]                                        ; +0x88, 0x9840a0\nBLR             X1                                                     ; +0x8c, 0x9840a4\nLDR             W1, [X19,#0x2E8]                                       ; +0x90, 0x9840a8\nCMP             W1, #2                                                 ; +0x94, 0x9840ac\nB.EQ            loc_9841F0                                             ; +0x98, 0x9840b0\nADRL            X1, aGjButton04Png; \"GJ_button_04.png\"                 ; +0x9c, 0x9840b4\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0xa4, 0x9840bc\nLDR             X0, [X19,#0x308]                                       ; +0xa8, 0x9840c0\nCBZ             X0, loc_9840EC                                         ; +0xac, 0x9840c4\nLDR             X1, [X0]                                               ; +0xb0, 0x9840c8\nLDR             X1, [X1,#0x430]                                        ; +0xb4, 0x9840cc\nBLR             X1                                                     ; +0xb8, 0x9840d0\nLDR             W1, [X19,#0x2E8]                                       ; +0xbc, 0x9840d4\nCMP             W1, #3                                                 ; +0xc0, 0x9840d8\nB.EQ            loc_984218                                             ; +0xc4, 0x9840dc\nADRL            X1, aGjButton04Png; \"GJ_button_04.png\"                 ; +0xc8, 0x9840e0\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0xd0, 0x9840e8\nMOV             X0, X19; this                                          ; +0xd4, 0x9840ec\nBL              _ZN20CustomizeObjectLayer13toggleVisibleEv; CustomizeObjectLayer::toggleVisible(void) ; +0xd8, 0x9840f0\nLDR             X1, [X19,#0x310]                                       ; +0xdc, 0x9840f4\nLDR             W3, [X19,#0x2E8]                                       ; +0xe0, 0x9840f8\nMOV             X0, X1                                                 ; +0xe4, 0x9840fc\nLDR             X2, [X1]                                               ; +0xe8, 0x984100\nCMP             W3, #1                                                 ; +0xec, 0x984104\nCSET            W1, EQ                                                 ; +0xf0, 0x984108\nLDR             X2, [X2,#0x158]                                        ; +0xf4, 0x98410c\nBLR             X2                                                     ; +0xf8, 0x984110\nLDR             X1, [X19,#0x310]                                       ; +0xfc, 0x984114\nLDR             W3, [X19,#0x2E8]                                       ; +0x100, 0x984118\nMOV             X0, X1                                                 ; +0x104, 0x98411c\nLDR             X2, [X1]                                               ; +0x108, 0x984120\nCMP             W3, #1                                                 ; +0x10c, 0x984124\nCSET            W1, EQ                                                 ; +0x110, 0x984128\nLDR             X2, [X2,#0x420]                                        ; +0x114, 0x98412c\nBLR             X2                                                     ; +0x118, 0x984130\nLDR             X1, [X19,#0x318]                                       ; +0x11c, 0x984134\nLDR             W3, [X19,#0x2E8]                                       ; +0x120, 0x984138\nMOV             X0, X1                                                 ; +0x124, 0x98413c\nLDR             X2, [X1]                                               ; +0x128, 0x984140\nCMP             W3, #2                                                 ; +0x12c, 0x984144\nCSET            W1, EQ                                                 ; +0x130, 0x984148\nLDR             X2, [X2,#0x158]                                        ; +0x134, 0x98414c\nBLR             X2                                                     ; +0x138, 0x984150\nLDR             X1, [X19,#0x318]                                       ; +0x13c, 0x984154\nLDR             W3, [X19,#0x2E8]                                       ; +0x140, 0x984158\nMOV             X0, X1                                                 ; +0x144, 0x98415c\nLDR             X2, [X1]                                               ; +0x148, 0x984160\nCMP             W3, #2                                                 ; +0x14c, 0x984164\nCSET            W1, EQ                                                 ; +0x150, 0x984168\nLDR             X2, [X2,#0x420]                                        ; +0x154, 0x98416c\nBLR             X2                                                     ; +0x158, 0x984170\nLDR             X1, [X19,#0x390]                                       ; +0x15c, 0x984174\nLDR             W3, [X19,#0x2E8]                                       ; +0x160, 0x984178\nMOV             X0, X1                                                 ; +0x164, 0x98417c\nLDR             X2, [X1]                                               ; +0x168, 0x984180\nCMP             W3, #3                                                 ; +0x16c, 0x984184\nCSET            W1, NE                                                 ; +0x170, 0x984188\nLDR             X2, [X2,#0x158]                                        ; +0x174, 0x98418c\nBLR             X2                                                     ; +0x178, 0x984190\nLDR             X1, [X19,#0x390]                                       ; +0x17c, 0x984194\nLDR             W3, [X19,#0x2E8]                                       ; +0x180, 0x984198\nMOV             X0, X1                                                 ; +0x184, 0x98419c\nLDR             X2, [X1]                                               ; +0x188, 0x9841a0\nCMP             W3, #3                                                 ; +0x18c, 0x9841a4\nCSET            W1, NE                                                 ; +0x190, 0x9841a8\nLDR             X2, [X2,#0x420]                                        ; +0x194, 0x9841ac\nBLR             X2                                                     ; +0x198, 0x9841b0\nMOV             X0, X19; this                                          ; +0x19c, 0x9841b4\nBL              _ZN20CustomizeObjectLayer16updateHSVButtonsEv; CustomizeObjectLayer::updateHSVButtons(void) ; +0x1a0, 0x9841b8\nMOV             X0, X19; this                                          ; +0x1a4, 0x9841bc\nBL              _ZN20CustomizeObjectLayer17updateColorSpriteEv; CustomizeObjectLayer::updateColorSprite(void) ; +0x1a8, 0x9841c0\nMOV             X0, X19; this                                          ; +0x1ac, 0x9841c4\nMOV             W1, #1; bool                                           ; +0x1b0, 0x9841c8\nBL              _ZN20CustomizeObjectLayer13getActiveModeEb; CustomizeObjectLayer::getActiveMode(bool) ; +0x1b4, 0x9841cc\nMOV             W1, W0; GJSpecialColorSelect *                         ; +0x1b8, 0x9841d0\nMOV             X0, X19; this                                          ; +0x1bc, 0x9841d4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1c0, 0x9841d8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x1c4, 0x9841dc\nB               _ZN20CustomizeObjectLayer18updateChannelLabelEi; CustomizeObjectLayer::updateChannelLabel(int) ; +0x1c8, 0x9841e0\nADRL            X1, aGjButton03Png; \"GJ_button_03.png\"                 ; +0x1cc, 0x9841e4\nB               loc_984090                                             ; +0x1d4, 0x9841ec\nADRL            X1, aGjButton03Png; \"GJ_button_03.png\"                 ; +0x1d8, 0x9841f0\nB               loc_9840BC                                             ; +0x1e0, 0x9841f8\nMOV             X0, X2                                                 ; +0x1e4, 0x9841fc\nLDR             X2, [X2]                                               ; +0x1e8, 0x984200\nADRL            X1, aDetailColor; \"Detail Color\"                       ; +0x1ec, 0x984204\nLDR             X2, [X2,#0x3A0]                                        ; +0x1f4, 0x98420c\nBLR             X2                                                     ; +0x1f8, 0x984210\nB               loc_984068                                             ; +0x1fc, 0x984214\nADRL            X1, aGjButton03Png; \"GJ_button_03.png\"                 ; +0x200, 0x984218\nB               loc_9840E8                                             ; +0x208, 0x984220\nMOV             X0, X2                                                 ; +0x20c, 0x984224\nLDR             X2, [X2]                                               ; +0x210, 0x984228\nADRL            X1, aBaseColor; \"Base Color\"                           ; +0x214, 0x98422c\nLDR             X2, [X2,#0x3A0]                                        ; +0x21c, 0x984234\nBLR             X2                                                     ; +0x220, 0x984238\nB               loc_984068                                             ; +0x224, 0x98423c", "xrefs": ["CustomizeObjectLayer::init @ 0x9865c4", "<???> @ 0xb7898", "CustomizeObjectLayer::init @ 0x985318", "CustomizeObjectLayer::init @ 0x9853f4", "CustomizeObjectLayer::init @ 0x986670", "<???> @ 0x15454c8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}