Function at 0x466040
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x4e1898]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4e48c8], 0
mov dword [ebp - 0x10], str.libEGL.dll
mov dword [ebp - 0xc], str.EGL.dll
mov dword [ebp - 8], 0
je 0x466081
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004672b4
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor esi, esi
mov eax, str.libEGL.dll
push eax
call edi
mov dword [0x4e48c8], eax
test eax, eax
jne 0x4660c9
mov eax, dword [ebp + esi*4 - 0xc]
inc esi
test eax, eax
jne 0x466090
push str.EGL:_Library_not_found
push 0x10006
call fcn.0045cbf0
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004672b4
mov esp, ebp
pop ebp
ret
push 3
push 0x4a26b4
push dword [ebp + esi*4 - 0x10]
call fcn.00473f30
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
add esp, 0xc
neg eax
sbb eax, eax
push str.eglGetConfigAttrib
push dword [0x4e48c8]
inc eax
mov dword [0x4e48ac], eax
call esi
push str.eglGetConfigs
push dword [0x4e48c8]
mov dword [0x4e48cc], eax
call esi
push str.eglGetDisplay
push dword [0x4e48c8]
mov dword [0x4e48d0], eax
call esi
push str.eglGetError
push dword [0x4e48c8]
mov dword [0x4e48d4], eax
call esi
push str.eglInitialize
push dword [0x4e48c8]
mov dword [0x4e48d8], eax
call esi
push str.eglTerminate
push dword [0x4e48c8]
mov dword [0x4e48dc], eax
call esi
push str.eglBindAPI
push dword [0x4e48c8]
mov dword [0x4e48e0], eax
call esi
push str.eglCreateContext
push dword [0x4e48c8]
mov dword [0x4e48e4], eax
call esi
push str.eglDestroySurface
push dword [0x4e48c8]
mov dword [0x4e48e8], eax
call esi
push str.eglDestroyContext
push dword [0x4e48c8]
mov dword [0x4e48ec], eax
call esi
push str.eglCreateWindowSurface
push dword [0x4e48c8]
mov dword [0x4e48f0], eax
call esi
push str.eglMakeCurrent
push dword [0x4e48c8]
mov dword [0x4e48f4], eax
call esi
push str.eglSwapBuffers
push dword [0x4e48c8]
mov dword [0x4e48f8], eax
call esi
push str.eglSwapInterval
push dword [0x4e48c8]
mov dword [0x4e48fc], eax
call esi
push str.eglQueryString
push dword [0x4e48c8]
mov dword [0x4e4900], eax
call esi
push str.eglGetProcAddress
push dword [0x4e48c8]
mov dword [0x4e4904], eax
call esi
cmp dword [0x4e48cc], 0
mov dword [0x4e4908], eax
je 0x4663b6
cmp dword [0x4e48d0], 0
je 0x4663b6
mov ecx, dword [0x4e48d4]
test ecx, ecx
je 0x4663b6
cmp dword [0x4e48d8], 0
je 0x4663b6
cmp dword [0x4e48dc], 0
je 0x4663b6
cmp dword [0x4e48e0], 0
je 0x4663b6
cmp dword [0x4e48e4], 0
je 0x4663b6
cmp dword [0x4e48e8], 0
je 0x4663b6
cmp dword [0x4e48ec], 0
je 0x4663b6
cmp dword [0x4e48f0], 0
je 0x4663b6
cmp dword [0x4e48f4], 0
je 0x4663b6
cmp dword [0x4e48f8], 0
je 0x4663b6
cmp dword [0x4e48fc], 0
je 0x4663b6
cmp dword [0x4e4900], 0
je 0x4663b6
cmp dword [0x4e4904], 0
je 0x4663b6
test eax, eax
je 0x4663b6
push 0
call ecx
mov dword [0x4e48a0], eax
test eax, eax
jne 0x46631b
call dword [0x4e48d8]
push eax
call fcn.00466780
push eax
push str.EGL:_Failed_to_get_EGL_display:__s
push 0x10006
call fcn.0045cbf0
add esp, 0x10
call fcn.00466410
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004672b4
mov esp, ebp
pop ebp
ret
push 0x4e48a8
push 0x4e48a4
push eax
call dword [0x4e48dc]
test eax, eax
jne 0x466344
call dword [0x4e48d8]
push eax
call fcn.00466780
push eax
push str.EGL:_Failed_to_initialize_EGL:__s
jmp 0x4662f7
push str.EGL_KHR_create_context
call fcn.00466750
push str.EGL_KHR_create_context_no_error
mov dword [0x4e48b0], eax
call fcn.00466750
push str.EGL_KHR_gl_colorspace
mov dword [0x4e48b4], eax
call fcn.00466750
push str.EGL_KHR_get_all_proc_addresses
mov dword [0x4e48b8], eax
call fcn.00466750
push str.EGL_KHR_context_flush_control
mov dword [0x4e48bc], eax
call fcn.00466750
push str.EGL_EXT_present_opaque
mov dword [0x4e48c0], eax
call fcn.00466750
add esp, 0x18
mov dword [0x4e48c4], eax
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004672b4
mov esp, ebp
pop ebp
ret
push str.EGL:_Failed_to_load_required_entry_points
push 0x10008
call fcn.0045cbf0
mov eax, dword [0x4e48a0]
add esp, 8
test eax, eax
je 0x4663e2
push eax
call dword [0x4e48e0]
mov dword [0x4e48a0], 0
mov eax, dword [0x4e48c8]
test eax, eax
je 0x4663fc
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4e48c8], 0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.004672b4
mov esp, ebp
pop ebp
ret