{"type": "func", "start": 5372032528, "end": 5372032994, "name": "GJBaseGameLayer::updateColor", "pseudocode": "// \n// GJBaseGameLayer::updateColor from 0x14032b610 to 0x14032b7e2 (466 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::updateColor @ 0x1403fc583\n// > PlayLayer::updateColor @ 0x140510a99\n// > <???> @ 0x14076b7b0\n// > <???> @ 0x14091f178\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:29 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::updateColor(\n        __int64 a1,\n        __int64 a2,\n        float a3,\n        unsigned int a4,\n        char a5,\n        float a6,\n        _OWORD *a7,\n        int a8,\n        char a9,\n        __int64 a10,\n        int a11)\n{\n  unsigned int v11; // ebx\n  __int64 ColorSprite; // rdi\n  __int64 ColorAction; // rbx\n  float v16; // xmm0_4\n  char v17; // al\n  cocos2d::CCDictionary *v18; // rcx\n  __int64 v19; // rcx\n  __int64 result; // rax\n\n  v11 = a4;\n  if ( a4 > 0x44D )\n    v11 = 0;\n  ColorSprite = GJEffectManager::getColorSprite(*(_QWORD *)(a1 + 2408), v11);\n  ColorAction = GJEffectManager::getColorAction(*(_QWORD *)(a1 + 2408), v11);\n  *(_DWORD *)(ColorAction + 128) = a11;\n  *(_BYTE *)(a1 + 12669) = *(_BYTE *)(ColorAction + 84);\n  *(_WORD *)(ColorAction + 72) = *(_WORD *)(ColorSprite + 324);\n  *(_BYTE *)(ColorAction + 74) = *(_BYTE *)(ColorSprite + 326);\n  *(_WORD *)(ColorAction + 75) = *(_WORD *)a2;\n  *(_BYTE *)(ColorAction + 77) = *(_BYTE *)(a2 + 2);\n  *(_BYTE *)(ColorAction + 84) = a5;\n  *(float *)(ColorAction + 80) = a3;\n  v16 = *(float *)(ColorSprite + 320) / 255.0;\n  *(float *)(ColorAction + 100) = a6;\n  *(float *)(ColorAction + 96) = v16;\n  v17 = a10;\n  *(_OWORD *)(ColorAction + 104) = *a7;\n  if ( a10 )\n    v17 = *(_BYTE *)(a10 + 1652);\n  *(_BYTE *)(ColorAction + 136) = v17;\n  *(_DWORD *)(ColorAction + 120) = a8;\n  *(_BYTE *)(ColorAction + 125) = a9;\n  *(_DWORD *)(ColorAction + 68) = 0;\n  *(_WORD *)(ColorAction + 56) = 0;\n  ColorAction::step(ColorAction);\n  v18 = *(cocos2d::CCDictionary **)(*(_QWORD *)(a1 + 2408) + 632LL);\n  if ( *(int *)(ColorAction + 120) <= 0 )\n    cocos2d::CCDictionary::removeObjectForKey(v18, *(int *)(ColorAction + 92));\n  else\n    cocos2d::CCDictionary::setObject(v18, (struct cocos2d::CCObject *)ColorAction, *(int *)(ColorAction + 92));\n  if ( a3 > 0.0 )\n    return ColorAction;\n  v19 = *(_QWORD *)(ColorAction + 144);\n  if ( !*(_DWORD *)(ColorAction + 120) )\n  {\n    *(_WORD *)(v19 + 324) = *(_WORD *)a2;\n    *(_BYTE *)(v19 + 326) = *(_BYTE *)(a2 + 2);\n    *(float *)(v19 + 320) = a6 * 255.0;\n    return ColorAction;\n  }\n  result = ColorAction;\n  if ( !*(_BYTE *)(ColorAction + 125) )\n    *(float *)(v19 + 320) = a6 * 255.0;\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::updateColor from 0x14032b610 to 0x14032b7e2 (466 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::updateColor @ 0x1403fc583\n; > PlayLayer::updateColor @ 0x140510a99\n; > <???> @ 0x14076b7b0\n; > <???> @ 0x14091f178\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:29 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x14032b610\nmov     [rax+8], rbx                                                   ; +0x3, 0x14032b613\nmov     [rax+10h], rbp                                                 ; +0x7, 0x14032b617\nmov     [rax+18h], rsi                                                 ; +0xb, 0x14032b61b\nmov     [rax+20h], rdi                                                 ; +0xf, 0x14032b61f\npush    r14                                                            ; +0x13, 0x14032b623\nsub     rsp, 50h                                                       ; +0x15, 0x14032b625\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0x19, 0x14032b629\nxor     r14d, r14d                                                     ; +0x1d, 0x14032b62d\ncmp     r9d, 44Dh                                                      ; +0x20, 0x14032b630\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x27, 0x14032b637\nmov     ebx, r9d                                                       ; +0x2b, 0x14032b63b\nmovaps  xmmword ptr [rax-38h], xmm9                                    ; +0x2e, 0x14032b63e\ncmova   ebx, r14d                                                      ; +0x33, 0x14032b643\nmov     rsi, rdx                                                       ; +0x37, 0x14032b647\nmov     rbp, rcx                                                       ; +0x3a, 0x14032b64a\nmov     edx, ebx                                                       ; +0x3d, 0x14032b64d\nmov     rcx, [rcx+968h]                                                ; +0x3f, 0x14032b64f\nmovaps  xmm9, xmm2                                                     ; +0x46, 0x14032b656\ncall    GJEffectManager__getColorSprite                                ; +0x4a, 0x14032b65a\nmov     rcx, [rbp+968h]                                                ; +0x4f, 0x14032b65f\nmov     edx, ebx                                                       ; +0x56, 0x14032b666\nmov     rdi, rax                                                       ; +0x58, 0x14032b668\ncall    GJEffectManager__getColorAction                                ; +0x5b, 0x14032b66b\nmov     ecx, [rsp+58h+arg_50]                                          ; +0x60, 0x14032b670\nmov     rbx, rax                                                       ; +0x67, 0x14032b677\nmovss   xmm6, [rsp+58h+arg_28]                                         ; +0x6a, 0x14032b67a\nmov     [rax+80h], ecx                                                 ; +0x73, 0x14032b683\nmovzx   ecx, byte ptr [rax+54h]                                        ; +0x79, 0x14032b689\nmov     [rbp+317Dh], cl                                                ; +0x7d, 0x14032b68d\nmovzx   ecx, word ptr [rdi+144h]                                       ; +0x83, 0x14032b693\nmov     [rax+48h], cx                                                  ; +0x8a, 0x14032b69a\nmovzx   ecx, byte ptr [rdi+146h]                                       ; +0x8e, 0x14032b69e\nmov     [rax+4Ah], cl                                                  ; +0x95, 0x14032b6a5\nmovzx   ecx, word ptr [rsi]                                            ; +0x98, 0x14032b6a8\nmov     [rax+4Bh], cx                                                  ; +0x9b, 0x14032b6ab\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x9f, 0x14032b6af\nmov     [rbx+4Dh], al                                                  ; +0xa3, 0x14032b6b3\nmovzx   eax, [rsp+58h+arg_20]                                          ; +0xa6, 0x14032b6b6\nmov     [rbx+54h], al                                                  ; +0xae, 0x14032b6be\nmov     rax, [rsp+58h+arg_30]                                          ; +0xb1, 0x14032b6c1\nmovss   dword ptr [rbx+50h], xmm9                                      ; +0xb9, 0x14032b6c9\nmovss   xmm0, dword ptr [rdi+140h]                                     ; +0xbf, 0x14032b6cf\ndivss   xmm0, cs:dword_140835964                                       ; +0xc7, 0x14032b6d7\nmovss   dword ptr [rbx+64h], xmm6                                      ; +0xcf, 0x14032b6df\nmovss   dword ptr [rbx+60h], xmm0                                      ; +0xd4, 0x14032b6e4\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xd9, 0x14032b6e9\nmov     rax, [rsp+58h+arg_48]                                          ; +0xdc, 0x14032b6ec\nmovups  xmmword ptr [rbx+68h], xmm0                                    ; +0xe4, 0x14032b6f4\ntest    rax, rax                                                       ; +0xe8, 0x14032b6f8\njz      short loc_14032B704                                            ; +0xeb, 0x14032b6fb\nmovzx   eax, byte ptr [rax+674h]                                       ; +0xed, 0x14032b6fd\nmov     [rbx+88h], al                                                  ; +0xf4, 0x14032b704\nxorps   xmm1, xmm1                                                     ; +0xfa, 0x14032b70a\nmov     eax, [rsp+58h+arg_38]                                          ; +0xfd, 0x14032b70d\nmov     rcx, rbx                                                       ; +0x104, 0x14032b714\nmov     [rbx+78h], eax                                                 ; +0x107, 0x14032b717\nxorps   xmm7, xmm7                                                     ; +0x10a, 0x14032b71a\nmovzx   eax, [rsp+58h+arg_40]                                          ; +0x10d, 0x14032b71d\nmov     [rbx+7Dh], al                                                  ; +0x115, 0x14032b725\nmov     [rbx+44h], r14d                                                ; +0x118, 0x14032b728\nmov     [rbx+38h], r14w                                                ; +0x11c, 0x14032b72c\ncall    ColorAction__step                                              ; +0x121, 0x14032b731\nmov     r10, [rbp+968h]                                                ; +0x126, 0x14032b736\nmovsxd  rdx, dword ptr [rbx+5Ch]                                       ; +0x12d, 0x14032b73d\nmov     rcx, [r10+278h]                                                ; +0x131, 0x14032b741\ncmp     [rbx+78h], r14d                                                ; +0x138, 0x14032b748\njle     short loc_14032B75C                                            ; +0x13c, 0x14032b74c\nmov     r8, rdx                                                        ; +0x13e, 0x14032b74e\nmov     rdx, rbx                                                       ; +0x141, 0x14032b751\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x144, 0x14032b754\njmp     short loc_14032B762                                            ; +0x14a, 0x14032b75a\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAX_J@Z; cocos2d::CCDictionary::removeObjectForKey(__int64) ; +0x14c, 0x14032b75c\ncomiss  xmm7, xmm9                                                     ; +0x152, 0x14032b762\njb      short loc_14032B799                                            ; +0x156, 0x14032b766\nmov     rcx, [rbx+90h]                                                 ; +0x158, 0x14032b768\ncmp     [rbx+78h], r14d                                                ; +0x15f, 0x14032b76f\njnz     short loc_14032B7C7                                            ; +0x163, 0x14032b773\nmovzx   eax, word ptr [rsi]                                            ; +0x165, 0x14032b775\nmulss   xmm6, cs:dword_140835964                                       ; +0x168, 0x14032b778\nmov     [rcx+144h], ax                                                 ; +0x170, 0x14032b780\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x177, 0x14032b787\nmov     [rcx+146h], al                                                 ; +0x17b, 0x14032b78b\nmovss   dword ptr [rcx+140h], xmm6                                     ; +0x181, 0x14032b791\nmov     rax, rbx                                                       ; +0x189, 0x14032b799\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x18c, 0x14032b79c\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x191, 0x14032b7a1\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x196, 0x14032b7a6\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x19b, 0x14032b7ab\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x1a0, 0x14032b7b0\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x1a5, 0x14032b7b5\nmovaps  xmm9, [rsp+58h+var_38]                                         ; +0x1aa, 0x14032b7ba\nadd     rsp, 50h                                                       ; +0x1b0, 0x14032b7c0\npop     r14                                                            ; +0x1b4, 0x14032b7c4\nretn                                                                   ; +0x1b6, 0x14032b7c6\nmov     rax, rbx                                                       ; +0x1b7, 0x14032b7c7\ncmp     [rbx+7Dh], r14b                                                ; +0x1ba, 0x14032b7ca\njnz     short loc_14032B79C                                            ; +0x1be, 0x14032b7ce\nmulss   xmm6, cs:dword_140835964                                       ; +0x1c0, 0x14032b7d0\nmovss   dword ptr [rcx+140h], xmm6                                     ; +0x1c8, 0x14032b7d8\njmp     short loc_14032B79C                                            ; +0x1d0, 0x14032b7e0", "xrefs": ["LevelEditorLayer::updateColor @ 0x1403fc583", "PlayLayer::updateColor @ 0x140510a99", "<???> @ 0x14076b7b0", "<???> @ 0x14091f178"], "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"}