Function at 0x40347b
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x1c], str.OpenGL_ES_CM
mov esi, ecx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x18], str.OpenGL_ES_CL
mov dword [ebp - 0x14], str.OpenGL_ES
mov eax, dword [edi + 4]
mov dword [esi + 0x1e8], eax
mov dword [esi + 0x1e4], 0x30001
push dword [0x4be5d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov dword [ebp - 4], eax
call fcn.0040380d
push str.glGetIntegerv
call dword [esi + 0x22c]
mov dword [esi + 0x214], eax
mov dword [esp], str.glGetString
call dword [esi + 0x22c]
cmp dword [esi + 0x214], 0
pop ecx
mov dword [esi + 0x218], eax
je 0x4037a2
test eax, eax
je 0x4037a2
push 0x1f02
call eax
mov ebx, eax
test ebx, ebx
jne 0x40352d
cmp dword [edi], 0x30001
mov eax, str.OpenGL_ES_version_string_retrieval_is_broken
mov ecx, str.OpenGL_version_string_retrieval_is_broken
cmove eax, ecx
push eax
jmp 0x4037a7
and dword [ebp - 8], 0
mov ecx, str.OpenGL_ES_CM
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x40353b
sub edi, edx
push edi
push ecx
push ebx
call fcn.004111d0
add esp, 0xc
test eax, eax
je 0x403564
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov ecx, dword [ebp + eax*4 - 0x1c]
test ecx, ecx
jne 0x403536
jmp 0x403570
add ebx, edi
mov dword [esi + 0x1e4], 0x30002
lea eax, [esi + 0x1f4]
push eax
lea ecx, [esi + 0x1f0]
push ecx
lea edi, [esi + 0x1ec]
push edi
push str._d._d._d
push ebx
call fcn.00403107
add esp, 0x14
test eax, eax
jne 0x4035b0
cmp dword [esi + 0x1e4], 0x30001
mov eax, str.No_version_found_in_OpenGL_ES_version_string
mov ecx, str.No_version_found_in_OpenGL_version_string
jmp 0x403524
mov ebx, dword [ebp - 0xc]
mov eax, dword [edi]
mov ecx, dword [ebx + 8]
cmp eax, ecx
jl 0x40376c
jne 0x4035d1
mov edx, dword [esi + 0x1f0]
cmp edx, dword [ebx + 0xc]
jl 0x403772
cmp eax, 3
jl 0x4035f0
push str.glGetStringi
call dword [esi + 0x22c]
mov dword [esi + 0x210], eax
pop ecx
test eax, eax
je 0x4037a2
cmp dword [esi + 0x1e4], 0x30001
jne 0x4036bc
cmp dword [edi], 3
jl 0x403658
lea eax, [ebp - 8]
push eax
push 0x821e
call dword [esi + 0x214]
mov eax, dword [ebp - 8]
test al, 1
je 0x403625
mov dword [esi + 0x1f8], 1
test al, 2
jne 0x403640
mov ecx, str.GL_ARB_debug_output
call fcn.004038f0
test eax, eax
je 0x403698
cmp dword [ebx + 0x14], 0
je 0x403698
mov eax, dword [ebp - 8]
mov dword [esi + 0x1fc], 1
test al, 8
je 0x403658
mov dword [esi + 0x200], 1
mov eax, dword [esi + 0x1ec]
cmp eax, 4
jge 0x403671
cmp eax, 3
jne 0x4036b5
cmp dword [esi + 0x1f0], 2
jl 0x4036b5
lea eax, [ebp - 8]
push eax
push 0x9126
call dword [esi + 0x214]
test byte [ebp - 8], 2
jne 0x4036ab
test byte [ebp - 8], 1
je 0x40369d
mov dword [esi + 0x204], 0x32001
jmp 0x4036b5
mov eax, dword [ebp - 8]
jmp 0x40364a
mov ecx, str.GL_ARB_compatibility
call fcn.004038f0
test eax, eax
je 0x4036b5
mov dword [esi + 0x204], 0x32002
mov ecx, str.GL_ARB_robustness
jmp 0x4036c1
mov ecx, str.GL_EXT_robustness
call fcn.004038f0
test eax, eax
je 0x403701
lea eax, [ebp - 8]
push eax
push 0x8256
call dword [esi + 0x214]
cmp dword [ebp - 8], 0x8252
jne 0x4036ee
mov dword [esi + 0x208], 0x31002
jmp 0x403701
cmp dword [ebp - 8], 0x8261
jne 0x403701
mov dword [esi + 0x208], 0x31001
mov ecx, str.GL_KHR_context_flush_control
call fcn.004038f0
test eax, eax
je 0x403743
lea eax, [ebp - 8]
push eax
push 0x82fb
call dword [esi + 0x214]
cmp dword [ebp - 8], 0
jne 0x403730
mov dword [esi + 0x20c], 0x35002
jmp 0x403743
cmp dword [ebp - 8], 0x82fc
jne 0x403743
mov dword [esi + 0x20c], 0x35001
push str.glClear
call dword [esi + 0x22c]
mov dword [esp], 0x4000
call eax
push esi
call dword [esi + 0x220]
pop ecx
mov ecx, dword [ebp - 4]
call fcn.0040380d
xor eax, eax
inc eax
jmp 0x4037bd
mov edx, dword [esi + 0x1f0]
mov esi, dword [esi + 0x1e4]
mov edi, 0x30001
push edx
push eax
push dword [ebx + 0xc]
cmp esi, edi
mov eax, str.Requested_OpenGL_ES_version__i._i__got_version__i._i
push ecx
mov ecx, str.Requested_OpenGL_version__i._i__got_version__i._i
cmove eax, ecx
push eax
push 0x10007
call fcn.0040478d
add esp, 0x18
jmp 0x4037b3
push str.Entry_point_retrieval_is_broken
push 0x10008
call fcn.0040478d
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
call fcn.0040380d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret