Function at 0x140049b10
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x40
xor ebx, ebx
lea rax, str.libEGL.dll
cmp qword [0x1401413e0], rbx
lea rcx, str.EGL.dll
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x30], rbx
je 0x140049b47
lea eax, [rbx + 1]
add rsp, 0x40
pop rbx
ret
mov qword [rsp + 0x50], rsi
mov esi, ebx
mov qword [rsp + 0x58], rdi
mov rdi, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [0x1401413e0], rax
mov rcx, rax
test rax, rax
jne 0x140049b7d
mov rax, qword [rsp + rdi*8 + 0x28]
inc rdi
inc esi
test rax, rax
jne 0x140049b56
test rcx, rcx
jne 0x140049ba5
lea rdx, str.EGL:_Library_not_found
mov ecx, 0x10006
call fcn.14004aaa0
mov rsi, qword [rsp + 0x50]
xor eax, eax
mov rdi, qword [rsp + 0x58]
add rsp, 0x40
pop rbx
ret
movsxd rcx, esi
lea rdx, [0x1400e42e4]
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 [0x1401413c0], ecx
mov rcx, qword [0x1401413e0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglGetConfigs
mov qword [0x1401413e8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglGetDisplay
mov qword [0x1401413f0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglGetError
mov qword [0x1401413f8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglInitialize
mov qword [0x140141400], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglTerminate
mov qword [0x140141408], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglBindAPI
mov qword [0x140141410], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglCreateContext
mov qword [0x140141418], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglDestroySurface
mov qword [0x140141420], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglDestroyContext
mov qword [0x140141428], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglCreateWindowSurface
mov qword [0x140141430], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglMakeCurrent
mov qword [0x140141438], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglSwapBuffers
mov qword [0x140141440], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglSwapInterval
mov qword [0x140141448], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglQueryString
mov qword [0x140141450], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1401413e0]
lea rdx, str.eglGetProcAddress
mov qword [0x140141458], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x1401413e8], rbx
mov qword [0x140141460], rax
je 0x14004a196
cmp qword [0x1401413f0], rbx
je 0x14004a196
mov rdx, qword [0x1401413f8]
test rdx, rdx
je 0x14004a196
cmp qword [0x140141400], rbx
je 0x14004a196
cmp qword [0x140141408], rbx
je 0x14004a196
cmp qword [0x140141410], rbx
je 0x14004a196
cmp qword [0x140141418], rbx
je 0x14004a196
cmp qword [0x140141420], rbx
je 0x14004a196
cmp qword [0x140141428], rbx
je 0x14004a196
cmp qword [0x140141430], rbx
je 0x14004a196
cmp qword [0x140141438], rbx
je 0x14004a196
cmp qword [0x140141440], rbx
je 0x14004a196
cmp qword [0x140141448], rbx
je 0x14004a196
cmp qword [0x140141450], rbx
je 0x14004a196
cmp qword [0x140141458], rbx
je 0x14004a196
test rax, rax
je 0x14004a196
xor ecx, ecx
call rdx
mov qword [0x1401413b0], rax
test rax, rax
jne 0x140049e82
call qword [0x140141400]
mov ecx, eax
call fcn.1400494b0
mov r8, rax
lea rdx, str.EGL:_Failed_to_get_EGL_display:__s
mov ecx, 0x10006
call fcn.14004aaa0
jmp 0x14004a1a7
lea r8, [0x1401413bc]
mov rcx, rax
lea rdx, [0x1401413b8]
call qword [0x140141408]
test eax, eax
jne 0x140049ec3
call qword [0x140141400]
mov ecx, eax
call fcn.1400494b0
mov r8, rax
lea rdx, str.EGL:_Failed_to_initialize_EGL:__s
mov ecx, 0x10006
call fcn.14004aaa0
jmp 0x14004a1a7
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x140049f1f
lea rdx, str.EGL_KHR_create_context
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x140049f1f
lea rcx, [rax + 0x16]
cmp rax, rdi
je 0x140049f01
cmp byte [rax - 1], 0x20
jne 0x140049f0a
test byte [rcx], 0xdf
je 0x14004a144
lea rdx, str.EGL_KHR_create_context
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140049ef2
mov eax, ebx
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
mov dword [0x1401413c4], eax
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x140049f83
lea rdx, str.EGL_KHR_create_context_no_error
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x140049f83
lea rcx, [rax + 0x1f]
cmp rax, rdi
je 0x140049f65
cmp byte [rax - 1], 0x20
jne 0x140049f6e
test byte [rcx], 0xdf
je 0x14004a14e
lea rdx, str.EGL_KHR_create_context_no_error
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140049f56
mov eax, ebx
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
mov dword [0x1401413c8], eax
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x140049fed
lea rdx, str.EGL_KHR_gl_colorspace
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x140049fed
nop word [rax + rax]
lea rcx, [rax + 0x15]
cmp rax, rdi
je 0x140049fcf
cmp byte [rax - 1], 0x20
jne 0x140049fd8
test byte [rcx], 0xdf
je 0x14004a158
lea rdx, str.EGL_KHR_gl_colorspace
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140049fc0
mov eax, ebx
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
mov dword [0x1401413cc], eax
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x14004a051
lea rdx, str.EGL_KHR_get_all_proc_addresses
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x14004a051
lea rcx, [rax + 0x1e]
cmp rax, rdi
je 0x14004a033
cmp byte [rax - 1], 0x20
jne 0x14004a03c
test byte [rcx], 0xdf
je 0x14004a162
lea rdx, str.EGL_KHR_get_all_proc_addresses
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x14004a024
mov eax, ebx
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
mov dword [0x1401413d0], eax
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x14004a0bd
lea rdx, str.EGL_KHR_context_flush_control
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x14004a0bd
nop dword [rax + rax]
lea rcx, [rax + 0x1d]
cmp rax, rdi
je 0x14004a09f
cmp byte [rax - 1], 0x20
jne 0x14004a0a8
test byte [rcx], 0xdf
je 0x14004a16c
lea rdx, str.EGL_KHR_context_flush_control
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x14004a090
mov eax, ebx
mov rcx, qword [0x1401413b0]
mov edx, 0x3055
mov dword [0x1401413d4], eax
call qword [0x140141458]
mov rdi, rax
test rax, rax
je 0x14004a17b
lea rdx, str.EGL_EXT_present_opaque
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x14004a17b
nop dword [rax]
lea rcx, [rax + 0x16]
cmp rax, rdi
je 0x14004a10f
cmp byte [rax - 1], 0x20
jne 0x14004a114
test byte [rcx], 0xdf
je 0x14004a176
lea rdx, str.EGL_EXT_present_opaque
mov rdi, rcx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x14004a100
mov rsi, qword [rsp + 0x50]
mov eax, 1
mov rdi, qword [rsp + 0x58]
mov dword [0x1401413d8], ebx
add rsp, 0x40
pop rbx
ret
mov eax, 1
jmp 0x140049f21
mov eax, 1
jmp 0x140049f85
mov eax, 1
jmp 0x140049fef
mov eax, 1
jmp 0x14004a053
mov eax, 1
jmp 0x14004a0bf
mov ebx, 1
mov rsi, qword [rsp + 0x50]
mov eax, 1
mov rdi, qword [rsp + 0x58]
mov dword [0x1401413d8], ebx
add rsp, 0x40
pop rbx
ret
lea rdx, str.EGL:_Failed_to_load_required_entry_points
mov ecx, 0x10008
call fcn.14004aaa0
mov rcx, qword [0x1401413b0]
test rcx, rcx
je 0x14004a1c0
call qword [0x140141410]
mov qword [0x1401413b0], rbx
mov rcx, qword [0x1401413e0]
test rcx, rcx
je 0x14004a1d9
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x1401413e0], rbx
mov rsi, qword [rsp + 0x50]
xor eax, eax
mov rdi, qword [rsp + 0x58]
add rsp, 0x40
pop rbx
ret