{"type": "func", "start": 5372245696, "end": 5372245899, "name": "GJColorSetupLayer::onColor", "pseudocode": "// \n// GJColorSetupLayer::onColor from 0x14035f6c0 to 0x14035f78b (203 bytes)\n// \n// 2 xrefs:\n// > GJColorSetupLayer::init @ 0x14035edf5\n// > <???> @ 0x1409212b4\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:30:52 +0000\n// \n\n__int64 __fastcall GJColorSetupLayer::onColor(__int64 a1, __int64 a2)\n{\n  int v3; // ebx\n  __int64 v4; // rdx\n  void (__fastcall ***v5)(_QWORD); // rcx\n  __int64 v6; // rdx\n  __int64 ColorAction; // rax\n  char *v9; // rax\n  __int64 v10; // rcx\n\n  v3 = *(_DWORD *)(a1 + 720) * *(_DWORD *)(a1 + 724);\n  v4 = v3 + (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  if ( *(_BYTE *)(a1 + 752) )\n  {\n    v5 = *(void (__fastcall ****)(_QWORD))(a1 + 760);\n    *(_DWORD *)(a1 + 768) = v4;\n    if ( v5 )\n    {\n      if ( (int)v4 > 0 )\n        (**v5)(v5);\n    }\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n    LOBYTE(v6) = 1;\n    return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v6);\n  }\n  else\n  {\n    ColorAction = GJEffectManager::getColorAction(*(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL), v4);\n    v9 = ColorSelectPopup::create(0, 0, ColorAction);\n    v10 = a1 + 664;\n    if ( !a1 )\n      v10 = 0;\n    *((_DWORD *)v9 + 148) = 106;\n    *((_QWORD *)v9 + 138) = v10;\n    return (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v9 + 1064LL))(v9);\n  }\n}", "assembly": "; \n; GJColorSetupLayer::onColor from 0x14035f6c0 to 0x14035f78b (203 bytes)\n; \n; 2 xrefs:\n; > GJColorSetupLayer::init @ 0x14035edf5\n; > <???> @ 0x1409212b4\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:30:52 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14035f6c0\npush    rdi                                                            ; +0x5, 0x14035f6c5\nsub     rsp, 20h                                                       ; +0x6, 0x14035f6c6\nmov     ebx, [rcx+2D4h]                                                ; +0xa, 0x14035f6ca\nmov     rdi, rcx                                                       ; +0x10, 0x14035f6d0\nimul    ebx, [rcx+2D0h]                                                ; +0x13, 0x14035f6d3\nmov     rcx, rdx                                                       ; +0x1a, 0x14035f6da\nmov     rax, [rdx]                                                     ; +0x1d, 0x14035f6dd\ncall    qword ptr [rax+38h]                                            ; +0x20, 0x14035f6e0\ncmp     byte ptr [rdi+2F0h], 0                                         ; +0x23, 0x14035f6e3\nlea     edx, [rbx+rax]                                                 ; +0x2a, 0x14035f6ea\njz      short loc_14035F731                                            ; +0x2d, 0x14035f6ed\nmov     rcx, [rdi+2F8h]                                                ; +0x2f, 0x14035f6ef\nmov     [rdi+300h], edx                                                ; +0x36, 0x14035f6f6\ntest    rcx, rcx                                                       ; +0x3c, 0x14035f6fc\njz      short loc_14035F70A                                            ; +0x3f, 0x14035f6ff\ntest    edx, edx                                                       ; +0x41, 0x14035f701\njle     short loc_14035F70A                                            ; +0x43, 0x14035f703\nmov     rax, [rcx]                                                     ; +0x45, 0x14035f705\ncall    qword ptr [rax]                                                ; +0x48, 0x14035f708\nmov     rax, [rdi]                                                     ; +0x4a, 0x14035f70a\nxor     edx, edx                                                       ; +0x4d, 0x14035f70d\nmov     rcx, rdi                                                       ; +0x4f, 0x14035f70f\ncall    qword ptr [rax+3E0h]                                           ; +0x52, 0x14035f712\nmov     rax, [rdi]                                                     ; +0x58, 0x14035f718\nmov     dl, 1                                                          ; +0x5b, 0x14035f71b\nmov     rcx, rdi                                                       ; +0x5d, 0x14035f71d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x60, 0x14035f720\nadd     rsp, 20h                                                       ; +0x65, 0x14035f725\npop     rdi                                                            ; +0x69, 0x14035f729\njmp     qword ptr [rax+208h]                                           ; +0x6a, 0x14035f72a\nmov     rcx, [rdi+2A8h]                                                ; +0x71, 0x14035f731\nmov     rcx, [rcx+140h]                                                ; +0x78, 0x14035f738\ncall    GJEffectManager__getColorAction                                ; +0x7f, 0x14035f73f\nmov     r8, rax                                                        ; +0x84, 0x14035f744\nxor     edx, edx                                                       ; +0x87, 0x14035f747\nxor     ecx, ecx                                                       ; +0x89, 0x14035f749\ncall    ColorSelectPopup__create                                       ; +0x8b, 0x14035f74b\nxor     edx, edx                                                       ; +0x90, 0x14035f750\nlea     rcx, [rdi+298h]                                                ; +0x92, 0x14035f752\ntest    rdi, rdi                                                       ; +0x99, 0x14035f759\ncmovz   rcx, rdx                                                       ; +0x9c, 0x14035f75c\nmov     dword ptr [rax+250h], 6Ah ; 'j'                                ; +0xa0, 0x14035f760\nmov     [rax+450h], rcx                                                ; +0xaa, 0x14035f76a\nmov     rcx, [rax]                                                     ; +0xb1, 0x14035f771\nmov     rdx, [rcx+428h]                                                ; +0xb4, 0x14035f774\nmov     rcx, rax                                                       ; +0xbb, 0x14035f77b\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbe, 0x14035f77e\nadd     rsp, 20h                                                       ; +0xc3, 0x14035f783\npop     rdi                                                            ; +0xc7, 0x14035f787\njmp     rdx                                                            ; +0xc8, 0x14035f788", "xrefs": ["GJColorSetupLayer::init @ 0x14035edf5", "<???> @ 0x1409212b4"], "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"}