Function at 0x14004bfa0
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x40
mov rax, qword [0x1400baf38]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor edi, edi
lea rax, str.libEGL.dll
cmp qword [0x1400bf6f0], rdi
lea rcx, str.EGL.dll
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rdi
je 0x14004bff3
lea eax, [rdi + 1]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14004d4a0
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 [0x1400bf6f0], rax
test rax, rax
jne 0x14004c03c
mov rax, qword [rsp + rbx*8 + 0x28]
inc rbx
inc esi
test rax, rax
jne 0x14004c002
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.1400416a0
jmp 0x14004c4f5
movsxd rcx, esi
lea rdx, [0x1400aa170]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x20]
call fcn.140051cd0
mov ecx, edi
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x1400bf6d0], ecx
mov rcx, qword [0x1400bf6f0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglGetConfigs
mov qword [0x1400bf6f8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglGetDisplay
mov qword [0x1400bf700], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglGetError
mov qword [0x1400bf708], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglInitialize
mov qword [0x1400bf710], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglTerminate
mov qword [0x1400bf718], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglBindAPI
mov qword [0x1400bf720], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglCreateContext
mov qword [0x1400bf728], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglDestroySurface
mov qword [0x1400bf730], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglDestroyContext
mov qword [0x1400bf738], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglCreateWindowSurface
mov qword [0x1400bf740], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglMakeCurrent
mov qword [0x1400bf748], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglSwapBuffers
mov qword [0x1400bf750], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglSwapInterval
mov qword [0x1400bf758], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglQueryString
mov qword [0x1400bf760], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400bf6f0]
lea rdx, str.eglGetProcAddress
mov qword [0x1400bf768], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x1400bf6f8], rdi
mov qword [0x1400bf770], rax
je 0x14004c4b2
cmp qword [0x1400bf700], rdi
je 0x14004c4b2
mov rdx, qword [0x1400bf708]
test rdx, rdx
je 0x14004c4b2
cmp qword [0x1400bf710], rdi
je 0x14004c4b2
cmp qword [0x1400bf718], rdi
je 0x14004c4b2
cmp qword [0x1400bf720], rdi
je 0x14004c4b2
cmp qword [0x1400bf728], rdi
je 0x14004c4b2
cmp qword [0x1400bf730], rdi
je 0x14004c4b2
cmp qword [0x1400bf738], rdi
je 0x14004c4b2
cmp qword [0x1400bf740], rdi
je 0x14004c4b2
cmp qword [0x1400bf748], rdi
je 0x14004c4b2
cmp qword [0x1400bf750], rdi
je 0x14004c4b2
cmp qword [0x1400bf758], rdi
je 0x14004c4b2
cmp qword [0x1400bf760], rdi
je 0x14004c4b2
cmp qword [0x1400bf768], rdi
je 0x14004c4b2
test rax, rax
je 0x14004c4b2
xor ecx, ecx
call rdx
mov qword [0x1400bf6c0], rax
test rax, rax
jne 0x14004c31d
call qword [0x1400bf710]
mov ecx, eax
call fcn.14004c950
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.1400416a0
call fcn.14004c520
jmp 0x14004c4f5
lea r8, [0x1400bf6cc]
mov rcx, rax
lea rdx, [0x1400bf6c8]
call qword [0x1400bf718]
test eax, eax
jne 0x14004c363
call qword [0x1400bf710]
mov ecx, eax
call fcn.14004c950
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.1400416a0
call fcn.14004c520
jmp 0x14004c4f5
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
call qword [0x1400bf768]
test rax, rax
je 0x14004c392
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.140043050
test eax, eax
mov eax, 1
jne 0x14004c394
mov eax, edi
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
mov dword [0x1400bf6d4], eax
call qword [0x1400bf768]
test rax, rax
je 0x14004c3c9
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.140043050
test eax, eax
mov eax, 1
jne 0x14004c3cb
mov eax, edi
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
mov dword [0x1400bf6d8], eax
call qword [0x1400bf768]
test rax, rax
je 0x14004c400
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.140043050
test eax, eax
mov eax, 1
jne 0x14004c402
mov eax, edi
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
mov dword [0x1400bf6dc], eax
call qword [0x1400bf768]
test rax, rax
je 0x14004c437
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.140043050
test eax, eax
mov eax, 1
jne 0x14004c439
mov eax, edi
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
mov dword [0x1400bf6e0], eax
call qword [0x1400bf768]
test rax, rax
je 0x14004c46e
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.140043050
test eax, eax
mov eax, 1
jne 0x14004c470
mov eax, edi
mov rcx, qword [0x1400bf6c0]
mov edx, 0x3055
mov dword [0x1400bf6e4], eax
call qword [0x1400bf768]
test rax, rax
je 0x14004c4a5
mov rdx, rax
lea rcx, str.EGL_EXT_present_opaque
call fcn.140043050
test eax, eax
je 0x14004c4a5
mov edi, 1
mov dword [0x1400bf6e8], edi
mov eax, 1
jmp 0x14004c4f7
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.1400416a0
mov rcx, qword [0x1400bf6c0]
test rcx, rcx
je 0x14004c4dc
call qword [0x1400bf720]
mov qword [0x1400bf6c0], rdi
mov rcx, qword [0x1400bf6f0]
test rcx, rcx
je 0x14004c4f5
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x1400bf6f0], rdi
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14004d4a0
add rsp, 0x40
pop rdi
ret