Function at 0x1002160e
Capabilities:
Allocate thread local storage

Disassembly:
push 4
mov eax, 0x10024fd6
call fcn.10024485
or ebx, 0xffffffff
xor edi, edi
push 8
pop esi
cmp dword [0x10045114], ebx
jne 0x1002163d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x10045114], eax
cmp eax, ebx
je 0x10028fcb
push 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x10028fa6
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [0x10045c2c], eax
test eax, eax
je 0x10028fbb
push 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x10028fad
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [0x10045c28], eax
test eax, eax
je 0x10028fbb
push 0x14
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x10028fb4
push 2
pop edx
mov dword [eax], edx
lea ecx, [eax + 0xc]
mov dword [ecx - 8], edi
mov dword [ecx], edi
lea ecx, [ecx + 4]
sub edx, 1
jne 0x100216c6
mov dword [0x10045c24], eax
test eax, eax
je 0x10028fbb
push 0x84
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], edi
test eax, eax
je 0x10021783
mov ecx, eax
call fcn.10020d09
mov dword [ebp - 4], ebx
mov dword [0x10045c20], eax
test eax, eax
je 0x10028fbb
push 0xa4
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 1
test esi, esi
je 0x10021787
push 0xa4
push edi
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov ecx, esi
call fcn.10020c8d
mov dword [ebp - 4], ebx
mov dword [0x10045c1c], esi
test esi, esi
je 0x10028fbb
push 0x80000000
push 0x10045628
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x10028fbb
xor eax, eax
inc eax
call fcn.10024453
ret
mov eax, edi
jmp 0x10021708
mov esi, edi
jmp 0x10021751
mov eax, edi
jmp 0x10021663
mov eax, edi
jmp 0x10021696
mov eax, edi
jmp 0x100216d3
mov eax, dword [0x10045114]
cmp eax, ebx
je 0x10028fcb
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov esi, dword [0x10045c2c]
test esi, esi
je 0x10028feb
mov ecx, esi
call fcn.1003f2d0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [0x10045c28]
mov dword [0x10045c2c], edi
test esi, esi
je 0x10029011
mov ecx, esi
call fcn.1003f2d0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x10045c24]
mov dword [0x10045c28], edi
test eax, eax
je 0x1002902f
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [0x10045c20]
mov dword [0x10045c24], edi
test esi, esi
je 0x1002906a
push 0x1002a140
push 8
push 0xc
lea eax, [esi + 4]
mov dword [ebp - 4], 2
push eax
call fcn.10023498
push esi
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [0x10045c1c]
mov dword [0x10045c20], edi
test esi, esi
je 0x100290a2
push 0x1002a140
push 8
push 0xc
lea eax, [esi + 4]
mov dword [ebp - 4], 3
push eax
call fcn.10023498
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [0x10045c1c], edi
xor eax, eax
jmp 0x1002177d