{"type": "func", "start": 6442936832, "end": 6442937002, "name": "cocos2d::CCApplication::setupVerticalSync", "pseudocode": "// \n// cocos2d::CCApplication::setupVerticalSync from 0x180076a00 to 0x180076aaa (170 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCApplication::run @ 0x180075f77\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801be854\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:21:58 +0000\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_1801B2508 = (__int64)v4;\n  *((_BYTE *)this + 185) = (unsigned int)sub_1800D79A0(\"WGL_EXT_swap_control_tear\") == 1\n                        || (unsigned int)sub_1800D79A0(\"GLX_EXT_swap_control_tear\") == 1;\n}", "assembly": "; \n; cocos2d::CCApplication::setupVerticalSync from 0x180076a00 to 0x180076aaa (170 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCApplication::run @ 0x180075f77\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801be854\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:21:58 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180076a00\npush    rdi                                                            ; +0x5, 0x180076a05\nsub     rsp, 20h                                                       ; +0x6, 0x180076a06\nmov     rbx, rcx                                                       ; +0xa, 0x180076a0a\nlea     rcx, aWglgetextensio; \"wglGetExtensionsStringEXT\"              ; +0xd, 0x180076a0d\ncall    cs:wglGetProcAddress                                           ; +0x14, 0x180076a14\nmov     rdi, rax                                                       ; +0x1a, 0x180076a1a\ncall    rdi                                                            ; +0x1d, 0x180076a1d\nmov     rcx, rax; Str                                                  ; +0x1f, 0x180076a1f\nlea     rdx, SubStr; \"WGL_EXT_swap_control\"                            ; +0x22, 0x180076a22\ncall    strstr                                                         ; +0x29, 0x180076a29\ntest    rax, rax                                                       ; +0x2e, 0x180076a2e\njz      short loc_180076A5D                                            ; +0x31, 0x180076a31\ncall    rdi                                                            ; +0x33, 0x180076a33\nmov     rcx, rax; Str                                                  ; +0x35, 0x180076a35\nlea     rdx, aExtSwapControl; \"EXT_swap_control_tear\"                  ; +0x38, 0x180076a38\ncall    strstr                                                         ; +0x3f, 0x180076a3f\ntest    rax, rax                                                       ; +0x44, 0x180076a44\nlea     rcx, aWglswapinterva; \"wglSwapIntervalEXT\"                     ; +0x47, 0x180076a47\nsetnz   al                                                             ; +0x4e, 0x180076a4e\nmov     [rbx+0B9h], al                                                 ; +0x51, 0x180076a51\ncall    cs:wglGetProcAddress                                           ; +0x57, 0x180076a57\nlea     rcx, aWglExtSwapCont_0; \"WGL_EXT_swap_control_tear\"            ; +0x5d, 0x180076a5d\nmov     cs:qword_1801B2508, rax                                        ; +0x64, 0x180076a64\ncall    sub_1800D79A0                                                  ; +0x6b, 0x180076a6b\ncmp     eax, 1                                                         ; +0x70, 0x180076a70\njz      short loc_180076A98                                            ; +0x73, 0x180076a73\nlea     rcx, aGlxExtSwapCont; \"GLX_EXT_swap_control_tear\"              ; +0x75, 0x180076a75\ncall    sub_1800D79A0                                                  ; +0x7c, 0x180076a7c\ncmp     eax, 1                                                         ; +0x81, 0x180076a81\njz      short loc_180076A98                                            ; +0x84, 0x180076a84\nmov     byte ptr [rbx+0B9h], 0                                         ; +0x86, 0x180076a86\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8d, 0x180076a8d\nadd     rsp, 20h                                                       ; +0x92, 0x180076a92\npop     rdi                                                            ; +0x96, 0x180076a96\nretn                                                                   ; +0x97, 0x180076a97\nmov     byte ptr [rbx+0B9h], 1                                         ; +0x98, 0x180076a98\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9f, 0x180076a9f\nadd     rsp, 20h                                                       ; +0xa4, 0x180076aa4\npop     rdi                                                            ; +0xa8, 0x180076aa8\nretn                                                                   ; +0xa9, 0x180076aa9", "xrefs": ["cocos2d::CCApplication::run @ 0x180075f77", "<???> @ 0x18014cf68", "<???> @ 0x1801be854"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}