{"type": "func", "start": 6442637504, "end": 6442638167, "name": "cocos2d::CCLens3D::update", "pseudocode": "// \n// cocos2d::CCLens3D::update from 0x18002d8c0 to 0x18002db57 (663 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800e8a28\n// > <???> @ 0x180134c6c\n// > <???> @ 0x180134cbc\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801afdd8\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 cocos2d::CCLens3D::update(cocos2d::CCLens3D *this, float a2)\n{\n  int v3; // esi\n  float v4; // xmm11_4\n  int v5; // edi\n  float v6; // xmm8_4\n  const struct cocos2d::CCPoint *v7; // rax\n  float *v8; // rax\n  float Length; // xmm0_4\n  float v10; // xmm6_4\n  float v11; // xmm0_4\n  float v12; // xmm0_4\n  float v13; // xmm7_4\n  _DWORD *v14; // rax\n  float v15; // xmm6_4\n  float v16; // xmm0_4\n  const struct cocos2d::CCPoint *v17; // rax\n  cocos2d::CCPoint v18; // [rsp+20h] [rbp-D8h] BYREF\n  cocos2d::CCPoint v19; // [rsp+28h] [rbp-D0h] BYREF\n  float v20; // [rsp+30h] [rbp-C8h] BYREF\n  float v21; // [rsp+38h] [rbp-C0h] BYREF\n  _BYTE v22[8]; // [rsp+40h] [rbp-B8h] BYREF\n  float v23; // [rsp+48h] [rbp-B0h] BYREF\n  struct cocos2d::_ccVertex3F v24; // [rsp+50h] [rbp-A8h] BYREF\n\n  if ( *((_BYTE *)this + 121) )\n  {\n    v3 = 0;\n    if ( (float)(*((float *)this + 24) + 1.0) > 0.0 )\n    {\n      v4 = 0.0;\n      do\n      {\n        v5 = 0;\n        if ( (float)(*((float *)this + 25) + 1.0) > 0.0 )\n        {\n          v6 = 0.0;\n          do\n          {\n            v7 = (const struct cocos2d::CCPoint *)kmVec2Fill(&v20, v4, v6);\n            cocos2d::CCGrid3DAction::originalVertex(this, &v24, v7);\n            v8 = kmVec2Fill(&v21, v24.x, v24.y);\n            cocos2d::CCSize::operator-((float *)this + 26, (float *)&v18, v8);\n            Length = cocos2d::CCPoint::getLength(&v18);\n            v10 = *((float *)this + 28);\n            if ( v10 > Length )\n            {\n              v11 = (float)(v10 - Length) / v10;\n              if ( v11 == 0.0 )\n                v11 = 0.001;\n              v12 = logf(v11);\n              v13 = expf(v12 * *((float *)this + 29)) * v10;\n              if ( cocos2d::CCPoint::getLength(&v18) > 0.0 )\n              {\n                v14 = (_DWORD *)cocos2d::ccpNormalize((cocos2d *)v22, &v18);\n                cocos2d::CCSize::operator=(&v18, v14);\n                cocos2d::CCSize::operator*((float *)&v18, (float *)&v19, v13);\n                if ( *((_BYTE *)this + 120) )\n                  v15 = -1.0;\n                else\n                  v15 = 1.0;\n                v16 = cocos2d::CCPoint::getLength(&v19);\n                v24.z = v24.z + (float)((float)(v16 * v15) * *((float *)this + 29));\n              }\n            }\n            v17 = (const struct cocos2d::CCPoint *)kmVec2Fill(&v23, v4, v6);\n            cocos2d::CCGrid3DAction::setVertex(this, v17, &v24);\n            v6 = (float)++v5;\n          }\n          while ( (float)(*((float *)this + 25) + 1.0) > (float)v5 );\n        }\n        v4 = (float)++v3;\n      }\n      while ( (float)(*((float *)this + 24) + 1.0) > (float)v3 );\n    }\n    *((_BYTE *)this + 121) = 0;\n  }\n}", "assembly": "; \n; cocos2d::CCLens3D::update from 0x18002d8c0 to 0x18002db57 (663 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800e8a28\n; > <???> @ 0x180134c6c\n; > <???> @ 0x180134cbc\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801afdd8\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, 0x18002d8c0\npush    rbx                                                            ; +0x3, 0x18002d8c3\nsub     rsp, 0F0h                                                      ; +0x4, 0x18002d8c4\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x18002d8cb\nxor     rax, rsp                                                       ; +0x12, 0x18002d8d2\nmov     [rsp+0F8h+var_98], rax                                         ; +0x15, 0x18002d8d5\ncmp     byte ptr [rcx+79h], 0                                          ; +0x1a, 0x18002d8da\nmov     rbx, rcx                                                       ; +0x1e, 0x18002d8de\njz      loc_18002DB41                                                  ; +0x21, 0x18002d8e1\nmovss   xmm0, dword ptr [rcx+60h]                                      ; +0x27, 0x18002d8e7\nmov     [r11+18h], rsi                                                 ; +0x2c, 0x18002d8ec\nxor     esi, esi                                                       ; +0x30, 0x18002d8f0\nmovaps  xmmword ptr [r11-48h], xmm9                                    ; +0x32, 0x18002d8f2\nmovss   xmm9, cs:flt_1800E61A8                                         ; +0x37, 0x18002d8f7\naddss   xmm0, xmm9                                                     ; +0x40, 0x18002d900\nmovaps  xmmword ptr [r11-58h], xmm10                                   ; +0x45, 0x18002d905\nxorps   xmm10, xmm10                                                   ; +0x4a, 0x18002d90a\ncomiss  xmm0, xmm10                                                    ; +0x4e, 0x18002d90e\njbe     loc_18002DB23                                                  ; +0x52, 0x18002d912\nmov     [r11+10h], rbp                                                 ; +0x58, 0x18002d918\nmov     [r11+20h], rdi                                                 ; +0x5c, 0x18002d91c\nmovaps  xmmword ptr [r11-18h], xmm6                                    ; +0x60, 0x18002d920\nmovaps  xmmword ptr [r11-28h], xmm7                                    ; +0x65, 0x18002d925\nmovaps  xmmword ptr [r11-38h], xmm8                                    ; +0x6a, 0x18002d92a\nmovaps  xmmword ptr [r11-68h], xmm11                                   ; +0x6f, 0x18002d92f\nxorps   xmm11, xmm11                                                   ; +0x74, 0x18002d934\nmovaps  xmmword ptr [r11-78h], xmm12                                   ; +0x78, 0x18002d938\nmovss   xmm12, cs:flt_1800E83F0                                        ; +0x7d, 0x18002d93d\nmovaps  [rsp+0F8h+var_88], xmm13                                       ; +0x86, 0x18002d946\nmovss   xmm13, cs:dword_1800E6B20                                      ; +0x8c, 0x18002d94c\nnop     word ptr [rax+rax+00000000h]                                   ; +0x95, 0x18002d955\nmovss   xmm0, dword ptr [rbx+64h]                                      ; +0xa0, 0x18002d960\nxor     edi, edi                                                       ; +0xa5, 0x18002d965\naddss   xmm0, xmm9                                                     ; +0xa7, 0x18002d967\ncomiss  xmm0, xmm10                                                    ; +0xac, 0x18002d96c\njbe     loc_18002DAC3                                                  ; +0xb0, 0x18002d970\nmovaps  xmm8, xmm10                                                    ; +0xb6, 0x18002d976\nnop     word ptr [rax+rax+00h]                                         ; +0xba, 0x18002d97a\nmovaps  xmm2, xmm8                                                     ; +0xc0, 0x18002d980\nlea     rcx, [rsp+0F8h+var_C8]                                         ; +0xc4, 0x18002d984\nmovaps  xmm1, xmm11                                                    ; +0xc9, 0x18002d989\ncall    kmVec2Fill                                                     ; +0xcd, 0x18002d98d\nmov     r8, rax                                                        ; +0xd2, 0x18002d992\nlea     rdx, [rsp+0F8h+var_A8]                                         ; +0xd5, 0x18002d995\nmov     rcx, rbx                                                       ; +0xda, 0x18002d99a\ncall    ?originalVertex@CCGrid3DAction@cocos2d@@QEAA?AU_ccVertex3F@2@AEBVCCPoint@2@@Z; cocos2d::CCGrid3DAction::originalVertex(cocos2d::CCPoint const &) ; +0xdd, 0x18002d99d\nmovss   xmm2, [rsp+0F8h+var_A4]                                        ; +0xe2, 0x18002d9a2\nlea     rcx, [rsp+0F8h+var_C0]                                         ; +0xe8, 0x18002d9a8\nmovss   xmm1, [rsp+0F8h+var_A8]                                        ; +0xed, 0x18002d9ad\ncall    kmVec2Fill                                                     ; +0xf3, 0x18002d9b3\nmov     r8, rax                                                        ; +0xf8, 0x18002d9b8\nlea     rdx, [rsp+0F8h+var_D8]                                         ; +0xfb, 0x18002d9bb\nlea     rcx, [rbx+68h]                                                 ; +0x100, 0x18002d9c0\ncall    ??GCCSize@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCSize::operator-(cocos2d::CCSize const &) ; +0x104, 0x18002d9c4\nlea     rcx, [rsp+0F8h+var_D8]; this                                   ; +0x109, 0x18002d9c9\ncall    ?getLength@CCPoint@cocos2d@@QEBAMXZ; cocos2d::CCPoint::getLength(void) ; +0x10e, 0x18002d9ce\nmovss   xmm6, dword ptr [rbx+70h]                                      ; +0x113, 0x18002d9d3\nmovaps  xmm1, xmm0                                                     ; +0x118, 0x18002d9d8\ncomiss  xmm6, xmm1                                                     ; +0x11b, 0x18002d9db\njbe     loc_18002DA82                                                  ; +0x11e, 0x18002d9de\nmovaps  xmm0, xmm6                                                     ; +0x124, 0x18002d9e4\nsubss   xmm0, xmm1                                                     ; +0x127, 0x18002d9e7\ndivss   xmm0, xmm6                                                     ; +0x12b, 0x18002d9eb\nucomiss xmm0, xmm10                                                    ; +0x12f, 0x18002d9ef\njp      short loc_18002D9FB                                            ; +0x133, 0x18002d9f3\njnz     short loc_18002D9FB                                            ; +0x135, 0x18002d9f5\nmovaps  xmm0, xmm12; X                                                 ; +0x137, 0x18002d9f7\ncall    logf                                                           ; +0x13b, 0x18002d9fb\nmulss   xmm0, dword ptr [rbx+74h]; X                                   ; +0x140, 0x18002da00\ncall    expf                                                           ; +0x145, 0x18002da05\nmovaps  xmm7, xmm0                                                     ; +0x14a, 0x18002da0a\nlea     rcx, [rsp+0F8h+var_D8]; this                                   ; +0x14d, 0x18002da0d\nmulss   xmm7, xmm6                                                     ; +0x152, 0x18002da12\ncall    ?getLength@CCPoint@cocos2d@@QEBAMXZ; cocos2d::CCPoint::getLength(void) ; +0x156, 0x18002da16\ncomiss  xmm0, xmm10                                                    ; +0x15b, 0x18002da1b\njbe     short loc_18002DA82                                            ; +0x15f, 0x18002da1f\nlea     rdx, [rsp+0F8h+var_D8]                                         ; +0x161, 0x18002da21\nlea     rcx, [rsp+0F8h+var_B8]                                         ; +0x166, 0x18002da26\ncall    ?ccpNormalize@cocos2d@@YA?AVCCPoint@1@AEBV21@@Z; cocos2d::ccpNormalize(cocos2d::CCPoint const &) ; +0x16b, 0x18002da2b\nmov     rdx, rax                                                       ; +0x170, 0x18002da30\nlea     rcx, [rsp+0F8h+var_D8]                                         ; +0x173, 0x18002da33\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x178, 0x18002da38\nmovaps  xmm2, xmm7                                                     ; +0x17d, 0x18002da3d\nlea     rdx, [rsp+0F8h+var_D0]                                         ; +0x180, 0x18002da40\nlea     rcx, [rsp+0F8h+var_D8]                                         ; +0x185, 0x18002da45\ncall    ??DCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator*(float) ; +0x18a, 0x18002da4a\ncmp     byte ptr [rbx+78h], 0                                          ; +0x18f, 0x18002da4f\njz      short loc_18002DA5B                                            ; +0x193, 0x18002da53\nmovaps  xmm6, xmm13                                                    ; +0x195, 0x18002da55\njmp     short loc_18002DA5F                                            ; +0x199, 0x18002da59\nmovaps  xmm6, xmm9                                                     ; +0x19b, 0x18002da5b\nlea     rcx, [rsp+0F8h+var_D0]; this                                   ; +0x19f, 0x18002da5f\ncall    ?getLength@CCPoint@cocos2d@@QEBAMXZ; cocos2d::CCPoint::getLength(void) ; +0x1a4, 0x18002da64\nmovss   xmm1, [rsp+0F8h+var_A0]                                        ; +0x1a9, 0x18002da69\nmulss   xmm0, xmm6                                                     ; +0x1af, 0x18002da6f\nmulss   xmm0, dword ptr [rbx+74h]                                      ; +0x1b3, 0x18002da73\naddss   xmm1, xmm0                                                     ; +0x1b8, 0x18002da78\nmovss   [rsp+0F8h+var_A0], xmm1                                        ; +0x1bc, 0x18002da7c\nmovaps  xmm2, xmm8                                                     ; +0x1c2, 0x18002da82\nlea     rcx, [rsp+0F8h+var_B0]                                         ; +0x1c6, 0x18002da86\nmovaps  xmm1, xmm11                                                    ; +0x1cb, 0x18002da8b\ncall    kmVec2Fill                                                     ; +0x1cf, 0x18002da8f\nmov     rdx, rax; struct cocos2d::CCPoint *                            ; +0x1d4, 0x18002da94\nlea     r8, [rsp+0F8h+var_A8]; struct cocos2d::_ccVertex3F *           ; +0x1d7, 0x18002da97\nmov     rcx, rbx; this                                                 ; +0x1dc, 0x18002da9c\ncall    ?setVertex@CCGrid3DAction@cocos2d@@QEAAXAEBVCCPoint@2@AEBU_ccVertex3F@2@@Z; cocos2d::CCGrid3DAction::setVertex(cocos2d::CCPoint const &,cocos2d::_ccVertex3F const &) ; +0x1df, 0x18002da9f\nmovss   xmm0, dword ptr [rbx+64h]                                      ; +0x1e4, 0x18002daa4\ninc     edi                                                            ; +0x1e9, 0x18002daa9\naddss   xmm0, xmm9                                                     ; +0x1eb, 0x18002daab\nmovd    xmm8, edi                                                      ; +0x1f0, 0x18002dab0\ncvtdq2ps xmm8, xmm8                                                    ; +0x1f5, 0x18002dab5\ncomiss  xmm0, xmm8                                                     ; +0x1f9, 0x18002dab9\nja      loc_18002D980                                                  ; +0x1fd, 0x18002dabd\nmovss   xmm0, dword ptr [rbx+60h]                                      ; +0x203, 0x18002dac3\ninc     esi                                                            ; +0x208, 0x18002dac8\naddss   xmm0, xmm9                                                     ; +0x20a, 0x18002daca\nmovd    xmm11, esi                                                     ; +0x20f, 0x18002dacf\ncvtdq2ps xmm11, xmm11                                                  ; +0x214, 0x18002dad4\ncomiss  xmm0, xmm11                                                    ; +0x218, 0x18002dad8\nja      loc_18002D960                                                  ; +0x21c, 0x18002dadc\nmovaps  xmm13, [rsp+0F8h+var_88]                                       ; +0x222, 0x18002dae2\nmovaps  xmm12, [rsp+0F8h+var_78]                                       ; +0x228, 0x18002dae8\nmovaps  xmm11, [rsp+0F8h+var_68]                                       ; +0x231, 0x18002daf1\nmovaps  xmm8, [rsp+0F8h+var_38]                                        ; +0x23a, 0x18002dafa\nmovaps  xmm7, [rsp+0F8h+var_28]                                        ; +0x243, 0x18002db03\nmovaps  xmm6, [rsp+0F8h+var_18]                                        ; +0x24b, 0x18002db0b\nmov     rdi, [rsp+0F8h+arg_18]                                         ; +0x253, 0x18002db13\nmov     rbp, [rsp+0F8h+arg_8]                                          ; +0x25b, 0x18002db1b\nmovaps  xmm10, [rsp+0F8h+var_58]                                       ; +0x263, 0x18002db23\nmovaps  xmm9, [rsp+0F8h+var_48]                                        ; +0x26c, 0x18002db2c\nmov     rsi, [rsp+0F8h+arg_10]                                         ; +0x275, 0x18002db35\nmov     byte ptr [rbx+79h], 0                                          ; +0x27d, 0x18002db3d\nmov     rcx, [rsp+0F8h+var_98]                                         ; +0x281, 0x18002db41\nxor     rcx, rsp; StackCookie                                          ; +0x286, 0x18002db46\ncall    __security_check_cookie                                        ; +0x289, 0x18002db49\nadd     rsp, 0F0h                                                      ; +0x28e, 0x18002db4e\npop     rbx                                                            ; +0x295, 0x18002db55\nretn                                                                   ; +0x296, 0x18002db56", "xrefs": ["<???> @ 0x1800e8a28", "<???> @ 0x180134c6c", "<???> @ 0x180134cbc", "<???> @ 0x1801438a8", "<???> @ 0x1801afdd8"], "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"}