Function at 0x14005dad0
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140094fc0]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor ebx, ebx
lea rax, str.libEGL.dll
cmp qword [0x1400972b0], rbx
lea rcx, str.EGL.dll
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rbx
je 0x14005db28
lea eax, [rbx + 1]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400605a0
add rsp, 0x50
pop rbx
ret
mov qword [rsp + 0x60], rsi
mov esi, ebx
mov qword [rsp + 0x68], rdi
mov rdi, rbx
mov rcx, rax
call sub.KERNEL32.dll_LoadLibraryA
mov qword [0x1400972b0], rax
test rax, rax
jne 0x14005db70
mov rax, qword [rsp + rdi*8 + 0x30]
inc rdi
inc esi
test rax, rax
jne 0x14005db37
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.140053970
jmp 0x14005e174
movsxd rcx, esi
lea rdx, [0x14007ffb0]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x28]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov ecx, ebx
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x140097270], ecx
mov rcx, qword [0x1400972b0]
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglGetConfigs
mov qword [0x1400972b8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglGetDisplay
mov qword [0x1400972c0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglGetError
mov qword [0x1400972c8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglInitialize
mov qword [0x1400972d0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglTerminate
mov qword [0x1400972d8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglBindAPI
mov qword [0x1400972e0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglCreateContext
mov qword [0x1400972e8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglDestroySurface
mov qword [0x1400972f0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglDestroyContext
mov qword [0x1400972f8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglCreateWindowSurface
mov qword [0x140097300], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglMakeCurrent
mov qword [0x140097308], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglSwapBuffers
mov qword [0x140097310], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglSwapInterval
mov qword [0x140097318], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglQueryString
mov qword [0x140097320], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x1400972b0]
lea rdx, str.eglGetProcAddress
mov qword [0x140097328], rax
call sub.KERNEL32.dll_GetProcAddress
cmp qword [0x1400972b8], rbx
mov rcx, rax
mov qword [0x140097330], rax
je 0x14005e132
cmp qword [0x1400972c0], rbx
je 0x14005e132
cmp qword [0x1400972c8], rbx
je 0x14005e132
cmp qword [0x1400972d0], rbx
je 0x14005e132
cmp qword [0x1400972d8], rbx
je 0x14005e132
cmp qword [0x1400972e0], rbx
je 0x14005e132
cmp qword [0x1400972e8], rbx
je 0x14005e132
cmp qword [0x1400972f0], rbx
je 0x14005e132
cmp qword [0x1400972f8], rbx
je 0x14005e132
cmp qword [0x140097300], rbx
je 0x14005e132
cmp qword [0x140097308], rbx
je 0x14005e132
cmp qword [0x140097310], rbx
je 0x14005e132
cmp qword [0x140097318], rbx
je 0x14005e132
cmp qword [0x140097320], rbx
je 0x14005e132
mov rax, qword [0x140097328]
test rax, rax
je 0x14005e132
test rcx, rcx
je 0x14005e132
mov edx, 0x3055
xor ecx, ecx
call rax
mov rdi, rax
test rax, rax
je 0x14005de34
call qword [0x1400972d0]
cmp eax, 0x3000
jne 0x14005de34
mov dword [0x140097288], 1
jmp 0x14005de40
cmp dword [0x140097288], ebx
je 0x14005dee8
mov rdx, rdi
lea rcx, str.EGL_EXT_platform_base
call fcn.140050480
mov rdx, rdi
mov dword [0x14009728c], eax
lea rcx, str.EGL_EXT_platform_x11
call fcn.140050480
mov rdx, rdi
mov dword [0x140097290], eax
lea rcx, str.EGL_EXT_platform_wayland
call fcn.140050480
mov rdx, rdi
mov dword [0x140097294], eax
lea rcx, str.EGL_ANGLE_platform_angle
call fcn.140050480
mov rdx, rdi
mov dword [0x14009729c], eax
lea rcx, str.EGL_ANGLE_platform_angle_opengl
call fcn.140050480
mov rdx, rdi
mov dword [0x1400972a0], eax
lea rcx, str.EGL_ANGLE_platform_angle_d3d
call fcn.140050480
mov rdx, rdi
mov dword [0x1400972a4], eax
lea rcx, str.EGL_ANGLE_platform_angle_vulkan
call fcn.140050480
mov rdx, rdi
mov dword [0x1400972a8], eax
lea rcx, str.EGL_ANGLE_platform_angle_metal
call fcn.140050480
mov dword [0x1400972ac], eax
cmp dword [0x14009728c], ebx
je 0x14005df18
lea rcx, str.eglGetPlatformDisplayEXT
call qword [0x140097330]
lea rcx, str.eglCreatePlatformWindowSurfaceEXT
mov qword [0x140097338], rax
call qword [0x140097330]
mov qword [0x140097340], rax
lea rcx, [rsp + 0x20]
call qword [0x140095ba8]
mov dword [0x140097258], eax
test eax, eax
je 0x14005df49
call qword [0x140095bb0]
mov r8, qword [rsp + 0x20]
mov rdx, rax
mov ecx, dword [0x140097258]
call qword [0x140097338]
jmp 0x14005df58
call qword [0x140095bb0]
mov rcx, rax
call qword [0x1400972c8]
mov rcx, qword [rsp + 0x20]
mov qword [0x140097260], rax
call fcn.140053ec0
mov rcx, qword [0x140097260]
test rcx, rcx
jne 0x14005dfa0
call qword [0x1400972d0]
mov ecx, eax
call fcn.14005e5e0
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.140053970
call fcn.14005e1a0
jmp 0x14005e174
lea r8, [0x14009726c]
lea rdx, [0x140097268]
call qword [0x1400972d8]
test eax, eax
jne 0x14005dfe3
call qword [0x1400972d0]
mov ecx, eax
call fcn.14005e5e0
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.140053970
call fcn.14005e1a0
jmp 0x14005e174
mov rcx, qword [0x140097260]
mov edx, 0x3055
call qword [0x140097328]
test rax, rax
je 0x14005e012
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.140050480
test eax, eax
mov eax, 1
jne 0x14005e014
mov eax, ebx
mov rcx, qword [0x140097260]
mov edx, 0x3055
mov dword [0x140097274], eax
call qword [0x140097328]
test rax, rax
je 0x14005e049
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.140050480
test eax, eax
mov eax, 1
jne 0x14005e04b
mov eax, ebx
mov rcx, qword [0x140097260]
mov edx, 0x3055
mov dword [0x140097278], eax
call qword [0x140097328]
test rax, rax
je 0x14005e080
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.140050480
test eax, eax
mov eax, 1
jne 0x14005e082
mov eax, ebx
mov rcx, qword [0x140097260]
mov edx, 0x3055
mov dword [0x14009727c], eax
call qword [0x140097328]
test rax, rax
je 0x14005e0b7
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.140050480
test eax, eax
mov eax, 1
jne 0x14005e0b9
mov eax, ebx
mov rcx, qword [0x140097260]
mov edx, 0x3055
mov dword [0x140097280], eax
call qword [0x140097328]
test rax, rax
je 0x14005e0ee
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.140050480
test eax, eax
mov eax, 1
jne 0x14005e0f0
mov eax, ebx
mov rcx, qword [0x140097260]
mov edx, 0x3055
mov dword [0x140097284], eax
call qword [0x140097328]
test rax, rax
je 0x14005e125
mov rdx, rax
lea rcx, str.EGL_EXT_present_opaque
call fcn.140050480
test eax, eax
je 0x14005e125
mov ebx, 1
mov dword [0x140097298], ebx
mov eax, 1
jmp 0x14005e176
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.140053970
mov rcx, qword [0x140097260]
test rcx, rcx
je 0x14005e15c
call qword [0x1400972e0]
mov qword [0x140097260], rbx
mov rcx, qword [0x1400972b0]
test rcx, rcx
je 0x14005e174
call fcn.14005f200
mov qword [0x1400972b0], rbx
xor eax, eax
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400605a0
add rsp, 0x50
pop rbx
ret