{"type": "func", "start": 4297034176, "end": 4297034441, "name": "CustomizeObjectLayer::colorSetupClosed", "pseudocode": "// \n// CustomizeObjectLayer::colorSetupClosed from 0x1001f89c0 to 0x1001f8ac9 (265 bytes)\n// \n// 2 xrefs:\n// > sub_1001F8E10 @ 0x1001f8e1c\n// > <???> @ 0x1008d98c0\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 __fastcall CustomizeObjectLayer::colorSetupClosed(CustomizeObjectLayer *a1, int a2)\n{\n  char v2; // al\n  int v4; // r15d\n  ButtonSprite *v5; // rsi\n  unsigned int v6; // r12d\n  __int64 v7; // r13\n  const char *CString; // rax\n  cocos2d::CCString *v9; // rax\n  const std::string::value_type *v10; // rsi\n  char v11; // [rsp-8h] [rbp-30h]\n\n  v11 = v2;\n  CustomizeObjectLayer::updateSelected(a1, a2);\n  v4 = a2;\n  if ( (unsigned int)(a2 - 10) <= 0x3DD )\n  {\n    a1->m_customColorChannel = a2;\n    a1->m_disableTextDelegate = 1;\n    CustomizeObjectLayer::updateCustomColorLabels(a1);\n    a1->m_disableTextDelegate = 0;\n    v4 = 1008;\n  }\n  v5 = nullptr;\n  if ( (unsigned int)sub_100720070(a1->m_colorButtons) )\n  {\n    v6 = 0;\n    while ( 1 )\n    {\n      v7 = sub_1007200C0(a1->m_colorButtons, v6);\n      if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(v7) == v4 )\n        break;\n      if ( ++v6 >= (unsigned int)sub_100720070(a1->m_colorButtons) )\n      {\n        v5 = nullptr;\n        goto LABEL_9;\n      }\n    }\n    v5 = (ButtonSprite *)v7;\n  }\nLABEL_9:\n  CustomizeObjectLayer::highlightSelected(a1, v5);\n  CustomizeObjectLayer::updateColorSprite(a1);\n  if ( a2 < 1000 )\n  {\n    if ( a2 <= 0 )\n    {\n      v10 = \" \";\n      goto LABEL_14;\n    }\n    v9 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v11);\n    CString = cocos2d::CCString::getCString(v9);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(a2);\n  }\n  v10 = CString;\nLABEL_14:\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const std::string::value_type *))a1->m_selectedColorLabel->setString)(\n    a1->m_selectedColorLabel,\n    v10);\n}", "assembly": "; \n; CustomizeObjectLayer::colorSetupClosed from 0x1001f89c0 to 0x1001f8ac9 (265 bytes)\n; \n; 2 xrefs:\n; > sub_1001F8E10 @ 0x1001f8e1c\n; > <???> @ 0x1008d98c0\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\npush    rbp                                                            ; +0x0, 0x1001f89c0\nmov     rbp, rsp                                                       ; +0x1, 0x1001f89c1\npush    r15                                                            ; +0x4, 0x1001f89c4\npush    r14                                                            ; +0x6, 0x1001f89c6\npush    r13                                                            ; +0x8, 0x1001f89c8\npush    r12                                                            ; +0xa, 0x1001f89ca\npush    rbx                                                            ; +0xc, 0x1001f89cc\npush    rax; char                                                      ; +0xd, 0x1001f89cd\nmov     r14d, esi                                                      ; +0xe, 0x1001f89ce\nmov     rbx, rdi                                                       ; +0x11, 0x1001f89d1\ncall    CustomizeObjectLayer__updateSelected                           ; +0x14, 0x1001f89d4\nlea     eax, [r14-0Ah]                                                 ; +0x19, 0x1001f89d9\nmov     r15d, r14d                                                     ; +0x1d, 0x1001f89dd\ncmp     eax, 3DDh                                                      ; +0x20, 0x1001f89e0\nja      short loc_1001F8A0A                                            ; +0x25, 0x1001f89e5\nmov     [rbx+2D4h], r14d                                               ; +0x27, 0x1001f89e7\nmov     byte ptr [rbx+382h], 1                                         ; +0x2e, 0x1001f89ee\nmov     rdi, rbx                                                       ; +0x35, 0x1001f89f5\ncall    CustomizeObjectLayer__updateCustomColorLabels                  ; +0x38, 0x1001f89f8\nmov     byte ptr [rbx+382h], 0                                         ; +0x3d, 0x1001f89fd\nmov     r15d, 3F0h                                                     ; +0x44, 0x1001f8a04\nmov     rdi, [rbx+2A8h]                                                ; +0x4a, 0x1001f8a0a\ncall    sub_100720070                                                  ; +0x51, 0x1001f8a11\nxor     esi, esi                                                       ; +0x56, 0x1001f8a16\ntest    eax, eax                                                       ; +0x58, 0x1001f8a18\njz      short loc_1001F8A5B                                            ; +0x5a, 0x1001f8a1a\nxor     r12d, r12d                                                     ; +0x5c, 0x1001f8a1c\nnop                                                                    ; +0x5f, 0x1001f8a1f\nmov     rdi, [rbx+2A8h]                                                ; +0x60, 0x1001f8a20\nmov     esi, r12d                                                      ; +0x67, 0x1001f8a27\ncall    sub_1007200C0                                                  ; +0x6a, 0x1001f8a2a\nmov     r13, rax                                                       ; +0x6f, 0x1001f8a2f\nmov     rax, [rax]                                                     ; +0x72, 0x1001f8a32\nmov     rdi, r13                                                       ; +0x75, 0x1001f8a35\ncall    qword ptr [rax+40h]                                            ; +0x78, 0x1001f8a38\ncmp     eax, r15d                                                      ; +0x7b, 0x1001f8a3b\njz      short loc_1001F8A58                                            ; +0x7e, 0x1001f8a3e\ninc     r12d                                                           ; +0x80, 0x1001f8a40\nmov     rdi, [rbx+2A8h]                                                ; +0x83, 0x1001f8a43\ncall    sub_100720070                                                  ; +0x8a, 0x1001f8a4a\ncmp     r12d, eax                                                      ; +0x8f, 0x1001f8a4f\njb      short loc_1001F8A20                                            ; +0x92, 0x1001f8a52\nxor     esi, esi                                                       ; +0x94, 0x1001f8a54\njmp     short loc_1001F8A5B                                            ; +0x96, 0x1001f8a56\nmov     rsi, r13                                                       ; +0x98, 0x1001f8a58\nmov     rdi, rbx                                                       ; +0x9b, 0x1001f8a5b\ncall    CustomizeObjectLayer__highlightSelected                        ; +0x9e, 0x1001f8a5e\nmov     rdi, rbx                                                       ; +0xa3, 0x1001f8a63\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0xa6, 0x1001f8a66\ncmp     r14d, 3E8h                                                     ; +0xab, 0x1001f8a6b\njl      short loc_1001F8A7E                                            ; +0xb2, 0x1001f8a72\nmov     edi, r14d                                                      ; +0xb4, 0x1001f8a74\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0xb7, 0x1001f8a77\njmp     short loc_1001F8A9C                                            ; +0xbc, 0x1001f8a7c\ntest    r14d, r14d                                                     ; +0xbe, 0x1001f8a7e\njle     short loc_1001F8AC0                                            ; +0xc1, 0x1001f8a81\nlea     rdi, aI; \"%i\"                                                  ; +0xc3, 0x1001f8a83\nmov     esi, r14d                                                      ; +0xca, 0x1001f8a8a\nxor     eax, eax                                                       ; +0xcd, 0x1001f8a8d\ncall    sub_1007AB580                                                  ; +0xcf, 0x1001f8a8f\nmov     rdi, rax                                                       ; +0xd4, 0x1001f8a94\ncall    cocos2d__CCString__getCString                                  ; +0xd7, 0x1001f8a97\nmov     rsi, rax                                                       ; +0xdc, 0x1001f8a9c\nmov     rdi, [rbx+310h]                                                ; +0xdf, 0x1001f8a9f\nmov     rax, [rdi]                                                     ; +0xe6, 0x1001f8aa6\nmov     rax, [rax+390h]                                                ; +0xe9, 0x1001f8aa9\nadd     rsp, 8                                                         ; +0xf0, 0x1001f8ab0\npop     rbx                                                            ; +0xf4, 0x1001f8ab4\npop     r12                                                            ; +0xf5, 0x1001f8ab5\npop     r13                                                            ; +0xf7, 0x1001f8ab7\npop     r14                                                            ; +0xf9, 0x1001f8ab9\npop     r15                                                            ; +0xfb, 0x1001f8abb\npop     rbp                                                            ; +0xfd, 0x1001f8abd\njmp     rax                                                            ; +0xfe, 0x1001f8abe\nlea     rsi, asc_100823F54; \" \"                                        ; +0x100, 0x1001f8ac0\njmp     short loc_1001F8A9F                                            ; +0x107, 0x1001f8ac7", "xrefs": ["sub_1001F8E10 @ 0x1001f8e1c", "<???> @ 0x1008d98c0"], "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"}