Function at 0x491eb0
Capabilities:
Link many functions at runtime

Disassembly:
push edi
push esi
push ebx
mov ebx, 1
sub esp, 0x20
mov ecx, dword [0x690514]
mov dword [esp + 0x14], str.libEGL.dll
mov dword [esp + 0x18], str.EGL.dll
mov dword [esp + 0x1c], 0
test ecx, ecx
je 0x491ef0
add esp, 0x20
mov eax, ebx
pop ebx
pop esi
pop edi
ret
lea ebx, [esp + 0x14]
mov esi, str.libEGL.dll
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x491f0e
add ebx, 4
mov esi, dword [ebx]
test esi, esi
je 0x492294
mov dword [esp], esi
call edi
sub esp, 4
test eax, eax
mov dword [0x690514], eax
je 0x491f01
mov ecx, 3
mov edi, 0x5e3da8
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
repe cmpsb byte [esi], byte es:[edi]
mov dword [esp + 4], str.eglGetConfigAttrib
mov dword [esp], eax
seta dl
sbb dl, 0
test dl, dl
sete dl
movzx edx, dl
mov dword [0x6904fc], edx
call ebx
mov dword [0x690518], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglGetConfigs
mov dword [esp], eax
call ebx
mov dword [0x69051c], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglGetDisplay
mov dword [esp], eax
call ebx
mov dword [0x690520], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglGetError
mov dword [esp], eax
call ebx
mov dword [0x690524], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglInitialize
mov dword [esp], eax
call ebx
mov dword [0x690528], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglTerminate
mov dword [esp], eax
call ebx
mov dword [0x69052c], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglBindAPI
mov dword [esp], eax
call ebx
mov dword [0x690530], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglCreateContext
mov dword [esp], eax
call ebx
mov dword [0x690534], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglDestroySurface
mov dword [esp], eax
call ebx
mov dword [0x690538], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglDestroyContext
mov dword [esp], eax
call ebx
mov dword [0x69053c], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglCreateWindowSurface
mov dword [esp], eax
call ebx
mov dword [0x690540], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglMakeCurrent
mov dword [esp], eax
call ebx
mov dword [0x690544], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglSwapBuffers
mov dword [esp], eax
call ebx
mov dword [0x690548], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglSwapInterval
mov dword [esp], eax
call ebx
mov dword [0x69054c], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglQueryString
mov dword [esp], eax
call ebx
mov dword [0x690550], eax
mov eax, dword [0x690514]
sub esp, 8
mov dword [esp + 4], str.eglGetProcAddress
mov dword [esp], eax
call ebx
mov edx, dword [0x690518]
sub esp, 8
mov dword [0x690554], eax
test edx, edx
je 0x492233
mov edx, dword [0x69051c]
test edx, edx
je 0x492233
mov edx, dword [0x690520]
test edx, edx
je 0x492233
mov edi, dword [0x690524]
test edi, edi
je 0x492233
mov esi, dword [0x690528]
test esi, esi
je 0x492233
mov ebx, dword [0x69052c]
test ebx, ebx
je 0x492233
mov ecx, dword [0x690530]
test ecx, ecx
je 0x492233
mov edi, dword [0x690534]
test edi, edi
je 0x492233
mov esi, dword [0x690538]
test esi, esi
je 0x492233
mov ebx, dword [0x69053c]
test ebx, ebx
je 0x492233
mov ecx, dword [0x690540]
test ecx, ecx
je 0x492233
mov edi, dword [0x690544]
test edi, edi
je 0x492233
mov esi, dword [0x690548]
test esi, esi
je 0x492233
mov ebx, dword [0x69054c]
test ebx, ebx
je 0x492233
mov ecx, dword [0x690550]
test ecx, ecx
je 0x492233
test eax, eax
je 0x492233
mov dword [esp], 0
call edx
sub esp, 4
test eax, eax
mov dword [0x6904f0], eax
je 0x4922b3
mov dword [esp + 8], 0x6904f8
mov dword [esp + 4], 0x6904f4
mov dword [esp], eax
call dword [0x690528]
sub esp, 0xc
test eax, eax
jne 0x4922f3
call dword [0x690524]
sub eax, 0x3000
mov edx, str.ERROR:_UNKNOWN_EGL_ERROR
cmp eax, 0xe
ja 0x49220f
mov edx, dword [eax*4 + 0x5e4380]
mov dword [esp + 8], edx
mov dword [esp + 4], str.EGL:_Failed_to_initialize_EGL:__s
xor ebx, ebx
mov dword [esp], 0x10006
call fcn.0047f1d0
call fcn.00491e60
jmp 0x491edd
mov dword [esp + 4], str.EGL:_Failed_to_load_required_entry_points
mov dword [esp], 0x10008
call fcn.0047f1d0
mov eax, dword [0x6904f0]
test eax, eax
je 0x492266
mov dword [esp], eax
call dword [0x69052c]
mov dword [0x6904f0], 0
sub esp, 4
mov eax, dword [0x690514]
xor ebx, ebx
test eax, eax
je 0x491edd
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov dword [0x690514], 0
mov eax, ebx
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov dword [esp + 4], str.EGL:_Library_not_found
mov dword [esp], 0x10006
xor ebx, ebx
call fcn.0047f1d0
add esp, 0x20
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call dword [0x690524]
sub eax, 0x3000
mov edx, str.ERROR:_UNKNOWN_EGL_ERROR
cmp eax, 0xe
ja 0x4922cf
mov edx, dword [eax*4 + 0x5e4380]
mov dword [esp + 8], edx
mov dword [esp + 4], str.EGL:_Failed_to_get_EGL_display:__s
xor ebx, ebx
mov dword [esp], 0x10006
call fcn.0047f1d0
call fcn.00491e60
jmp 0x491edd
mov dword [esp], str.EGL_KHR_create_context
mov ebx, 1
call fcn.00491c00
mov dword [esp], str.EGL_KHR_create_context_no_error
mov dword [0x690500], eax
call fcn.00491c00
mov dword [esp], str.EGL_KHR_gl_colorspace
mov dword [0x690504], eax
call fcn.00491c00
mov dword [esp], str.EGL_KHR_get_all_proc_addresses
mov dword [0x690508], eax
call fcn.00491c00
mov dword [esp], str.EGL_KHR_context_flush_control
mov dword [0x69050c], eax
call fcn.00491c00
mov dword [0x690510], eax
jmp 0x491edd