{"type": "func", "start": 4299185272, "end": 4299185420, "name": "LevelEditorLayer::pasteColorState", "pseudocode": "// \n// LevelEditorLayer::pasteColorState from 0x100405c78 to 0x100405d0c (148 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::onPaste @ 0x10005881c\n// > EditorUI::onPasteColor @ 0x10018b030\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 11:04:41 +0000\n// \n\nvoid __fastcall LevelEditorLayer::pasteColorState(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v4; // x1\n  unsigned int *v5; // x9\n  __int64 v6; // x8\n  __int64 *v8; // x21\n  unsigned __int64 v9; // x22\n  __int64 v10; // x20\n\n  v4 = *(_QWORD *)(a1 + 14120);\n  if ( v4 )\n  {\n    if ( a2 )\n    {\n      GameObject::duplicateColorMode(a2, v4);\n      *(_BYTE *)(a2 + 1148) = 1;\n    }\n    else if ( a3 )\n    {\n      v5 = *(unsigned int **)(a3 + 56);\n      v6 = *v5;\n      if ( (_DWORD)v6 )\n      {\n        v8 = *((__int64 **)v5 + 2);\n        v9 = (unsigned __int64)&v8[v6 - 1];\n        do\n        {\n          v10 = *v8;\n          if ( !*v8 )\n            break;\n          GameObject::duplicateColorMode(*v8, *(_QWORD *)(a1 + 14120));\n          *(_BYTE *)(v10 + 1148) = 1;\n          ++v8;\n        }\n        while ( (unsigned __int64)v8 <= v9 );\n      }\n    }\n  }\n}", "assembly": "; \n; LevelEditorLayer::pasteColorState from 0x100405c78 to 0x100405d0c (148 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::onPaste @ 0x10005881c\n; > EditorUI::onPasteColor @ 0x10018b030\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 11:04:41 +0000\n; \nSTP             X24, X23, [SP,#-0x10+var_30]!                          ; +0x0, 0x100405c78\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100405c7c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100405c80\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100405c84\nADD             X29, SP, #0x30                                         ; +0x10, 0x100405c88\nMOV             X20, X1                                                ; +0x14, 0x100405c8c\nLDR             X1, [X0,#0x3728]                                       ; +0x18, 0x100405c90\nCBZ             X1, loc_100405CAC                                      ; +0x1c, 0x100405c94\nCBZ             X20, loc_100405CC0                                     ; +0x20, 0x100405c98\nMOV             X0, X20                                                ; +0x24, 0x100405c9c\nBL              GameObject__duplicateColorMode                         ; +0x28, 0x100405ca0\nMOV             W8, #1                                                 ; +0x2c, 0x100405ca4\nSTRB            W8, [X20,#0x47C]                                       ; +0x30, 0x100405ca8\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x34, 0x100405cac\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x38, 0x100405cb0\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x3c, 0x100405cb4\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0x40, 0x100405cb8\nRET                                                                    ; +0x44, 0x100405cbc\nCBZ             X2, loc_100405CAC                                      ; +0x48, 0x100405cc0\nLDR             X9, [X2,#0x38]                                         ; +0x4c, 0x100405cc4\nLDR             W8, [X9]                                               ; +0x50, 0x100405cc8\nCBZ             W8, loc_100405CAC                                      ; +0x54, 0x100405ccc\nMOV             X19, X0                                                ; +0x58, 0x100405cd0\nLDR             X21, [X9,#0x10]                                        ; +0x5c, 0x100405cd4\nADD             X8, X21, X8,LSL#3                                      ; +0x60, 0x100405cd8\nSUB             X22, X8, #8                                            ; +0x64, 0x100405cdc\nMOV             W23, #1                                                ; +0x68, 0x100405ce0\nLDR             X20, [X21]                                             ; +0x6c, 0x100405ce4\nCBZ             X20, loc_100405CAC                                     ; +0x70, 0x100405ce8\nLDR             X1, [X19,#0x3728]                                      ; +0x74, 0x100405cec\nMOV             X0, X20                                                ; +0x78, 0x100405cf0\nBL              GameObject__duplicateColorMode                         ; +0x7c, 0x100405cf4\nSTRB            W23, [X20,#0x47C]                                      ; +0x80, 0x100405cf8\nADD             X21, X21, #8                                           ; +0x84, 0x100405cfc\nCMP             X21, X22                                               ; +0x88, 0x100405d00\nB.LS            loc_100405CE4                                          ; +0x8c, 0x100405d04\nB               loc_100405CAC                                          ; +0x90, 0x100405d08", "xrefs": ["CustomizeObjectLayer::onPaste @ 0x10005881c", "EditorUI::onPasteColor @ 0x10018b030"], "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"}