Function at 0x40a771
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push esi
mov dword [ebp - 0x48], 0xe8
mov dword [ebp - 0x40], 0x82
mov dword [ebp - 0x50], 0x68
mov dword [ebp - 4], 0xe9
mov dword [ebp - 0x34], 0x15
mov dword [ebp - 0x54], 0x5f
mov dword [ebp - 0x38], 6
mov dword [ebp - 0x20], 0x7a
mov dword [ebp - 0x3c], 0xfb
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x58], 0x76
mov eax, dword [0x4190e0]
and eax, dword [0x419114]
jne 0x40a7f0
mov ecx, dword [ebp - 0x38]
xor ecx, dword [0x4190e0]
jne 0x40a7f0
mov dword [ebp - 0x10], 0
jmp 0x40a7f7
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0
je 0x40aa20
mov edx, dword [ebp - 8]
xor edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
imul eax, dword [ebp - 0xc]
cmp edx, eax
jne 0x40a81b
mov dword [ebp - 0x14], 1
jmp 0x40a822
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x40aa20
mov ecx, dword [ebp - 8]
push ecx
call fcn.0040ba01
add esp, 4
mov esi, eax
mov edx, dword [0x4190cc]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
cmp esi, eax
je 0x40a854
mov dword [ebp - 0x18], 1
jmp 0x40a85b
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x34]
sub eax, dword [0x419124]
mov dword [0x4190c0], eax
mov ecx, dword [0x4190c8]
or ecx, dword [0x419130]
cmp dword [0x4190c0], ecx
je 0x40a886
mov dword [ebp - 0x1c], 1
jmp 0x40a88d
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x1c]
jae 0x40a8c3
mov dword [ebp - 0x5c], 0xe
mov eax, dword [0x4190e0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [0x4190dc]
push edx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [0x4190d4], eax
jmp 0x40a8e7
mov dword [ebp - 0x64], 0xfd
mov eax, dword [0x419110]
sub eax, dword [0x4190bc]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 8]
or ecx, dword [0x4190d0]
mov dword [0x419124], ecx
mov edx, dword [0x419110]
push edx
call fcn.0040ba01
add esp, 4
mov ecx, eax
mov eax, dword [0x419110]
xor edx, edx
div dword [ebp - 0x4c]
cmp ecx, eax
jae 0x40a90f
mov dword [ebp - 0x24], 1
jmp 0x40a916
mov dword [ebp - 0x24], 0
mov edx, dword [0x4190c4]
xor edx, dword [0x4190c8]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
cmp dword [ebp - 0x20], ecx
jae 0x40a93e
mov dword [ebp - 0x28], 1
jmp 0x40a945
mov dword [ebp - 0x28], 0
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x28]
jae 0x40a956
mov dword [ebp - 0x2c], 1
jmp 0x40a95d
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], 0
je 0x40a9dc
mov eax, dword [0x4190bc]
push eax
mov ecx, dword [0x41912c]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.GDI32.dll_PolylineTo]
mov esi, eax
mov eax, dword [ebp - 0x44]
push eax
call fcn.0040ba01
add esp, 4
cmp esi, eax
jne 0x40a995
mov dword [ebp - 0x30], 1
jmp 0x40a99c
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x30], 0
je 0x40a9dc
mov dword [ebp - 0x68], 0xbc
mov dword [ebp - 0x6c], 0x69
mov ecx, dword [0x4190bc]
add ecx, dword [ebp - 0x34]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4190c0], eax
mov eax, dword [0x419114]
imul eax, dword [0x419118]
mov dword [ebp - 0x74], eax
jmp 0x40a9ec
mov ecx, dword [0x419128]
imul ecx, dword [ebp - 0x44]
mov dword [0x4190c4], ecx
mov edx, dword [0x4190c8]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov dword [0x419118], eax
mov ecx, dword [0x4190d4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x419118], eax
mov edx, dword [0x419114]
xor edx, dword [0x4190d0]
mov dword [ebp - 0x48], edx
jmp 0x40aa4e
mov dword [ebp - 0x78], 0x54
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x84], 0
mov eax, dword [ebp - 0x88]
push eax
call fcn.0040ba01
add esp, 4
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0040ba01
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret