Function at 0x140087510
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x90
lea rdi, [rsp + 0x20]
mov ecx, 0x1c
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x1400edf10]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp qword [0x140140da8], 0
je 0x140087550
mov eax, 1
jmp 0x1400878b4
lea rcx, str.opengl32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x140140da8], rax
cmp qword [0x140140da8], 0
jne 0x140087586
lea rdx, str.WGL:_Failed_to_load_opengl32.dll
mov ecx, 0x10008
call fcn.140089b50
xor eax, eax
jmp 0x1400878b4
lea rdx, str.wglCreateContext
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140db0], rax
lea rdx, str.wglDeleteContext
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140db8], rax
lea rdx, str.wglGetProcAddress
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140dc0], rax
lea rdx, str.wglGetCurrentDC
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140dc8], rax
lea rdx, str.wglGetCurrentContext
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140dd0], rax
lea rdx, str.wglMakeCurrent
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140dd8], rax
lea rdx, str.wglShareLists
mov rcx, qword [0x140140da8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140140de0], rax
mov rcx, qword [0x14013ff08]
call qword [sym.imp.USER32.dll_GetDC]
mov qword [rsp + 0x70], rax
mov r8d, 0x28
xor edx, edx
lea rcx, [rsp + 0x28]
call sub.VCRUNTIME140.dll_memset
mov eax, 0x28
mov word [rsp + 0x28], ax
mov eax, 1
mov word [rsp + 0x2a], ax
mov dword [rsp + 0x2c], 0x25
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x31], 0x18
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.GDI32.dll_ChoosePixelFormat]
lea r8, [rsp + 0x28]
mov edx, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.GDI32.dll_SetPixelFormat]
test eax, eax
jne 0x1400876cb
lea rdx, str.WGL:_Failed_to_set_pixel_format_for_dummy_context
mov ecx, 0x10008
call fcn.140089b50
xor eax, eax
jmp 0x1400878b4
mov rcx, qword [rsp + 0x70]
call qword [0x140140db0]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x1400876fb
lea rdx, str.WGL:_Failed_to_create_dummy_context
mov ecx, 0x10008
call fcn.140089b50
xor eax, eax
jmp 0x1400878b4
call qword [0x140140dc8]
mov qword [rsp + 0x68], rax
call qword [0x140140dd0]
mov qword [rsp + 0x58], rax
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
call qword [0x140140dd8]
test eax, eax
jne 0x140087758
lea rdx, str.WGL:_Failed_to_make_dummy_context_current
mov ecx, 0x10008
call fcn.140089b50
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
call qword [0x140140dd8]
mov rcx, qword [rsp + 0x60]
call qword [0x140140db8]
xor eax, eax
jmp 0x1400878b4
lea rcx, str.wglGetExtensionsStringEXT
call qword [0x140140dc0]
mov qword [0x140140df8], rax
lea rcx, str.wglGetExtensionsStringARB
call qword [0x140140dc0]
mov qword [0x140140e00], rax
lea rcx, str.wglCreateContextAttribsARB
call qword [0x140140dc0]
mov qword [0x140140e08], rax
lea rcx, str.wglSwapIntervalEXT
call qword [0x140140dc0]
mov qword [0x140140de8], rax
lea rcx, str.wglGetPixelFormatAttribivARB
call qword [0x140140dc0]
mov qword [0x140140df0], rax
lea rcx, str.WGL_ARB_multisample
call fcn.140089560
mov dword [0x140140e18], eax
lea rcx, str.WGL_ARB_framebuffer_sRGB
call fcn.140089560
mov dword [0x140140e1c], eax
lea rcx, str.WGL_EXT_framebuffer_sRGB
call fcn.140089560
mov dword [0x140140e20], eax
lea rcx, str.WGL_ARB_create_context
call fcn.140089560
mov dword [0x140140e28], eax
lea rcx, str.WGL_ARB_create_context_profile
call fcn.140089560
mov dword [0x140140e2c], eax
lea rcx, str.WGL_EXT_create_context_es2_profile
call fcn.140089560
mov dword [0x140140e30], eax
lea rcx, str.WGL_ARB_create_context_robustness
call fcn.140089560
mov dword [0x140140e34], eax
lea rcx, str.WGL_ARB_create_context_no_error
call fcn.140089560
mov dword [0x140140e38], eax
lea rcx, str.WGL_EXT_swap_control
call fcn.140089560
mov dword [0x140140e10], eax
lea rcx, str.WGL_EXT_colorspace
call fcn.140089560
mov dword [0x140140e14], eax
lea rcx, str.WGL_ARB_pixel_format
call fcn.140089560
mov dword [0x140140e24], eax
lea rcx, str.WGL_ARB_context_flush_control
call fcn.140089560
mov dword [0x140140e3c], eax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
call qword [0x140140dd8]
mov rcx, qword [rsp + 0x60]
call qword [0x140140db8]
mov eax, 1
mov rdi, rax
mov rcx, rsp
lea rdx, [0x1400ae800]
call fcn.14008f020
mov rax, rdi
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14008e5d0
add rsp, 0x90
pop rdi
ret