Function at 0x10009961
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x100181d4]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x18], edx
push 0xc
mov dword [esp + 0x10], esi
xor ebx, ebx
call fcn.10008302
mov ecx, eax
test ecx, ecx
jne 0x1000999b
mov eax, dword [esi + 0x1c]
jmp 0x10009c6b
mov esi, dword [ebp + 8]
mov edi, ebx
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x20], eax
test eax, eax
je 0x100099de
push 0x2c
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [esp + 0x10], eax
test eax, eax
je 0x100099ca
mov dword [eax], 0x1000101c
mov dword [eax + 0x1c], ebx
jmp 0x100099d0
mov eax, ebx
mov dword [esp + 0x10], ebx
test eax, eax
jne 0x100099e4
mov eax, 0x8007000e
jmp 0x10009c6b
mov eax, ebx
mov dword [esp + 0x10], eax
push 1
push 0xc
push dword [esp + 0x20]
mov dword [esi + 8], eax
mov esi, dword [0x100186d0]
mov ecx, esi
call dword [0x10019344]
call esi
mov esi, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], esi
push 2
pop edx
test eax, eax
je 0x10009aab
movzx eax, word [eax]
push 9
pop ecx
cmp ax, dx
je 0x10009a27
cmp ax, cx
jne 0x10009aab
cmp dword [esi], 1
jne 0x10009aab
push dword [0x100181dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test dword [eax + 0x44], 0x20000000
je 0x10009aa8
movzx eax, word [esi + 4]
mov esi, dword [0x100186f0]
mov ecx, esi
push 8
push eax
call dword [0x10019344]
call esi
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x10009a6a
mov eax, 0x80070057
jmp 0x10009c6b
push eax
call dword [sym.imp.GDI32.dll_GetObjectType]
mov ecx, dword [ebp + 0xc]
push 2
pop edx
movzx ecx, word [ecx]
cmp cx, dx
jne 0x10009a84
cmp eax, 7
je 0x10009a94
push 9
pop edx
cmp cx, dx
jne 0x10009aa4
cmp eax, 5
jne 0x10009aa4
push 2
pop edx
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [esi], 0x10
jmp 0x10009aad
mov esi, dword [esp + 0x14]
push 2
pop edx
mov ecx, ebx
mov eax, dword [esi]
sub eax, ebx
je 0x10009c27
sub eax, 1
je 0x10009b8b
sub eax, 1
je 0x10009b63
sub eax, edx
je 0x10009b5d
sub eax, 4
je 0x10009b2b
sub eax, 8
je 0x10009b03
sub eax, 0x10
je 0x10009aea
mov edi, 0x80070057
jmp 0x10009c10
mov eax, dword [ebp + 8]
movzx edx, word [esi + 4]
add eax, 4
mov ecx, dword [esp + 0xc]
push eax
call fcn.10009063
jmp 0x10009c07
test ecx, ecx
jne 0x10009b20
movzx eax, word [esi + 4]
mov esi, dword [0x100186f0]
mov ecx, esi
push 8
push eax
call dword [0x10019344]
call esi
mov ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x10009c2a
push ebx
push ebx
push 0xb
mov ecx, dword [esp + 0x18]
push ebx
push dword [esi + 4]
mov ecx, dword [ecx + 0x28]
push ebx
call fcn.10006eff
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], edi
neg edi
sbb edi, edi
and edi, 0x7ff8fff2
add edi, 0x8007000e
jmp 0x10009c0c
push ebx
push ebx
push 0xa
jmp 0x10009b2f
mov edx, dword [esi + 4]
mov esi, dword [esp + 0xc]
mov ecx, esi
push ebx
push ebx
call fcn.10008047
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 4], eax
mov eax, ecx
jne 0x10009c2a
mov edi, dword [esi + 0x1c]
jmp 0x10009c0c
mov eax, dword [ebp + 0xc]
movzx edx, word [esi + 4]
test eax, eax
je 0x10009bed
movzx eax, word [eax]
cmp ax, word [0x100185b8]
je 0x10009bdb
cmp ax, word [0x100186c0]
je 0x10009bdb
cmp eax, 0xf
jne 0x10009bed
mov esi, dword [0x100186c8]
mov ecx, esi
push edx
call dword [0x10019344]
call esi
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], edi
neg edi
sbb edi, edi
and edi, 0x7ff8ffa9
add edi, 0x80070057
jmp 0x10009c0c
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
add eax, 4
push eax
call fcn.100092a2
jmp 0x10009c07
push dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
add eax, 4
push eax
push 0xc0
mov dword [eax], ebx
call fcn.10008e04
mov edi, eax
mov eax, dword [ebp + 8]
test edi, edi
jns 0x10009c2a
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10009c69
push eax
mov dword [eax], 0x1000101c
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x10009c69
mov eax, dword [ebp + 8]
cmp dword [esp + 0x10], ebx
je 0x10009c69
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x10009c3a
movzx ebx, word [ecx]
mov esi, dword [0x100186d0]
mov ecx, esi
push ebx
push dword [esp + 0x24]
push eax
push 1
push 0xc
push dword [esp + 0x2c]
call dword [0x10019344]
call esi
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x28]
call fcn.1000964f
mov eax, edi
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100165d0
mov esp, ebp
pop ebp
ret 0x10