Function at 0x1402ca420
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140447c18]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor ebx, ebx
lea rax, str.libEGL.dll
cmp qword [0x140451e78], 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 0x1402ca478
lea eax, [rbx + 1]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140323750
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 [0x140451e78], rax
mov rcx, rax
test rax, rax
jne 0x1402ca4ad
mov rax, qword [rsp + rdi*8 + 0x30]
inc rdi
inc esi
test rax, rax
jne 0x1402ca487
test rcx, rcx
jne 0x1402ca4c8
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.1402bda60
jmp 0x1402caacb
movsxd rcx, esi
lea rdx, [0x140410780]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x28]
call fcn.14033ac60
mov ecx, ebx
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x140451e38], ecx
mov rcx, qword [0x140451e78]
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglGetConfigs
mov qword [0x140451e80], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglGetDisplay
mov qword [0x140451e88], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglGetError
mov qword [0x140451e90], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglInitialize
mov qword [0x140451e98], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglTerminate
mov qword [0x140451ea0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglBindAPI
mov qword [0x140451ea8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglCreateContext
mov qword [0x140451eb0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglDestroySurface
mov qword [0x140451eb8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglDestroyContext
mov qword [0x140451ec0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglCreateWindowSurface
mov qword [0x140451ec8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglMakeCurrent
mov qword [0x140451ed0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglSwapBuffers
mov qword [0x140451ed8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglSwapInterval
mov qword [0x140451ee0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglQueryString
mov qword [0x140451ee8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140451e78]
lea rdx, str.eglGetProcAddress
mov qword [0x140451ef0], rax
call sub.KERNEL32.dll_GetProcAddress
cmp qword [0x140451e80], rbx
mov rcx, rax
mov qword [0x140451ef8], rax
je 0x1402caa89
cmp qword [0x140451e88], rbx
je 0x1402caa89
cmp qword [0x140451e90], rbx
je 0x1402caa89
cmp qword [0x140451e98], rbx
je 0x1402caa89
cmp qword [0x140451ea0], rbx
je 0x1402caa89
cmp qword [0x140451ea8], rbx
je 0x1402caa89
cmp qword [0x140451eb0], rbx
je 0x1402caa89
cmp qword [0x140451eb8], rbx
je 0x1402caa89
cmp qword [0x140451ec0], rbx
je 0x1402caa89
cmp qword [0x140451ec8], rbx
je 0x1402caa89
cmp qword [0x140451ed0], rbx
je 0x1402caa89
cmp qword [0x140451ed8], rbx
je 0x1402caa89
cmp qword [0x140451ee0], rbx
je 0x1402caa89
cmp qword [0x140451ee8], rbx
je 0x1402caa89
mov rax, qword [0x140451ef0]
test rax, rax
je 0x1402caa89
test rcx, rcx
je 0x1402caa89
mov edx, 0x3055
xor ecx, ecx
call rax
mov rdi, rax
test rax, rax
je 0x1402ca78b
call qword [0x140451e98]
cmp eax, 0x3000
jne 0x1402ca78b
mov dword [0x140451e50], 1
jmp 0x1402ca797
cmp dword [0x140451e50], ebx
je 0x1402ca83f
mov rdx, rdi
lea rcx, str.EGL_EXT_platform_base
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e54], eax
lea rcx, str.EGL_EXT_platform_x11
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e58], eax
lea rcx, str.EGL_EXT_platform_wayland
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e5c], eax
lea rcx, str.EGL_ANGLE_platform_angle
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e64], eax
lea rcx, str.EGL_ANGLE_platform_angle_opengl
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e68], eax
lea rcx, str.EGL_ANGLE_platform_angle_d3d
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e6c], eax
lea rcx, str.EGL_ANGLE_platform_angle_vulkan
call fcn.1402bf760
mov rdx, rdi
mov dword [0x140451e70], eax
lea rcx, str.EGL_ANGLE_platform_angle_metal
call fcn.1402bf760
mov dword [0x140451e74], eax
cmp dword [0x140451e54], ebx
je 0x1402ca86f
lea rcx, str.eglGetPlatformDisplayEXT
call qword [0x140451ef8]
lea rcx, str.eglCreatePlatformWindowSurfaceEXT
mov qword [0x140451f00], rax
call qword [0x140451ef8]
mov qword [0x140451f08], rax
lea rcx, [rsp + 0x20]
call qword [0x140450668]
mov dword [0x140451e20], eax
test eax, eax
je 0x1402ca8a0
call qword [0x140450670]
mov r8, qword [rsp + 0x20]
mov rdx, rax
mov ecx, dword [0x140451e20]
call qword [0x140451f00]
jmp 0x1402ca8af
call qword [0x140450670]
mov rcx, rax
call qword [0x140451e90]
mov rcx, qword [rsp + 0x20]
mov qword [0x140451e28], rax
call fcn.1402bdfb0
mov rcx, qword [0x140451e28]
test rcx, rcx
jne 0x1402ca8f7
call qword [0x140451e98]
mov ecx, eax
call fcn.1402caf70
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.1402bda60
call fcn.1402caaf0
jmp 0x1402caacb
lea r8, [0x140451e34]
lea rdx, [0x140451e30]
call qword [0x140451ea0]
test eax, eax
jne 0x1402ca93a
call qword [0x140451e98]
mov ecx, eax
call fcn.1402caf70
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.1402bda60
call fcn.1402caaf0
jmp 0x1402caacb
mov rcx, qword [0x140451e28]
mov edx, 0x3055
call qword [0x140451ef0]
test rax, rax
je 0x1402ca969
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.1402bf760
test eax, eax
mov eax, 1
jne 0x1402ca96b
mov eax, ebx
mov rcx, qword [0x140451e28]
mov edx, 0x3055
mov dword [0x140451e3c], eax
call qword [0x140451ef0]
test rax, rax
je 0x1402ca9a0
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.1402bf760
test eax, eax
mov eax, 1
jne 0x1402ca9a2
mov eax, ebx
mov rcx, qword [0x140451e28]
mov edx, 0x3055
mov dword [0x140451e40], eax
call qword [0x140451ef0]
test rax, rax
je 0x1402ca9d7
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.1402bf760
test eax, eax
mov eax, 1
jne 0x1402ca9d9
mov eax, ebx
mov rcx, qword [0x140451e28]
mov edx, 0x3055
mov dword [0x140451e44], eax
call qword [0x140451ef0]
test rax, rax
je 0x1402caa0e
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.1402bf760
test eax, eax
mov eax, 1
jne 0x1402caa10
mov eax, ebx
mov rcx, qword [0x140451e28]
mov edx, 0x3055
mov dword [0x140451e48], eax
call qword [0x140451ef0]
test rax, rax
je 0x1402caa45
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.1402bf760
test eax, eax
mov eax, 1
jne 0x1402caa47
mov eax, ebx
mov rcx, qword [0x140451e28]
mov edx, 0x3055
mov dword [0x140451e4c], eax
call qword [0x140451ef0]
test rax, rax
je 0x1402caa7c
mov rdx, rax
lea rcx, str.EGL_EXT_present_opaque
call fcn.1402bf760
test eax, eax
je 0x1402caa7c
mov ebx, 1
mov dword [0x140451e60], ebx
mov eax, 1
jmp 0x1402caacd
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.1402bda60
mov rcx, qword [0x140451e28]
test rcx, rcx
je 0x1402caab3
call qword [0x140451ea8]
mov qword [0x140451e28], rbx
mov rcx, qword [0x140451e78]
test rcx, rcx
je 0x1402caacb
call fcn.1402cbe60
mov qword [0x140451e78], rbx
xor eax, eax
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140323750
add rsp, 0x50
pop rbx
ret