Function at 0x417804
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
push esi
mov dword [ebp - 0x2c], 0x24
mov dword [ebp - 0x18], 0xf9
mov dword [ebp - 0x20], 0xa6
mov dword [ebp - 0x10], 0xbd
mov dword [ebp - 0x28], 0x90
mov dword [ebp - 0xc], 0x88
mov dword [ebp - 4], 0xd5
push fcn.00418e94
mov eax, dword [0x4217e4]
push eax
mov ecx, dword [0x4217fc]
push ecx
call dword [ebp + 0x10]
add esp, 0xc
mov esi, eax
push fcn.0040b7d4
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [str.AJ]
push eax
call dword [ebp + 0x10]
add esp, 0xc
cmp esi, eax
jne 0x4178b4
mov ecx, dword [0x4217f8]
imul ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [str.AJ]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x4217e0]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [ebp - 0x24], eax
mov edx, dword [0x4217f4]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x20], eax
jmp 0x41783f
mov eax, dword [0x42181c]
mov dword [ebp - 0x14], eax
jmp 0x4178c7
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
cmp edx, dword [0x4217ec]
jae 0x417afe
mov dword [ebp - 0x48], 0x78
mov eax, dword [0x421814]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov ecx, dword [0x421808]
push ecx
call fcn.00418e94
add esp, 4
test eax, eax
jne 0x417917
mov edx, dword [0x4217e0]
push edx
call fcn.0040bf14
add esp, 4
test eax, eax
jne 0x417917
mov dword [ebp - 0x30], 0
jmp 0x41791e
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x421800]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x417951
push fcn.0040bf14
mov edx, dword [ebp - 8]
push edx
call fcn.004154e4
add esp, 8
test eax, eax
je 0x417951
mov dword [ebp - 0x34], 1
jmp 0x417958
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x34]
jae 0x417969
mov dword [ebp - 0x38], 1
jmp 0x417970
mov dword [ebp - 0x38], 0
cmp dword [ebp - 0x38], 0
jne 0x4179ac
mov ecx, dword [0x4217ec]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
mov edx, dword [0x421804]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp esi, eax
je 0x41799f
mov dword [ebp - 0x3c], 1
jmp 0x4179a6
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
je 0x4179e7
mov dword [ebp - 0x78], 0x36
push fcn.0040b7d4
mov eax, dword [0x4217e0]
push eax
mov ecx, dword [0x4217f4]
push ecx
call fcn.00412234
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x4217ec]
push ecx
call dword [sym.imp.GDI32.dll_PolylineTo]
mov dword [ebp + 0x10], eax
jmp 0x417a10
mov dword [ebp - 0x7c], 0xd7
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x42180c], eax
push fcn.0040e4a4
mov eax, dword [0x4217f8]
push eax
call fcn.0040e4a4
add esp, 8
mov ecx, dword [0x4217ec]
push ecx
mov edx, dword [0x42181c]
push edx
call dword [sym.imp.GDI32.dll_SetArcDirection]
mov dword [ebp + 8], eax
mov eax, dword [0x42181c]
push eax
mov ecx, dword [0x4217e0]
push ecx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov esi, eax
push fcn.00418e94
mov edx, dword [ebp - 0x18]
push edx
call fcn.00415df4
add esp, 8
cmp esi, eax
jbe 0x417a5a
mov dword [ebp - 0x40], 1
jmp 0x417a61
mov dword [ebp - 0x40], 0
cmp dword [ebp - 0x40], 0
jne 0x417aa3
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040b7d4
add esp, 4
mov esi, eax
mov ecx, dword [0x421820]
push ecx
mov edx, dword [0x4217f8]
push edx
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
cmp esi, eax
jbe 0x417a96
mov dword [ebp - 0x44], 1
jmp 0x417a9d
mov dword [ebp - 0x44], 0
cmp dword [ebp - 0x44], 0
je 0x417ace
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x4217e0]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.GDI32.dll_PolylineTo]
mov dword [0x42180c], eax
mov eax, dword [ebp - 0x48]
imul eax, dword [0x4217e0]
mov dword [0x4217fc], eax
jmp 0x417af9
mov dword [ebp - 0x80], 0x50
mov dword [ebp - 0x6c], 0x99
mov eax, dword [ebp - 0x24]
xor edx, edx
div dword [ebp - 0x6c]
mov dword [0x421818], eax
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x84], eax
jmp 0x4178be
mov edx, dword [ebp - 0x28]
imul edx, dword [0x421800]
mov dword [0x421814], edx
push fcn.00418e94
mov eax, dword [ebp - 0x18]
push eax
call fcn.004154e4
add esp, 8
cmp dword [0x421814], eax
jae 0x417b30
mov dword [ebp - 0x4c], 1
jmp 0x417b37
mov dword [ebp - 0x4c], 0
mov ecx, dword [0x4217f4]
add ecx, dword [0x4217fc]
mov dword [0x4217f8], ecx
mov eax, dword [0x4217fc]
xor edx, edx
div dword [0x421808]
mov dword [ebp + 0xc], eax
mov edx, dword [0x4217f8]
cmp edx, dword [ebp + 0xc]
jbe 0x417b6d
mov dword [ebp - 0x50], 1
jmp 0x417b74
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x50]
jbe 0x417d12
push fcn.00418e94
mov ecx, dword [0x4217e4]
push ecx
call fcn.004154e4
add esp, 8
mov edx, dword [0x4217e0]
sub edx, dword [0x421824]
mov dword [str.AJ], edx
je 0x417bc8
push fcn.0040b7d4
mov eax, dword [0x42180c]
push eax
call fcn.004154e4
add esp, 8
test eax, eax
je 0x417bc8
mov dword [ebp - 0x54], 1
jmp 0x417bcf
mov dword [ebp - 0x54], 0
mov ecx, dword [0x4217fc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_PolylineTo]
test eax, eax
jne 0x417c09
mov ecx, dword [ebp + 8]
mov dword [0x4217f4], ecx
mov edx, dword [0x4217f4]
mov dword [ebp + 0xc], edx
cmp dword [ebp + 0xc], 0
jne 0x417c09
mov dword [ebp - 0x58], 0
jmp 0x417c10
mov dword [ebp - 0x58], 1
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x58]
jne 0x417c21
mov dword [ebp - 0x5c], 1
jmp 0x417c28
mov dword [ebp - 0x5c], 0
cmp dword [ebp - 0x5c], 0
je 0x417c7b
mov eax, dword [0x4217e8]
xor edx, edx
div dword [0x42180c]
mov dword [0x42180c], eax
mov ecx, dword [0x4217f8]
push ecx
mov edx, dword [ebp - 0x88]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [0x42180c], eax
jae 0x417c65
mov dword [ebp - 0x60], 1
jmp 0x417c6c
mov dword [ebp - 0x60], 0
cmp dword [ebp - 0x60], 0
je 0x417c7b
mov dword [ebp - 0x64], 1
jmp 0x417c82
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x24]
mov dword [0x421808], eax
mov ecx, dword [0x421808]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [str.AJ]
push eax
call dword [sym.imp.GDI32.dll_SetArcDirection]
cmp eax, dword [ebp - 0x10]
jne 0x417cb1
mov dword [ebp - 0x68], 1
jmp 0x417cb8
mov dword [ebp - 0x68], 0
mov ecx, dword [ebp - 0x64]
cmp ecx, dword [ebp - 0x68]
je 0x417cf4
mov edx, dword [0x42181c]
push edx
call fcn.0040bf14
add esp, 4
mov eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x4217fc]
push ecx
mov edx, dword [0x42181c]
push edx
call dword [sym.imp.ole32.dll_CoTreatAsClass]
mov dword [ebp + 0xc], eax
jmp 0x417b94
mov eax, dword [ebp - 0x10]
push eax
call fcn.0040b7d4
add esp, 4
mov ecx, dword [ebp - 0xc]
imul ecx, dword [ebp - 0x18]
mov dword [0x421804], ecx
jmp 0x417afe
mov edx, dword [0x421804]
xor edx, dword [0x421800]
mov dword [0x421804], edx
mov eax, dword [str.AJ]
imul eax, dword [ebp - 8]
mov dword [0x4217ec], eax
cmp dword [0x4217ec], 0
je 0x417d6c
mov ecx, dword [0x42181c]
sub ecx, dword [ebp - 0x2c]
je 0x417d6c
mov edx, dword [ebp + 0xc]
push edx
call fcn.0040b7d4
add esp, 4
mov eax, dword [0x4217f0]
push eax
mov ecx, dword [0x4217f0]
push ecx
call dword [sym.imp.GDI32.dll_SetArcDirection]
mov dword [0x421820], eax
jmp 0x417d24
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [ebp + 8], eax
mov eax, dword [0x4217fc]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
sub ecx, 0x2a
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0xca
ja case.0x417da1.1
mov edx, dword [ebp - 0x1c]
movzx eax, byte [edx + 0x417f4c]
jmp dword [eax*4 + 0x417f28]
mov dword [ebp - 0x8c], 0xb
mov ecx, dword [0x421800]
push ecx
mov edx, dword [0x4217f4]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.GDI32.dll_PolylineTo]
mov dword [ebp - 0x28], eax
jmp 0x417f16
mov dword [ebp - 0x90], 0xca
mov ecx, dword [0x42181c]
push ecx
call fcn.00418e94
add esp, 4
jmp 0x417f16
mov dword [ebp - 0x94], 0x34
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x98], 0x71
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptor]
mov dword [str.AJ], eax
jmp 0x417f16
mov dword [ebp - 0x9c], 0xc7
mov ecx, dword [0x4217f0]
push ecx
call fcn.0040b7d4
add esp, 4
mov edx, dword [ebp + 0xc]
push edx
call fcn.0040b7d4
add esp, 4
jmp 0x417f16
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 4]
mov dword [ebp - 0xa0], eax
mov ecx, dword [0x421820]
push ecx
call fcn.0040bf14
add esp, 4
jmp 0x417f16
mov edx, dword [0x4217e4]
sub edx, dword [0x421804]
mov dword [ebp - 8], edx
mov eax, dword [ebp + 0x10]
or eax, dword [ebp - 8]
mov dword [0x4217ec], eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x421820], eax
jmp 0x417f16
mov dword [ebp - 0x74], 0x72
push fcn.00418e94
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004154e4
add esp, 8
push fcn.0040b7d4
mov eax, dword [ebp - 0x74]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00412234
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.0040bf14
add esp, 4
jmp 0x417f16
mov eax, dword [0x4217f4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp + 0x10], eax
mov ecx, dword [0x421818]
xor ecx, dword [0x4217e8]
mov dword [ebp - 4], ecx
jmp 0x417f16
mov dword [ebp - 0xa4], 0x2e
mov edx, dword [ebp - 4]
push edx
mov eax, dword [0x42181c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.GDI32.dll_PolylineTo]
mov dword [0x4217e0], eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
pop esi
mov esp, ebp
pop ebp
ret