{"type": "func", "start": 6442925424, "end": 6442925594, "name": "cocos2d::CCApplication::setupVerticalSync", "pseudocode": "// \n// cocos2d::CCApplication::setupVerticalSync from 0x180073d70 to 0x180073e1a (170 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCApplication::run @ 0x1800734f0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b44a0\n// > <???> @ 0x1801b44ac\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::CCApplication::setupVerticalSync(cocos2d::CCApplication *this)\n{\n  __int64 (*ProcAddress)(void); // rdi\n  const char *v3; // rax\n  char *v4; // rax\n  const char *v5; // rax\n\n  ProcAddress = wglGetProcAddress(\"wglGetExtensionsStringEXT\");\n  v3 = (const char *)ProcAddress();\n  v4 = strstr(v3, \"WGL_EXT_swap_control\");\n  if ( v4 )\n  {\n    v5 = (const char *)ProcAddress();\n    *((_BYTE *)this + 185) = strstr(v5, \"EXT_swap_control_tear\") != nullptr;\n    v4 = (char *)wglGetProcAddress(\"wglSwapIntervalEXT\");\n  }\n  qword_1801A84C8 = (__int64)v4;\n  *((_BYTE *)this + 185) = (unsigned int)sub_1800D3240(\"WGL_EXT_swap_control_tear\") == 1\n                        || (unsigned int)sub_1800D3240(\"GLX_EXT_swap_control_tear\") == 1;\n}", "assembly": "; \n; cocos2d::CCApplication::setupVerticalSync from 0x180073d70 to 0x180073e1a (170 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCApplication::run @ 0x1800734f0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b44a0\n; > <???> @ 0x1801b44ac\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     [rsp+arg_0], rbx                                               ; +0x0, 0x180073d70\npush    rdi                                                            ; +0x5, 0x180073d75\nsub     rsp, 20h                                                       ; +0x6, 0x180073d76\nmov     rbx, rcx                                                       ; +0xa, 0x180073d7a\nlea     rcx, aWglgetextensio; \"wglGetExtensionsStringEXT\"              ; +0xd, 0x180073d7d\ncall    cs:wglGetProcAddress                                           ; +0x14, 0x180073d84\nmov     rdi, rax                                                       ; +0x1a, 0x180073d8a\ncall    rdi                                                            ; +0x1d, 0x180073d8d\nmov     rcx, rax; Str                                                  ; +0x1f, 0x180073d8f\nlea     rdx, SubStr; \"WGL_EXT_swap_control\"                            ; +0x22, 0x180073d92\ncall    strstr                                                         ; +0x29, 0x180073d99\ntest    rax, rax                                                       ; +0x2e, 0x180073d9e\njz      short loc_180073DCD                                            ; +0x31, 0x180073da1\ncall    rdi                                                            ; +0x33, 0x180073da3\nmov     rcx, rax; Str                                                  ; +0x35, 0x180073da5\nlea     rdx, aExtSwapControl; \"EXT_swap_control_tear\"                  ; +0x38, 0x180073da8\ncall    strstr                                                         ; +0x3f, 0x180073daf\ntest    rax, rax                                                       ; +0x44, 0x180073db4\nlea     rcx, aWglswapinterva; \"wglSwapIntervalEXT\"                     ; +0x47, 0x180073db7\nsetnz   al                                                             ; +0x4e, 0x180073dbe\nmov     [rbx+0B9h], al                                                 ; +0x51, 0x180073dc1\ncall    cs:wglGetProcAddress                                           ; +0x57, 0x180073dc7\nlea     rcx, aWglExtSwapCont_0; \"WGL_EXT_swap_control_tear\"            ; +0x5d, 0x180073dcd\nmov     cs:qword_1801A84C8, rax                                        ; +0x64, 0x180073dd4\ncall    sub_1800D3240                                                  ; +0x6b, 0x180073ddb\ncmp     eax, 1                                                         ; +0x70, 0x180073de0\njz      short loc_180073E08                                            ; +0x73, 0x180073de3\nlea     rcx, aGlxExtSwapCont; \"GLX_EXT_swap_control_tear\"              ; +0x75, 0x180073de5\ncall    sub_1800D3240                                                  ; +0x7c, 0x180073dec\ncmp     eax, 1                                                         ; +0x81, 0x180073df1\njz      short loc_180073E08                                            ; +0x84, 0x180073df4\nmov     byte ptr [rbx+0B9h], 0                                         ; +0x86, 0x180073df6\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8d, 0x180073dfd\nadd     rsp, 20h                                                       ; +0x92, 0x180073e02\npop     rdi                                                            ; +0x96, 0x180073e06\nretn                                                                   ; +0x97, 0x180073e07\nmov     byte ptr [rbx+0B9h], 1                                         ; +0x98, 0x180073e08\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9f, 0x180073e0f\nadd     rsp, 20h                                                       ; +0xa4, 0x180073e14\npop     rdi                                                            ; +0xa8, 0x180073e18\nretn                                                                   ; +0xa9, 0x180073e19", "xrefs": ["cocos2d::CCApplication::run @ 0x1800734f0", "<???> @ 0x1801438a8", "<???> @ 0x1801b44a0", "<???> @ 0x1801b44ac"], "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"}