Function at 0x140042530
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x40
xor ebx, ebx
lea rax, str.libEGL.dll
cmp qword [0x14009b2d8], rbx
lea rcx, str.EGL.dll
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rbx
je 0x14004256c
lea eax, [rbx + 1]
add rsp, 0x40
pop rbx
ret
mov qword [rsp + 0x58], rsi
mov esi, ebx
mov qword [rsp + 0x60], rdi
mov rdi, rbx
nop dword [rax + rax]
mov rcx, rax
call sub.KERNEL32.dll_LoadLibraryA
mov qword [0x14009b2d8], rax
mov rcx, rax
test rax, rax
jne 0x1400425a6
mov rax, qword [rsp + rdi*8 + 0x28]
inc rdi
inc esi
test rax, rax
jne 0x140042580
test rcx, rcx
jne 0x1400425ce
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.140034430
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
movsxd rcx, esi
lea rdx, [0x140088dd0]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x20]
call fcn.140048f80
mov ecx, ebx
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x14009b298], ecx
mov rcx, qword [0x14009b2d8]
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglGetConfigs
mov qword [0x14009b2e0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglGetDisplay
mov qword [0x14009b2e8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglGetError
mov qword [0x14009b2f0], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglInitialize
mov qword [0x14009b2f8], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglTerminate
mov qword [0x14009b300], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglBindAPI
mov qword [0x14009b308], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglCreateContext
mov qword [0x14009b310], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglDestroySurface
mov qword [0x14009b318], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglDestroyContext
mov qword [0x14009b320], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglCreateWindowSurface
mov qword [0x14009b328], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglMakeCurrent
mov qword [0x14009b330], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglSwapBuffers
mov qword [0x14009b338], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglSwapInterval
mov qword [0x14009b340], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglQueryString
mov qword [0x14009b348], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x14009b2d8]
lea rdx, str.eglGetProcAddress
mov qword [0x14009b350], rax
call sub.KERNEL32.dll_GetProcAddress
cmp qword [0x14009b2e0], rbx
mov rcx, rax
mov qword [0x14009b358], rax
je 0x140042bb7
cmp qword [0x14009b2e8], rbx
je 0x140042bb7
cmp qword [0x14009b2f0], rbx
je 0x140042bb7
cmp qword [0x14009b2f8], rbx
je 0x140042bb7
cmp qword [0x14009b300], rbx
je 0x140042bb7
cmp qword [0x14009b308], rbx
je 0x140042bb7
cmp qword [0x14009b310], rbx
je 0x140042bb7
cmp qword [0x14009b318], rbx
je 0x140042bb7
cmp qword [0x14009b320], rbx
je 0x140042bb7
cmp qword [0x14009b328], rbx
je 0x140042bb7
cmp qword [0x14009b330], rbx
je 0x140042bb7
cmp qword [0x14009b338], rbx
je 0x140042bb7
cmp qword [0x14009b340], rbx
je 0x140042bb7
cmp qword [0x14009b348], rbx
je 0x140042bb7
mov rax, qword [0x14009b350]
test rax, rax
je 0x140042bb7
test rcx, rcx
je 0x140042bb7
mov edx, 0x3055
xor ecx, ecx
call rax
mov rdi, rax
test rax, rax
je 0x140042891
call qword [0x14009b2f8]
cmp eax, 0x3000
jne 0x140042891
mov dword [0x14009b2b0], 1
jmp 0x14004289d
cmp dword [0x14009b2b0], ebx
je 0x140042945
mov rdx, rdi
lea rcx, str.EGL_EXT_platform_base
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2b4], eax
lea rcx, str.EGL_EXT_platform_x11
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2b8], eax
lea rcx, str.EGL_EXT_platform_wayland
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2bc], eax
lea rcx, str.EGL_ANGLE_platform_angle
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2c4], eax
lea rcx, str.EGL_ANGLE_platform_angle_opengl
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2c8], eax
lea rcx, str.EGL_ANGLE_platform_angle_d3d
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2cc], eax
lea rcx, str.EGL_ANGLE_platform_angle_vulkan
call fcn.140038020
mov rdx, rdi
mov dword [0x14009b2d0], eax
lea rcx, str.EGL_ANGLE_platform_angle_metal
call fcn.140038020
mov dword [0x14009b2d4], eax
cmp dword [0x14009b2b4], ebx
je 0x140042975
lea rcx, str.eglGetPlatformDisplayEXT
call qword [0x14009b358]
lea rcx, str.eglCreatePlatformWindowSurfaceEXT
mov qword [0x14009b360], rax
call qword [0x14009b358]
mov qword [0x14009b368], rax
lea rcx, [rsp + 0x50]
call qword [0x140099ac8]
mov dword [0x14009b280], eax
test eax, eax
je 0x1400429a6
call qword [0x140099ad0]
mov r8, qword [rsp + 0x50]
mov rdx, rax
mov ecx, dword [0x14009b280]
call qword [0x14009b360]
jmp 0x1400429b5
call qword [0x140099ad0]
mov rcx, rax
call qword [0x14009b2f0]
mov rcx, qword [rsp + 0x50]
mov qword [0x14009b288], rax
call fcn.140034940
mov rcx, qword [0x14009b288]
test rcx, rcx
jne 0x140042a0a
call qword [0x14009b2f8]
mov ecx, eax
call fcn.140043090
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.140034430
call fcn.140042c10
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
lea r8, [0x14009b294]
lea rdx, [0x14009b290]
call qword [0x14009b300]
test eax, eax
jne 0x140042a5a
call qword [0x14009b2f8]
mov ecx, eax
call fcn.140043090
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.140034430
call fcn.140042c10
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
mov rcx, qword [0x14009b288]
mov edx, 0x3055
call qword [0x14009b350]
test rax, rax
je 0x140042a89
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.140038020
test eax, eax
mov eax, 1
jne 0x140042a8b
mov eax, ebx
mov rcx, qword [0x14009b288]
mov edx, 0x3055
mov dword [0x14009b29c], eax
call qword [0x14009b350]
test rax, rax
je 0x140042ac0
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.140038020
test eax, eax
mov eax, 1
jne 0x140042ac2
mov eax, ebx
mov rcx, qword [0x14009b288]
mov edx, 0x3055
mov dword [0x14009b2a0], eax
call qword [0x14009b350]
test rax, rax
je 0x140042af7
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.140038020
test eax, eax
mov eax, 1
jne 0x140042af9
mov eax, ebx
mov rcx, qword [0x14009b288]
mov edx, 0x3055
mov dword [0x14009b2a4], eax
call qword [0x14009b350]
test rax, rax
je 0x140042b2e
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.140038020
test eax, eax
mov eax, 1
jne 0x140042b30
mov eax, ebx
mov rcx, qword [0x14009b288]
mov edx, 0x3055
mov dword [0x14009b2a8], eax
call qword [0x14009b350]
test rax, rax
je 0x140042b65
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.140038020
test eax, eax
mov eax, 1
jne 0x140042b67
mov eax, ebx
mov rcx, qword [0x14009b288]
mov edx, 0x3055
mov dword [0x14009b2ac], eax
call qword [0x14009b350]
test rax, rax
je 0x140042b9c
mov rdx, rax
lea rcx, str.EGL_EXT_present_opaque
call fcn.140038020
test eax, eax
je 0x140042b9c
mov ebx, 1
mov rsi, qword [rsp + 0x58]
mov eax, 1
mov rdi, qword [rsp + 0x60]
mov dword [0x14009b2c0], ebx
add rsp, 0x40
pop rbx
ret
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.140034430
mov rcx, qword [0x14009b288]
test rcx, rcx
je 0x140042be1
call qword [0x14009b308]
mov qword [0x14009b288], rbx
mov rcx, qword [0x14009b2d8]
test rcx, rcx
je 0x140042bf9
call fcn.14003a0d0
mov qword [0x14009b2d8], rbx
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret