Function at 0x140048de0
Capabilities:
Link many functions at runtime

Disassembly:
sub rsp, 0x58
mov rax, qword [0x1400cc418]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea rax, str.libEGL.dll
mov qword [rsp + 0x28], rax
lea rax, str.EGL.dll
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0
cmp qword [0x1400d0848], 0
je 0x140048e28
mov eax, 1
jmp 0x140049233
mov dword [rsp + 0x20], 0
jmp 0x140048e3c
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
cmp qword [rsp + rax*8 + 0x28], 0
je 0x140048e6e
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + rax*8 + 0x28]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1400d0848], rax
cmp qword [0x1400d0848], 0
je 0x140048e6c
jmp 0x140048e6e
jmp 0x140048e32
cmp qword [0x1400d0848], 0
jne 0x140048e90
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.14004f400
xor eax, eax
jmp 0x140049233
movsxd rax, dword [rsp + 0x20]
mov r8d, 3
lea rdx, [0x1400bfd34]
mov rcx, qword [rsp + rax*8 + 0x28]
call fcn.14005dfb0
test eax, eax
jne 0x140048eba
mov dword [rsp + 0x24], 1
jmp 0x140048ec2
mov dword [rsp + 0x24], 0
mov eax, dword [rsp + 0x24]
mov dword [0x1400d0830], eax
lea rdx, str.eglGetConfigAttrib
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0850], rax
lea rdx, str.eglGetConfigs
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0858], rax
lea rdx, str.eglGetDisplay
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0860], rax
lea rdx, str.eglGetError
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0868], rax
lea rdx, str.eglInitialize
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0870], rax
lea rdx, str.eglTerminate
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0878], rax
lea rdx, str.eglBindAPI
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0880], rax
lea rdx, str.eglCreateContext
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0888], rax
lea rdx, str.eglDestroySurface
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0890], rax
lea rdx, str.eglDestroyContext
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d0898], rax
lea rdx, str.eglCreateWindowSurface
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08a0], rax
lea rdx, str.eglMakeCurrent
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08a8], rax
lea rdx, str.eglSwapBuffers
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08b0], rax
lea rdx, str.eglSwapInterval
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08b8], rax
lea rdx, str.eglQueryString
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08c0], rax
lea rdx, str.eglGetProcAddress
mov rcx, qword [0x1400d0848]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400d08c8], rax
cmp qword [0x1400d0850], 0
je 0x140049128
cmp qword [0x1400d0858], 0
je 0x140049128
cmp qword [0x1400d0860], 0
je 0x140049128
cmp qword [0x1400d0868], 0
je 0x140049128
cmp qword [0x1400d0870], 0
je 0x140049128
cmp qword [0x1400d0878], 0
je 0x140049128
cmp qword [0x1400d0880], 0
je 0x140049128
cmp qword [0x1400d0888], 0
je 0x140049128
cmp qword [0x1400d0890], 0
je 0x140049128
cmp qword [0x1400d0898], 0
je 0x140049128
cmp qword [0x1400d08a0], 0
je 0x140049128
cmp qword [0x1400d08a8], 0
je 0x140049128
cmp qword [0x1400d08b0], 0
je 0x140049128
cmp qword [0x1400d08b8], 0
je 0x140049128
cmp qword [0x1400d08c0], 0
je 0x140049128
cmp qword [0x1400d08c8], 0
jne 0x140049145
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.14004f400
call fcn.140049250
xor eax, eax
jmp 0x140049233
xor ecx, ecx
call qword [0x1400d0860]
mov qword [0x1400d0820], rax
cmp qword [0x1400d0820], 0
jne 0x14004918b
call qword [0x1400d0868]
mov ecx, eax
call fcn.140052060
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.14004f400
call fcn.140049250
xor eax, eax
jmp 0x140049233
lea r8, [0x1400d082c]
lea rdx, [0x1400d0828]
mov rcx, qword [0x1400d0820]
call qword [0x1400d0870]
test eax, eax
jne 0x1400491d4
call qword [0x1400d0868]
mov ecx, eax
call fcn.140052060
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.14004f400
call fcn.140049250
xor eax, eax
jmp 0x140049233
lea rcx, str.EGL_KHR_create_context
call fcn.1400525f0
mov dword [0x1400d0834], eax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.1400525f0
mov dword [0x1400d0838], eax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.1400525f0
mov dword [0x1400d083c], eax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.1400525f0
mov dword [0x1400d0840], eax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.1400525f0
mov dword [0x1400d0844], eax
mov eax, 1
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140059c60
add rsp, 0x58
ret