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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
push esi
mov dword [ebp - 4], 0x72
mov dword [ebp - 0x14], 0xdd
mov dword [ebp - 0x18], 0xb8
mov dword [ebp - 0xc], 0x20
mov dword [ebp - 0x1c], 9
mov dword [ebp - 8], 0x3f
mov dword [ebp - 0x10], 0x97
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x415e51
mov ecx, dword [ebp + 0xc]
and ecx, dword [0x42181c]
je 0x415e51
mov dword [ebp - 0x24], 1
jmp 0x415e58
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [0x421800]
push eax
mov ecx, dword [0x421818]
push ecx
mov edx, dword [0x4217f4]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x415e9f
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [str.AJ]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x415e9f
mov dword [ebp - 0x28], 1
jmp 0x415ea6
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x28]
je 0x415eb7
mov dword [ebp - 0x2c], 1
jmp 0x415ebe
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], 0
je 0x415f03
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov esi, eax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [0x4217fc]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.GDI32.dll_PolylineTo]
cmp esi, eax
jne 0x415eed
mov dword [ebp - 0x30], 1
jmp 0x415ef4
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x30], 0
je 0x415f03
mov dword [ebp - 0x34], 1
jmp 0x415f0a
mov dword [ebp - 0x34], 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
mov eax, dword [0x4217ec]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp esi, eax
je 0x415f2f
mov dword [ebp - 0x38], 1
jmp 0x415f36
mov dword [ebp - 0x38], 0
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x38]
jae 0x4160ab
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x421820], eax
mov esi, dword [0x4217f0]
add esi, dword [0x42181c]
mov eax, dword [0x42181c]
push eax
call fcn.00418e94
add esp, 4
cmp esi, eax
jae 0x415f78
mov dword [ebp - 0x3c], 1
jmp 0x415f7f
mov dword [ebp - 0x3c], 0
mov ecx, dword [0x4217e8]
push ecx
call fcn.00418e94
add esp, 4
test eax, eax
je 0x415fb1
mov edx, dword [ebp - 0x14]
imul edx, dword [ebp - 0x10]
mov dword [0x4217ec], edx
cmp dword [0x4217ec], 0
je 0x415fb1
mov dword [ebp - 0x40], 1
jmp 0x415fb8
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
jae 0x415fc9
mov dword [ebp - 0x44], 1
jmp 0x415fd0
mov dword [ebp - 0x44], 0
cmp dword [ebp - 0x44], 0
je 0x41605b
mov ecx, dword [ebp - 0x10]
mov dword [0x421800], ecx
mov edx, dword [0x421800]
mov dword [0x421824], edx
mov eax, dword [0x421814]
push eax
call fcn.0040bf14
add esp, 4
cmp dword [0x421824], eax
jae 0x41600e
mov dword [ebp - 0x48], 1
jmp 0x416015
mov dword [ebp - 0x48], 0
cmp dword [ebp - 0x48], 0
je 0x41605b
mov dword [ebp - 0xec], 0x71
mov ecx, dword [0x4217f8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4217e4], eax
mov edx, dword [0x4217e4]
push edx
call fcn.00418e94
add esp, 4
mov eax, dword [0x4217e0]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], eax
jmp 0x41609a
mov dword [ebp - 0xf0], 7
mov dword [ebp - 0xf4], 0xab
mov edx, dword [0x421804]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x4217fc], eax
mov eax, dword [0x421804]
xor edx, edx
div dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], ecx
clc
mov eax, dword [0x421824]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x4217f8], eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00418e94
add esp, 4
mov ecx, dword [0x421804]
sub ecx, dword [0x421824]
cmp eax, ecx
jbe 0x416118
mov dword [ebp - 0xf8], 0x1e
mov edx, dword [ebp - 0x10]
push edx
call fcn.0040bf14
add esp, 4
mov eax, dword [0x421824]
add eax, dword [ebp - 0x14]
mov dword [0x421820], eax
mov ecx, dword [0x4217ec]
push ecx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4217fc], eax
jmp 0x416131
mov dword [ebp - 0xfc], 0x17
mov edx, dword [0x4217ec]
or edx, dword [ebp + 0xc]
mov dword [0x4217f8], edx
mov eax, dword [0x4217f4]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov esi, eax
mov ecx, dword [0x421820]
push ecx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
cmp esi, eax
jae 0x416159
mov dword [ebp - 0x4c], 1
jmp 0x416160
mov dword [ebp - 0x4c], 0
mov edx, dword [0x421808]
or edx, dword [0x421808]
jne 0x416187
mov eax, dword [0x4217f0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
test eax, eax
jne 0x416187
mov dword [ebp - 0x50], 0
jmp 0x41618e
mov dword [ebp - 0x50], 1
mov ecx, dword [ebp - 0x4c]
cmp ecx, dword [ebp - 0x50]
je 0x4161b1
mov dword [ebp - 0xcc], 6
mov edx, dword [ebp - 0xcc]
push edx
call fcn.0040bf14
add esp, 4
jmp 0x4161f3
mov dword [ebp - 0x100], 0x8a
mov eax, dword [0x421824]
and eax, dword [0x421824]
mov dword [0x421800], eax
mov ecx, dword [0x421820]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x4217fc], eax
mov edx, dword [0x4217e4]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [0x4217f4], eax