Function at 0x409eb887
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov bl, byte [ebp + 0x10]
xor ecx, ecx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x10]
push edi
mov dword [ebp - 0x1c], ecx
mov edi, dword [eax]
add eax, 4
mov byte [ebp + 0xb], bl
and byte [ebp + 0xb], 0x80
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], edi
mov dword [esi + 0x10], eax
je 0x409eb8fa
cmp edi, ecx
je 0x409eb8fa
push 4
push edi
call fcn.409e6532
test eax, eax
jne 0x409eb8f0
push 4
push edi
call fcn.409e656b
test eax, eax
jne 0x409eb8f0
test bl, 0x40
je 0x409eb8e8
mov eax, dword [edi]
mov dword [ebp - 8], eax
jmp 0x409eb8ec
and dword [ebp - 8], 0
xor ecx, ecx
jmp 0x409eb8fd
mov eax, 0x80070057
jmp 0x409ebb11
mov dword [ebp - 8], edi
test bl, 0x40
je 0x409eb967
cmp dword [ebp - 8], ecx
je 0x409eb960
and bl, 0x3f
lea eax, [ebp - 0x14]
push eax
cmp bl, 0x20
jne 0x409eb93d
mov ecx, dword [esi + 0x28]
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
call fcn.409e54fb
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
call fcn.409e46c0
mov dword [ebp - 0x24], 1
jmp 0x409eb950
push dword [ebp + 0xc]
push ecx
push dword [ebp - 8]
push ecx
mov ecx, dword [esi + 0x28]
call fcn.409e5bab
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x409eb965
mov eax, 0x8007000e
jmp 0x409ebb11
mov dword [ebp - 4], ecx
jmp 0x409eb967
xor ecx, ecx
cmp byte [ebp + 0xb], 0
je 0x409eb9d1
cmp edi, ecx
je 0x409eb9d1
push dword [ebp + 0xc]
mov ecx, dword [esi + 0x28]
call fcn.409e4ee8
mov dword [ebp - 0xc], eax
test eax, eax
je 0x409eb9c8
push 4
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
call fcn.409ef108
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x409eb9c8
push 1
push 4
push ebx
call sub.wow32.dll_WOWGetVDMPointer
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
cmp dword [esi + 8], 0
jge 0x409eb9c1
add dword [esi + 4], 0xfffffffc
mov eax, dword [esi + 4]
mov dword [eax], ebx
jmp 0x409eb9ed
mov eax, dword [esi + 4]
mov dword [eax], ebx
jmp 0x409eb9e9
mov dword [ebp - 0x10], 0x8007000e
jmp 0x409eba01
cmp dword [esi + 8], ecx
mov ecx, dword [ebp - 4]
jge 0x409eb9e4
add dword [esi + 4], 0xfffffffc
mov eax, dword [esi + 4]
mov dword [eax], ecx
jmp 0x409eb9ed
mov eax, dword [esi + 4]
mov dword [eax], ecx
add dword [esi + 4], 4
mov eax, dword [esi + 0x14]
movzx eax, byte [eax]
and eax, 0x3f
push esi
call dword [eax*4 + 0x409e1528]
mov dword [ebp - 0x10], eax
cmp byte [ebp + 0xb], 0
je 0x409ebaa9
test edi, edi
je 0x409ebaa9
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
jl 0x409ebaa7
push 1
push 4
push dword [ebp - 0x18]
call sub.wow32.dll_WOWGetVDMPointer
mov edi, dword [eax]
test edi, edi
je 0x409ebaa4
xor eax, eax
cmp dword [ebp + 0x14], eax
je 0x409eba5a
call fcn.409e46f4
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [esi + 0x28]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
push edi
push dword [ebp + 0x14]
push dword [ebp - 0xc]
call fcn.409e61b6
jmp 0x409eba6f
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [esi + 0x28]
push eax
push dword [ebp + 0xc]
push eax
push edi
push dword [ebp - 0xc]
call fcn.409e5f3e
mov ebx, eax
test ebx, ebx
je 0x409eba91
mov al, byte [ebp + 0x10]
and al, 0x3f
cmp al, 0x21
jne 0x409eba8b
cmp dword [ebp - 0x14], 4
je 0x409eba8b
mov dword [ebx + 0x1c], 0x20
and dword [ebp - 0xc], 0
jmp 0x409eba98
mov dword [ebp - 0x10], 0x8007000e
push edi
push dword [0x409f23e0]
call sub.wow32.dll_WOWCallback16
mov edi, dword [ebp - 0x20]
mov dword [edi], ebx
cmp dword [ebp - 4], 0
je 0x409ebad1
mov al, byte [ebp + 0x10]
and al, 0xc0
cmp al, 0xc0
jne 0x409ebac3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x409ebad1
push dword [ebp - 4]
push dword [0x409f23e0]
call sub.wow32.dll_WOWCallback16
cmp dword [ebp - 0xc], 0
je 0x409ebae5
push dword [ebp + 0xc]
mov ecx, dword [esi + 0x28]
push dword [ebp - 0xc]
call fcn.409e4f35
cmp dword [ebp - 0x18], 0
je 0x409ebb03
push 4
push dword [ebp - 0x18]
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
call fcn.409ef19c
cmp dword [ebp - 0x24], 0
je 0x409ebb0e
call fcn.409e4709
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 0x10