{"type": "func", "start": 4300149696, "end": 4300149856, "name": "GameToolbox::strongColor", "pseudocode": "// \n// GameToolbox::strongColor from 0x1004f13c0 to 0x1004f1460 (160 bytes)\n// \n// 3 xrefs:\n// > SimplePlayer::updateColors @ 0x10036e92a\n// > PlayerObject::updateGlowColor @ 0x10041a07f\n// > PlayerObject::updateGlowColor @ 0x10041a0ae\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  unsigned int v1; // ecx\n  unsigned int v2; // eax\n  int g; // edx\n  unsigned __int8 r; // cl\n  float v5; // xmm0_4\n\n  v1 = (*(_DWORD *)&a1.r & 0xFFFFFFu) >> 8;\n  v2 = (*(_DWORD *)&a1.r & 0xFFFFFFu) >> 16;\n  if ( v2 != 255 && a1.r != 255 )\n  {\n    g = a1.g;\n    if ( a1.g != 255 )\n    {\n      r = (*(_DWORD *)&a1.r & 0xFFFFFFu) >> 16;\n      if ( a1.g >= v2 )\n        r = a1.g;\n      if ( a1.r >= (unsigned int)r )\n        r = a1.r;\n      v5 = fminf(1.5, 255.0 / (float)r);\n      *(_DWORD *)&a1.r = (int)(float)((float)a1.r * v5);\n      v1 = (int)(float)((float)g * v5);\n      v2 = (int)(float)((float)(int)v2 * v5);\n    }\n  }\n  return (cocos2d::ccColor3B)(((unsigned __int8)v2 << 16) | ((unsigned __int8)v1 << 8) | a1.r);\n}", "assembly": "; \n; GameToolbox::strongColor from 0x1004f13c0 to 0x1004f1460 (160 bytes)\n; \n; 3 xrefs:\n; > SimplePlayer::updateColors @ 0x10036e92a\n; > PlayerObject::updateGlowColor @ 0x10041a07f\n; > PlayerObject::updateGlowColor @ 0x10041a0ae\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     eax, edi                                                       ; +0x0, 0x1004f13c0\nand     eax, 0FFFFFFh                                                  ; +0x2, 0x1004f13c2\nmov     ecx, eax                                                       ; +0x7, 0x1004f13c7\nshr     ecx, 8                                                         ; +0x9, 0x1004f13c9\nshr     eax, 10h                                                       ; +0xc, 0x1004f13cc\ncmp     eax, 0FFh                                                      ; +0xf, 0x1004f13cf\njz      short loc_1004F144B                                            ; +0x14, 0x1004f13d4\nmovzx   esi, dil                                                       ; +0x16, 0x1004f13d6\ncmp     esi, 0FFh                                                      ; +0x1a, 0x1004f13da\njz      short loc_1004F144B                                            ; +0x20, 0x1004f13e0\nmovzx   edx, cl                                                        ; +0x22, 0x1004f13e2\ncmp     edx, 0FFh                                                      ; +0x25, 0x1004f13e5\njz      short loc_1004F144B                                            ; +0x2b, 0x1004f13eb\npush    rbp                                                            ; +0x2d, 0x1004f13ed\nmov     rbp, rsp                                                       ; +0x2e, 0x1004f13ee\ncmp     edx, eax                                                       ; +0x31, 0x1004f13f1\nmovzx   ecx, al                                                        ; +0x33, 0x1004f13f3\ncmovnb  ecx, edx                                                       ; +0x36, 0x1004f13f6\nmovzx   edi, cl                                                        ; +0x39, 0x1004f13f9\ncmp     esi, edi                                                       ; +0x3c, 0x1004f13fc\ncmovnb  ecx, esi                                                       ; +0x3e, 0x1004f13fe\nmovzx   ecx, cl                                                        ; +0x41, 0x1004f1401\ncvtsi2ss xmm0, ecx                                                     ; +0x44, 0x1004f1404\nmovss   xmm1, cs:dword_100815C10                                       ; +0x48, 0x1004f1408\ndivss   xmm1, xmm0                                                     ; +0x50, 0x1004f1410\nmovss   xmm0, cs:dword_100815000                                       ; +0x54, 0x1004f1414\ncvtsi2ss xmm2, esi                                                     ; +0x5c, 0x1004f141c\nminss   xmm0, xmm1                                                     ; +0x60, 0x1004f1420\nmulss   xmm2, xmm0                                                     ; +0x64, 0x1004f1424\ncvttss2si edi, xmm2                                                    ; +0x68, 0x1004f1428\nxorps   xmm1, xmm1                                                     ; +0x6c, 0x1004f142c\ncvtsi2ss xmm1, edx                                                     ; +0x6f, 0x1004f142f\nmulss   xmm1, xmm0                                                     ; +0x73, 0x1004f1433\ncvttss2si ecx, xmm1                                                    ; +0x77, 0x1004f1437\nxorps   xmm1, xmm1                                                     ; +0x7b, 0x1004f143b\ncvtsi2ss xmm1, eax                                                     ; +0x7e, 0x1004f143e\nmulss   xmm1, xmm0                                                     ; +0x82, 0x1004f1442\ncvttss2si eax, xmm1                                                    ; +0x86, 0x1004f1446\npop     rbp                                                            ; +0x8a, 0x1004f144a\nmovzx   eax, al                                                        ; +0x8b, 0x1004f144b\nshl     eax, 10h                                                       ; +0x8e, 0x1004f144e\nmovzx   ecx, cl                                                        ; +0x91, 0x1004f1451\nshl     ecx, 8                                                         ; +0x94, 0x1004f1454\nor      ecx, eax                                                       ; +0x97, 0x1004f1457\nmovzx   eax, dil                                                       ; +0x99, 0x1004f1459\nor      eax, ecx                                                       ; +0x9d, 0x1004f145d\nretn                                                                   ; +0x9f, 0x1004f145f", "xrefs": ["SimplePlayer::updateColors @ 0x10036e92a", "PlayerObject::updateGlowColor @ 0x10041a07f", "PlayerObject::updateGlowColor @ 0x10041a0ae"], "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"}