Function at 0x46ee10
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x10
mov eax, dword [0x51a900]
xor eax, esp
mov dword [esp + 0xc], eax
cmp dword [0x51e178], 0
mov dword [esp], str.libEGL.dll
mov dword [esp + 4], str.EGL.dll
mov dword [esp + 8], 0
je 0x46ee52
mov eax, 1
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00471a79
add esp, 0x10
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 ecx, eax
mov dword [0x51e178], ecx
test ecx, ecx
jne 0x46eea2
mov eax, dword [esp + esi*4 + 0xc]
inc esi
test eax, eax
jne 0x46ee61
test ecx, ecx
jne 0x46eea2
push str.EGL:_Library_not_found
push 0x10006
call fcn.00464240
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00471a79
add esp, 0x10
ret
push 3
push 0x4b5834
push dword [esp + esi*4 + 0x10]
call fcn.0047f290
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
add esp, 0xc
neg eax
sbb eax, eax
push str.eglGetConfigAttrib
push dword [0x51e178]
inc eax
mov dword [0x51e15c], eax
call esi
push str.eglGetConfigs
push dword [0x51e178]
mov dword [0x51e17c], eax
call esi
push str.eglGetDisplay
push dword [0x51e178]
mov dword [0x51e180], eax
call esi
push str.eglGetError
push dword [0x51e178]
mov dword [0x51e184], eax
call esi
push str.eglInitialize
push dword [0x51e178]
mov dword [0x51e188], eax
call esi
push str.eglTerminate
push dword [0x51e178]
mov dword [0x51e18c], eax
call esi
push str.eglBindAPI
push dword [0x51e178]
mov dword [0x51e190], eax
call esi
push str.eglCreateContext
push dword [0x51e178]
mov dword [0x51e194], eax
call esi
push str.eglDestroySurface
push dword [0x51e178]
mov dword [0x51e198], eax
call esi
push str.eglDestroyContext
push dword [0x51e178]
mov dword [0x51e19c], eax
call esi
push str.eglCreateWindowSurface
push dword [0x51e178]
mov dword [0x51e1a0], eax
call esi
push str.eglMakeCurrent
push dword [0x51e178]
mov dword [0x51e1a4], eax
call esi
push str.eglSwapBuffers
push dword [0x51e178]
mov dword [0x51e1a8], eax
call esi
push str.eglSwapInterval
push dword [0x51e178]
mov dword [0x51e1ac], eax
call esi
push str.eglQueryString
push dword [0x51e178]
mov dword [0x51e1b0], eax
call esi
push str.eglGetProcAddress
push dword [0x51e178]
mov dword [0x51e1b4], eax
call esi
cmp dword [0x51e17c], 0
mov dword [0x51e1b8], eax
je 0x46f191
cmp dword [0x51e180], 0
je 0x46f191
mov ecx, dword [0x51e184]
test ecx, ecx
je 0x46f191
cmp dword [0x51e188], 0
je 0x46f191
cmp dword [0x51e18c], 0
je 0x46f191
cmp dword [0x51e190], 0
je 0x46f191
cmp dword [0x51e194], 0
je 0x46f191
cmp dword [0x51e198], 0
je 0x46f191
cmp dword [0x51e19c], 0
je 0x46f191
cmp dword [0x51e1a0], 0
je 0x46f191
cmp dword [0x51e1a4], 0
je 0x46f191
cmp dword [0x51e1a8], 0
je 0x46f191
cmp dword [0x51e1ac], 0
je 0x46f191
cmp dword [0x51e1b0], 0
je 0x46f191
cmp dword [0x51e1b4], 0
je 0x46f191
test eax, eax
je 0x46f191
push 0
call ecx
mov dword [0x51e150], eax
test eax, eax
jne 0x46f0f5
call dword [0x51e188]
push eax
call fcn.0046f560
push eax
push str.EGL:_Failed_to_get_EGL_display:__s
push 0x10006
call fcn.00464240
add esp, 0x10
call fcn.0046f1f0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00471a79
add esp, 0x10
ret
push 0x51e158
push 0x51e154
push eax
call dword [0x51e18c]
test eax, eax
jne 0x46f11e
call dword [0x51e188]
push eax
call fcn.0046f560
push eax
push str.EGL:_Failed_to_initialize_EGL:__s
jmp 0x46f0d0
push str.EGL_KHR_create_context
call fcn.0046f530
push str.EGL_KHR_create_context_no_error
mov dword [0x51e160], eax
call fcn.0046f530
push str.EGL_KHR_gl_colorspace
mov dword [0x51e164], eax
call fcn.0046f530
push str.EGL_KHR_get_all_proc_addresses
mov dword [0x51e168], eax
call fcn.0046f530
push str.EGL_KHR_context_flush_control
mov dword [0x51e16c], eax
call fcn.0046f530
push str.EGL_EXT_present_opaque
mov dword [0x51e170], eax
call fcn.0046f530
add esp, 0x18
mov dword [0x51e174], eax
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00471a79
add esp, 0x10
ret
push str.EGL:_Failed_to_load_required_entry_points
push 0x10008
call fcn.00464240
mov eax, dword [0x51e150]
add esp, 8
test eax, eax
je 0x46f1bd
push eax
call dword [0x51e190]
mov dword [0x51e150], 0
mov eax, dword [0x51e178]
test eax, eax
je 0x46f1d7
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x51e178], 0
mov ecx, dword [esp + 0x14]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00471a79
add esp, 0x10
ret