Function at 0x140039790
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x50
mov rax, qword [0x1400a21c8]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp qword [0x1400a7440], 0
je 0x1400397c7
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400531d0
add rsp, 0x50
pop rdi
ret
lea rcx, str.opengl32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1400a7440], rax
test rax, rax
jne 0x140039806
lea rdx, str.WGL:_Failed_to_load_opengl32.dll
mov ecx, 0x10008
call fcn.140036d00
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400531d0
add rsp, 0x50
pop rdi
ret
lea rdx, str.wglCreateContext
mov qword [rsp + 0x70], rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglDeleteContext
mov qword [0x1400a7448], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglGetProcAddress
mov qword [0x1400a7450], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglGetCurrentDC
mov qword [0x1400a7458], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglGetCurrentContext
mov qword [0x1400a7460], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglMakeCurrent
mov qword [0x1400a7468], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a7440]
lea rdx, str.wglShareLists
mov qword [0x1400a7470], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a65a0]
mov qword [0x1400a7478], rax
call qword [sym.imp.USER32.dll_GetDC]
xorps xmm0, xmm0
lea rdx, [rsp + 0x20]
movups xmmword [rsp + 0x20], xmm0
mov rsi, rax
mov dword [rsp + 0x20], 0x10028
xor eax, eax
mov dword [rsp + 0x24], 0x25
mov rcx, rsi
mov qword [rsp + 0x40], rax
movups xmmword [rsp + 0x30], xmm0
mov word [rsp + 0x28], 0x1800
lea edi, [rax + 1]
call qword [sym.imp.GDI32.dll_ChoosePixelFormat]
lea r8, [rsp + 0x20]
mov rcx, rsi
mov edx, eax
call qword [sym.imp.GDI32.dll_SetPixelFormat]
test eax, eax
jne 0x14003993c
lea rdx, str.WGL:_Failed_to_set_pixel_format_for_dummy_context
mov ecx, 0x10008
call fcn.140036d00
xor eax, eax
jmp 0x140039b25
mov rcx, rsi
mov qword [rsp + 0x60], rbx
call qword [0x1400a7448]
mov rbx, rax
test rax, rax
jne 0x14003996a
lea rdx, str.WGL:_Failed_to_create_dummy_context
mov ecx, 0x10008
call fcn.140036d00
xor eax, eax
jmp 0x140039b20
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x78], r14
call qword [0x1400a7460]
mov rbp, rax
call qword [0x1400a7468]
mov rdx, rbx
mov rcx, rsi
mov r14, rax
call qword [0x1400a7470]
test eax, eax
jne 0x1400399c3
lea rdx, str.WGL:_Failed_to_make_dummy_context_current
mov ecx, 0x10008
call fcn.140036d00
mov rdx, r14
mov rcx, rbp
call qword [0x1400a7470]
mov rcx, rbx
call qword [0x1400a7450]
xor eax, eax
jmp 0x140039b16
lea rcx, str.wglGetExtensionsStringEXT
call qword [0x1400a7458]
lea rcx, str.wglGetExtensionsStringARB
mov qword [0x1400a7490], rax
call qword [0x1400a7458]
lea rcx, str.wglCreateContextAttribsARB
mov qword [0x1400a7498], rax
call qword [0x1400a7458]
lea rcx, str.wglSwapIntervalEXT
mov qword [0x1400a74a0], rax
call qword [0x1400a7458]
lea rcx, str.wglGetPixelFormatAttribivARB
mov qword [0x1400a7480], rax
call qword [0x1400a7458]
lea rcx, str.WGL_ARB_multisample
mov qword [0x1400a7488], rax
call fcn.14003a440
lea rcx, str.WGL_ARB_framebuffer_sRGB
mov dword [0x1400a74b0], eax
call fcn.14003a440
lea rcx, str.WGL_EXT_framebuffer_sRGB
mov dword [0x1400a74b4], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_create_context
mov dword [0x1400a74b8], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_create_context_profile
mov dword [0x1400a74c0], eax
call fcn.14003a440
lea rcx, str.WGL_EXT_create_context_es2_profile
mov dword [0x1400a74c4], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_create_context_robustness
mov dword [0x1400a74c8], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_create_context_no_error
mov dword [0x1400a74cc], eax
call fcn.14003a440
lea rcx, str.WGL_EXT_swap_control
mov dword [0x1400a74d0], eax
call fcn.14003a440
lea rcx, str.WGL_EXT_colorspace
mov dword [0x1400a74a8], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_pixel_format
mov dword [0x1400a74ac], eax
call fcn.14003a440
lea rcx, str.WGL_ARB_context_flush_control
mov dword [0x1400a74bc], eax
call fcn.14003a440
mov rdx, r14
mov dword [0x1400a74d4], eax
mov rcx, rbp
call qword [0x1400a7470]
mov rcx, rbx
call qword [0x1400a7450]
mov eax, edi
mov rbp, qword [rsp + 0x68]
mov r14, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400531d0
add rsp, 0x50
pop rdi
ret