{"type": "func", "start": 5370420128, "end": 5370420344, "name": "GameObject::duplicateColorMode", "pseudocode": "// \n// GameObject::duplicateColorMode from 0x1401a1ba0 to 0x1401a1c78 (216 bytes)\n// \n// 8 xrefs:\n// > CustomizeObjectLayer::onPaste @ 0x1400a80e9\n// > CustomizeObjectLayer::onPaste @ 0x1400a8129\n// > EditorUI::onPasteColor @ 0x140114608\n// > EditorUI::onPasteColor @ 0x140114648\n// > EditorUI::createRockEdges @ 0x14012e62e\n// > GameObject::duplicateValues @ 0x1401a1e8e\n// > LevelEditorLayer::copyObjectState @ 0x1402e1397\n// > <???> @ 0x1406cbfa0\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 GameObject::duplicateColorMode(GameObject *a1)\n{\n  __int64 v1; // rdx\n  __int64 v3; // r10\n  __int64 v4; // r8\n  int v5; // ecx\n  int v6; // eax\n  int v7; // ecx\n  GJSpriteColor *m_detailColor; // r10\n  int v9; // edx\n  int v10; // eax\n  bool v11; // sf\n\n  v3 = *(_QWORD *)(v1 + 1104);\n  v4 = *(_QWORD *)(v1 + 1112);\n  if ( a1->m_customSpriteColor && !a1->m_detailColor && v4 )\n  {\n    if ( (v5 = *(_DWORD *)(v4 + 4), v5 != *(_DWORD *)v4) && *(_DWORD *)v4 || v5 )\n      v3 = *(_QWORD *)(v1 + 1112);\n  }\n  v6 = *(_DWORD *)v3;\n  if ( *(_DWORD *)(v3 + 4) == *(_DWORD *)v3 || !v6 )\n    v6 = *(_DWORD *)(v3 + 4);\n  v7 = 1101;\n  if ( v6 < 0 )\n    v6 = 0;\n  if ( v6 > 1101 )\n    v6 = 1101;\n  a1->m_baseColor->m_colorID = v6;\n  a1->m_baseColor->m_hsv = *(cocos2d::ccHSVValue *)(v3 + 16);\n  if ( v4 )\n  {\n    m_detailColor = a1->m_detailColor;\n    if ( m_detailColor )\n    {\n      v9 = *(_DWORD *)(v4 + 4);\n      v10 = *(_DWORD *)v4;\n      if ( v9 == *(_DWORD *)v4 || (v11 = v10 < 0, !v10) )\n      {\n        v10 = *(_DWORD *)(v4 + 4);\n        v11 = v9 < 0;\n      }\n      if ( v11 )\n        v10 = 0;\n      if ( v10 <= 1101 )\n      {\n        v7 = v10;\n        if ( v10 < 0 )\n          v7 = 1011;\n      }\n      m_detailColor->m_colorID = v7;\n      a1->m_detailColor->m_hsv = *(cocos2d::ccHSVValue *)(v4 + 16);\n    }\n  }\n}", "assembly": "; \n; GameObject::duplicateColorMode from 0x1401a1ba0 to 0x1401a1c78 (216 bytes)\n; \n; 8 xrefs:\n; > CustomizeObjectLayer::onPaste @ 0x1400a80e9\n; > CustomizeObjectLayer::onPaste @ 0x1400a8129\n; > EditorUI::onPasteColor @ 0x140114608\n; > EditorUI::onPasteColor @ 0x140114648\n; > EditorUI::createRockEdges @ 0x14012e62e\n; > GameObject::duplicateValues @ 0x1401a1e8e\n; > LevelEditorLayer::copyObjectState @ 0x1402e1397\n; > <???> @ 0x1406cbfa0\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1401a1ba0\ncmp     byte ptr [rcx+416h], 0                                         ; +0x5, 0x1401a1ba5\nmov     r9, rcx                                                        ; +0xc, 0x1401a1bac\nmov     r10, [rdx+450h]                                                ; +0xf, 0x1401a1baf\nmov     r8, [rdx+458h]                                                 ; +0x16, 0x1401a1bb6\njz      short loc_1401A1BE4                                            ; +0x1d, 0x1401a1bbd\ncmp     qword ptr [rcx+458h], 0                                        ; +0x1f, 0x1401a1bbf\njnz     short loc_1401A1BE4                                            ; +0x27, 0x1401a1bc7\ntest    r8, r8                                                         ; +0x29, 0x1401a1bc9\njz      short loc_1401A1BE4                                            ; +0x2c, 0x1401a1bcc\nmov     ecx, [r8+4]                                                    ; +0x2e, 0x1401a1bce\nmov     eax, [r8]                                                      ; +0x32, 0x1401a1bd2\ncmp     ecx, eax                                                       ; +0x35, 0x1401a1bd5\njz      short loc_1401A1BDD                                            ; +0x37, 0x1401a1bd7\ntest    eax, eax                                                       ; +0x39, 0x1401a1bd9\njnz     short loc_1401A1BE1                                            ; +0x3b, 0x1401a1bdb\ntest    ecx, ecx                                                       ; +0x3d, 0x1401a1bdd\njz      short loc_1401A1BE4                                            ; +0x3f, 0x1401a1bdf\nmov     r10, r8                                                        ; +0x41, 0x1401a1be1\nmov     ecx, [r10+4]                                                   ; +0x44, 0x1401a1be4\nmov     eax, [r10]                                                     ; +0x48, 0x1401a1be8\ncmp     ecx, eax                                                       ; +0x4b, 0x1401a1beb\njz      short loc_1401A1BF3                                            ; +0x4d, 0x1401a1bed\ntest    eax, eax                                                       ; +0x4f, 0x1401a1bef\njnz     short loc_1401A1BF5                                            ; +0x51, 0x1401a1bf1\nmov     eax, ecx                                                       ; +0x53, 0x1401a1bf3\nmov     rdx, [r9+450h]                                                 ; +0x55, 0x1401a1bf5\nxor     ebx, ebx                                                       ; +0x5c, 0x1401a1bfc\ntest    eax, eax                                                       ; +0x5e, 0x1401a1bfe\nmov     ecx, 44Dh                                                      ; +0x60, 0x1401a1c00\ncmovs   eax, ebx                                                       ; +0x65, 0x1401a1c05\nlea     r11d, [rcx-5Ah]                                                ; +0x68, 0x1401a1c08\ncmp     eax, ecx                                                       ; +0x6c, 0x1401a1c0c\njle     short loc_1401A1C14                                            ; +0x6e, 0x1401a1c0e\nmov     eax, ecx                                                       ; +0x70, 0x1401a1c10\njmp     short loc_1401A1C1A                                            ; +0x72, 0x1401a1c12\ntest    eax, eax                                                       ; +0x74, 0x1401a1c14\ncmovs   eax, r11d                                                      ; +0x76, 0x1401a1c16\nmov     [rdx], eax                                                     ; +0x7a, 0x1401a1c1a\nmov     rax, [r9+450h]                                                 ; +0x7c, 0x1401a1c1c\nmovups  xmm0, xmmword ptr [r10+10h]                                    ; +0x83, 0x1401a1c23\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x88, 0x1401a1c28\ntest    r8, r8                                                         ; +0x8c, 0x1401a1c2c\njz      short loc_1401A1C72                                            ; +0x8f, 0x1401a1c2f\nmov     r10, [r9+458h]                                                 ; +0x91, 0x1401a1c31\ntest    r10, r10                                                       ; +0x98, 0x1401a1c38\njz      short loc_1401A1C72                                            ; +0x9b, 0x1401a1c3b\nmov     edx, [r8+4]                                                    ; +0x9d, 0x1401a1c3d\nmov     eax, [r8]                                                      ; +0xa1, 0x1401a1c41\ncmp     edx, eax                                                       ; +0xa4, 0x1401a1c44\njz      short loc_1401A1C4C                                            ; +0xa6, 0x1401a1c46\ntest    eax, eax                                                       ; +0xa8, 0x1401a1c48\njnz     short loc_1401A1C50                                            ; +0xaa, 0x1401a1c4a\nmov     eax, edx                                                       ; +0xac, 0x1401a1c4c\ntest    edx, edx                                                       ; +0xae, 0x1401a1c4e\ncmovs   eax, ebx                                                       ; +0xb0, 0x1401a1c50\ncmp     eax, ecx                                                       ; +0xb3, 0x1401a1c53\njg      short loc_1401A1C5F                                            ; +0xb5, 0x1401a1c55\ntest    eax, eax                                                       ; +0xb7, 0x1401a1c57\nmov     ecx, eax                                                       ; +0xb9, 0x1401a1c59\ncmovs   ecx, r11d                                                      ; +0xbb, 0x1401a1c5b\nmov     [r10], ecx                                                     ; +0xbf, 0x1401a1c5f\nmov     rax, [r9+458h]                                                 ; +0xc2, 0x1401a1c62\nmovups  xmm0, xmmword ptr [r8+10h]                                     ; +0xc9, 0x1401a1c69\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0xce, 0x1401a1c6e\nmov     rbx, [rsp+arg_0]                                               ; +0xd2, 0x1401a1c72\nretn                                                                   ; +0xd7, 0x1401a1c77", "xrefs": ["CustomizeObjectLayer::onPaste @ 0x1400a80e9", "CustomizeObjectLayer::onPaste @ 0x1400a8129", "EditorUI::onPasteColor @ 0x140114608", "EditorUI::onPasteColor @ 0x140114648", "EditorUI::createRockEdges @ 0x14012e62e", "GameObject::duplicateValues @ 0x1401a1e8e", "LevelEditorLayer::copyObjectState @ 0x1402e1397", "<???> @ 0x1406cbfa0"], "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"}