{"type": "func", "start": 4296906832, "end": 4296907340, "name": "CustomizeObjectLayer::onSelectMode", "pseudocode": "// \n// CustomizeObjectLayer::onSelectMode from 0x1001d9850 to 0x1001d9a4c (508 bytes)\n// \n// 4 xrefs:\n// > CustomizeObjectLayer::init @ 0x1001d95bc\n// > CustomizeObjectLayer::init @ 0x1001d78ec\n// > CustomizeObjectLayer::init @ 0x1001d79ef\n// > CustomizeObjectLayer::init @ 0x1001d8a67\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 12:26:25 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::onSelectMode(__int64 a1, __int64 a2)\n{\n  char v2; // al\n  int v4; // eax\n  _QWORD *v5; // rdi\n  const char *v6; // r8\n  const char *v7; // rsi\n  __int64 v8; // rax\n  const char *v9; // r14\n  const char *v10; // rsi\n  __int64 v11; // rax\n  const char *v12; // rsi\n  __int64 v13; // rdi\n  __int64 v14; // rax\n  int ActiveMode; // eax\n  __int64 CString; // rax\n  __int64 v17; // rax\n  const std::string::value_type *v18; // rsi\n  char v20; // [rsp-8h] [rbp-20h]\n\n  v20 = v2;\n  v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  *(_DWORD *)(a1 + 744) = v4;\n  v5 = *(_QWORD **)(a1 + 800);\n  v6 = \"Insert Text\";\n  if ( v4 == 2 )\n    v6 = \"Detail Color\";\n  v7 = \"Base Color\";\n  if ( v4 != 1 )\n    v7 = v6;\n  (*(void (__fastcall **)(_QWORD *, const char *, const char *, _QWORD, const char *))(*v5 + 928LL))(\n    v5,\n    v7,\n    \"Detail Color\",\n    *v5,\n    v6);\n  v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 760) + 1072LL))(*(_QWORD *)(a1 + 760));\n  v9 = \"GJ_button_04.png\";\n  v10 = \"GJ_button_04.png\";\n  if ( *(_DWORD *)(a1 + 744) == 1 )\n    v10 = \"GJ_button_03.png\";\n  ButtonSprite::updateBGImage(v8, (__int64)v10);\n  v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 1072LL))(*(_QWORD *)(a1 + 768));\n  v12 = \"GJ_button_04.png\";\n  if ( *(_DWORD *)(a1 + 744) == 2 )\n    v12 = \"GJ_button_03.png\";\n  ButtonSprite::updateBGImage(v11, (__int64)v12);\n  v13 = *(_QWORD *)(a1 + 776);\n  if ( v13 )\n  {\n    v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 1072LL))(v13);\n    if ( *(_DWORD *)(a1 + 744) == 3 )\n      v9 = \"GJ_button_03.png\";\n    ButtonSprite::updateBGImage(v14, (__int64)v9);\n  }\n  CustomizeObjectLayer::toggleVisible(a1);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 784) + 344LL))(\n    *(_QWORD *)(a1 + 784),\n    *(_DWORD *)(a1 + 744) == 1);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 784) + 1056LL))(\n    *(_QWORD *)(a1 + 784),\n    *(_DWORD *)(a1 + 744) == 1);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 792) + 344LL))(\n    *(_QWORD *)(a1 + 792),\n    *(_DWORD *)(a1 + 744) == 2);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 792) + 1056LL))(\n    *(_QWORD *)(a1 + 792),\n    *(_DWORD *)(a1 + 744) == 2);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 912) + 344LL))(\n    *(_QWORD *)(a1 + 912),\n    *(_DWORD *)(a1 + 744) != 3);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 912) + 1056LL))(\n    *(_QWORD *)(a1 + 912),\n    *(_DWORD *)(a1 + 744) != 3);\n  CustomizeObjectLayer::updateHSVButtons(a1);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n  if ( ActiveMode < 1000 )\n  {\n    if ( ActiveMode <= 0 )\n    {\n      v18 = \" \";\n      return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n               *(_QWORD *)(a1 + 808),\n               v18);\n    }\n    v17 = sub_10088E820(\"%i\", v20);\n    CString = cocos2d::CCString::getCString(v17);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);\n  }\n  v18 = (const std::string::value_type *)CString;\n  return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(\n           *(_QWORD *)(a1 + 808),\n           v18);\n}", "assembly": "; \n; CustomizeObjectLayer::onSelectMode from 0x1001d9850 to 0x1001d9a4c (508 bytes)\n; \n; 4 xrefs:\n; > CustomizeObjectLayer::init @ 0x1001d95bc\n; > CustomizeObjectLayer::init @ 0x1001d78ec\n; > CustomizeObjectLayer::init @ 0x1001d79ef\n; > CustomizeObjectLayer::init @ 0x1001d8a67\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 12:26:25 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001d9850\nmov     rbp, rsp                                                       ; +0x1, 0x1001d9851\npush    r15                                                            ; +0x4, 0x1001d9854\npush    r14                                                            ; +0x6, 0x1001d9856\npush    rbx                                                            ; +0x8, 0x1001d9858\npush    rax; char                                                      ; +0x9, 0x1001d9859\nmov     rbx, rdi                                                       ; +0xa, 0x1001d985a\nmov     rax, [rsi]                                                     ; +0xd, 0x1001d985d\nmov     rdi, rsi                                                       ; +0x10, 0x1001d9860\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x1001d9863\nmov     [rbx+2E8h], eax                                                ; +0x16, 0x1001d9866\nmov     rdi, [rbx+320h]                                                ; +0x1c, 0x1001d986c\nmov     rcx, [rdi]                                                     ; +0x23, 0x1001d9873\ncmp     eax, 2                                                         ; +0x26, 0x1001d9876\nlea     rdx, aDetailColor; \"Detail Color\"                              ; +0x29, 0x1001d9879\nlea     r8, aInsertText; \"Insert Text\"                                 ; +0x30, 0x1001d9880\ncmovz   r8, rdx                                                        ; +0x37, 0x1001d9887\ncmp     eax, 1                                                         ; +0x3b, 0x1001d988b\nlea     rsi, aBaseColor; \"Base Color\"                                  ; +0x3e, 0x1001d988e\ncmovnz  rsi, r8                                                        ; +0x45, 0x1001d9895\ncall    qword ptr [rcx+3A0h]                                           ; +0x49, 0x1001d9899\nmov     rdi, [rbx+2F8h]                                                ; +0x4f, 0x1001d989f\nmov     rax, [rdi]                                                     ; +0x56, 0x1001d98a6\ncall    qword ptr [rax+430h]                                           ; +0x59, 0x1001d98a9\ncmp     dword ptr [rbx+2E8h], 1                                        ; +0x5f, 0x1001d98af\nlea     r15, aGjButton03Png; \"GJ_button_03.png\"                        ; +0x66, 0x1001d98b6\nlea     r14, aGjButton04Png; \"GJ_button_04.png\"                        ; +0x6d, 0x1001d98bd\nmov     rsi, r14                                                       ; +0x74, 0x1001d98c4\ncmovz   rsi, r15                                                       ; +0x77, 0x1001d98c7\nmov     rdi, rax                                                       ; +0x7b, 0x1001d98cb\ncall    ButtonSprite__updateBGImage                                    ; +0x7e, 0x1001d98ce\nmov     rdi, [rbx+300h]                                                ; +0x83, 0x1001d98d3\nmov     rax, [rdi]                                                     ; +0x8a, 0x1001d98da\ncall    qword ptr [rax+430h]                                           ; +0x8d, 0x1001d98dd\ncmp     dword ptr [rbx+2E8h], 2                                        ; +0x93, 0x1001d98e3\nmov     rsi, r14                                                       ; +0x9a, 0x1001d98ea\ncmovz   rsi, r15                                                       ; +0x9d, 0x1001d98ed\nmov     rdi, rax                                                       ; +0xa1, 0x1001d98f1\ncall    ButtonSprite__updateBGImage                                    ; +0xa4, 0x1001d98f4\nmov     rdi, [rbx+308h]                                                ; +0xa9, 0x1001d98f9\ntest    rdi, rdi                                                       ; +0xb0, 0x1001d9900\njz      short loc_1001D9924                                            ; +0xb3, 0x1001d9903\nmov     rax, [rdi]                                                     ; +0xb5, 0x1001d9905\ncall    qword ptr [rax+430h]                                           ; +0xb8, 0x1001d9908\ncmp     dword ptr [rbx+2E8h], 3                                        ; +0xbe, 0x1001d990e\ncmovz   r14, r15                                                       ; +0xc5, 0x1001d9915\nmov     rdi, rax                                                       ; +0xc9, 0x1001d9919\nmov     rsi, r14                                                       ; +0xcc, 0x1001d991c\ncall    ButtonSprite__updateBGImage                                    ; +0xcf, 0x1001d991f\nmov     rdi, rbx                                                       ; +0xd4, 0x1001d9924\ncall    CustomizeObjectLayer__toggleVisible                            ; +0xd7, 0x1001d9927\nmov     rdi, [rbx+310h]                                                ; +0xdc, 0x1001d992c\nxor     esi, esi                                                       ; +0xe3, 0x1001d9933\ncmp     dword ptr [rbx+2E8h], 1                                        ; +0xe5, 0x1001d9935\nsetz    sil                                                            ; +0xec, 0x1001d993c\nmov     rax, [rdi]                                                     ; +0xf0, 0x1001d9940\ncall    qword ptr [rax+158h]                                           ; +0xf3, 0x1001d9943\nmov     rdi, [rbx+310h]                                                ; +0xf9, 0x1001d9949\nxor     esi, esi                                                       ; +0x100, 0x1001d9950\ncmp     dword ptr [rbx+2E8h], 1                                        ; +0x102, 0x1001d9952\nsetz    sil                                                            ; +0x109, 0x1001d9959\nmov     rax, [rdi]                                                     ; +0x10d, 0x1001d995d\ncall    qword ptr [rax+420h]                                           ; +0x110, 0x1001d9960\nmov     rdi, [rbx+318h]                                                ; +0x116, 0x1001d9966\nxor     esi, esi                                                       ; +0x11d, 0x1001d996d\ncmp     dword ptr [rbx+2E8h], 2                                        ; +0x11f, 0x1001d996f\nsetz    sil                                                            ; +0x126, 0x1001d9976\nmov     rax, [rdi]                                                     ; +0x12a, 0x1001d997a\ncall    qword ptr [rax+158h]                                           ; +0x12d, 0x1001d997d\nmov     rdi, [rbx+318h]                                                ; +0x133, 0x1001d9983\nxor     esi, esi                                                       ; +0x13a, 0x1001d998a\ncmp     dword ptr [rbx+2E8h], 2                                        ; +0x13c, 0x1001d998c\nsetz    sil                                                            ; +0x143, 0x1001d9993\nmov     rax, [rdi]                                                     ; +0x147, 0x1001d9997\ncall    qword ptr [rax+420h]                                           ; +0x14a, 0x1001d999a\nmov     rdi, [rbx+390h]                                                ; +0x150, 0x1001d99a0\nxor     esi, esi                                                       ; +0x157, 0x1001d99a7\ncmp     dword ptr [rbx+2E8h], 3                                        ; +0x159, 0x1001d99a9\nsetnz   sil                                                            ; +0x160, 0x1001d99b0\nmov     rax, [rdi]                                                     ; +0x164, 0x1001d99b4\ncall    qword ptr [rax+158h]                                           ; +0x167, 0x1001d99b7\nmov     rdi, [rbx+390h]                                                ; +0x16d, 0x1001d99bd\nxor     esi, esi                                                       ; +0x174, 0x1001d99c4\ncmp     dword ptr [rbx+2E8h], 3                                        ; +0x176, 0x1001d99c6\nsetnz   sil                                                            ; +0x17d, 0x1001d99cd\nmov     rax, [rdi]                                                     ; +0x181, 0x1001d99d1\ncall    qword ptr [rax+420h]                                           ; +0x184, 0x1001d99d4\nmov     rdi, rbx                                                       ; +0x18a, 0x1001d99da\ncall    CustomizeObjectLayer__updateHSVButtons                         ; +0x18d, 0x1001d99dd\nmov     rdi, rbx                                                       ; +0x192, 0x1001d99e2\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x195, 0x1001d99e5\nmov     rdi, rbx                                                       ; +0x19a, 0x1001d99ea\nmov     esi, 1                                                         ; +0x19d, 0x1001d99ed\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x1a2, 0x1001d99f2\ncmp     eax, 3E8h                                                      ; +0x1a7, 0x1001d99f7\njl      short loc_1001D9A07                                            ; +0x1ac, 0x1001d99fc\nmov     edi, eax                                                       ; +0x1ae, 0x1001d99fe\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x1b0, 0x1001d9a00\njmp     short loc_1001D9A23                                            ; +0x1b5, 0x1001d9a05\ntest    eax, eax                                                       ; +0x1b7, 0x1001d9a07\njle     short loc_1001D9A43                                            ; +0x1b9, 0x1001d9a09\nlea     rdi, aI_14; \"%i\"                                               ; +0x1bb, 0x1001d9a0b\nmov     esi, eax                                                       ; +0x1c2, 0x1001d9a12\nxor     eax, eax                                                       ; +0x1c4, 0x1001d9a14\ncall    sub_10088E820                                                  ; +0x1c6, 0x1001d9a16\nmov     rdi, rax                                                       ; +0x1cb, 0x1001d9a1b\ncall    cocos2d__CCString__getCString                                  ; +0x1ce, 0x1001d9a1e\nmov     rsi, rax                                                       ; +0x1d3, 0x1001d9a23\nmov     rdi, [rbx+328h]                                                ; +0x1d6, 0x1001d9a26\nmov     rax, [rdi]                                                     ; +0x1dd, 0x1001d9a2d\nmov     rax, [rax+3A0h]                                                ; +0x1e0, 0x1001d9a30\nadd     rsp, 8                                                         ; +0x1e7, 0x1001d9a37\npop     rbx                                                            ; +0x1eb, 0x1001d9a3b\npop     r14                                                            ; +0x1ec, 0x1001d9a3c\npop     r15                                                            ; +0x1ee, 0x1001d9a3e\npop     rbp                                                            ; +0x1f0, 0x1001d9a40\njmp     rax                                                            ; +0x1f1, 0x1001d9a41\nlea     rsi, asc_100A41844; \" \"                                        ; +0x1f3, 0x1001d9a43\njmp     short loc_1001D9A26                                            ; +0x1fa, 0x1001d9a4a", "xrefs": ["CustomizeObjectLayer::init @ 0x1001d95bc", "CustomizeObjectLayer::init @ 0x1001d78ec", "CustomizeObjectLayer::init @ 0x1001d79ef", "CustomizeObjectLayer::init @ 0x1001d8a67"], "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"}