{"type": "func", "start": 5372576688, "end": 5372577601, "name": "PlayLayer::updateInvisibleBlock", "pseudocode": "// \n// PlayLayer::updateInvisibleBlock from 0x1403b03b0 to 0x1403b0741 (913 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::updateVisibility @ 0x1403b0134\n// > <???> @ 0x14069972c\n// > <???> @ 0x140699784\n// > <???> @ 0x1406d6d28\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 PlayLayer::updateInvisibleBlock(\n        PlayLayer *a1,\n        GameObject *a2,\n        float a3,\n        float a4,\n        float a5,\n        float a6,\n        const cocos2d::ccColor3B *a7)\n{\n  float m_fadeMargin; // xmm1_4\n  float v12; // xmm0_4\n  float m_halfCameraWidth; // xmm1_4\n  float v14; // xmm6_4\n  float x; // xmm2_4\n  float *v16; // rax\n  float v17; // xmm0_4\n  float v18; // xmm3_4\n  float v19; // xmm0_4\n  float v20; // xmm1_4\n  float v21; // xmm8_4\n  float v22; // xmm8_4\n  float v23; // xmm0_4\n  float v24; // xmm1_4\n  float v25; // xmm7_4\n  cocos2d::CCSprite *m_glowSprite; // rcx\n  int v27; // ebx\n  float v28; // xmm0_4\n  __int16 v29; // cx\n  int b; // r8d\n  float v31; // xmm1_4\n  float v32; // xmm10_4\n  float v33; // xmm4_4\n  float v34; // xmm2_4\n  float v35; // xmm3_4\n  cocos2d::ccColor3B *p_m_lightBGColor; // rdx\n  cocos2d::CCPoint v37; // [rsp+A0h] [rbp+8h] BYREF\n  float v38; // [rsp+A8h] [rbp+10h] BYREF\n  __int16 v39; // [rsp+B0h] [rbp+18h] BYREF\n  char v40; // [rsp+B2h] [rbp+1Ah]\n\n  ((void (__fastcall *)(GameObject *, float *))a2->getRealPosition)(a2, &v38);\n  m_fadeMargin = a2->m_fadeMargin;\n  if ( v38 <= a1->m_cameraUnzoomedX )\n    v12 = v38 + m_fadeMargin;\n  else\n    v12 = v38 - m_fadeMargin;\n  v38 = v12;\n  cocos2d::CCPoint::CCPoint(&v37);\n  m_halfCameraWidth = a1->m_halfCameraWidth;\n  v14 = 0.0;\n  x = a1->m_gameState.m_cameraPosition2.x;\n  v17 = *v16;\n  if ( *v16 <= (float)(m_halfCameraWidth + x) )\n  {\n    v18 = 0.014285714;\n    v19 = (float)((float)(m_halfCameraWidth + x) - v17) - 0.0;\n  }\n  else\n  {\n    v18 = 0.02;\n    v19 = (float)((float)(v17 - 0.0) - x) - m_halfCameraWidth;\n  }\n  v20 = (float)(m_halfCameraWidth - v19) * v18;\n  if ( v20 >= 0.0 )\n    v21 = fminf(1.0, v20);\n  else\n    v21 = 0.0;\n  v22 = v21 * 255.0;\n  if ( v38 <= (float)(x + a3) )\n  {\n    v23 = a6;\n    v24 = (float)(x + a4) - v38;\n  }\n  else\n  {\n    v23 = a5;\n    v24 = (float)(v38 - x) - a3;\n  }\n  v25 = fminf(1.0, v24 / fmaxf(v23, 1.0));\n  if ( v25 < 0.0 )\n    v25 = 0.0;\n  a2->setOpacity(\n    &a2->cocos2d::CCRGBAProtocol,\n    (int)fminf((float)((float)(v25 * 0.94999999) + 0.050000001) * 255.0, v22));\n  m_glowSprite = a2->m_glowSprite;\n  if ( m_glowSprite )\n  {\n    v27 = (int)(float)((float)(unsigned __int8)(int)fminf((float)((float)(v25 * 0.85000002) + 0.15000001) * 255.0, v22)\n                     * a2->m_opacityMod);\n    m_glowSprite->setOpacity(&m_glowSprite->cocos2d::CCRGBAProtocol, v27);\n    a2->m_glowSprite->setChildOpacity(a2->m_glowSprite, v27);\n  }\n  v28 = (float)a2->getOpacity(&a2->cocos2d::CCRGBAProtocol) / 255.0;\n  if ( v28 <= 0.80000001 )\n  {\n    p_m_lightBGColor = &a1->m_lightBGColor;\n  }\n  else\n  {\n    v29 = *(_WORD *)&a1->m_lightBGColor.r;\n    LOWORD(v37.x) = v29;\n    b = a7->b;\n    v39 = *(_WORD *)&a7->r;\n    v31 = (float)((float)(1.0 - (float)((float)(v28 - 0.80000001) / 0.2)) * 0.30000001) + 0.69999999;\n    v32 = 1.0 - v31;\n    v33 = fminf((float)((float)b * (float)(1.0 - v31)) + (float)((float)a1->m_lightBGColor.b * v31), 255.0);\n    if ( v33 < 0.0 )\n      v33 = 0.0;\n    v34 = fminf((float)((float)HIBYTE(v39) * v32) + (float)((float)HIBYTE(v29) * v31), 255.0);\n    if ( v34 < 0.0 )\n      v34 = 0.0;\n    v35 = fminf((float)((float)(unsigned __int8)v39 * v32) + (float)((float)(unsigned __int8)v29 * v31), 255.0);\n    if ( v35 >= 0.0 )\n      v14 = v35;\n    p_m_lightBGColor = (cocos2d::ccColor3B *)&v39;\n    LOBYTE(v39) = (int)v14;\n    HIBYTE(v39) = (int)v34;\n    v40 = (int)v33;\n  }\n  a2->setGlowColor(a2, p_m_lightBGColor);\n}", "assembly": "; \n; PlayLayer::updateInvisibleBlock from 0x1403b03b0 to 0x1403b0741 (913 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::updateVisibility @ 0x1403b0134\n; > <???> @ 0x14069972c\n; > <???> @ 0x140699784\n; > <???> @ 0x1406d6d28\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     r11, rsp                                                       ; +0x0, 0x1403b03b0\npush    rsi                                                            ; +0x3, 0x1403b03b3\npush    rdi                                                            ; +0x4, 0x1403b03b4\nsub     rsp, 88h                                                       ; +0x5, 0x1403b03b5\nmov     rax, [rdx]                                                     ; +0xc, 0x1403b03bc\nmov     rdi, rdx                                                       ; +0xf, 0x1403b03bf\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0x12, 0x1403b03c2\nlea     rdx, [r11+10h]                                                 ; +0x17, 0x1403b03c7\nmovaps  xmmword ptr [r11-58h], xmm9                                    ; +0x1b, 0x1403b03cb\nmov     rsi, rcx                                                       ; +0x20, 0x1403b03d0\nmovaps  xmmword ptr [r11-68h], xmm10                                   ; +0x23, 0x1403b03d3\nmov     rcx, rdi                                                       ; +0x28, 0x1403b03d8\nmov     [r11-18h], r14                                                 ; +0x2b, 0x1403b03db\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x2f, 0x1403b03df\nmovaps  xmm7, xmm2                                                     ; +0x34, 0x1403b03e4\nmovaps  xmmword ptr [r11-48h], xmm8                                    ; +0x37, 0x1403b03e7\nmovaps  xmmword ptr [r11-78h], xmm11                                   ; +0x3c, 0x1403b03ec\nmovaps  xmm11, xmm3                                                    ; +0x41, 0x1403b03f1\ncall    qword ptr [rax+4A8h]                                           ; +0x45, 0x1403b03f5\nmovss   xmm0, [rsp+98h+arg_8]                                          ; +0x4b, 0x1403b03fb\ncomiss  xmm0, dword ptr [rsi+3264h]                                    ; +0x54, 0x1403b0404\nmovss   xmm1, dword ptr [rdi+354h]                                     ; +0x5b, 0x1403b040b\njbe     short loc_1403B041B                                            ; +0x63, 0x1403b0413\nsubss   xmm0, xmm1                                                     ; +0x65, 0x1403b0415\njmp     short loc_1403B041F                                            ; +0x69, 0x1403b0419\naddss   xmm0, xmm1                                                     ; +0x6b, 0x1403b041b\nlea     rdx, [rsp+98h+arg_8]                                           ; +0x6f, 0x1403b041f\nmovss   [rsp+98h+arg_8], xmm0                                          ; +0x77, 0x1403b0427\nlea     rcx, [rsp+98h+arg_0]                                           ; +0x80, 0x1403b0430\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x88, 0x1403b0438\nmovss   xmm1, dword ptr [rsi+3268h]                                    ; +0x8e, 0x1403b043e\nxorps   xmm6, xmm6                                                     ; +0x96, 0x1403b0446\nmovss   xmm2, dword ptr [rsi+50Ch]                                     ; +0x99, 0x1403b0449\nmovaps  xmm3, xmm1                                                     ; +0xa1, 0x1403b0451\naddss   xmm3, xmm2                                                     ; +0xa4, 0x1403b0454\nmovss   xmm0, dword ptr [rax]                                          ; +0xa8, 0x1403b0458\ncomiss  xmm0, xmm3                                                     ; +0xac, 0x1403b045c\njbe     short loc_1403B0477                                            ; +0xaf, 0x1403b045f\nmovss   xmm3, cs:dword_1406229C0                                       ; +0xb1, 0x1403b0461\nsubss   xmm0, xmm6                                                     ; +0xb9, 0x1403b0469\nsubss   xmm0, xmm2                                                     ; +0xbd, 0x1403b046d\nsubss   xmm0, xmm1                                                     ; +0xc1, 0x1403b0471\njmp     short loc_1403B048A                                            ; +0xc5, 0x1403b0475\nsubss   xmm3, xmm0                                                     ; +0xc7, 0x1403b0477\nmovaps  xmm0, xmm3                                                     ; +0xcb, 0x1403b047b\nmovss   xmm3, cs:dword_1406229B0                                       ; +0xce, 0x1403b047e\nsubss   xmm0, xmm6                                                     ; +0xd6, 0x1403b0486\nmovss   xmm10, cs:flt_140622C24                                        ; +0xda, 0x1403b048a\nsubss   xmm1, xmm0                                                     ; +0xe3, 0x1403b0493\nmulss   xmm1, xmm3                                                     ; +0xe7, 0x1403b0497\ncomiss  xmm6, xmm1                                                     ; +0xeb, 0x1403b049b\njbe     short loc_1403B04A6                                            ; +0xee, 0x1403b049e\nxorps   xmm8, xmm8                                                     ; +0xf0, 0x1403b04a0\njmp     short loc_1403B04AF                                            ; +0xf4, 0x1403b04a4\nmovaps  xmm8, xmm10                                                    ; +0xf6, 0x1403b04a6\nminss   xmm8, xmm1                                                     ; +0xfa, 0x1403b04aa\nmovss   xmm1, [rsp+98h+arg_8]                                          ; +0xff, 0x1403b04af\nmovaps  xmm0, xmm2                                                     ; +0x108, 0x1403b04b8\nmovss   xmm9, cs:dword_140623418                                       ; +0x10b, 0x1403b04bb\naddss   xmm0, xmm7                                                     ; +0x114, 0x1403b04c4\nmulss   xmm8, xmm9                                                     ; +0x118, 0x1403b04c8\ncomiss  xmm1, xmm0                                                     ; +0x11d, 0x1403b04cd\njbe     short loc_1403B04E5                                            ; +0x120, 0x1403b04d0\nmovss   xmm0, [rsp+98h+arg_20]                                         ; +0x122, 0x1403b04d2\nsubss   xmm1, xmm2                                                     ; +0x12b, 0x1403b04db\nsubss   xmm1, xmm7                                                     ; +0x12f, 0x1403b04df\njmp     short loc_1403B04FA                                            ; +0x133, 0x1403b04e3\nmovss   xmm0, [rsp+98h+arg_28]                                         ; +0x135, 0x1403b04e5\naddss   xmm2, xmm11                                                    ; +0x13e, 0x1403b04ee\nsubss   xmm2, xmm1                                                     ; +0x143, 0x1403b04f3\nmovaps  xmm1, xmm2                                                     ; +0x147, 0x1403b04f7\nmovaps  xmm11, [rsp+98h+var_78]                                        ; +0x14a, 0x1403b04fa\nmaxss   xmm0, xmm10                                                    ; +0x150, 0x1403b0500\nmovaps  xmm7, xmm10                                                    ; +0x155, 0x1403b0505\ndivss   xmm1, xmm0                                                     ; +0x159, 0x1403b0509\nminss   xmm7, xmm1                                                     ; +0x15d, 0x1403b050d\ncomiss  xmm6, xmm7                                                     ; +0x161, 0x1403b0511\njbe     short loc_1403B0519                                            ; +0x164, 0x1403b0514\nxorps   xmm7, xmm7                                                     ; +0x166, 0x1403b0516\nmov     rax, [rdi+140h]                                                ; +0x169, 0x1403b0519\nlea     rcx, [rdi+140h]                                                ; +0x170, 0x1403b0520\nmovaps  xmm0, xmm7                                                     ; +0x177, 0x1403b0527\nmulss   xmm0, cs:dword_140622BF4                                       ; +0x17a, 0x1403b052a\naddss   xmm0, cs:dword_1406229EC                                       ; +0x182, 0x1403b0532\nmulss   xmm0, xmm9                                                     ; +0x18a, 0x1403b053a\nminss   xmm0, xmm8                                                     ; +0x18f, 0x1403b053f\ncvttss2si edx, xmm0                                                    ; +0x194, 0x1403b0544\ncall    qword ptr [rax+28h]                                            ; +0x198, 0x1403b0548\nmov     rcx, [rdi+2F0h]                                                ; +0x19b, 0x1403b054b\ntest    rcx, rcx                                                       ; +0x1a2, 0x1403b0552\njz      short loc_1403B05BE                                            ; +0x1a5, 0x1403b0555\nmulss   xmm7, cs:dword_140622BC4                                       ; +0x1a7, 0x1403b0557\nadd     rcx, 140h                                                      ; +0x1af, 0x1403b055f\nmov     [rsp+98h+arg_18], rbx                                          ; +0x1b6, 0x1403b0566\naddss   xmm7, cs:dword_140622A50                                       ; +0x1be, 0x1403b056e\nmulss   xmm7, xmm9                                                     ; +0x1c6, 0x1403b0576\nminss   xmm7, xmm8                                                     ; +0x1cb, 0x1403b057b\ncvttss2si eax, xmm7                                                    ; +0x1d0, 0x1403b0580\nmovzx   edx, al                                                        ; +0x1d4, 0x1403b0584\nmov     rax, [rcx]                                                     ; +0x1d7, 0x1403b0587\nmovd    xmm0, edx                                                      ; +0x1da, 0x1403b058a\ncvtdq2ps xmm0, xmm0                                                    ; +0x1de, 0x1403b058e\nmulss   xmm0, dword ptr [rdi+43Ch]                                     ; +0x1e1, 0x1403b0591\ncvttss2si ebx, xmm0                                                    ; +0x1e9, 0x1403b0599\nmovzx   edx, bl                                                        ; +0x1ed, 0x1403b059d\ncall    qword ptr [rax+28h]                                            ; +0x1f0, 0x1403b05a0\nmov     rcx, [rdi+2F0h]                                                ; +0x1f3, 0x1403b05a3\nmovzx   edx, bl                                                        ; +0x1fa, 0x1403b05aa\nmov     rax, [rcx]                                                     ; +0x1fd, 0x1403b05ad\ncall    qword ptr [rax+3A8h]                                           ; +0x200, 0x1403b05b0\nmov     rbx, [rsp+98h+arg_18]                                          ; +0x206, 0x1403b05b6\nmov     rax, [rdi+140h]                                                ; +0x20e, 0x1403b05be\nlea     rcx, [rdi+140h]                                                ; +0x215, 0x1403b05c5\ncall    qword ptr [rax+20h]                                            ; +0x21c, 0x1403b05cc\nmovss   xmm1, cs:dword_140622BA4                                       ; +0x21f, 0x1403b05cf\nmovaps  xmm8, [rsp+98h+var_48]                                         ; +0x227, 0x1403b05d7\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x22d, 0x1403b05dd\nmov     r14, [rsp+98h+var_18]                                          ; +0x232, 0x1403b05e2\nmovzx   eax, al                                                        ; +0x23a, 0x1403b05ea\nmovd    xmm0, eax                                                      ; +0x23d, 0x1403b05ed\ncvtdq2ps xmm0, xmm0                                                    ; +0x241, 0x1403b05f1\ndivss   xmm0, xmm9                                                     ; +0x244, 0x1403b05f4\ncomiss  xmm0, xmm1                                                     ; +0x249, 0x1403b05f9\njbe     loc_1403B0713                                                  ; +0x24c, 0x1403b05fc\nmov     rax, [rsp+98h+arg_30]                                          ; +0x252, 0x1403b0602\nsubss   xmm0, xmm1                                                     ; +0x25a, 0x1403b060a\nmovzx   ecx, word ptr [rsi+32A0h]                                      ; +0x25e, 0x1403b060e\nxorps   xmm3, xmm3                                                     ; +0x265, 0x1403b0615\nxorps   xmm4, xmm4                                                     ; +0x268, 0x1403b0618\nmov     word ptr [rsp+98h+arg_0], cx                                   ; +0x26b, 0x1403b061b\nxorps   xmm2, xmm2                                                     ; +0x273, 0x1403b0623\nmovaps  xmm1, xmm10                                                    ; +0x276, 0x1403b0626\nmovzx   edx, word ptr [rax]                                            ; +0x27a, 0x1403b062a\ndivss   xmm0, cs:dword_140622A74                                       ; +0x27d, 0x1403b062d\nmovzx   r8d, byte ptr [rax+2]                                          ; +0x285, 0x1403b0635\nmovzx   eax, dl                                                        ; +0x28a, 0x1403b063a\nmov     [rsp+98h+arg_10], dx                                           ; +0x28d, 0x1403b063d\ncvtsi2ss xmm3, eax                                                     ; +0x295, 0x1403b0645\nmovzx   eax, cl                                                        ; +0x299, 0x1403b0649\nsubss   xmm1, xmm0                                                     ; +0x29c, 0x1403b064c\nxorps   xmm0, xmm0                                                     ; +0x2a0, 0x1403b0650\ncvtsi2ss xmm0, eax                                                     ; +0x2a3, 0x1403b0653\nmovzx   eax, byte ptr [rsp+98h+arg_10+1]                               ; +0x2a7, 0x1403b0657\nmulss   xmm1, cs:dword_140622AA0                                       ; +0x2af, 0x1403b065f\ncvtsi2ss xmm2, eax                                                     ; +0x2b7, 0x1403b0667\nmovzx   eax, byte ptr [rsp+98h+arg_0+1]                                ; +0x2bb, 0x1403b066b\naddss   xmm1, cs:dword_140622B74                                       ; +0x2c3, 0x1403b0673\ncvtsi2ss xmm4, r8d                                                     ; +0x2cb, 0x1403b067b\nmulss   xmm0, xmm1                                                     ; +0x2d0, 0x1403b0680\nsubss   xmm10, xmm1                                                    ; +0x2d4, 0x1403b0684\nmulss   xmm4, xmm10                                                    ; +0x2d9, 0x1403b0689\nmulss   xmm3, xmm10                                                    ; +0x2de, 0x1403b068e\nmulss   xmm2, xmm10                                                    ; +0x2e3, 0x1403b0693\naddss   xmm3, xmm0                                                     ; +0x2e8, 0x1403b0698\nxorps   xmm0, xmm0                                                     ; +0x2ec, 0x1403b069c\ncvtsi2ss xmm0, eax                                                     ; +0x2ef, 0x1403b069f\nmovzx   eax, byte ptr [rsi+32A2h]                                      ; +0x2f3, 0x1403b06a3\nmulss   xmm0, xmm1                                                     ; +0x2fa, 0x1403b06aa\naddss   xmm2, xmm0                                                     ; +0x2fe, 0x1403b06ae\nxorps   xmm0, xmm0                                                     ; +0x302, 0x1403b06b2\ncvtsi2ss xmm0, eax                                                     ; +0x305, 0x1403b06b5\nmulss   xmm0, xmm1                                                     ; +0x309, 0x1403b06b9\naddss   xmm4, xmm0                                                     ; +0x30d, 0x1403b06bd\nminss   xmm4, xmm9                                                     ; +0x311, 0x1403b06c1\ncomiss  xmm6, xmm4                                                     ; +0x316, 0x1403b06c6\njbe     short loc_1403B06CE                                            ; +0x319, 0x1403b06c9\nxorps   xmm4, xmm4                                                     ; +0x31b, 0x1403b06cb\nminss   xmm2, xmm9                                                     ; +0x31e, 0x1403b06ce\ncomiss  xmm6, xmm2                                                     ; +0x323, 0x1403b06d3\njbe     short loc_1403B06DB                                            ; +0x326, 0x1403b06d6\nxorps   xmm2, xmm2                                                     ; +0x328, 0x1403b06d8\nminss   xmm3, xmm9                                                     ; +0x32b, 0x1403b06db\ncomiss  xmm6, xmm3                                                     ; +0x330, 0x1403b06e0\nja      short loc_1403B06E8                                            ; +0x333, 0x1403b06e3\nmovaps  xmm6, xmm3                                                     ; +0x335, 0x1403b06e5\ncvttss2si eax, xmm6                                                    ; +0x338, 0x1403b06e8\nlea     rdx, [rsp+98h+arg_10]                                          ; +0x33c, 0x1403b06ec\nmov     byte ptr [rsp+98h+arg_10], al                                  ; +0x344, 0x1403b06f4\ncvttss2si eax, xmm2                                                    ; +0x34b, 0x1403b06fb\nmov     byte ptr [rsp+98h+arg_10+1], al                                ; +0x34f, 0x1403b06ff\ncvttss2si eax, xmm4                                                    ; +0x356, 0x1403b0706\nmov     [rsp+98h+arg_12], al                                           ; +0x35a, 0x1403b070a\njmp     short loc_1403B071A                                            ; +0x361, 0x1403b0711\nlea     rdx, [rsi+32A0h]                                               ; +0x363, 0x1403b0713\nmov     rax, [rdi]                                                     ; +0x36a, 0x1403b071a\nmov     rcx, rdi                                                       ; +0x36d, 0x1403b071d\ncall    qword ptr [rax+538h]                                           ; +0x370, 0x1403b0720\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x376, 0x1403b0726\nmovaps  xmm9, [rsp+98h+var_58]                                         ; +0x37b, 0x1403b072b\nmovaps  xmm10, [rsp+98h+var_68]                                        ; +0x381, 0x1403b0731\nadd     rsp, 88h                                                       ; +0x387, 0x1403b0737\npop     rdi                                                            ; +0x38e, 0x1403b073e\npop     rsi                                                            ; +0x38f, 0x1403b073f\nretn                                                                   ; +0x390, 0x1403b0740", "xrefs": ["PlayLayer::updateVisibility @ 0x1403b0134", "<???> @ 0x14069972c", "<???> @ 0x140699784", "<???> @ 0x1406d6d28"], "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"}