Function at 0x1001d5ec
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
movzx eax, byte [ebp + 0x20]
test eax, eax
je 0x1001d61c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
movzx eax, byte [eax]
test eax, eax
je 0x1001d617
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
jmp 0x1001d7c2
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 0
je 0x1001d749
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx]
jne 0x1001d692
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x1001d692
and dword [ebp - 0xc], 0
jmp 0x1001d699
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0xfff8
jbe 0x1001d6b5
mov dword [ebp - 0x10], 1
jmp 0x1001d6b9
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
imul eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx]
jle 0x1001d6d2
mov dword [ebp - 0x14], 1
jmp 0x1001d6d6
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0x7f4ea14c
jle 0x1001d6e8
mov dword [ebp - 0x18], 1
jmp 0x1001d6ec
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add eax, dword [ebp - 0x18]
je 0x1001d704
xor eax, eax
inc eax
je 0x1001d704
mov dword [ebp - 0x1c], 1
jmp 0x1001d708
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx]
jle 0x1001d725
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x1001d725
and dword [ebp - 0x54], 0
jmp 0x1001d72c
mov dword [ebp - 0x54], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
add eax, dword [ecx]
je 0x1001d749
mov dword [ebp - 0x20], 1
jmp 0x1001d74d
and dword [ebp - 0x20], 0
push 0
mov ecx, dword [ebp - 8]
call fcn.10016fad
mov ecx, dword [ebp - 0x20]
add ecx, dword [eax]
mov eax, dword [ebp - 0x24]
cmp ecx, dword [eax]
jge 0x1001d76c
mov dword [ebp - 0x28], 1
jmp 0x1001d770
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
sub ecx, dword [eax]
jne 0x1001d789
mov eax, 0x7276cc72
test eax, eax
jne 0x1001d789
and dword [ebp - 0x58], 0
jmp 0x1001d790
mov dword [ebp - 0x58], 1
push 1
mov ecx, dword [ebp - 8]
call fcn.10016fad
mov eax, dword [ebp - 0x5c]
mov esi, dword [eax]
push 0
mov ecx, dword [ebp - 8]
call fcn.10016fad
cmp esi, dword [eax]
jg 0x1001d7b6
mov dword [ebp - 0x2c], 1
jmp 0x1001d7ba
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
pop esi
mov esp, ebp
pop ebp
ret