Function at 0x1800ba700
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x40
mov rax, qword [0x180175398]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor edi, edi
lea rax, str.libEGL.dll
cmp qword [0x180364ad8], rdi
lea rcx, str.EGL.dll
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rdi
je 0x1800ba753
lea eax, [rdi + 1]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1800be620
add rsp, 0x40
pop rdi
ret
mov qword [rsp + 0x50], rbx
mov rbx, rdi
mov qword [rsp + 0x58], rsi
mov esi, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x180364ad8], rax
test rax, rax
jne 0x1800ba79c
mov rax, qword [rsp + rbx*8 + 0x28]
inc rbx
inc esi
test rax, rax
jne 0x1800ba762
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.1800b03f0
jmp 0x1800bac1e
movsxd rcx, esi
lea rdx, [0x180114b00]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x20]
call fcn.1800d1100
mov ecx, edi
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x180364ac0], ecx
mov rcx, qword [0x180364ad8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglGetConfigs
mov qword [0x180364ae0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglGetDisplay
mov qword [0x180364ae8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglGetError
mov qword [0x180364af0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglInitialize
mov qword [0x180364af8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglTerminate
mov qword [0x180364b00], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglBindAPI
mov qword [0x180364b08], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglCreateContext
mov qword [0x180364b10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglDestroySurface
mov qword [0x180364b18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglDestroyContext
mov qword [0x180364b20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglCreateWindowSurface
mov qword [0x180364b28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglMakeCurrent
mov qword [0x180364b30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglSwapBuffers
mov qword [0x180364b38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglSwapInterval
mov qword [0x180364b40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglQueryString
mov qword [0x180364b48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180364ad8]
lea rdx, str.eglGetProcAddress
mov qword [0x180364b50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x180364ae0], rdi
mov qword [0x180364b58], rax
je 0x1800babdb
cmp qword [0x180364ae8], rdi
je 0x1800babdb
mov rdx, qword [0x180364af0]
test rdx, rdx
je 0x1800babdb
cmp qword [0x180364af8], rdi
je 0x1800babdb
cmp qword [0x180364b00], rdi
je 0x1800babdb
cmp qword [0x180364b08], rdi
je 0x1800babdb
cmp qword [0x180364b10], rdi
je 0x1800babdb
cmp qword [0x180364b18], rdi
je 0x1800babdb
cmp qword [0x180364b20], rdi
je 0x1800babdb
cmp qword [0x180364b28], rdi
je 0x1800babdb
cmp qword [0x180364b30], rdi
je 0x1800babdb
cmp qword [0x180364b38], rdi
je 0x1800babdb
cmp qword [0x180364b40], rdi
je 0x1800babdb
cmp qword [0x180364b48], rdi
je 0x1800babdb
cmp qword [0x180364b50], rdi
je 0x1800babdb
test rax, rax
je 0x1800babdb
xor ecx, ecx
call rdx
mov qword [0x180364ab0], rax
test rax, rax
jne 0x1800baa7d
call qword [0x180364af8]
mov ecx, eax
call fcn.1800bb070
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.1800b03f0
call fcn.1800bac40
jmp 0x1800bac1e
lea r8, [0x180364abc]
mov rcx, rax
lea rdx, [0x180364ab8]
call qword [0x180364b00]
test eax, eax
jne 0x1800baac3
call qword [0x180364af8]
mov ecx, eax
call fcn.1800bb070
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.1800b03f0
call fcn.1800bac40
jmp 0x1800bac1e
mov rcx, qword [0x180364ab0]
mov edx, 0x3055
call qword [0x180364b50]
test rax, rax
je 0x1800baaf2
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.1800af480
test eax, eax
mov eax, 1
jne 0x1800baaf4
mov eax, edi
mov rcx, qword [0x180364ab0]
mov edx, 0x3055
mov dword [0x180364ac4], eax
call qword [0x180364b50]
test rax, rax
je 0x1800bab29
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.1800af480
test eax, eax
mov eax, 1
jne 0x1800bab2b
mov eax, edi
mov rcx, qword [0x180364ab0]
mov edx, 0x3055
mov dword [0x180364ac8], eax
call qword [0x180364b50]
test rax, rax
je 0x1800bab60
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.1800af480
test eax, eax
mov eax, 1
jne 0x1800bab62
mov eax, edi
mov rcx, qword [0x180364ab0]
mov edx, 0x3055
mov dword [0x180364acc], eax
call qword [0x180364b50]
test rax, rax
je 0x1800bab97
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.1800af480
test eax, eax
mov eax, 1
jne 0x1800bab99
mov eax, edi
mov rcx, qword [0x180364ab0]
mov edx, 0x3055
mov dword [0x180364ad0], eax
call qword [0x180364b50]
test rax, rax
je 0x1800babce
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.1800af480
test eax, eax
je 0x1800babce
mov edi, 1
mov dword [0x180364ad4], edi
mov eax, 1
jmp 0x1800bac20
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.1800b03f0
mov rcx, qword [0x180364ab0]
test rcx, rcx
je 0x1800bac05
call qword [0x180364b08]
mov qword [0x180364ab0], rdi
mov rcx, qword [0x180364ad8]
test rcx, rcx
je 0x1800bac1e
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x180364ad8], rdi
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1800be620
add rsp, 0x40
pop rdi
ret