Function at 0x140038040
Capabilities:
Link many functions at runtime

Disassembly:
push rdi
sub rsp, 0x50
mov rax, qword [0x140093880]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edi, edi
lea rax, str.libEGL.dll
cmp qword [0x1400a1a28], rdi
lea rcx, str.EGL.dll
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rdi
je 0x140038098
lea eax, [rdi + 1]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400451f0
add rsp, 0x50
pop rdi
ret
mov qword [rsp + 0x60], rbx
mov rbx, rdi
mov qword [rsp + 0x68], rsi
mov esi, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1400a1a28], rax
mov rcx, rax
test rax, rax
jne 0x1400380ce
mov rax, qword [rsp + rbx*8 + 0x30]
inc rbx
inc esi
test rax, rax
jne 0x1400380a7
test rcx, rcx
jne 0x1400380e9
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.140039200
jmp 0x140038a85
movsxd rcx, esi
lea rdx, [0x140087a70]
mov r8d, 3
mov rcx, qword [rsp + rcx*8 + 0x28]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov ecx, edi
lea rdx, str.eglGetConfigAttrib
test eax, eax
sete cl
mov dword [0x1400a19e8], ecx
mov rcx, qword [0x1400a1a28]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglGetConfigs
mov qword [0x1400a1a30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglGetDisplay
mov qword [0x1400a1a38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglGetError
mov qword [0x1400a1a40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglInitialize
mov qword [0x1400a1a48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglTerminate
mov qword [0x1400a1a50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglBindAPI
mov qword [0x1400a1a58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglCreateContext
mov qword [0x1400a1a60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglDestroySurface
mov qword [0x1400a1a68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglDestroyContext
mov qword [0x1400a1a70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglCreateWindowSurface
mov qword [0x1400a1a78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglMakeCurrent
mov qword [0x1400a1a80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglSwapBuffers
mov qword [0x1400a1a88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglSwapInterval
mov qword [0x1400a1a90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglQueryString
mov qword [0x1400a1a98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1a28]
lea rdx, str.eglGetProcAddress
mov qword [0x1400a1aa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x1400a1a30], rdi
mov rcx, rax
mov qword [0x1400a1aa8], rax
je 0x140038a42
cmp qword [0x1400a1a38], rdi
je 0x140038a42
cmp qword [0x1400a1a40], rdi
je 0x140038a42
cmp qword [0x1400a1a48], rdi
je 0x140038a42
cmp qword [0x1400a1a50], rdi
je 0x140038a42
cmp qword [0x1400a1a58], rdi
je 0x140038a42
cmp qword [0x1400a1a60], rdi
je 0x140038a42
cmp qword [0x1400a1a68], rdi
je 0x140038a42
cmp qword [0x1400a1a70], rdi
je 0x140038a42
cmp qword [0x1400a1a78], rdi
je 0x140038a42
cmp qword [0x1400a1a80], rdi
je 0x140038a42
cmp qword [0x1400a1a88], rdi
je 0x140038a42
cmp qword [0x1400a1a90], rdi
je 0x140038a42
cmp qword [0x1400a1a98], rdi
je 0x140038a42
mov rax, qword [0x1400a1aa0]
test rax, rax
je 0x140038a42
test rcx, rcx
je 0x140038a42
mov edx, 0x3055
xor ecx, ecx
call rax
mov rbx, rax
test rax, rax
je 0x1400383bd
call qword [0x1400a1a48]
cmp eax, 0x3000
jne 0x1400383bd
mov dword [0x1400a1a00], 1
jmp 0x1400383c9
cmp dword [0x1400a1a00], edi
je 0x140038644
lea rdx, str.EGL_EXT_platform_base
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003840c
lea rcx, [rax + 0x15]
cmp rax, rsi
je 0x1400383ef
cmp byte [rax - 1], 0x20
jne 0x1400383f8
test byte [rcx], 0xdf
je 0x1400386a5
lea rdx, str.EGL_EXT_platform_base
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400383e0
mov eax, edi
lea rdx, str.EGL_EXT_platform_x11
mov dword [0x1400a1a04], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003845c
nop dword [rax + rax]
lea rcx, [rax + 0x14]
cmp rax, rsi
je 0x14003843f
cmp byte [rax - 1], 0x20
jne 0x140038448
test byte [rcx], 0xdf
je 0x1400386af
lea rdx, str.EGL_EXT_platform_x11
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038430
mov eax, edi
lea rdx, str.EGL_EXT_platform_wayland
mov dword [0x1400a1a08], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x1400384ac
nop dword [rax + rax]
lea rcx, [rax + 0x18]
cmp rax, rsi
je 0x14003848f
cmp byte [rax - 1], 0x20
jne 0x140038498
test byte [rcx], 0xdf
je 0x1400386b9
lea rdx, str.EGL_EXT_platform_wayland
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038480
mov eax, edi
lea rdx, str.EGL_ANGLE_platform_angle
mov dword [0x1400a1a0c], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x1400384fc
nop dword [rax + rax]
lea rcx, [rax + 0x18]
cmp rax, rsi
je 0x1400384df
cmp byte [rax - 1], 0x20
jne 0x1400384e8
test byte [rcx], 0xdf
je 0x1400386c3
lea rdx, str.EGL_ANGLE_platform_angle
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400384d0
mov eax, edi
lea rdx, str.EGL_ANGLE_platform_angle_opengl
mov dword [0x1400a1a14], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003854c
nop dword [rax + rax]
lea rcx, [rax + 0x1f]
cmp rax, rsi
je 0x14003852f
cmp byte [rax - 1], 0x20
jne 0x140038538
test byte [rcx], 0xdf
je 0x1400386cd
lea rdx, str.EGL_ANGLE_platform_angle_opengl
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038520
mov eax, edi
lea rdx, str.EGL_ANGLE_platform_angle_d3d
mov dword [0x1400a1a18], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003859c
nop dword [rax + rax]
lea rcx, [rax + 0x1c]
cmp rax, rsi
je 0x14003857f
cmp byte [rax - 1], 0x20
jne 0x140038588
test byte [rcx], 0xdf
je 0x1400386d7
lea rdx, str.EGL_ANGLE_platform_angle_d3d
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038570
mov eax, edi
lea rdx, str.EGL_ANGLE_platform_angle_vulkan
mov dword [0x1400a1a1c], eax
mov rcx, rbx
mov rsi, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x1400385ec
nop dword [rax + rax]
lea rcx, [rax + 0x1f]
cmp rax, rsi
je 0x1400385cf
cmp byte [rax - 1], 0x20
jne 0x1400385d8
test byte [rcx], 0xdf
je 0x1400386e1
lea rdx, str.EGL_ANGLE_platform_angle_vulkan
mov rsi, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400385c0
mov eax, edi
lea rdx, str.EGL_ANGLE_platform_angle_metal
mov dword [0x1400a1a20], eax
mov rcx, rbx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003863c
nop dword [rax + rax]
lea rcx, [rax + 0x1e]
cmp rax, rbx
je 0x14003861f
cmp byte [rax - 1], 0x20
jne 0x140038628
test byte [rcx], 0xdf
je 0x1400386eb
lea rdx, str.EGL_ANGLE_platform_angle_metal
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038610
mov eax, edi
mov dword [0x1400a1a24], eax
cmp dword [0x1400a1a04], edi
je 0x140038674
lea rcx, str.eglGetPlatformDisplayEXT
call qword [0x1400a1aa8]
lea rcx, str.eglCreatePlatformWindowSurfaceEXT
mov qword [0x1400a1ab0], rax
call qword [0x1400a1aa8]
mov qword [0x1400a1ab8], rax
lea rcx, [rsp + 0x20]
call qword [0x1400a0218]
mov dword [0x1400a19d0], eax
test eax, eax
je 0x1400386f5
call qword [0x1400a0220]
mov r8, qword [rsp + 0x20]
mov rdx, rax
mov ecx, dword [0x1400a19d0]
call qword [0x1400a1ab0]
jmp 0x140038704
mov eax, 1
jmp 0x14003840e
mov eax, 1
jmp 0x14003845e
mov eax, 1
jmp 0x1400384ae
mov eax, 1
jmp 0x1400384fe
mov eax, 1
jmp 0x14003854e
mov eax, 1
jmp 0x14003859e
mov eax, 1
jmp 0x1400385ee
mov eax, 1
jmp 0x14003863e
call qword [0x1400a0220]
mov rcx, rax
call qword [0x1400a1a40]
mov rcx, qword [rsp + 0x20]
mov qword [0x1400a19d8], rax
test rcx, rcx
je 0x140038729
mov rdx, qword [0x1400a0000]
call qword [0x14009fff8]
mov rax, qword [0x1400a19d8]
test rax, rax
jne 0x140038759
call qword [0x1400a1a48]
mov ecx, eax
call fcn.14003fcb0
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.140039200
call fcn.14003ca60
jmp 0x140038a85
lea r8, [0x1400a19e4]
mov rcx, rax
lea rdx, [0x1400a19e0]
call qword [0x1400a1a50]
test eax, eax
jne 0x14003879f
call qword [0x1400a1a48]
mov ecx, eax
call fcn.14003fcb0
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.140039200
call fcn.14003ca60
jmp 0x140038a85
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x1400387fc
lea rdx, str.EGL_KHR_create_context
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x1400387fc
nop dword [rax]
lea rcx, [rax + 0x16]
cmp rax, rbx
je 0x1400387df
cmp byte [rax - 1], 0x20
jne 0x1400387e8
test byte [rcx], 0xdf
je 0x1400389fe
lea rdx, str.EGL_KHR_create_context
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400387d0
mov eax, edi
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
mov dword [0x1400a19ec], eax
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x14003885e
lea rdx, str.EGL_KHR_create_context_no_error
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003885e
lea rcx, [rax + 0x1f]
cmp rax, rbx
je 0x140038841
cmp byte [rax - 1], 0x20
jne 0x14003884a
test byte [rcx], 0xdf
je 0x140038a08
lea rdx, str.EGL_KHR_create_context_no_error
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038832
mov eax, edi
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
mov dword [0x1400a19f0], eax
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x1400388c0
lea rdx, str.EGL_KHR_gl_colorspace
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x1400388c0
lea rcx, [rax + 0x15]
cmp rax, rbx
je 0x1400388a3
cmp byte [rax - 1], 0x20
jne 0x1400388ac
test byte [rcx], 0xdf
je 0x140038a12
lea rdx, str.EGL_KHR_gl_colorspace
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038894
mov eax, edi
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
mov dword [0x1400a19f4], eax
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x140038922
lea rdx, str.EGL_KHR_get_all_proc_addresses
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x140038922
lea rcx, [rax + 0x1e]
cmp rax, rbx
je 0x140038905
cmp byte [rax - 1], 0x20
jne 0x14003890e
test byte [rcx], 0xdf
je 0x140038a1c
lea rdx, str.EGL_KHR_get_all_proc_addresses
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400388f6
mov eax, edi
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
mov dword [0x1400a19f8], eax
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x14003898c
lea rdx, str.EGL_KHR_context_flush_control
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x14003898c
nop dword [rax + rax]
lea rcx, [rax + 0x1d]
cmp rax, rbx
je 0x14003896f
cmp byte [rax - 1], 0x20
jne 0x140038978
test byte [rcx], 0xdf
je 0x140038a26
lea rdx, str.EGL_KHR_context_flush_control
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x140038960
mov eax, edi
mov rcx, qword [0x1400a19d8]
mov edx, 0x3055
mov dword [0x1400a19fc], eax
call qword [0x1400a1aa0]
mov rbx, rax
test rax, rax
je 0x140038a35
lea rdx, str.EGL_EXT_present_opaque
mov rcx, rax
call sub.VCRUNTIME140.dll_strstr
test rax, rax
je 0x140038a35
lea rcx, [rax + 0x16]
cmp rax, rbx
je 0x1400389d5
cmp byte [rax - 1], 0x20
jne 0x1400389da
test byte [rcx], 0xdf
je 0x140038a30
lea rdx, str.EGL_EXT_present_opaque
mov rbx, rcx
call sub.VCRUNTIME140.dll_strstr
test rax, rax
jne 0x1400389c6
mov dword [0x1400a1a10], edi
mov eax, 1
jmp 0x140038a87
mov eax, 1
jmp 0x1400387fe
mov eax, 1
jmp 0x140038860
mov eax, 1
jmp 0x1400388c2
mov eax, 1
jmp 0x140038924
mov eax, 1
jmp 0x14003898e
mov edi, 1
mov dword [0x1400a1a10], edi
mov eax, 1
jmp 0x140038a87
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.140039200
mov rcx, qword [0x1400a19d8]
test rcx, rcx
je 0x140038a6c
call qword [0x1400a1a58]
mov qword [0x1400a19d8], rdi
mov rcx, qword [0x1400a1a28]
test rcx, rcx
je 0x140038a85
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x1400a1a28], rdi
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400451f0
add rsp, 0x50
pop rdi
ret