{"type": "func", "start": 5370032400, "end": 5370032918, "name": "CustomizeObjectLayer::onSelectMode", "pseudocode": "// \n// CustomizeObjectLayer::onSelectMode from 0x140143110 to 0x140143316 (518 bytes)\n// \n// 5 xrefs:\n// > CustomizeObjectLayer::init @ 0x140141d10\n// > CustomizeObjectLayer::init @ 0x14013fa29\n// > CustomizeObjectLayer::init @ 0x14013fb5d\n// > CustomizeObjectLayer::init @ 0x140140e99\n// > <???> @ 0x1409173c0\n// \n// This function is hookable on this platform (idp: pc, 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 11:27:10 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::onSelectMode(__int64 a1, __int64 a2)\n{\n  int v3; // eax\n  void (__fastcall ***v4)(_QWORD, const char *); // rcx\n  const char *v5; // rdx\n  const char *v6; // rsi\n  const char *v7; // rbx\n  __int64 v8; // rax\n  const char *v9; // rbx\n  __int64 v10; // rax\n  __int64 v11; // rcx\n  __int64 v12; // rax\n  __int64 v13; // rdx\n  __int64 v14; // rdx\n  __int64 v15; // rdx\n  __int64 v16; // rdx\n  __int64 v17; // rdx\n  __int64 v18; // rdx\n  __int64 v19; // rdx\n  __int64 v20; // rdx\n  int ActiveMode; // eax\n  const char *CString; // rdx\n  cocos2d::CCString *v23; // rax\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = (void (__fastcall ***)(_QWORD, const char *))(*(_QWORD *)(a1 + 800) + 360LL);\n  *(_DWORD *)(a1 + 744) = v3;\n  if ( v3 == 1 )\n  {\n    v5 = \"Base Color\";\n  }\n  else\n  {\n    v5 = \"Detail Color\";\n    if ( v3 != 2 )\n      v5 = \"Insert Text\";\n  }\n  (**v4)(v4, v5);\n  v6 = \"GJ_button_04.png\";\n  v7 = \"GJ_button_04.png\";\n  if ( *(_DWORD *)(a1 + 744) == 1 )\n    v7 = \"GJ_button_03.png\";\n  v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 760) + 952LL))(*(_QWORD *)(a1 + 760));\n  ButtonSprite::updateBGImage(v8, v7);\n  v9 = \"GJ_button_04.png\";\n  if ( *(_DWORD *)(a1 + 744) == 2 )\n    v9 = \"GJ_button_03.png\";\n  v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 952LL))(*(_QWORD *)(a1 + 768));\n  ButtonSprite::updateBGImage(v10, v9);\n  v11 = *(_QWORD *)(a1 + 776);\n  if ( v11 )\n  {\n    if ( *(_DWORD *)(a1 + 744) == 3 )\n      v6 = \"GJ_button_03.png\";\n    v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 952LL))(v11);\n    ButtonSprite::updateBGImage(v12, v6);\n  }\n  CustomizeObjectLayer::toggleVisible(a1);\n  LOBYTE(v13) = *(_DWORD *)(a1 + 744) == 1;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 784) + 336LL))(*(_QWORD *)(a1 + 784), v13);\n  LOBYTE(v14) = *(_DWORD *)(a1 + 744) == 1;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 784) + 936LL))(*(_QWORD *)(a1 + 784), v14);\n  LOBYTE(v15) = *(_DWORD *)(a1 + 744) == 2;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 792) + 336LL))(*(_QWORD *)(a1 + 792), v15);\n  LOBYTE(v16) = *(_DWORD *)(a1 + 744) == 2;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 792) + 936LL))(*(_QWORD *)(a1 + 792), v16);\n  LOBYTE(v17) = *(_DWORD *)(a1 + 744) != 3;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 912) + 336LL))(*(_QWORD *)(a1 + 912), v17);\n  LOBYTE(v18) = *(_DWORD *)(a1 + 744) != 3;\n  (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 912) + 936LL))(*(_QWORD *)(a1 + 912), v18);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n  CustomizeObjectLayer::updateColorSprite(a1, v19);\n  LOBYTE(v20) = 1;\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, v20);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      CString = \" \";\n    }\n    else\n    {\n      v23 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)ActiveMode);\n      CString = cocos2d::CCString::getCString(v23);\n    }\n  }\n  else\n  {\n    CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);\n  }\n  return (**(__int64 (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 808) + 360LL))(\n           *(_QWORD *)(a1 + 808) + 360LL,\n           CString);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectMode from 0x140143110 to 0x140143316 (518 bytes)\n; \n; 5 xrefs:\n; > CustomizeObjectLayer::init @ 0x140141d10\n; > CustomizeObjectLayer::init @ 0x14013fa29\n; > CustomizeObjectLayer::init @ 0x14013fb5d\n; > CustomizeObjectLayer::init @ 0x140140e99\n; > <???> @ 0x1409173c0\n; \n; This function is hookable on this platform (idp: pc, 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 11:27:10 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140143110\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x140143115\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x14014311a\npush    rdi                                                            ; +0xf, 0x14014311f\nsub     rsp, 20h                                                       ; +0x10, 0x140143120\nmov     rax, [rdx]                                                     ; +0x14, 0x140143124\nmov     rdi, rcx                                                       ; +0x17, 0x140143127\nmov     rcx, rdx                                                       ; +0x1a, 0x14014312a\ncall    qword ptr [rax+38h]                                            ; +0x1d, 0x14014312d\nmov     rcx, [rdi+320h]                                                ; +0x20, 0x140143130\nadd     rcx, 168h                                                      ; +0x27, 0x140143137\nmov     [rdi+2E8h], eax                                                ; +0x2e, 0x14014313e\ncmp     eax, 1                                                         ; +0x34, 0x140143144\njnz     short loc_140143152                                            ; +0x37, 0x140143147\nlea     rdx, aBaseColor; \"Base Color\"                                  ; +0x39, 0x140143149\njmp     short loc_140143165                                            ; +0x40, 0x140143150\nlea     rdx, aDetailColor; \"Detail Color\"                              ; +0x42, 0x140143152\ncmp     eax, 2                                                         ; +0x49, 0x140143159\njz      short loc_140143165                                            ; +0x4c, 0x14014315c\nlea     rdx, aInsertText; \"Insert Text\"                                ; +0x4e, 0x14014315e\nmov     rax, [rcx]                                                     ; +0x55, 0x140143165\ncall    qword ptr [rax]                                                ; +0x58, 0x140143168\nmov     rcx, [rdi+2F8h]                                                ; +0x5a, 0x14014316a\nlea     rsi, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x61, 0x140143171\ncmp     dword ptr [rdi+2E8h], 1                                        ; +0x68, 0x140143178\nlea     rbp, aGjButton03Png; \"GJ_button_03.png\"                        ; +0x6f, 0x14014317f\nmov     rbx, rsi                                                       ; +0x76, 0x140143186\ncmovz   rbx, rbp                                                       ; +0x79, 0x140143189\nmov     rax, [rcx]                                                     ; +0x7d, 0x14014318d\ncall    qword ptr [rax+3B8h]                                           ; +0x80, 0x140143190\nmov     rcx, rax                                                       ; +0x86, 0x140143196\nmov     rdx, rbx                                                       ; +0x89, 0x140143199\ncall    ButtonSprite__updateBGImage                                    ; +0x8c, 0x14014319c\nmov     rcx, [rdi+300h]                                                ; +0x91, 0x1401431a1\nmov     rbx, rsi                                                       ; +0x98, 0x1401431a8\ncmp     dword ptr [rdi+2E8h], 2                                        ; +0x9b, 0x1401431ab\ncmovz   rbx, rbp                                                       ; +0xa2, 0x1401431b2\nmov     rax, [rcx]                                                     ; +0xa6, 0x1401431b6\ncall    qword ptr [rax+3B8h]                                           ; +0xa9, 0x1401431b9\nmov     rcx, rax                                                       ; +0xaf, 0x1401431bf\nmov     rdx, rbx                                                       ; +0xb2, 0x1401431c2\ncall    ButtonSprite__updateBGImage                                    ; +0xb5, 0x1401431c5\nmov     rcx, [rdi+308h]                                                ; +0xba, 0x1401431ca\ntest    rcx, rcx                                                       ; +0xc1, 0x1401431d1\njz      short loc_1401431F5                                            ; +0xc4, 0x1401431d4\ncmp     dword ptr [rdi+2E8h], 3                                        ; +0xc6, 0x1401431d6\nmov     rax, [rcx]                                                     ; +0xcd, 0x1401431dd\ncmovz   rsi, rbp                                                       ; +0xd0, 0x1401431e0\ncall    qword ptr [rax+3B8h]                                           ; +0xd4, 0x1401431e4\nmov     rcx, rax                                                       ; +0xda, 0x1401431ea\nmov     rdx, rsi                                                       ; +0xdd, 0x1401431ed\ncall    ButtonSprite__updateBGImage                                    ; +0xe0, 0x1401431f0\nmov     rcx, rdi                                                       ; +0xe5, 0x1401431f5\ncall    CustomizeObjectLayer__toggleVisible                            ; +0xe8, 0x1401431f8\nmov     rcx, [rdi+310h]                                                ; +0xed, 0x1401431fd\ncmp     dword ptr [rdi+2E8h], 1                                        ; +0xf4, 0x140143204\nsetz    dl                                                             ; +0xfb, 0x14014320b\nmov     rax, [rcx]                                                     ; +0xfe, 0x14014320e\ncall    qword ptr [rax+150h]                                           ; +0x101, 0x140143211\nmov     rcx, [rdi+310h]                                                ; +0x107, 0x140143217\ncmp     dword ptr [rdi+2E8h], 1                                        ; +0x10e, 0x14014321e\nsetz    dl                                                             ; +0x115, 0x140143225\nmov     rax, [rcx]                                                     ; +0x118, 0x140143228\ncall    qword ptr [rax+3A8h]                                           ; +0x11b, 0x14014322b\nmov     rcx, [rdi+318h]                                                ; +0x121, 0x140143231\ncmp     dword ptr [rdi+2E8h], 2                                        ; +0x128, 0x140143238\nsetz    dl                                                             ; +0x12f, 0x14014323f\nmov     rax, [rcx]                                                     ; +0x132, 0x140143242\ncall    qword ptr [rax+150h]                                           ; +0x135, 0x140143245\nmov     rcx, [rdi+318h]                                                ; +0x13b, 0x14014324b\ncmp     dword ptr [rdi+2E8h], 2                                        ; +0x142, 0x140143252\nsetz    dl                                                             ; +0x149, 0x140143259\nmov     rax, [rcx]                                                     ; +0x14c, 0x14014325c\ncall    qword ptr [rax+3A8h]                                           ; +0x14f, 0x14014325f\nmov     rcx, [rdi+390h]                                                ; +0x155, 0x140143265\ncmp     dword ptr [rdi+2E8h], 3                                        ; +0x15c, 0x14014326c\nsetnz   dl                                                             ; +0x163, 0x140143273\nmov     rax, [rcx]                                                     ; +0x166, 0x140143276\ncall    qword ptr [rax+150h]                                           ; +0x169, 0x140143279\nmov     rcx, [rdi+390h]                                                ; +0x16f, 0x14014327f\ncmp     dword ptr [rdi+2E8h], 3                                        ; +0x176, 0x140143286\nsetnz   dl                                                             ; +0x17d, 0x14014328d\nmov     rax, [rcx]                                                     ; +0x180, 0x140143290\ncall    qword ptr [rax+3A8h]                                           ; +0x183, 0x140143293\nmov     rcx, rdi                                                       ; +0x189, 0x140143299\ncall    CustomizeObjectLayer__updateHSVButtons                         ; +0x18c, 0x14014329c\nmov     rcx, rdi                                                       ; +0x191, 0x1401432a1\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x194, 0x1401432a4\nmov     dl, 1                                                          ; +0x199, 0x1401432a9\nmov     rcx, rdi                                                       ; +0x19b, 0x1401432ab\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x19e, 0x1401432ae\ncmp     eax, 3E8h                                                      ; +0x1a3, 0x1401432b3\njl      short loc_1401432C6                                            ; +0x1a8, 0x1401432b8\nmov     ecx, eax                                                       ; +0x1aa, 0x1401432ba\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x1ac, 0x1401432bc\nmov     rdx, rax                                                       ; +0x1b1, 0x1401432c1\njmp     short loc_1401432EE                                            ; +0x1b4, 0x1401432c4\ntest    eax, eax                                                       ; +0x1b6, 0x1401432c6\njle     short loc_1401432E7                                            ; +0x1b8, 0x1401432c8\nmov     edx, eax                                                       ; +0x1ba, 0x1401432ca\nlea     rcx, word_1406ED6F8                                            ; +0x1bc, 0x1401432cc\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1c3, 0x1401432d3\nmov     rcx, rax                                                       ; +0x1c9, 0x1401432d9\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x1cc, 0x1401432dc\nmov     rdx, rax                                                       ; +0x1d2, 0x1401432e2\njmp     short loc_1401432EE                                            ; +0x1d5, 0x1401432e5\nlea     rdx, asc_1406ED6E4; \" \"                                        ; +0x1d7, 0x1401432e7\nmov     rcx, [rdi+328h]                                                ; +0x1de, 0x1401432ee\nadd     rcx, 168h                                                      ; +0x1e5, 0x1401432f5\nmov     rax, [rcx]                                                     ; +0x1ec, 0x1401432fc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1ef, 0x1401432ff\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x1f4, 0x140143304\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x1f9, 0x140143309\nadd     rsp, 20h                                                       ; +0x1fe, 0x14014330e\npop     rdi                                                            ; +0x202, 0x140143312\njmp     qword ptr [rax]                                                ; +0x203, 0x140143313", "xrefs": ["CustomizeObjectLayer::init @ 0x140141d10", "CustomizeObjectLayer::init @ 0x14013fa29", "CustomizeObjectLayer::init @ 0x14013fb5d", "CustomizeObjectLayer::init @ 0x140140e99", "<???> @ 0x1409173c0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}