{"type": "func", "start": 5370027936, "end": 5370028195, "name": "CustomizeObjectLayer::onLiveEdit", "pseudocode": "// \n// CustomizeObjectLayer::onLiveEdit from 0x140141fa0 to 0x1401420a3 (259 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x140140d0c\n// > <???> @ 0x140917324\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// Hidden C++ exception states: #wind=1\n__int64 __fastcall CustomizeObjectLayer::onLiveEdit(__int64 a1, __int64 a2)\n{\n  unsigned int ActiveMode; // ebp\n  __int64 v4; // rax\n  __int64 v5; // rsi\n  __int64 v6; // rcx\n  __int64 v7; // rax\n  unsigned int *v8; // rbx\n  __int64 v9; // rax\n  unsigned __int64 v10; // rbx\n  unsigned __int64 i; // rdi\n  void *v13; // [rsp+40h] [rbp+18h]\n\n  LOBYTE(a2) = 1;\n  ActiveMode = CustomizeObjectLayer::getActiveMode(a1, a2);\n  CustomizeObjectLayer::onClose(a1, 0);\n  v4 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v13 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  v5 = *(_QWORD *)(*(_QWORD *)(v4 + 568) + 14904LL);\n  v6 = *(_QWORD *)(v5 + 1568);\n  if ( v6 )\n  {\n    *(_BYTE *)(v6 + 1141) = 0;\n    GameObject::updateObjectEditorColor();\n  }\n  else if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(v5 + 944)) )\n  {\n    v7 = *(_QWORD *)(v5 + 944);\n    if ( v7 )\n    {\n      v8 = *(unsigned int **)(v7 + 56);\n      v9 = *v8;\n      if ( (_DWORD)v9 )\n      {\n        v10 = *((_QWORD *)v8 + 2);\n        for ( i = v10 + 8 * (v9 - 1); v10 <= i; v10 += 8LL )\n        {\n          if ( !*(_QWORD *)v10 )\n            break;\n          *(_BYTE *)(*(_QWORD *)v10 + 1141LL) = 0;\n          GameObject::updateObjectEditorColor();\n        }\n      }\n    }\n  }\n  return EditorUI::showLiveColorSelectForMode(v5, ActiveMode);\n}", "assembly": "; \n; CustomizeObjectLayer::onLiveEdit from 0x140141fa0 to 0x1401420a3 (259 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x140140d0c\n; > <???> @ 0x140917324\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, 0x140141fa0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x140141fa5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140141faa\npush    rdi                                                            ; +0xf, 0x140141faf\nsub     rsp, 20h                                                       ; +0x10, 0x140141fb0\nmov     rbx, rcx                                                       ; +0x14, 0x140141fb4\nmov     dl, 1                                                          ; +0x17, 0x140141fb7\ncall    CustomizeObjectLayer__getActiveMode                            ; +0x19, 0x140141fb9\nmov     ebp, eax                                                       ; +0x1e, 0x140141fbe\nxor     edx, edx                                                       ; +0x20, 0x140141fc0\nmov     rcx, rbx                                                       ; +0x22, 0x140141fc2\ncall    CustomizeObjectLayer__onClose                                  ; +0x25, 0x140141fc5\nmov     rax, cs:qword_14090BFD0                                        ; +0x2a, 0x140141fca\ntest    rax, rax                                                       ; +0x31, 0x140141fd1\njnz     short loc_140142008                                            ; +0x34, 0x140141fd4\nmov     ecx, 6E8h; Size                                                ; +0x36, 0x140141fd6\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3b, 0x140141fdb\nmov     [rsp+28h+arg_10], rax                                          ; +0x40, 0x140141fe0\nmov     rcx, rax                                                       ; +0x45, 0x140141fe5\ncall    GameManager__GameManager                                       ; +0x48, 0x140141fe8\nnop                                                                    ; +0x4d, 0x140141fed\nmov     cs:qword_14090BFD0, rax                                        ; +0x4e, 0x140141fee\nmov     rcx, [rax]                                                     ; +0x55, 0x140141ff5\nmov     rdx, [rcx+48h]                                                 ; +0x58, 0x140141ff8\nmov     rcx, rax                                                       ; +0x5c, 0x140141ffc\ncall    rdx                                                            ; +0x5f, 0x140141fff\nmov     rax, cs:qword_14090BFD0                                        ; +0x61, 0x140142001\nmov     rax, [rax+238h]                                                ; +0x68, 0x140142008\nmov     rsi, [rax+3A38h]                                               ; +0x6f, 0x14014200f\nmov     rcx, [rsi+620h]                                                ; +0x76, 0x140142016\ntest    rcx, rcx                                                       ; +0x7d, 0x14014201d\njz      short loc_140142030                                            ; +0x80, 0x140142020\nmov     byte ptr [rcx+475h], 0                                         ; +0x82, 0x140142022\ncall    GameObject__updateObjectEditorColor                            ; +0x89, 0x140142029\njmp     short loc_140142085                                            ; +0x8e, 0x14014202e\nmov     rcx, [rsi+3B0h]                                                ; +0x90, 0x140142030\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x97, 0x140142037\ntest    eax, eax                                                       ; +0x9d, 0x14014203d\njz      short loc_140142085                                            ; +0x9f, 0x14014203f\nmov     rax, [rsi+3B0h]                                                ; +0xa1, 0x140142041\ntest    rax, rax                                                       ; +0xa8, 0x140142048\njz      short loc_140142085                                            ; +0xab, 0x14014204b\nmov     rbx, [rax+38h]                                                 ; +0xad, 0x14014204d\nmov     eax, [rbx]                                                     ; +0xb1, 0x140142051\ntest    eax, eax                                                       ; +0xb3, 0x140142053\njz      short loc_140142085                                            ; +0xb5, 0x140142055\nmov     rbx, [rbx+10h]                                                 ; +0xb7, 0x140142057\nlea     rdi, [rax-1]                                                   ; +0xbb, 0x14014205b\nlea     rdi, [rbx+rdi*8]                                               ; +0xbf, 0x14014205f\ncmp     rbx, rdi                                                       ; +0xc3, 0x140142063\nja      short loc_140142085                                            ; +0xc6, 0x140142066\nmov     rcx, [rbx]                                                     ; +0xc8, 0x140142068\ntest    rcx, rcx                                                       ; +0xcb, 0x14014206b\njz      short loc_140142085                                            ; +0xce, 0x14014206e\nmov     byte ptr [rcx+475h], 0                                         ; +0xd0, 0x140142070\ncall    GameObject__updateObjectEditorColor                            ; +0xd7, 0x140142077\nadd     rbx, 8                                                         ; +0xdc, 0x14014207c\ncmp     rbx, rdi                                                       ; +0xe0, 0x140142080\njbe     short loc_140142068                                            ; +0xe3, 0x140142083\nmov     edx, ebp                                                       ; +0xe5, 0x140142085\nmov     rcx, rsi                                                       ; +0xe7, 0x140142087\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xea, 0x14014208a\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xef, 0x14014208f\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xf4, 0x140142094\nadd     rsp, 20h                                                       ; +0xf9, 0x140142099\npop     rdi                                                            ; +0xfd, 0x14014209d\njmp     EditorUI__showLiveColorSelectForMode                           ; +0xfe, 0x14014209e", "xrefs": ["CustomizeObjectLayer::init @ 0x140140d0c", "<???> @ 0x140917324"], "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"}