Function at 0x140005530
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 0x58]
mov rbx, rcx
test al, 0x10
je 0x14000554d
lea rdi, str.libOpenglRenderV3.dll
jmp 0x140005570
cmp eax, 1
jne 0x14000555b
lea rdi, str.libOpenglRenderV2.dll
jmp 0x140005570
cmp eax, 2
lea rdi, [0x14000a5c8]
lea rcx, str.libOpenglRender.dll
cmovne rdi, rcx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rbx + 0x1d8], rax
test rax, rax
jne 0x1400055b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
lea rdx, [0x14000a5f8]
mov r9d, eax
lea rcx, str._s:_LoadLibrary__S_Fail_Error_u_n
call fcn.140001010
mov eax, 1
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rcx, rbx
call fcn.140004fa0
test al, al
jne 0x1400055e3
lea rdx, [0x14000a668]
lea rcx, str._S:_init_renderer_funcs_fail__n
call fcn.140001010
mov eax, 2
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
cmp qword [rbx + 0x268], 0
mov qword [rsp + 0x40], rsi
je 0x140005792
mov edx, dword [rbx + 0x58]
test dl, 0x10
je 0x1400056e5
mov ecx, edx
and ecx, 0xf
je 0x140005691
cmp ecx, 1
je 0x14000563d
mov r8d, edx
lea rcx, [0x14000a878]
lea rdx, [0x14000a850]
call fcn.140001010
mov rsi, qword [rsp + 0x40]
mov eax, 3
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
lea rdx, [0x14000a7a0]
lea rcx, [0x14000a7c8]
call fcn.140001010
lea rdx, [0x14000a7f8]
lea rcx, [0x14000a804]
call qword [rbx + 0x268]
lea rdx, [0x14000a810]
lea rcx, [0x14000a820]
call qword [rbx + 0x268]
lea rdx, [0x14000a830]
lea rcx, [0x14000a840]
call qword [rbx + 0x268]
jmp 0x140005897
lea rdx, [0x14000a6c0]
lea rcx, [0x14000a6e8]
call fcn.140001010
lea rdx, [0x14000a718]
lea rcx, [0x14000a734]
call qword [rbx + 0x268]
lea rdx, str.libGLES_CM_translator_v3.dll
lea rcx, [0x14000a760]
call qword [rbx + 0x268]
lea rdx, [0x14000a770]
lea rcx, [0x14000a790]
call qword [rbx + 0x268]
jmp 0x14000594f
cmp edx, 1
jne 0x14000573e
lea rdx, [0x14000a8b0]
lea rcx, [0x14000a8d8]
call fcn.140001010
lea rdx, [0x14000a908]
lea rcx, [0x14000a914]
call qword [rbx + 0x268]
lea rdx, str.libGLESv1.dll
lea rcx, [0x14000a930]
call qword [rbx + 0x268]
lea rdx, [0x14000a940]
lea rcx, [0x14000a950]
call qword [rbx + 0x268]
jmp 0x140005897
lea rdx, [0x14000a960]
lea rcx, [0x14000a988]
call fcn.140001010
lea rdx, str.libEGL_translator.dll
lea rcx, str.libEGL
call qword [rbx + 0x268]
lea rdx, str.libGLES_CM_translator.dll
lea rcx, str.libGLESv1
call qword [rbx + 0x268]
lea rdx, [0x14000aa08]
lea rcx, str.libGLESv2
call qword [rbx + 0x268]
jmp 0x14000594f
mov rdi, qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
lea rcx, [0x14000aa38]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x1400057be
lea rdx, [0x14000aa48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov edx, dword [rbx + 0x58]
test dl, 0x10
je 0x140005860
mov eax, edx
and eax, 0xf
je 0x14000582f
cmp eax, 1
je 0x140005801
mov r8d, edx
lea rcx, str._s:_invalid_renderer_0x_x_n
lea rdx, [0x14000abe0]
call fcn.140001010
mov rsi, qword [rsp + 0x40]
mov eax, 4
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
lea rdx, [0x14000ab30]
lea rcx, [0x14000ab58]
call fcn.140001010
lea rcx, [0x14000ab88]
call rdi
lea rcx, [0x14000aba0]
call rdi
lea rcx, [0x14000abc0]
jmp 0x140005895
lea rdx, [0x14000aa50]
lea rcx, [0x14000aa78]
call fcn.140001010
lea rcx, str.ANDROID_EGL_LIBlibEGL_translator_v3
call rdi
lea rcx, str.ANDROID_GLESv1_LIBlibGLES_CM_translator_v3
call rdi
lea rcx, str.ANDROID_GLESv2_LIBlibGLES_V2_translator_v3
jmp 0x14000594d
cmp edx, 1
jne 0x140005921
lea rdx, [0x14000ac40]
lea rcx, str._s:_RendererDirectX_n
call fcn.140001010
lea rcx, str.ANDROID_EGL_LIBlibEGL
call rdi
lea rcx, str.ANDROID_GLESv1_LIBlibGLESv1
call rdi
lea rcx, str.ANDROID_GLESv2_LIBlibGLESv2
call rdi
lea rcx, str.libEGL.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x140005988
lea rdx, str.gForceDiscreteGraphics
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor edi, edi
test rax, rax
je 0x1400058d1
mov ecx, edi
cmp byte [rbx + 0x64], cl
setne cl
mov dword [rax], ecx
lea rdx, str.gFxaaQuality
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400058eb
mov ecx, dword [rbx + 0x68]
mov dword [rax], ecx
lea rdx, str.gProgramBinaryCache
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14000590a
mov ecx, edi
cmp byte [rbx + 0x70], cl
setne cl
mov dword [rax], ecx
lea rdx, [0x14000ae1c]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140005988
jmp 0x14000597e
lea rdx, [0x14000acf0]
lea rcx, str._s:_RendererOpenGL_n
call fcn.140001010
lea rcx, str.ANDROID_EGL_LIBlibEGL_translator
call rdi
lea rcx, str.ANDROID_GLESv1_LIBlibGLES_CM_translator
call rdi
lea rcx, str.ANDROID_GLESv2_LIBlibGLES_V2_translator
call rdi
test byte [rbx + 0x58], 0x10
je 0x140005988
lea rcx, str.libEGL_translator_v3.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x140005988
lea rdx, str.gVSync
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140005988
xor edi, edi
cmp byte [rbx + 0x71], dil
setne dil
mov dword [rax], edi
call qword [rbx + 0x1e0]
test eax, eax
jne 0x1400059ba
lea rdx, [0x14000ae50]
lea rcx, str._S:_initLibrary_fail__n
call fcn.140001010
mov rsi, qword [rsp + 0x40]
mov eax, 5
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov ecx, dword [rbx + 0x34]
call qword [rbx + 0x1e8]
cmp qword [rbx + 0x20], 0x10
lea rcx, [rbx + 8]
jb 0x1400059d1
mov rcx, qword [rcx]
call qword [rbx + 0x1f0]
mov ecx, 3
call qword [rbx + 0x1f8]
mov ecx, dword [rbx + 0x38]
call qword [rbx + 0x200]
lea rcx, [0x140005cf0]
call qword [rbx + 0x208]
lea rcx, [0x140005c80]
call qword [rbx + 0x230]
mov rax, qword [rbx + 0x258]
test rax, rax
je 0x140005a1d
mov rdx, rbx
lea rcx, [0x140004f10]
call rax
mov rax, qword [rbx + 0x260]
test rax, rax
je 0x140005a33
movss xmm0, dword [0x14000c65c]
call rax
mov ecx, dword [rbx + 0x58]
test cl, 0x10
je 0x140005a5b
and ecx, 0xf
je 0x140005a52
cmp ecx, 1
jne 0x140005b4f
lea rcx, [0x14000aeb8]
jmp 0x140005a6e
lea rcx, str.libGLES_V2_translator_v3.dll
jmp 0x140005a6e
cmp ecx, 1
lea rcx, str.libGLESv2.dll
je 0x140005a6e
lea rcx, str.libGLES_V2_translator.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
je 0x140005b4f
lea rdx, str.glEGLImageTargetRenderReg
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glEGLImageTargetRenderRegEx
mov rcx, rdi
mov qword [rbx + 0x278], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glEGLImageTargetRenderDelTex
mov rcx, rdi
mov qword [rbx + 0x280], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glEGLImageTargetRenderCalcPos
mov rcx, rdi
mov qword [rbx + 0x288], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glVertexBindingRegTexAuto
mov rcx, rdi
mov qword [rbx + 0x290], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glVertexBindingAutoSetting
mov rcx, rdi
mov qword [rbx + 0x298], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glVertexBindingAutoClear
mov rcx, rdi
mov qword [rbx + 0x2a0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glOpenglUnsupportReport
mov rcx, rdi
mov qword [rbx + 0x2a8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.glBeacon
mov rcx, rdi
mov qword [rbx + 0x2b0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x2b8], rax
mov rax, qword [rbx]
lea rcx, vtable.local_opengl.0
mov rdx, qword [rax + 0xa0]
cmp rax, rcx
jne 0x140005beb
mov rax, qword [rbx + 0x2b8]
test rax, rax
je 0x140005b7e
lea rcx, [0x140005c00]
call rax
mov rax, qword [rbx + 0x270]
test rax, rax
je 0x140005b92
mov ecx, dword [rbx + 0x2c0]
call rax
mov eax, dword [rbx + 0x60]
mov r9d, dword [rbx + 0x5c]
mov r8d, dword [rbx + 0x28]
mov edx, dword [rbx + 0x30]
mov ecx, dword [rbx + 0x2c]
mov dword [rsp + 0x20], eax
call qword [rbx + 0x210]
test eax, eax
jne 0x140005bd9
lea rdx, str.local_opengl::start
lea rcx, str._S:_initOpenGLRendererPort_fail__n
call fcn.140001010
mov rsi, qword [rsp + 0x40]
mov eax, 6
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rsi, qword [rsp + 0x40]
xor eax, eax
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rcx, rbx
call rdx
jmp 0x140005b7e