{"type": "func", "start": 6443229536, "end": 6443229850, "name": "cocos2d::CCDirector::convertToGL", "pseudocode": "// \n// cocos2d::CCDirector::convertToGL from 0x1800be160 to 0x1800be29a (314 bytes)\n// \n// 8 xrefs:\n// > cocos2d::CCTouch::getDelta @ 0x1800b2726\n// > cocos2d::CCTouch::getDelta @ 0x1800b273c\n// > cocos2d::CCTouch::getLocation @ 0x1800b278f\n// > cocos2d::CCTouch::getPreviousLocation @ 0x1800b27ef\n// > cocos2d::CCTouch::getStartLocation @ 0x1800b284f\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9168\n// > <???> @ 0x1801b9174\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\nstruct cocos2d::CCPoint *__fastcall cocos2d::CCDirector::convertToGL(\n        cocos2d::CCDirector *this,\n        struct cocos2d::CCPoint *a2,\n        float *a3)\n{\n  float v6; // xmm6_4\n  _DWORD *v7; // rax\n  float v8; // xmm0_4\n  int v9; // r9d\n  float v11[2]; // [rsp+20h] [rbp-168h] BYREF\n  float v12[4]; // [rsp+28h] [rbp-160h] BYREF\n  float v13[6]; // [rsp+38h] [rbp-150h] BYREF\n  __int128 v14[3]; // [rsp+50h] [rbp-138h] BYREF\n  float v15; // [rsp+88h] [rbp-100h]\n  float v16; // [rsp+8Ch] [rbp-FCh]\n  float v17[16]; // [rsp+90h] [rbp-F8h] BYREF\n  float v18[16]; // [rsp+D0h] [rbp-B8h] BYREF\n  _OWORD v19[4]; // [rsp+110h] [rbp-78h] BYREF\n\n  kmGLGetMatrix(5889, v18);\n  kmGLGetMatrix(5888, v17);\n  kmMat4Multiply((float *)v14, v18, v17);\n  kmMat4Inverse(v19, v14);\n  v6 = v15 / v16;\n  v7 = (_DWORD *)((__int64 (__fastcall *)(cocos2d::CCEGLView *))this->m_pobOpenGLView->getDesignResolutionSize)(this->m_pobOpenGLView);\n  cocos2d::cc_timeval::operator=(v11, v7);\n  v8 = *a3 + *a3;\n  v12[2] = v6;\n  v12[0] = (float)(v8 / v11[0]) - 1.0;\n  v12[1] = 1.0 - (float)((float)(a3[1] + a3[1]) / v11[1]);\n  kmVec3TransformCoord(v13, (int)v12, (__int64)v19, v9);\n  kmVec2Fill((float *)a2, v13[0], v13[1]);\n  return a2;\n}", "assembly": "; \n; cocos2d::CCDirector::convertToGL from 0x1800be160 to 0x1800be29a (314 bytes)\n; \n; 8 xrefs:\n; > cocos2d::CCTouch::getDelta @ 0x1800b2726\n; > cocos2d::CCTouch::getDelta @ 0x1800b273c\n; > cocos2d::CCTouch::getLocation @ 0x1800b278f\n; > cocos2d::CCTouch::getPreviousLocation @ 0x1800b27ef\n; > cocos2d::CCTouch::getStartLocation @ 0x1800b284f\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9168\n; > <???> @ 0x1801b9174\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\npush    rbx                                                            ; +0x0, 0x1800be160\npush    rsi                                                            ; +0x2, 0x1800be162\npush    rdi                                                            ; +0x3, 0x1800be163\nsub     rsp, 170h                                                      ; +0x4, 0x1800be164\nmovaps  [rsp+188h+var_28], xmm6                                        ; +0xb, 0x1800be16b\nmov     rax, cs:__security_cookie                                      ; +0x13, 0x1800be173\nxor     rax, rsp                                                       ; +0x1a, 0x1800be17a\nmov     [rsp+188h+var_38], rax                                         ; +0x1d, 0x1800be17d\nmov     rsi, rdx                                                       ; +0x25, 0x1800be185\nmov     rbx, rcx                                                       ; +0x28, 0x1800be188\nlea     rdx, [rsp+188h+var_B8]                                         ; +0x2b, 0x1800be18b\nmov     ecx, 1701h                                                     ; +0x33, 0x1800be193\nmov     rdi, r8                                                        ; +0x38, 0x1800be198\ncall    kmGLGetMatrix                                                  ; +0x3b, 0x1800be19b\nlea     rdx, [rsp+188h+var_F8]                                         ; +0x40, 0x1800be1a0\nmov     ecx, 1700h                                                     ; +0x48, 0x1800be1a8\ncall    kmGLGetMatrix                                                  ; +0x4d, 0x1800be1ad\nlea     r8, [rsp+188h+var_F8]                                          ; +0x52, 0x1800be1b2\nlea     rdx, [rsp+188h+var_B8]                                         ; +0x5a, 0x1800be1ba\nlea     rcx, [rsp+188h+var_138]                                        ; +0x62, 0x1800be1c2\ncall    kmMat4Multiply                                                 ; +0x67, 0x1800be1c7\nlea     rdx, [rsp+188h+var_138]                                        ; +0x6c, 0x1800be1cc\nlea     rcx, [rsp+188h+var_78]                                         ; +0x71, 0x1800be1d1\ncall    kmMat4Inverse                                                  ; +0x79, 0x1800be1d9\nmov     rcx, [rbx+0B8h]                                                ; +0x7e, 0x1800be1de\nmovss   xmm6, [rsp+188h+var_100]                                       ; +0x85, 0x1800be1e5\ndivss   xmm6, [rsp+188h+var_FC]                                        ; +0x8e, 0x1800be1ee\nmov     rax, [rcx]                                                     ; +0x97, 0x1800be1f7\ncall    qword ptr [rax+50h]                                            ; +0x9a, 0x1800be1fa\nmov     rdx, rax                                                       ; +0x9d, 0x1800be1fd\nlea     rcx, [rsp+188h+var_168]                                        ; +0xa0, 0x1800be200\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0xa5, 0x1800be205\nmovss   xmm0, dword ptr [rdi]                                          ; +0xaa, 0x1800be20a\nlea     r8, [rsp+188h+var_78]                                          ; +0xae, 0x1800be20e\nmovss   xmm1, cs:flt_1800E61A8                                         ; +0xb6, 0x1800be216\naddss   xmm0, xmm0                                                     ; +0xbe, 0x1800be21e\nlea     rdx, [rsp+188h+var_160]                                        ; +0xc2, 0x1800be222\nmovss   [rsp+188h+var_158], xmm6                                       ; +0xc7, 0x1800be227\nlea     rcx, [rsp+188h+var_150]                                        ; +0xcd, 0x1800be22d\ndivss   xmm0, [rsp+188h+var_168]                                       ; +0xd2, 0x1800be232\nsubss   xmm0, xmm1                                                     ; +0xd8, 0x1800be238\nmovss   [rsp+188h+var_160], xmm0                                       ; +0xdc, 0x1800be23c\nmovss   xmm0, dword ptr [rdi+4]                                        ; +0xe2, 0x1800be242\naddss   xmm0, xmm0                                                     ; +0xe7, 0x1800be247\ndivss   xmm0, [rsp+188h+var_164]                                       ; +0xeb, 0x1800be24b\nsubss   xmm1, xmm0                                                     ; +0xf1, 0x1800be251\nmovss   [rsp+188h+var_15C], xmm1                                       ; +0xf5, 0x1800be255\ncall    kmVec3TransformCoord                                           ; +0xfb, 0x1800be25b\nmovss   xmm2, [rsp+188h+var_14C]                                       ; +0x100, 0x1800be260\nmov     rcx, rsi                                                       ; +0x106, 0x1800be266\nmovss   xmm1, [rsp+188h+var_150]                                       ; +0x109, 0x1800be269\ncall    kmVec2Fill                                                     ; +0x10f, 0x1800be26f\nmov     rax, rsi                                                       ; +0x114, 0x1800be274\nmov     rcx, [rsp+188h+var_38]                                         ; +0x117, 0x1800be277\nxor     rcx, rsp; StackCookie                                          ; +0x11f, 0x1800be27f\ncall    __security_check_cookie                                        ; +0x122, 0x1800be282\nmovaps  xmm6, [rsp+188h+var_28]                                        ; +0x127, 0x1800be287\nadd     rsp, 170h                                                      ; +0x12f, 0x1800be28f\npop     rdi                                                            ; +0x136, 0x1800be296\npop     rsi                                                            ; +0x137, 0x1800be297\npop     rbx                                                            ; +0x138, 0x1800be298\nretn                                                                   ; +0x139, 0x1800be299", "xrefs": ["cocos2d::CCTouch::getDelta @ 0x1800b2726", "cocos2d::CCTouch::getDelta @ 0x1800b273c", "cocos2d::CCTouch::getLocation @ 0x1800b278f", "cocos2d::CCTouch::getPreviousLocation @ 0x1800b27ef", "cocos2d::CCTouch::getStartLocation @ 0x1800b284f", "<???> @ 0x1801438a8", "<???> @ 0x1801b9168", "<???> @ 0x1801b9174"], "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"}