{"type": "func", "start": 4295252552, "end": 4295252704, "name": "GameToolbox::strongColor", "pseudocode": "// \n// GameToolbox::strongColor from 0x100045a48 to 0x100045ae0 (152 bytes)\n// \n// 3 xrefs:\n// > PlayerObject::updateGlowColor @ 0x10022c35c\n// > PlayerObject::updateGlowColor @ 0x10022c37c\n// > SimplePlayer::updateColors @ 0x100306118\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\n// local variable allocation has failed, the output may be wrong!\ncocos2d::ccColor3B __fastcall GameToolbox::strongColor(cocos2d::ccColor3B a1)\n{\n  __int64 v1; // x8\n  __int64 v2; // x9\n  unsigned int b; // w10\n  unsigned int g; // w12\n  float v5; // s0\n\n  v1 = *(_QWORD *)&a1.r >> 8;\n  v2 = *(_QWORD *)&a1.r >> 16;\n  b = a1.b;\n  if ( a1.b != 255 && a1.r != 255 )\n  {\n    g = a1.g;\n    if ( a1.g != 255 )\n    {\n      if ( a1.g < (unsigned int)a1.b )\n        LOBYTE(v1) = a1.b;\n      if ( a1.r >= (unsigned int)(unsigned __int8)v1 )\n        LOBYTE(v1) = a1.r;\n      v5 = 255.0 / (float)(unsigned __int8)v1;\n      if ( v5 > 1.5 )\n        v5 = 1.5;\n      *(_DWORD *)&a1.r = (int)(float)(v5 * (float)a1.r);\n      LODWORD(v1) = (int)(float)(v5 * (float)g);\n      LODWORD(v2) = (int)(float)(v5 * (float)b);\n    }\n  }\n  return (cocos2d::ccColor3B)(((unsigned __int8)v1 << 8) | ((_DWORD)v2 << 16) | a1.r);\n}", "assembly": "; \n; GameToolbox::strongColor from 0x100045a48 to 0x100045ae0 (152 bytes)\n; \n; 3 xrefs:\n; > PlayerObject::updateGlowColor @ 0x10022c35c\n; > PlayerObject::updateGlowColor @ 0x10022c37c\n; > SimplePlayer::updateColors @ 0x100306118\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\nLSR             X8, X0, #8                                             ; +0x0, 0x100045a48\nLSR             X9, X0, #0x10                                          ; +0x4, 0x100045a4c\nUBFX            X10, X0, #0x10, #8                                     ; +0x8, 0x100045a50\nCMP             W10, #0xFF                                             ; +0xc, 0x100045a54\nB.EQ            loc_100045AC8                                          ; +0x10, 0x100045a58\nAND             W11, W0, #0xFF                                         ; +0x14, 0x100045a5c\nCMP             W11, #0xFF                                             ; +0x18, 0x100045a60\nB.EQ            loc_100045AC8                                          ; +0x1c, 0x100045a64\nUBFX            X12, X0, #8, #8                                        ; +0x20, 0x100045a68\nCMP             W12, #0xFF                                             ; +0x24, 0x100045a6c\nB.EQ            loc_100045AC8                                          ; +0x28, 0x100045a70\nCMP             W12, W10                                               ; +0x2c, 0x100045a74\nCSEL            W8, W9, W8, CC                                         ; +0x30, 0x100045a78\nCMP             W11, W8,UXTB                                           ; +0x34, 0x100045a7c\nCSEL            W8, W8, W0, CC                                         ; +0x38, 0x100045a80\nAND             W8, W8, #0xFF                                          ; +0x3c, 0x100045a84\nUCVTF           S0, W8                                                 ; +0x40, 0x100045a88\nMOV             W8, #0x437F0000                                        ; +0x44, 0x100045a8c\nFMOV            S1, W8                                                 ; +0x48, 0x100045a90\nFDIV            S0, S1, S0                                             ; +0x4c, 0x100045a94\nFMOV            S1, #1.5                                               ; +0x50, 0x100045a98\nFCMP            S0, S1                                                 ; +0x54, 0x100045a9c\nFCSEL           S0, S1, S0, GT                                         ; +0x58, 0x100045aa0\nUCVTF           S1, W11                                                ; +0x5c, 0x100045aa4\nFMUL            S1, S0, S1                                             ; +0x60, 0x100045aa8\nFCVTZS          W0, S1                                                 ; +0x64, 0x100045aac\nUCVTF           S1, W12                                                ; +0x68, 0x100045ab0\nFMUL            S1, S0, S1                                             ; +0x6c, 0x100045ab4\nFCVTZS          W8, S1                                                 ; +0x70, 0x100045ab8\nUCVTF           S1, W10                                                ; +0x74, 0x100045abc\nFMUL            S0, S0, S1                                             ; +0x78, 0x100045ac0\nFCVTZS          W9, S0                                                 ; +0x7c, 0x100045ac4\nAND             W8, W8, #0xFF                                          ; +0x80, 0x100045ac8\nLSL             W8, W8, #8                                             ; +0x84, 0x100045acc\nORR             W8, W8, W9,LSL#16                                      ; +0x88, 0x100045ad0\nBFXIL           W8, W0, #0, #8                                         ; +0x8c, 0x100045ad4\nMOV             X0, X8                                                 ; +0x90, 0x100045ad8\nRET                                                                    ; +0x94, 0x100045adc", "xrefs": ["PlayerObject::updateGlowColor @ 0x10022c35c", "PlayerObject::updateGlowColor @ 0x10022c37c", "SimplePlayer::updateColors @ 0x100306118"], "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"}