Function at 0x5ba575f1
Capabilities:
Allocate thread local storage
Check os version
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x5bb70c3c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
mov esi, dword [ebp + 8]
jne 0x5ba57799
push edi
push 0
call fcn.5bb3e1a1
and dword [ebp - 0xa0], 0
push 0x26
pop ecx
xor eax, eax
lea edi, [ebp - 0x9c]
rep stosd dword es:[edi], eax
mov dword [0x5bb73710], esi
call fcn.5ba82533
xor esi, esi
push 0x5bb73714
inc esi
push esi
mov dword [0x5bb7389c], eax
call dword [sym.imp.ole32.dll_CoGetMalloc]
call fcn.5ba82566
push 0x5bb738c8
push 0x5bb738a0
call fcn.5ba82577
call fcn.5babcc61
push eax
push 0x5ba4a5dc
push dword [0x5bb73710]
call fcn.5ba8259e
mov dword [0x5bb73708], eax
lea eax, [ebp - 0xa0]
push eax
mov dword [ebp - 0xa0], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
pop edi
je 0x5ba576ce
cmp dword [ebp - 0x90], 2
jne 0x5ba576ce
cmp dword [ebp - 0x9c], 5
jne 0x5ba576ce
cmp dword [ebp - 0x98], esi
jne 0x5ba576ce
cmp word [ebp - 0x94], 0xa28
jne 0x5ba576ce
call fcn.5babcc7f
test eax, eax
je 0x5ba576d7
mov dword [0x5bb7370c], esi
cmp dword [0x5bb73708], 0
jne 0x5ba576de
xor eax, eax
jmp 0x5ba578e2
call fcn.5ba826c4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push 0
push eax
mov dword [0x5bb707a0], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x5bb73874
call esi
push 0x5bb73718
call esi
push 0x5bb73730
call esi
push 0x5bb73748
call esi
push 0x5bb73760
call esi
push 0x5bb73778
call esi
push 0x5bb73790
call esi
push 0x5bb73960
call esi
push 0x5bb737a8
call esi
push 0x5bb737c0
call esi
push 0x5bb737d8
call esi
push 0x5bb737f0
call esi
push dword [0x5bb73710]
mov ecx, 0x5bb736a0
push 0x5bb707a8
call fcn.5bae625f
mov eax, dword [0x5bb73708]
push 0x54
mov dword [0x5bb736a8], eax
call fcn.5ba5615b
test eax, eax
pop ecx
je 0x5ba5778d
mov ecx, eax
call fcn.5ba826de
mov dword [0x5bb73808], eax
jmp 0x5ba578df
and dword [0x5bb73808], 0
jmp 0x5ba578df
cmp eax, 2
jne 0x5ba577b8
push 0
call fcn.5ba5613e
push 0
push dword [0x5bb707a0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x5ba578df
cmp eax, 3
jne 0x5ba577e3
push dword [0x5bb707a0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x5ba577a5
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x5ba577a5
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
jmp 0x5ba577a5
test eax, eax
jne 0x5ba578df
mov eax, dword [0x5bb7395c]
test eax, eax
je 0x5ba57801
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
and dword [0x5bb7395c], 0
mov eax, dword [0x5bb73808]
test eax, eax
je 0x5ba57810
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 0x5bb736a0
call dword [sym.imp.ATL.DLL_AtlModuleTerm]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x5bb73730
call esi
push 0x5bb73748
call esi
push 0x5bb73760
call esi
push 0x5bb73778
call esi
push 0x5bb73790
call esi
push 0x5bb73960
call esi
push 0x5bb737a8
call esi
push 0x5bb737c0
call esi
push 0x5bb73718
call esi
push 0x5bb737d8
call esi
push 0x5bb73874
call esi
push 0x5bb737f0
call esi
call fcn.5bb34e4b
push dword [0x5bb707a0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x5ba5789e
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x5ba5789e
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
call fcn.5bad6536
mov eax, dword [0x5bb707a0]
cmp eax, 0xffffffff
je 0x5ba578b4
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov eax, dword [0x5bb73714]
test eax, eax
je 0x5ba578ca
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
and dword [0x5bb73714], 0
mov eax, dword [0x5bb73708]
test eax, eax
je 0x5ba578da
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.5bb3e1b9
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop esi
call fcn.5bb3f314
leave
ret 0xc