Function at 0x496380
Capabilities:
Link many functions at runtime

Disassembly:
push edi
push esi
push ebx
mov ebx, 1
sub esp, 0x20
mov ecx, dword [0x6910d4]
mov dword [esp + 0x14], str.libEGL.dll
mov dword [esp + 0x18], str.EGL.dll
mov dword [esp + 0x1c], 0
test ecx, ecx
je 0x4963c0
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 0x4963de
add ebx, 4
mov esi, dword [ebx]
test esi, esi
je 0x496764
mov dword [esp], esi
call edi
sub esp, 4
test eax, eax
mov dword [0x6910d4], eax
je 0x4963d1
mov ecx, 3
mov edi, 0x5e6048
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 [0x6910bc], edx
call ebx
mov dword [0x6910d8], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglGetConfigs
mov dword [esp], eax
call ebx
mov dword [0x6910dc], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglGetDisplay
mov dword [esp], eax
call ebx
mov dword [0x6910e0], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglGetError
mov dword [esp], eax
call ebx
mov dword [0x6910e4], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglInitialize
mov dword [esp], eax
call ebx
mov dword [0x6910e8], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglTerminate
mov dword [esp], eax
call ebx
mov dword [0x6910ec], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglBindAPI
mov dword [esp], eax
call ebx
mov dword [0x6910f0], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglCreateContext
mov dword [esp], eax
call ebx
mov dword [0x6910f4], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglDestroySurface
mov dword [esp], eax
call ebx
mov dword [0x6910f8], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglDestroyContext
mov dword [esp], eax
call ebx
mov dword [0x6910fc], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglCreateWindowSurface
mov dword [esp], eax
call ebx
mov dword [0x691100], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglMakeCurrent
mov dword [esp], eax
call ebx
mov dword [0x691104], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglSwapBuffers
mov dword [esp], eax
call ebx
mov dword [0x691108], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglSwapInterval
mov dword [esp], eax
call ebx
mov dword [0x69110c], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglQueryString
mov dword [esp], eax
call ebx
mov dword [0x691110], eax
mov eax, dword [0x6910d4]
sub esp, 8
mov dword [esp + 4], str.eglGetProcAddress
mov dword [esp], eax
call ebx
mov edx, dword [0x6910d8]
sub esp, 8
mov dword [0x691114], eax
test edx, edx
je 0x496703
mov edx, dword [0x6910dc]
test edx, edx
je 0x496703
mov edx, dword [0x6910e0]
test edx, edx
je 0x496703
mov edi, dword [0x6910e4]
test edi, edi
je 0x496703
mov esi, dword [0x6910e8]
test esi, esi
je 0x496703
mov ebx, dword [0x6910ec]
test ebx, ebx
je 0x496703
mov ecx, dword [0x6910f0]
test ecx, ecx
je 0x496703
mov edi, dword [0x6910f4]
test edi, edi
je 0x496703
mov esi, dword [0x6910f8]
test esi, esi
je 0x496703
mov ebx, dword [0x6910fc]
test ebx, ebx
je 0x496703
mov ecx, dword [0x691100]
test ecx, ecx
je 0x496703
mov edi, dword [0x691104]
test edi, edi
je 0x496703
mov esi, dword [0x691108]
test esi, esi
je 0x496703
mov ebx, dword [0x69110c]
test ebx, ebx
je 0x496703
mov ecx, dword [0x691110]
test ecx, ecx
je 0x496703
test eax, eax
je 0x496703
mov dword [esp], 0
call edx
sub esp, 4
test eax, eax
mov dword [0x6910b0], eax
je 0x496783
mov dword [esp + 8], 0x6910b8
mov dword [esp + 4], 0x6910b4
mov dword [esp], eax
call dword [0x6910e8]
sub esp, 0xc
test eax, eax
jne 0x4967c3
call dword [0x6910e4]
sub eax, 0x3000
mov edx, str.ERROR:_UNKNOWN_EGL_ERROR
cmp eax, 0xe
ja 0x4966df
mov edx, dword [eax*4 + 0x5e6620]
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.004836a0
call fcn.00496330
jmp 0x4963ad
mov dword [esp + 4], str.EGL:_Failed_to_load_required_entry_points
mov dword [esp], 0x10008
call fcn.004836a0
mov eax, dword [0x6910b0]
test eax, eax
je 0x496736
mov dword [esp], eax
call dword [0x6910ec]
mov dword [0x6910b0], 0
sub esp, 4
mov eax, dword [0x6910d4]
xor ebx, ebx
test eax, eax
je 0x4963ad
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov dword [0x6910d4], 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.004836a0
add esp, 0x20
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call dword [0x6910e4]
sub eax, 0x3000
mov edx, str.ERROR:_UNKNOWN_EGL_ERROR
cmp eax, 0xe
ja 0x49679f
mov edx, dword [eax*4 + 0x5e6620]
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.004836a0
call fcn.00496330
jmp 0x4963ad
mov dword [esp], str.EGL_KHR_create_context
mov ebx, 1
call fcn.004960d0
mov dword [esp], str.EGL_KHR_create_context_no_error
mov dword [0x6910c0], eax
call fcn.004960d0
mov dword [esp], str.EGL_KHR_gl_colorspace
mov dword [0x6910c4], eax
call fcn.004960d0
mov dword [esp], str.EGL_KHR_get_all_proc_addresses
mov dword [0x6910c8], eax
call fcn.004960d0
mov dword [esp], str.EGL_KHR_context_flush_control
mov dword [0x6910cc], eax
call fcn.004960d0
mov dword [0x6910d0], eax
jmp 0x4963ad