{"type": "func", "start": 6443334480, "end": 6443334627, "name": "sub_1800D7B50", "pseudocode": "// \n// sub_1800D7B50 from 0x1800d7b50 to 0x1800d7be3 (147 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::setupWindow @ 0x18007b91b\n// > sub_1800DC220 @ 0x1800dc503\n// > sub_1800DC680 @ 0x1800dc701\n// > <???> @ 0x1801c4968\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:22:33 +0000\n// \n\n__int64 __fastcall sub_1800D7B50(__int64 a1)\n{\n  __int64 result; // rax\n  __int64 v3; // rdx\n\n  if ( !*(_DWORD *)&ModuleName )\n    return sub_1800DB260(65537, nullptr);\n  result = sub_1800DE110(&unk_1801B520C);\n  v3 = result;\n  if ( a1 && !*(_DWORD *)(a1 + 512) )\n    return sub_1800DB260(65546, \"Cannot make current with a window that has no OpenGL or OpenGL ES context\");\n  if ( !result )\n  {\nLABEL_10:\n    if ( !a1 )\n      return result;\n    return (*(__int64 (__fastcall **)(__int64, __int64))(a1 + 584))(a1, v3);\n  }\n  if ( !a1 || *(_DWORD *)(a1 + 516) != *(_DWORD *)(result + 516) )\n  {\n    result = (*(__int64 (__fastcall **)(_QWORD))(result + 584))(0);\n    goto LABEL_10;\n  }\n  return (*(__int64 (__fastcall **)(__int64, __int64))(a1 + 584))(a1, v3);\n}", "assembly": "; \n; sub_1800D7B50 from 0x1800d7b50 to 0x1800d7be3 (147 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::setupWindow @ 0x18007b91b\n; > sub_1800DC220 @ 0x1800dc503\n; > sub_1800DC680 @ 0x1800dc701\n; > <???> @ 0x1801c4968\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:22:33 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800d7b50\nsub     rsp, 20h                                                       ; +0x2, 0x1800d7b52\ncmp     dword ptr cs:ModuleName, 0                                     ; +0x6, 0x1800d7b56\nmov     rbx, rcx                                                       ; +0xd, 0x1800d7b5d\njnz     short loc_1800D7B73                                            ; +0x10, 0x1800d7b60\nxor     edx, edx                                                       ; +0x12, 0x1800d7b62\nmov     ecx, 10001h                                                    ; +0x14, 0x1800d7b64\nadd     rsp, 20h                                                       ; +0x19, 0x1800d7b69\npop     rbx                                                            ; +0x1d, 0x1800d7b6d\njmp     sub_1800DB260                                                  ; +0x1e, 0x1800d7b6e\nlea     rcx, unk_1801B520C                                             ; +0x23, 0x1800d7b73\ncall    sub_1800DE110                                                  ; +0x2a, 0x1800d7b7a\nmov     rdx, rax                                                       ; +0x2f, 0x1800d7b7f\ntest    rbx, rbx                                                       ; +0x32, 0x1800d7b82\njz      short loc_1800D7BA6                                            ; +0x35, 0x1800d7b85\ncmp     dword ptr [rbx+200h], 0                                        ; +0x37, 0x1800d7b87\njnz     short loc_1800D7BA6                                            ; +0x3e, 0x1800d7b8e\nlea     rdx, aCannotMakeCurr; \"Cannot make current with a window that \"... ; +0x40, 0x1800d7b90\nmov     ecx, 1000Ah                                                    ; +0x47, 0x1800d7b97\nadd     rsp, 20h                                                       ; +0x4c, 0x1800d7b9c\npop     rbx                                                            ; +0x50, 0x1800d7ba0\njmp     sub_1800DB260                                                  ; +0x51, 0x1800d7ba1\ntest    rdx, rdx                                                       ; +0x56, 0x1800d7ba6\njz      short loc_1800D7BC6                                            ; +0x59, 0x1800d7ba9\ntest    rbx, rbx                                                       ; +0x5b, 0x1800d7bab\njz      short loc_1800D7BBE                                            ; +0x5e, 0x1800d7bae\nmov     eax, [rax+204h]                                                ; +0x60, 0x1800d7bb0\ncmp     [rbx+204h], eax                                                ; +0x66, 0x1800d7bb6\njz      short loc_1800D7BCB                                            ; +0x6c, 0x1800d7bbc\nxor     ecx, ecx                                                       ; +0x6e, 0x1800d7bbe\ncall    qword ptr [rdx+248h]                                           ; +0x70, 0x1800d7bc0\ntest    rbx, rbx                                                       ; +0x76, 0x1800d7bc6\njz      short loc_1800D7BDD                                            ; +0x79, 0x1800d7bc9\nmov     rcx, rbx                                                       ; +0x7b, 0x1800d7bcb\nmov     rax, [rbx+248h]                                                ; +0x7e, 0x1800d7bce\nadd     rsp, 20h                                                       ; +0x85, 0x1800d7bd5\npop     rbx                                                            ; +0x89, 0x1800d7bd9\njmp     rax                                                            ; +0x8a, 0x1800d7bda\nadd     rsp, 20h                                                       ; +0x8d, 0x1800d7bdd\npop     rbx                                                            ; +0x91, 0x1800d7be1\nretn                                                                   ; +0x92, 0x1800d7be2", "xrefs": ["cocos2d::CCEGLView::setupWindow @ 0x18007b91b", "sub_1800DC220 @ 0x1800dc503", "sub_1800DC680 @ 0x1800dc701", "<???> @ 0x1801c4968"], "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"}