Function at 0x4016f5
Capabilities:
Link many functions at runtime

Disassembly:
push esi
mov esi, ecx
push edi
test byte [esi + 0x40], 0x10
je 0x401706
mov edi, str.libOpenglRenderV3.dll
jmp 0x401716
cmp dword [esi + 0x40], 1
mov edi, str.libOpenglRenderV2.dll
je 0x401716
mov edi, str.libOpenglRender.dll
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x1a4], eax
test eax, eax
jne 0x401749
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x407390
push str._s:_LoadLibrary__S_Fail_Error_u_n
call fcn.0040105e
xor eax, eax
add esp, 0x10
inc eax
jmp 0x401b68
mov ecx, esi
call fcn.00401cce
test al, al
jne 0x40176d
push str.local_opengl::start
push str._S:_init_renderer_funcs_fail__n
call fcn.0040105e
pop ecx
pop ecx
push 2
pop eax
jmp 0x401b68
cmp dword [esi + 0x1ec], 0
mov edi, str.libGLESv2.dll
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x401876
mov eax, dword [esi + 0x40]
test al, 0x10
je 0x401831
mov ecx, eax
and ecx, 0xf
sub ecx, 0
je 0x4017ea
sub ecx, 1
je 0x4017a7
push 3
jmp 0x4018ad
push 0x407390
push 0x4074f8
call fcn.0040105e
push str.libEGL.dll
push str.libEGL
call dword [esi + 0x1ec]
push str.libGLESv1.dll
push str.libGLESv1
call dword [esi + 0x1ec]
push edi
push str.libGLESv2
call dword [esi + 0x1ec]
add esp, 0x20
jmp 0x401927
push 0x407390
push 0x407450
call fcn.0040105e
push str.libEGL_translator_v3.dll
push str.libEGL
call dword [esi + 0x1ec]
push str.libGLES_CM_translator_v3.dll
push str.libGLESv1
call dword [esi + 0x1ec]
push str.libGLES_V2_translator_v3.dll
push str.libGLESv2
call dword [esi + 0x1ec]
add esp, 0x20
jmp 0x4019a3
push 0x407390
cmp eax, 1
jne 0x401845
push str._s:_RendererDirectX_n
jmp 0x4017b1
push str._s:_RendererOpenGL_n
call fcn.0040105e
push str.libEGL_translator.dll
push str.libEGL
call dword [esi + 0x1ec]
push str.libGLES_CM_translator.dll
push str.libGLESv1
call dword [esi + 0x1ec]
push str.libGLES_V2_translator.dll
jmp 0x40181e
mov edi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
push str.msvcrt.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x401895
push 0x407640
push eax
call ebx
mov edi, eax
mov eax, dword [esi + 0x40]
test al, 0x10
je 0x4018fb
mov ecx, eax
and ecx, 0xf
sub ecx, 0
je 0x4018d4
sub ecx, 1
je 0x4018c8
push 4
pop esi
push eax
push 0x407390
push str._s:_invalid_renderer_0x_x_n
call fcn.0040105e
add esp, 0xc
mov eax, esi
jmp 0x401b67
push 0x407390
push 0x4074f8
jmp 0x40190a
push 0x407390
push 0x407450
call fcn.0040105e
push str.ANDROID_EGL_LIBlibEGL_translator_v3
call edi
push str.ANDROID_GLESv1_LIBlibGLES_CM_translator_v3
call edi
push str.ANDROID_GLESv2_LIBlibGLES_V2_translator_v3
jmp 0x40199e
push 0x407390
cmp eax, 1
jne 0x401981
push str._s:_RendererDirectX_n
call fcn.0040105e
push str.ANDROID_EGL_LIBlibEGL
call edi
push str.ANDROID_GLESv1_LIBlibGLESv1
call edi
push str.ANDROID_GLESv2_LIBlibGLESv2
call edi
add esp, 0x14
push str.libEGL.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4019ce
push str.gForceDiscreteGraphics
push edi
call ebx
test eax, eax
je 0x401952
xor ecx, ecx
cmp byte [esi + 0x4c], cl
setne cl
mov dword [eax], ecx
push str.gFxaaQuality
push edi
call ebx
test eax, eax
je 0x401963
mov ecx, dword [esi + 0x50]
mov dword [eax], ecx
push str.gProgramBinaryCache
push edi
call ebx
test eax, eax
je 0x401979
xor ecx, ecx
cmp byte [esi + 0x58], cl
setne cl
mov dword [eax], ecx
push str.gVSync
push edi
jmp 0x4019be
push str._s:_RendererOpenGL_n
call fcn.0040105e
push str.ANDROID_EGL_LIBlibEGL_translator
call edi
push str.ANDROID_GLESv1_LIBlibGLES_CM_translator
call edi
push str.ANDROID_GLESv2_LIBlibGLES_V2_translator
call edi
add esp, 0x14
test byte [esi + 0x40], 0x10
je 0x4019ce
push str.libEGL_translator_v3.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x4019ce
push str.gVSync
push eax
call ebx
test eax, eax
je 0x4019ce
xor ecx, ecx
cmp byte [esi + 0x59], cl
setne cl
mov dword [eax], ecx
call dword [esi + 0x1a8]
test eax, eax
jne 0x4019f0
push str.local_opengl::start
push str._S:_initLibrary_fail__n
call fcn.0040105e
pop ecx
pop ecx
push 5
jmp 0x401b62
push dword [esi + 0x28]
call dword [esi + 0x1ac]
lea eax, [esi + 4]
cmp dword [eax + 0x14], 0x10
pop ecx
jb 0x401a05
mov eax, dword [eax]
push eax
call dword [esi + 0x1b0]
push 3
call dword [esi + 0x1b4]
push dword [esi + 0x2c]
call dword [esi + 0x1b8]
push 0x4014f1
call dword [esi + 0x1bc]
push 0x4016b5
call dword [esi + 0x1d0]
mov eax, dword [esi + 0x1e4]
add esp, 0x14
test eax, eax
je 0x401a4a
push esi
push 0x401f0a
call eax
pop ecx
pop ecx
mov eax, dword [esi + 0x1e8]
test eax, eax
je 0x401a5f
push ecx
mov dword [esp], 0x3f800000
call eax
pop ecx
mov eax, dword [esi + 0x40]
test al, 0x10
je 0x401a85
and eax, 0xf
sub eax, 0
je 0x401a7e
sub eax, 1
jne 0x401b19
push str.libGLESv2.dll
jmp 0x401a8f
push str.libGLES_V2_translator_v3.dll
jmp 0x401a8f
cmp eax, 1
je 0x401a77
push str.libGLES_V2_translator.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x401b19
push str.glEGLImageTargetRenderReg
push edi
call ebx
push str.glEGLImageTargetRenderRegEx
push edi
mov dword [esi + 0x1f4], eax
call ebx
push str.glEGLImageTargetRenderDelTex
push edi
mov dword [esi + 0x1f8], eax
call ebx
push str.glEGLImageTargetRenderCalcPos
push edi
mov dword [esi + 0x1fc], eax
call ebx
push str.glVertexBindingRegTexAuto
push edi
mov dword [esi + 0x200], eax
call ebx
push str.glVertexBindingAutoSetting
push edi
mov dword [esi + 0x204], eax
call ebx
push str.glVertexBindingAutoClear
push edi
mov dword [esi + 0x208], eax
call ebx
push str.glOpenglUnsupportReport
push edi
mov dword [esi + 0x20c], eax
call ebx
push str.glBeacon
push edi
mov dword [esi + 0x210], eax
call ebx
mov dword [esi + 0x214], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
mov eax, dword [esi + 0x1f0]
test eax, eax
je 0x401b33
push dword [esi + 0x218]
call eax
pop ecx
push dword [esi + 0x48]
push dword [esi + 0x44]
push dword [esi + 0x1c]
push dword [esi + 0x24]
push dword [esi + 0x20]
call dword [esi + 0x1c0]
add esp, 0x14
test eax, eax
jne 0x401b65
push str.local_opengl::start
push str._S:_initOpenGLRendererPort_fail__n
call fcn.0040105e
pop ecx
pop ecx
push 6
pop eax
jmp 0x401b67
xor eax, eax
pop ebx
pop edi
pop esi
ret