{"type": "func", "start": 6442683872, "end": 6442684631, "name": "cocos2d::CCPageTurn3D::update", "pseudocode": "// \n// cocos2d::CCPageTurn3D::update from 0x180038de0 to 0x1800390d7 (759 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800ea0b8\n// > <???> @ 0x1801363d8\n// > <???> @ 0x1801363e8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b0c60\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::CCPageTurn3D::update(cocos2d::CCPageTurn3D *this, float a2)\n{\n  float v4; // xmm1_4\n  float v5; // xmm13_4\n  float v6; // xmm6_4\n  float v7; // xmm6_4\n  float v8; // xmm12_4\n  int v9; // esi\n  float v10; // xmm11_4\n  int v11; // edi\n  float v12; // xmm9_4\n  const struct cocos2d::CCPoint *v13; // rax\n  float x; // xmm7_4\n  float v15; // xmm1_4\n  float v16; // xmm6_4\n  float v17; // xmm8_4\n  float v18; // xmm7_4\n  float v19; // xmm10_4\n  float v20; // xmm1_4\n  const struct cocos2d::CCPoint *v21; // rax\n  float v22; // [rsp+20h] [rbp-D8h]\n  float v23[2]; // [rsp+24h] [rbp-D4h] BYREF\n  float v24[3]; // [rsp+2Ch] [rbp-CCh] BYREF\n  struct cocos2d::_ccVertex3F v25; // [rsp+38h] [rbp-C0h] BYREF\n\n  v4 = fmaxf(0.0, a2 - 0.25);\n  v5 = -100.0 - (float)((float)(v4 * v4) * 500.0);\n  if ( a2 < 0.0 )\n    v6 = sqrtf(a2);\n  else\n    v6 = fsqrt(a2);\n  v7 = (float)(v6 * -1.5707964) + 1.5707964;\n  v8 = sinf(v7);\n  v9 = 0;\n  v22 = cosf(v7);\n  if ( *((float *)this + 24) >= 0.0 )\n  {\n    v10 = 0.0;\n    do\n    {\n      v11 = 0;\n      if ( *((float *)this + 25) >= 0.0 )\n      {\n        v12 = 0.0;\n        do\n        {\n          v13 = (const struct cocos2d::CCPoint *)kmVec2Fill(v23, v10, v12);\n          cocos2d::CCGrid3DAction::originalVertex(this, &v25, v13);\n          x = v25.x;\n          v15 = (float)((float)(v25.y - v5) * (float)(v25.y - v5)) + (float)(x * x);\n          if ( v15 < 0.0 )\n            v16 = sqrtf(v15);\n          else\n            v16 = fsqrt(v15);\n          v17 = v16 * v8;\n          v18 = asinf(x / v16) / v8;\n          v19 = cosf(v18);\n          if ( v18 > 3.141592653589793 )\n            v25.x = 0.0;\n          else\n            v25.x = sinf(v18) * v17;\n          v20 = (float)(1.0 - v19) * v17;\n          v25.y = (float)(v16 + v5) - (float)(v20 * v8);\n          v25.z = (float)(v20 * v22) / 7.0;\n          if ( v25.z < 0.5 )\n            v25.z = 0.5;\n          v21 = (const struct cocos2d::CCPoint *)kmVec2Fill(v24, v10, v12);\n          cocos2d::CCGrid3DAction::setVertex(this, v21, &v25);\n          v12 = (float)++v11;\n        }\n        while ( *((float *)this + 25) >= (float)v11 );\n      }\n      v10 = (float)++v9;\n    }\n    while ( *((float *)this + 24) >= (float)v9 );\n  }\n}", "assembly": "; \n; cocos2d::CCPageTurn3D::update from 0x180038de0 to 0x1800390d7 (759 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800ea0b8\n; > <???> @ 0x1801363d8\n; > <???> @ 0x1801363e8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b0c60\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     rax, rsp                                                       ; +0x0, 0x180038de0\nmov     [rax+20h], rbx                                                 ; +0x3, 0x180038de3\npush    rsi                                                            ; +0x7, 0x180038de7\nsub     rsp, 0F0h                                                      ; +0x8, 0x180038de8\nmovaps  xmmword ptr [rax-18h], xmm6                                    ; +0xf, 0x180038def\nmovaps  xmmword ptr [rax-78h], xmm12                                   ; +0x13, 0x180038df3\nmovaps  [rsp+0F8h+var_88], xmm13                                       ; +0x18, 0x180038df8\nmovaps  [rsp+0F8h+var_98], xmm14                                       ; +0x1e, 0x180038dfe\nmov     rax, cs:__security_cookie                                      ; +0x24, 0x180038e04\nxor     rax, rsp                                                       ; +0x2b, 0x180038e0b\nmov     [rsp+0F8h+var_B0], rax                                         ; +0x2e, 0x180038e0e\nmovss   xmm13, cs:dword_1800EA12C                                      ; +0x33, 0x180038e13\nmovaps  xmm0, xmm1                                                     ; +0x3c, 0x180038e1c\nsubss   xmm0, cs:dword_1800E83F4                                       ; +0x3f, 0x180038e1f\nmovaps  xmm2, xmm1                                                     ; +0x47, 0x180038e27\nmov     rbx, rcx                                                       ; +0x4a, 0x180038e2a\nxorps   xmm1, xmm1                                                     ; +0x4d, 0x180038e2d\nxorps   xmm14, xmm14                                                   ; +0x50, 0x180038e30\nmaxss   xmm1, xmm0                                                     ; +0x54, 0x180038e34\nxorps   xmm0, xmm0                                                     ; +0x58, 0x180038e38\nucomiss xmm0, xmm2                                                     ; +0x5b, 0x180038e3b\nmulss   xmm1, xmm1                                                     ; +0x5e, 0x180038e3e\nmulss   xmm1, cs:dword_1800EA124                                       ; +0x62, 0x180038e42\nsubss   xmm13, xmm1                                                    ; +0x6a, 0x180038e4a\nja      short loc_180038E5A                                            ; +0x6f, 0x180038e4f\nxorps   xmm6, xmm6                                                     ; +0x71, 0x180038e51\nsqrtss  xmm6, xmm2                                                     ; +0x74, 0x180038e54\njmp     short loc_180038E65                                            ; +0x78, 0x180038e58\nmovaps  xmm0, xmm2; X                                                  ; +0x7a, 0x180038e5a\ncall    sqrtf                                                          ; +0x7d, 0x180038e5d\nmovaps  xmm6, xmm0                                                     ; +0x82, 0x180038e62\nmulss   xmm6, cs:dword_1800EA128                                       ; +0x85, 0x180038e65\naddss   xmm6, cs:dword_1800E840C                                       ; +0x8d, 0x180038e6d\nmovaps  xmm0, xmm6; X                                                  ; +0x95, 0x180038e75\ncall    sinf                                                           ; +0x98, 0x180038e78\nmovaps  xmm12, xmm0                                                    ; +0x9d, 0x180038e7d\nmovaps  xmm0, xmm6; X                                                  ; +0xa1, 0x180038e81\ncall    cosf                                                           ; +0xa4, 0x180038e84\nmovss   xmm1, dword ptr [rbx+60h]                                      ; +0xa9, 0x180038e89\nxor     esi, esi                                                       ; +0xae, 0x180038e8e\ncomiss  xmm1, xmm14                                                    ; +0xb0, 0x180038e90\nmovss   [rsp+0F8h+var_D8], xmm0                                        ; +0xb4, 0x180038e94\njb      loc_1800390A4                                                  ; +0xba, 0x180038e9a\nmov     [rsp+0F8h+arg_10], rdi                                         ; +0xc0, 0x180038ea0\nmovaps  [rsp+0F8h+var_28], xmm7                                        ; +0xc8, 0x180038ea8\nmovaps  [rsp+0F8h+var_38], xmm8                                        ; +0xd0, 0x180038eb0\nmovaps  [rsp+0F8h+var_48], xmm9                                        ; +0xd9, 0x180038eb9\nmovaps  [rsp+0F8h+var_58], xmm10                                       ; +0xe2, 0x180038ec2\nmovaps  [rsp+0F8h+var_68], xmm11                                       ; +0xeb, 0x180038ecb\nxorps   xmm11, xmm11                                                   ; +0xf4, 0x180038ed4\nmovaps  [rsp+0F8h+var_A8], xmm15                                       ; +0xf8, 0x180038ed8\nmovss   xmm15, cs:flt_1800E61A8                                        ; +0xfe, 0x180038ede\nnop     word ptr [rax+rax+00000000h]                                   ; +0x107, 0x180038ee7\nmovss   xmm0, dword ptr [rbx+64h]                                      ; +0x110, 0x180038ef0\nxor     edi, edi                                                       ; +0x115, 0x180038ef5\ncomiss  xmm0, xmm14                                                    ; +0x117, 0x180038ef7\njb      loc_180039050                                                  ; +0x11b, 0x180038efb\nmovaps  xmm9, xmm14                                                    ; +0x121, 0x180038f01\nmovss   xmm14, cs:dword_1800E6308                                      ; +0x125, 0x180038f05\nxchg    ax, ax                                                         ; +0x12e, 0x180038f0e\nmovaps  xmm2, xmm9                                                     ; +0x130, 0x180038f10\nlea     rcx, [rsp+0F8h+var_D4]                                         ; +0x134, 0x180038f14\nmovaps  xmm1, xmm11                                                    ; +0x139, 0x180038f19\ncall    kmVec2Fill                                                     ; +0x13d, 0x180038f1d\nmov     r8, rax                                                        ; +0x142, 0x180038f22\nlea     rdx, [rsp+0F8h+var_C0]                                         ; +0x145, 0x180038f25\nmov     rcx, rbx                                                       ; +0x14a, 0x180038f2a\ncall    ?originalVertex@CCGrid3DAction@cocos2d@@QEAA?AU_ccVertex3F@2@AEBVCCPoint@2@@Z; cocos2d::CCGrid3DAction::originalVertex(cocos2d::CCPoint const &) ; +0x14d, 0x180038f2d\nmovss   xmm7, [rsp+0F8h+var_C0]                                        ; +0x152, 0x180038f32\nmovss   xmm1, [rsp+0F8h+var_BC]                                        ; +0x158, 0x180038f38\nmovaps  xmm0, xmm7                                                     ; +0x15e, 0x180038f3e\nsubss   xmm1, xmm13                                                    ; +0x161, 0x180038f41\nmulss   xmm0, xmm7                                                     ; +0x166, 0x180038f46\nmulss   xmm1, xmm1                                                     ; +0x16a, 0x180038f4a\naddss   xmm1, xmm0                                                     ; +0x16e, 0x180038f4e\nxorps   xmm0, xmm0                                                     ; +0x172, 0x180038f52\nucomiss xmm0, xmm1                                                     ; +0x175, 0x180038f55\nja      short loc_180038F63                                            ; +0x178, 0x180038f58\nxorps   xmm6, xmm6                                                     ; +0x17a, 0x180038f5a\nsqrtss  xmm6, xmm1                                                     ; +0x17d, 0x180038f5d\njmp     short loc_180038F6E                                            ; +0x181, 0x180038f61\nmovaps  xmm0, xmm1; X                                                  ; +0x183, 0x180038f63\ncall    sqrtf                                                          ; +0x186, 0x180038f66\nmovaps  xmm6, xmm0                                                     ; +0x18b, 0x180038f6b\ndivss   xmm7, xmm6                                                     ; +0x18e, 0x180038f6e\nmovaps  xmm8, xmm6                                                     ; +0x192, 0x180038f72\nmovaps  xmm0, xmm7; X                                                  ; +0x196, 0x180038f76\nmulss   xmm8, xmm12                                                    ; +0x199, 0x180038f79\ncall    asinf                                                          ; +0x19e, 0x180038f7e\nmovaps  xmm7, xmm0                                                     ; +0x1a3, 0x180038f83\ndivss   xmm7, xmm12                                                    ; +0x1a6, 0x180038f86\nmovaps  xmm0, xmm7; X                                                  ; +0x1ab, 0x180038f8b\ncall    cosf                                                           ; +0x1ae, 0x180038f8e\nxorps   xmm1, xmm1                                                     ; +0x1b3, 0x180038f93\nmovaps  xmm10, xmm0                                                    ; +0x1b6, 0x180038f96\nmovsd   xmm0, cs:qword_1800EA118                                       ; +0x1ba, 0x180038f9a\ncvtss2sd xmm1, xmm7                                                    ; +0x1c2, 0x180038fa2\ncomisd  xmm0, xmm1                                                     ; +0x1c6, 0x180038fa6\njb      short loc_180038FC1                                            ; +0x1ca, 0x180038faa\nmovaps  xmm0, xmm7; X                                                  ; +0x1cc, 0x180038fac\ncall    sinf                                                           ; +0x1cf, 0x180038faf\nmulss   xmm0, xmm8                                                     ; +0x1d4, 0x180038fb4\nmovss   [rsp+0F8h+var_C0], xmm0                                        ; +0x1d9, 0x180038fb9\njmp     short loc_180038FC9                                            ; +0x1df, 0x180038fbf\nmov     [rsp+0F8h+var_C0], 0                                           ; +0x1e1, 0x180038fc1\nmovaps  xmm1, xmm15                                                    ; +0x1e9, 0x180038fc9\naddss   xmm6, xmm13                                                    ; +0x1ed, 0x180038fcd\nsubss   xmm1, xmm10                                                    ; +0x1f2, 0x180038fd2\nmulss   xmm1, xmm8                                                     ; +0x1f7, 0x180038fd7\nmovaps  xmm0, xmm1                                                     ; +0x1fc, 0x180038fdc\nmulss   xmm1, [rsp+0F8h+var_D8]                                        ; +0x1ff, 0x180038fdf\nmulss   xmm0, xmm12                                                    ; +0x205, 0x180038fe5\ndivss   xmm1, cs:dword_1800EA120                                       ; +0x20a, 0x180038fea\nsubss   xmm6, xmm0                                                     ; +0x212, 0x180038ff2\ncomiss  xmm14, xmm1                                                    ; +0x216, 0x180038ff6\nmovss   [rsp+0F8h+var_BC], xmm6                                        ; +0x21a, 0x180038ffa\nmovss   [rsp+0F8h+var_B8], xmm1                                        ; +0x220, 0x180039000\njbe     short loc_180039010                                            ; +0x226, 0x180039006\nmov     [rsp+0F8h+var_B8], 3F000000h                                   ; +0x228, 0x180039008\nmovaps  xmm2, xmm9                                                     ; +0x230, 0x180039010\nlea     rcx, [rsp+0F8h+var_CC]                                         ; +0x234, 0x180039014\nmovaps  xmm1, xmm11                                                    ; +0x239, 0x180039019\ncall    kmVec2Fill                                                     ; +0x23d, 0x18003901d\nmov     rdx, rax; struct cocos2d::CCPoint *                            ; +0x242, 0x180039022\nlea     r8, [rsp+0F8h+var_C0]; struct cocos2d::_ccVertex3F *           ; +0x245, 0x180039025\nmov     rcx, rbx; this                                                 ; +0x24a, 0x18003902a\ncall    ?setVertex@CCGrid3DAction@cocos2d@@QEAAXAEBVCCPoint@2@AEBU_ccVertex3F@2@@Z; cocos2d::CCGrid3DAction::setVertex(cocos2d::CCPoint const &,cocos2d::_ccVertex3F const &) ; +0x24d, 0x18003902d\nmovss   xmm0, dword ptr [rbx+64h]                                      ; +0x252, 0x180039032\ninc     edi                                                            ; +0x257, 0x180039037\nmovd    xmm9, edi                                                      ; +0x259, 0x180039039\ncvtdq2ps xmm9, xmm9                                                    ; +0x25e, 0x18003903e\ncomiss  xmm0, xmm9                                                     ; +0x262, 0x180039042\njnb     loc_180038F10                                                  ; +0x266, 0x180039046\nxorps   xmm14, xmm14                                                   ; +0x26c, 0x18003904c\nmovss   xmm0, dword ptr [rbx+60h]                                      ; +0x270, 0x180039050\ninc     esi                                                            ; +0x275, 0x180039055\nmovd    xmm11, esi                                                     ; +0x277, 0x180039057\ncvtdq2ps xmm11, xmm11                                                  ; +0x27c, 0x18003905c\ncomiss  xmm0, xmm11                                                    ; +0x280, 0x180039060\njnb     loc_180038EF0                                                  ; +0x284, 0x180039064\nmovaps  xmm15, [rsp+0F8h+var_A8]                                       ; +0x28a, 0x18003906a\nmovaps  xmm11, [rsp+0F8h+var_68]                                       ; +0x290, 0x180039070\nmovaps  xmm10, [rsp+0F8h+var_58]                                       ; +0x299, 0x180039079\nmovaps  xmm9, [rsp+0F8h+var_48]                                        ; +0x2a2, 0x180039082\nmovaps  xmm8, [rsp+0F8h+var_38]                                        ; +0x2ab, 0x18003908b\nmovaps  xmm7, [rsp+0F8h+var_28]                                        ; +0x2b4, 0x180039094\nmov     rdi, [rsp+0F8h+arg_10]                                         ; +0x2bc, 0x18003909c\nmov     rcx, [rsp+0F8h+var_B0]                                         ; +0x2c4, 0x1800390a4\nxor     rcx, rsp; StackCookie                                          ; +0x2c9, 0x1800390a9\ncall    __security_check_cookie                                        ; +0x2cc, 0x1800390ac\nlea     r11, [rsp+0F8h+var_8]                                          ; +0x2d1, 0x1800390b1\nmov     rbx, [r11+28h]                                                 ; +0x2d9, 0x1800390b9\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x2dd, 0x1800390bd\nmovaps  xmm12, xmmword ptr [r11-70h]                                   ; +0x2e2, 0x1800390c2\nmovaps  xmm13, xmmword ptr [r11-80h]                                   ; +0x2e7, 0x1800390c7\nmovaps  xmm14, [rsp+0F8h+var_98]                                       ; +0x2ec, 0x1800390cc\nmov     rsp, r11                                                       ; +0x2f2, 0x1800390d2\npop     rsi                                                            ; +0x2f5, 0x1800390d5\nretn                                                                   ; +0x2f6, 0x1800390d6", "xrefs": ["<???> @ 0x1800ea0b8", "<???> @ 0x1801363d8", "<???> @ 0x1801363e8", "<???> @ 0x1801438a8", "<???> @ 0x1801b0c60"], "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"}