Function at 0x140058a80
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x70
lea rdi, [rsp + 0x20]
mov ecx, 0x14
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14009fef0]
xor rax, rsp
mov qword [rsp + 0x68], rax
lea rax, str.libEGL.dll
mov qword [rsp + 0x38], rax
lea rax, str.EGL.dll
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
cmp qword [0x1400a3e18], 0
je 0x140058adb
mov eax, 1
jmp 0x140058ef9
mov dword [rsp + 0x20], 0
jmp 0x140058aef
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
cmp qword [rsp + rax*8 + 0x38], 0
je 0x140058b21
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + rax*8 + 0x38]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1400a3e18], rax
cmp qword [0x1400a3e18], 0
je 0x140058b1f
jmp 0x140058b21
jmp 0x140058ae5
cmp qword [0x1400a3e18], 0
jne 0x140058b43
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.14004a890
xor eax, eax
jmp 0x140058ef9
movsxd rax, dword [rsp + 0x20]
mov r8d, 3
lea rdx, [0x14009dde4]
mov rcx, qword [rsp + rax*8 + 0x38]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140058b6e
mov dword [rsp + 0x60], 1
jmp 0x140058b76
mov dword [rsp + 0x60], 0
mov eax, dword [rsp + 0x60]
mov dword [0x1400a3df8], eax
lea rdx, str.eglGetConfigAttrib
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e20], rax
lea rdx, str.eglGetConfigs
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e28], rax
lea rdx, str.eglGetDisplay
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e30], rax
lea rdx, str.eglGetError
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e38], rax
lea rdx, str.eglInitialize
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e40], rax
lea rdx, str.eglTerminate
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e48], rax
lea rdx, str.eglBindAPI
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e50], rax
lea rdx, str.eglCreateContext
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e58], rax
lea rdx, str.eglDestroySurface
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e60], rax
lea rdx, str.eglDestroyContext
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e68], rax
lea rdx, str.eglCreateWindowSurface
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e70], rax
lea rdx, str.eglMakeCurrent
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e78], rax
lea rdx, str.eglSwapBuffers
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e80], rax
lea rdx, str.eglSwapInterval
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e88], rax
lea rdx, str.eglQueryString
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e90], rax
lea rdx, str.eglGetProcAddress
mov rcx, qword [0x1400a3e18]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400a3e98], rax
cmp qword [0x1400a3e20], 0
je 0x140058ddc
cmp qword [0x1400a3e28], 0
je 0x140058ddc
cmp qword [0x1400a3e30], 0
je 0x140058ddc
cmp qword [0x1400a3e38], 0
je 0x140058ddc
cmp qword [0x1400a3e40], 0
je 0x140058ddc
cmp qword [0x1400a3e48], 0
je 0x140058ddc
cmp qword [0x1400a3e50], 0
je 0x140058ddc
cmp qword [0x1400a3e58], 0
je 0x140058ddc
cmp qword [0x1400a3e60], 0
je 0x140058ddc
cmp qword [0x1400a3e68], 0
je 0x140058ddc
cmp qword [0x1400a3e70], 0
je 0x140058ddc
cmp qword [0x1400a3e78], 0
je 0x140058ddc
cmp qword [0x1400a3e80], 0
je 0x140058ddc
cmp qword [0x1400a3e88], 0
je 0x140058ddc
cmp qword [0x1400a3e90], 0
je 0x140058ddc
cmp qword [0x1400a3e98], 0
jne 0x140058df9
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.14004a890
call fcn.140058f30
xor eax, eax
jmp 0x140058ef9
xor ecx, ecx
call qword [0x1400a3e30]
mov qword [0x1400a3de8], rax
cmp qword [0x1400a3de8], 0
jne 0x140058e3f
call qword [0x1400a3e38]
mov ecx, eax
call fcn.140059cd0
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.14004a890
call fcn.140058f30
xor eax, eax
jmp 0x140058ef9
lea r8, [0x1400a3df4]
lea rdx, [0x1400a3df0]
mov rcx, qword [0x1400a3de8]
call qword [0x1400a3e40]
test eax, eax
jne 0x140058e88
call qword [0x1400a3e38]
mov ecx, eax
call fcn.140059cd0
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.14004a890
call fcn.140058f30
xor eax, eax
jmp 0x140058ef9
lea rcx, str.EGL_KHR_create_context
call fcn.14005a2e0
mov dword [0x1400a3dfc], eax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.14005a2e0
mov dword [0x1400a3e00], eax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.14005a2e0
mov dword [0x1400a3e04], eax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.14005a2e0
mov dword [0x1400a3e08], eax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.14005a2e0
mov dword [0x1400a3e0c], eax
lea rcx, str.EGL_EXT_present_opaque
call fcn.14005a2e0
mov dword [0x1400a3e10], eax
mov eax, 1
mov rdi, rax
mov rcx, rsp
lea rdx, [0x140063af0]
call fcn.14005c460
mov rax, rdi
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14005bb20
add rsp, 0x70
pop rdi
ret