Function at 0x140054540
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x40
xor ebx, ebx
lea rax, str.libEGL.dll
cmp qword [0x140095e08], 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 0x14005457c
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 [0x140095e08], rax
mov rcx, rax
test rax, rax
jne 0x1400545b6
mov rax, qword [rsp + rdi*8 + 0x28]
inc rdi
inc esi
test rax, rax
jne 0x140054590
test rcx, rcx
jne 0x1400545de
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.14004ea70
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
movsxd rcx, esi
lea rdx, [0x140076650]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x20]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov ecx, ebx
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x140095dc8], ecx
mov rcx, qword [0x140095e08]
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglGetConfigs
mov qword [0x140095e10], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglGetDisplay
mov qword [0x140095e18], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglGetError
mov qword [0x140095e20], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglInitialize
mov qword [0x140095e28], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglTerminate
mov qword [0x140095e30], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglBindAPI
mov qword [0x140095e38], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglCreateContext
mov qword [0x140095e40], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglDestroySurface
mov qword [0x140095e48], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglDestroyContext
mov qword [0x140095e50], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglCreateWindowSurface
mov qword [0x140095e58], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglMakeCurrent
mov qword [0x140095e60], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglSwapBuffers
mov qword [0x140095e68], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglSwapInterval
mov qword [0x140095e70], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglQueryString
mov qword [0x140095e78], rax
call sub.KERNEL32.dll_GetProcAddress
mov rcx, qword [0x140095e08]
lea rdx, str.eglGetProcAddress
mov qword [0x140095e80], rax
call sub.KERNEL32.dll_GetProcAddress
cmp qword [0x140095e10], rbx
mov rcx, rax
mov qword [0x140095e88], rax
je 0x140054bc8
cmp qword [0x140095e18], rbx
je 0x140054bc8
cmp qword [0x140095e20], rbx
je 0x140054bc8
cmp qword [0x140095e28], rbx
je 0x140054bc8
cmp qword [0x140095e30], rbx
je 0x140054bc8
cmp qword [0x140095e38], rbx
je 0x140054bc8
cmp qword [0x140095e40], rbx
je 0x140054bc8
cmp qword [0x140095e48], rbx
je 0x140054bc8
cmp qword [0x140095e50], rbx
je 0x140054bc8
cmp qword [0x140095e58], rbx
je 0x140054bc8
cmp qword [0x140095e60], rbx
je 0x140054bc8
cmp qword [0x140095e68], rbx
je 0x140054bc8
cmp qword [0x140095e70], rbx
je 0x140054bc8
cmp qword [0x140095e78], rbx
je 0x140054bc8
mov rax, qword [0x140095e80]
test rax, rax
je 0x140054bc8
test rcx, rcx
je 0x140054bc8
mov edx, 0x3055
xor ecx, ecx
call rax
mov rdi, rax
test rax, rax
je 0x1400548a2
call qword [0x140095e28]
cmp eax, 0x3000
jne 0x1400548a2
mov dword [0x140095de0], 1
jmp 0x1400548ae
cmp dword [0x140095de0], ebx
je 0x140054956
mov rdx, rdi
lea rcx, str.EGL_EXT_platform_base
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095de4], eax
lea rcx, str.EGL_EXT_platform_x11
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095de8], eax
lea rcx, str.EGL_EXT_platform_wayland
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095dec], eax
lea rcx, str.EGL_ANGLE_platform_angle
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095df4], eax
lea rcx, str.EGL_ANGLE_platform_angle_opengl
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095df8], eax
lea rcx, str.EGL_ANGLE_platform_angle_d3d
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095dfc], eax
lea rcx, str.EGL_ANGLE_platform_angle_vulkan
call fcn.14004fe90
mov rdx, rdi
mov dword [0x140095e00], eax
lea rcx, str.EGL_ANGLE_platform_angle_metal
call fcn.14004fe90
mov dword [0x140095e04], eax
cmp dword [0x140095de4], ebx
je 0x140054986
lea rcx, str.eglGetPlatformDisplayEXT
call qword [0x140095e88]
lea rcx, str.eglCreatePlatformWindowSurfaceEXT
mov qword [0x140095e90], rax
call qword [0x140095e88]
mov qword [0x140095e98], rax
lea rcx, [rsp + 0x50]
call qword [0x1400945f8]
mov dword [0x140095db0], eax
test eax, eax
je 0x1400549b7
call qword [0x140094600]
mov r8, qword [rsp + 0x50]
mov rdx, rax
mov ecx, dword [0x140095db0]
call qword [0x140095e90]
jmp 0x1400549c6
call qword [0x140094600]
mov rcx, rax
call qword [0x140095e20]
mov rcx, qword [rsp + 0x50]
mov qword [0x140095db8], rax
call fcn.14004ef80
mov rcx, qword [0x140095db8]
test rcx, rcx
jne 0x140054a1b
call qword [0x140095e28]
mov ecx, eax
call fcn.1400550a0
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.14004ea70
call fcn.140054c20
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
lea r8, [0x140095dc4]
lea rdx, [0x140095dc0]
call qword [0x140095e30]
test eax, eax
jne 0x140054a6b
call qword [0x140095e28]
mov ecx, eax
call fcn.1400550a0
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.14004ea70
call fcn.140054c20
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
mov rcx, qword [0x140095db8]
mov edx, 0x3055
call qword [0x140095e80]
test rax, rax
je 0x140054a9a
mov rdx, rax
lea rcx, str.EGL_KHR_create_context
call fcn.14004fe90
test eax, eax
mov eax, 1
jne 0x140054a9c
mov eax, ebx
mov rcx, qword [0x140095db8]
mov edx, 0x3055
mov dword [0x140095dcc], eax
call qword [0x140095e80]
test rax, rax
je 0x140054ad1
mov rdx, rax
lea rcx, str.EGL_KHR_create_context_no_error
call fcn.14004fe90
test eax, eax
mov eax, 1
jne 0x140054ad3
mov eax, ebx
mov rcx, qword [0x140095db8]
mov edx, 0x3055
mov dword [0x140095dd0], eax
call qword [0x140095e80]
test rax, rax
je 0x140054b08
mov rdx, rax
lea rcx, str.EGL_KHR_gl_colorspace
call fcn.14004fe90
test eax, eax
mov eax, 1
jne 0x140054b0a
mov eax, ebx
mov rcx, qword [0x140095db8]
mov edx, 0x3055
mov dword [0x140095dd4], eax
call qword [0x140095e80]
test rax, rax
je 0x140054b3f
mov rdx, rax
lea rcx, str.EGL_KHR_get_all_proc_addresses
call fcn.14004fe90
test eax, eax
mov eax, 1
jne 0x140054b41
mov eax, ebx
mov rcx, qword [0x140095db8]
mov edx, 0x3055
mov dword [0x140095dd8], eax
call qword [0x140095e80]
test rax, rax
je 0x140054b76
mov rdx, rax
lea rcx, str.EGL_KHR_context_flush_control
call fcn.14004fe90
test eax, eax
mov eax, 1
jne 0x140054b78
mov eax, ebx
mov rcx, qword [0x140095db8]
mov edx, 0x3055
mov dword [0x140095ddc], eax
call qword [0x140095e80]
test rax, rax
je 0x140054bad
mov rdx, rax
lea rcx, str.EGL_EXT_present_opaque
call fcn.14004fe90
test eax, eax
je 0x140054bad
mov ebx, 1
mov rsi, qword [rsp + 0x58]
mov eax, 1
mov rdi, qword [rsp + 0x60]
mov dword [0x140095df0], ebx
add rsp, 0x40
pop rbx
ret
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.14004ea70
mov rcx, qword [0x140095db8]
test rcx, rcx
je 0x140054bf2
call qword [0x140095e38]
mov qword [0x140095db8], rbx
mov rcx, qword [0x140095e08]
test rcx, rcx
je 0x140054c0a
call fcn.140056cc0
mov qword [0x140095e08], rbx
mov rsi, qword [rsp + 0x58]
xor eax, eax
mov rdi, qword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret