{"type": "func", "start": 4296835448, "end": 4296835652, "name": "GJChestSprite::setColor", "pseudocode": "// \n// GJChestSprite::setColor from 0x1001c8178 to 0x1001c8244 (204 bytes)\n// \n// 2 xrefs:\n// > sub_1001C8244 @ 0x1001c8248\n// > <???> @ 0x1007b8df8\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 __fastcall GJChestSprite::setColor(GJChestSprite *a1, const cocos2d::ccColor3B *a2)\n{\n  unsigned int v2; // s0\n  unsigned int v4; // s0\n  int v5; // w8\n  unsigned int v6; // s0\n  int v7; // w9\n  __int64 v8; // x0\n  __int64 v9; // x19\n  __int64 v10; // x0\n  cocos2d::ccColor3B v11; // [xsp+Ch] [xbp-14h] BYREF\n\n  v11 = *a2;\n  if ( a1->m_dark )\n  {\n    LOBYTE(v2) = v11.r;\n    *(float *)&v4 = (float)v2 * 0.4;\n    v5 = (int)*(float *)&v4;\n    LOBYTE(v4) = v11.g;\n    *(float *)&v6 = (float)v4 * 0.4;\n    v7 = (int)*(float *)&v6;\n    LOBYTE(v6) = v11.b;\n    v11.b = (int)(float)((float)v6 * 0.4);\n    *(_WORD *)&v11.r = v5 | ((_WORD)v7 << 8);\n  }\n  cocos2d::CCSprite::setColor(a1, &v11);\n  v8 = ((__int64 (__fastcall *)(GJChestSprite *))a1->getChildren)(a1);\n  if ( v8 )\n  {\n    v9 = v8;\n    if ( (unsigned int)sub_10024A36C(v8) )\n    {\n      v10 = sub_10024A388(v9, 0);\n      (*(void (__fastcall **)(__int64, cocos2d::ccColor3B *))(*(_QWORD *)v10 + 944LL))(v10, &v11);\n    }\n  }\n}", "assembly": "; \n; GJChestSprite::setColor from 0x1001c8178 to 0x1001c8244 (204 bytes)\n; \n; 2 xrefs:\n; > sub_1001C8244 @ 0x1001c8248\n; > <???> @ 0x1007b8df8\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\nSUB             SP, SP, #0x30                                          ; +0x0, 0x1001c8178\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001c817c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001c8180\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001c8184\nMOV             X19, X0                                                ; +0x10, 0x1001c8188\nLDRH            W8, [X1]                                               ; +0x14, 0x1001c818c\nSTRH            W8, [SP,#0x20+var_14]                                  ; +0x18, 0x1001c8190\nLDRB            W8, [X1,#2]                                            ; +0x1c, 0x1001c8194\nSTRB            W8, [SP,#0x20+var_12]                                  ; +0x20, 0x1001c8198\nLDRB            W8, [X0,#0x25C]                                        ; +0x24, 0x1001c819c\nCMP             W8, #1                                                 ; +0x28, 0x1001c81a0\nB.NE            loc_1001C81EC                                          ; +0x2c, 0x1001c81a4\nLDR             B0, [SP,#0x20+var_14]                                  ; +0x30, 0x1001c81a8\nUCVTF           S0, S0                                                 ; +0x34, 0x1001c81ac\nADRP            X8, #dword_10063537C@PAGE                              ; +0x38, 0x1001c81b0\nLDR             S1, [X8,#dword_10063537C@PAGEOFF]                      ; +0x3c, 0x1001c81b4\nFMUL            S0, S0, S1                                             ; +0x40, 0x1001c81b8\nFCVTZS          W8, S0                                                 ; +0x44, 0x1001c81bc\nLDR             B0, [SP,#0x20+var_14+1]                                ; +0x48, 0x1001c81c0\nUCVTF           S0, S0                                                 ; +0x4c, 0x1001c81c4\nFMUL            S0, S0, S1                                             ; +0x50, 0x1001c81c8\nFCVTZS          W9, S0                                                 ; +0x54, 0x1001c81cc\nLDR             B0, [SP,#0x20+var_12]                                  ; +0x58, 0x1001c81d0\nUCVTF           S0, S0                                                 ; +0x5c, 0x1001c81d4\nFMUL            S0, S0, S1                                             ; +0x60, 0x1001c81d8\nFCVTZS          W10, S0                                                ; +0x64, 0x1001c81dc\nORR             W8, W8, W9,LSL#8                                       ; +0x68, 0x1001c81e0\nSTRB            W10, [SP,#0x20+var_12]                                 ; +0x6c, 0x1001c81e4\nSTRH            W8, [SP,#0x20+var_14]                                  ; +0x70, 0x1001c81e8\nADD             X1, SP, #0x20+var_14                                   ; +0x74, 0x1001c81ec\nMOV             X0, X19                                                ; +0x78, 0x1001c81f0\nBL              cocos2d__CCSprite__setColor                            ; +0x7c, 0x1001c81f4\nLDR             X8, [X19]                                              ; +0x80, 0x1001c81f8\nLDR             X8, [X8,#0x1D8]                                        ; +0x84, 0x1001c81fc\nMOV             X0, X19                                                ; +0x88, 0x1001c8200\nBLR             X8                                                     ; +0x8c, 0x1001c8204\nCBZ             X0, loc_1001C8234                                      ; +0x90, 0x1001c8208\nMOV             X19, X0                                                ; +0x94, 0x1001c820c\nBL              sub_10024A36C                                          ; +0x98, 0x1001c8210\nCBZ             W0, loc_1001C8234                                      ; +0x9c, 0x1001c8214\nMOV             X0, X19                                                ; +0xa0, 0x1001c8218\nMOV             W1, #0                                                 ; +0xa4, 0x1001c821c\nBL              sub_10024A388                                          ; +0xa8, 0x1001c8220\nLDR             X8, [X0]                                               ; +0xac, 0x1001c8224\nLDR             X8, [X8,#0x3B0]                                        ; +0xb0, 0x1001c8228\nADD             X1, SP, #0x20+var_14                                   ; +0xb4, 0x1001c822c\nBLR             X8                                                     ; +0xb8, 0x1001c8230\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xbc, 0x1001c8234\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xc0, 0x1001c8238\nADD             SP, SP, #0x30 ; '0'                                    ; +0xc4, 0x1001c823c\nRET                                                                    ; +0xc8, 0x1001c8240", "xrefs": ["sub_1001C8244 @ 0x1001c8248", "<???> @ 0x1007b8df8"], "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"}