Function at 0x10001ef7
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push 0x1c
mov eax, 0x100131d7
call fcn.100129e8
mov edi, ecx
xor ebx, ebx
cmp dword [0x1001dd28], ebx
mov dword [ebp - 0x1c], 0x80004005
jne 0x10001f29
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push ebx
push eax
mov dword [0x1001dd28], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [0x1001dd28]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x100020e0
cmp dword [0x1001dfc0], ebx
jbe 0x100020e0
cmp dword [0x1001e06c], ebx
je 0x100020e0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 1
mov eax, dword [edi]
push edi
call dword [eax + 0x48]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x14], eax
je 0x10001f81
push str._D_3
lea esi, [ebp - 0x14]
call fcn.10001de1
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x100020bf
mov dword [ebp - 0x10], ebx
lea edx, [ebp - 0x10]
push edx
push 0x10015804
mov byte [ebp - 4], 2
mov ecx, dword [eax]
push eax
call dword [ecx]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jl 0x100020ae
cmp dword [ebp - 0x10], ebx
je 0x100020ae
push dword [ebp - 0x10]
call fcn.10001e84
push 0x18
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x10001ff3
mov dword [esi], vtable.CDocHandler.0
mov dword [esi + 4], vtable.CDocHandler.1.0
mov dword [esi + 8], 1
mov dword [esi + 0xc], edi
mov eax, dword [edi]
push edi
call dword [eax + 4]
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov edi, esi
jmp 0x10001ff5
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp - 0x20], ebx
je 0x1000200d
mov ecx, dword [eax]
lea edx, [ebp - 0x20]
push edx
push 0x10015514
push eax
call dword [ecx]
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x10002069
mov dword [ebp - 0x18], ebx
lea edx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 4
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jl 0x10002058
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x10002058
lea esi, [edi + 0x10]
cmp dword [esi], eax
je 0x10002044
push 0x10015524
call fcn.10001de1
mov eax, dword [ebp - 0x18]
lea esi, [edi + 0x14]
cmp dword [esi], eax
je 0x10002058
push 0x10015534
call fcn.10001de1
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x10002069
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp edi, ebx
mov byte [ebp - 4], 5
mov dword [ebp - 0x28], edi
je 0x1000208f
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0xc]
push 1
push dword [0x1001dd28]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp edi, ebx
mov byte [ebp - 4], 3
je 0x1000209d
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x100020ae
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x100020bf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x100020cf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x100020e0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
cmp dword [ebp - 0x1c], ebx
setge al
call fcn.10012a87
ret