Function at 0x1000d091
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x100181d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 5], dl
push ebx
push esi
push edi
mov edi, ecx
test dl, 0xc0
je 0x1000d218
mov eax, dword [edi + 0x10]
xor ebx, ebx
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0xc], ecx
mov dword [edi + 0x10], eax
test ecx, ecx
je 0x1000d16b
mov al, dl
and al, 0x40
mov byte [ebp - 6], al
je 0x1000d0fa
cmp dword [ebp + 0x10], ebx
je 0x1000d0ea
mov edx, dword [ebp + 0x10]
call fcn.1000776c
mov ecx, dword [ebp - 0xc]
mov dl, byte [ebp - 5]
jmp 0x1000d0ec
xor eax, eax
test eax, eax
je 0x1000d0fa
mov eax, 0x80070057
jmp 0x1000d278
test dl, dl
jns 0x1000d113
cmp dword [ebp + 0x10], ebx
je 0x1000d10d
mov edx, dword [ebp + 0x10]
call fcn.10007797
jmp 0x1000d10f
xor eax, eax
test eax, eax
jne 0x1000d0f0
push dword [ebp + 8]
push dword [0x100181dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
call fcn.10011e0c
mov ebx, eax
test ebx, ebx
jne 0x1000d139
mov eax, 0x8007000e
jmp 0x1000d278
cmp byte [ebp - 6], 0
je 0x1000d16b
mov esi, dword [0x100186d0]
mov ecx, esi
push 1
push dword [ebp + 8]
push ebx
call dword [0x10019344]
call esi
push dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push dword [ebp - 0xc]
call dword [0x10019344]
call dword [ebp + 0x14]
cmp dword [edi + 8], 0
mov eax, dword [edi + 4]
jge 0x1000d17e
add eax, 0xfffffffc
mov dword [edi + 4], eax
mov dword [eax], ebx
jmp 0x1000d184
mov dword [eax], ebx
add dword [edi + 4], 4
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
push edi
movzx eax, byte [eax]
and eax, 0x3f
mov esi, dword [eax*4 + 0x100010f8]
mov ecx, esi
call dword [0x10019344]
call esi
mov cl, byte [ebp - 5]
mov esi, eax
mov dword [ebp - 0x10], esi
test cl, cl
jns 0x1000d1fb
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x1000d1fb
test esi, esi
js 0x1000d1e8
mov esi, dword [0x100186d0]
mov ecx, esi
push 1
push dword [ebp + 8]
push ebx
call dword [0x10019344]
call esi
push dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push dword [ebp + 8]
push edi
push eax
call dword [0x10019344]
call dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
jmp 0x1000d1fb
test cl, 0x40
jne 0x1000d1fb
push dword [ebp + 0x10]
push 0
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
test ebx, ebx
je 0x1000d276
push dword [ebp + 8]
push ecx
push dword [0x100181dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
call fcn.10011f10
jmp 0x1000d276
cmp dword [edi + 8], 0
mov esi, dword [ebp + 8]
jge 0x1000d225
mov ecx, esi
jmp 0x1000d227
xor ecx, ecx
mov eax, dword [edi + 4]
mov ebx, dword [ebp + 0x10]
sub eax, ecx
mov ecx, dword [ebp + 0x14]
push esi
push ebx
push eax
push dword [edi + 0x10]
call dword [0x10019344]
call dword [ebp + 0x14]
cmp dword [edi + 8], 0
mov eax, dword [edi + 4]
jge 0x1000d24e
sub eax, esi
jmp 0x1000d250
add eax, esi
add dword [edi + 0x10], ebx
inc dword [edi + 0x14]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x14]
push edi
movzx eax, byte [eax]
and eax, 0x3f
mov esi, dword [eax*4 + 0x100010f8]
mov ecx, esi
call dword [0x10019344]
call esi
mov esi, eax
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100165d0
mov esp, ebp
pop ebp
ret 0x10