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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push esi
mov dword [ebp - 0x18], 0x3a
mov dword [ebp - 0x6c], 0xfe
mov dword [ebp - 8], 0x98
mov dword [ebp - 0x24], 0xeb
mov dword [ebp - 0x1c], 0xc0
mov dword [ebp - 0x28], 0x49
mov dword [ebp - 4], 0xb0
mov eax, dword [0x4190c8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [0x4190e0]
push edx
call dword [ebp + 0xc]
add esp, 8
cmp esi, eax
jne 0x410d28
mov dword [ebp - 0x2c], 1
jmp 0x410d2f
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [ebp + 0xc]
add esp, 8
mov esi, eax
mov edx, dword [0x4190d0]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [ebp + 0xc]
add esp, 8
cmp esi, eax
je 0x410d5d
mov dword [ebp - 0x30], 1
jmp 0x410d64
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x30]
jne 0x410d75
mov dword [ebp - 0x34], 1
jmp 0x410d7c
mov dword [ebp - 0x34], 0
cmp dword [ebp - 0x34], 0
jne 0x410dba
mov edx, dword [0x4190d4]
sub edx, dword [0x4190cc]
mov dword [0x41912c], edx
mov eax, dword [0x4190c4]
xor eax, dword [ebp - 0x64]
cmp eax, dword [0x41912c]
jbe 0x410dad
mov dword [ebp - 0x38], 1
jmp 0x410db4
mov dword [ebp - 0x38], 0
cmp dword [ebp - 0x38], 0
je 0x410dd1
mov ecx, dword [0x419124]
add ecx, dword [0x419130]
mov dword [0x419128], ecx
jmp 0x410cfc
mov edx, dword [ebp - 0x6c]
push edx
mov eax, dword [0x419110]
push eax
call fcn.0040ae11
add esp, 8
test eax, eax
je 0x410e08
mov ecx, dword [0x4190cc]
push ecx
mov edx, dword [0x419130]
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x410e08
mov dword [ebp - 0x3c], 1
jmp 0x410e0f
mov dword [ebp - 0x3c], 0
mov esi, dword [0x419120]
add esi, dword [0x41911c]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp esi, eax
jne 0x410e2e
mov dword [ebp - 0x40], 1
jmp 0x410e35
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x40]
jbe 0x410e9c
mov ecx, dword [0x4190c4]
and ecx, dword [ebp - 4]
mov dword [0x419110], ecx
mov edx, dword [0x4190c4]
push edx
mov eax, dword [0x4190c8]
push eax
call fcn.0040ae11
add esp, 8
mov ecx, dword [ebp - 8]
and ecx, dword [ebp - 8]
mov dword [0x4190dc], ecx
mov edx, dword [0x41912c]
push edx
mov eax, dword [0x419128]
push eax
call fcn.0040ae11
add esp, 8
mov ecx, dword [ebp - 0x64]
mov dword [0x4190dc], ecx
mov edx, dword [0x4190dc]
mov dword [0x4190d4], edx
jmp 0x410f87
mov dword [ebp - 0x4c], 0xf
mov eax, dword [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0040ae11
add esp, 8
mov esi, eax
mov edx, dword [0x4190c8]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.0040ae11
add esp, 8
cmp esi, eax
jae 0x410ed5
mov dword [ebp - 0x44], 1
jmp 0x410edc
mov dword [ebp - 0x44], 0
cmp dword [ebp - 0x44], 0
jne 0x410f25
mov ecx, dword [0x4190bc]
or ecx, dword [0x4190e0]
mov dword [0x4190d4], ecx
mov edx, dword [0x4190bc]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.0040ae11
add esp, 8
cmp eax, dword [0x4190d4]
je 0x410f18
mov dword [ebp - 0x48], 1
jmp 0x410f1f
mov dword [ebp - 0x48], 0
cmp dword [ebp - 0x48], 0
je 0x410f57
mov dword [ebp - 0x7c], 0x5c
mov dword [ebp - 0x80], 0x9c
mov ecx, dword [ebp - 0x1c]
imul ecx, dword [0x4190bc]
mov dword [0x4190c4], ecx
mov edx, dword [0x419130]
push edx
call dword [sym.imp.OLEAUT32.dll_SafeArrayDestroy]
mov dword [0x4190c4], eax
jmp 0x410f75
mov dword [ebp - 0x84], 0x79
mov eax, dword [ebp - 0x4c]
mov dword [0x4190e0], eax
mov ecx, dword [0x4190e0]
mov dword [0x4190d4], ecx
mov edx, dword [0x4190d4]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4190d4], eax
mov eax, dword [0x4190cc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [0x4190bc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
sub eax, 0x12
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xe5
ja case.0x410fbe.1
mov ecx, dword [ebp - 0x10]
movzx edx, byte [ecx + 0x411371]
jmp dword [edx*4 + 0x41135d]
mov dword [ebp - 0x88], 0x70
mov dword [ebp - 0x8c], 0xf7
mov dword [ebp - 0x90], 0xf4
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [0x419120]
push ecx
call fcn.0040ae11
add esp, 8
jmp 0x411090
mov dword [ebp - 0x94], 0xf
mov edx, dword [0x4190cc]
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.0040ae11
add esp, 8
jmp 0x411090
mov ecx, dword [ebp - 0x98]
push ecx
mov edx, dword [ebp - 0x70]
push edx
call fcn.0040ae11
add esp, 8
mov eax, dword [0x4190e4]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0040ae11
add esp, 8
jmp 0x411090
mov dword [ebp - 0x9c], 0x29
mov dword [ebp - 0xa0], 0xdf
mov edx, dword [ebp + 8]
mov dword [0x419120], edx
mov eax, dword [0x419120]
mov dword [0x41912c], eax
jmp 0x411090
mov ecx, dword [0x41911c]
push ecx
mov edx, dword [0x419110]
push edx
call dword [sym.imp.GDI32.dll_SetArcDirection]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x4190bc], eax
mov ecx, dword [ebp - 0x18]
and ecx, dword [0x4190cc]
mov dword [0x4190c4], ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [0x4190d8]
push eax
call fcn.0040ae11
add esp, 8
cmp eax, dword [0x4190c4]
je 0x4110c2
mov dword [ebp - 0x50], 1
jmp 0x4110c9
mov dword [ebp - 0x50], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 8]
mov dword [0x4190c4], edx
mov eax, dword [0x41911c]
push eax
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.0040ae11
add esp, 8
cmp eax, dword [0x4190c4]
je 0x4110fb
mov dword [ebp - 0x54], 1
jmp 0x411102
mov dword [ebp - 0x54], 0
mov edx, dword [ebp - 0x50]
cmp edx, dword [ebp - 0x54]
jbe 0x411113
mov dword [ebp - 0x58], 1
jmp 0x41111a
mov dword [ebp - 0x58], 0
mov eax, dword [0x419130]
and eax, dword [0x4190c4]
jne 0x41113e
mov ecx, dword [0x4190d0]
or ecx, dword [0x419124]
jne 0x41113e
mov dword [ebp - 0x5c], 0
jmp 0x411145
mov dword [ebp - 0x5c], 1
mov edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x5c]
jae 0x4112ae
mov dword [ebp - 0x60], 0x77
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
sub ecx, 0x44
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0xaa
ja case.0x41117e.1
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + 0x411479]
jmp dword [eax*4 + 0x411459]
mov dword [ebp - 0xa4], 0xc6
mov ecx, dword [0x4190bc]
sub ecx, dword [ebp + 0xc]
mov dword [0x4190d0], ecx
jmp 0x411291
mov dword [ebp - 0xa8], 0xdc
mov edx, dword [0x419120]
mov dword [0x419114], edx
mov eax, dword [0x419114]
mov dword [ebp - 0x18], eax
jmp 0x411291
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xb0], 0x1f
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [0x4190e4]
push edx
call fcn.0040ae11
add esp, 8
jmp 0x411291
mov dword [ebp - 0xb4], 0xc3
mov eax, dword [0x4190d0]
or eax, dword [0x4190c4]
mov dword [0x419110], eax
jmp 0x411291
mov ecx, dword [0x419124]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
mov dword [ebp - 0x60], edx
jmp 0x411291
mov dword [ebp - 0xb8], 0x7c
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040ae11
add esp, 8
jmp 0x411291
mov dword [ebp - 0xbc], 0xc7
mov edx, dword [ebp - 0xc0]
push edx
mov eax, dword [0x419110]
push eax
mov ecx, dword [0x4190e0]
push ecx
call dword [sym.imp.GDI32.dll_PolylineTo]
mov dword [0x4190d8], eax
jmp 0x411291
mov dword [ebp - 0xc4], 0x2e
mov dword [ebp - 0xc8], 0x55
mov edx, dword [0x4190d4]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x4190bc], eax
mov eax, dword [0x4190d8]
or eax, dword [ebp + 0xc]
mov dword [0x419110], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x419114], eax
jmp 0x411090
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x20], ecx
jmp 0x4112bf
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
cmp eax, dword [0x419120]
jae 0x411345
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x74]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x68]
push edx
mov eax, dword [0x4190c8]
push eax
call fcn.0040ae11
add esp, 8
test eax, eax
je 0x411324
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [0x4190dc], edx
cmp dword [0x4190dc], 0
je 0x411324
mov eax, dword [0x4190dc]
mov dword [0x419114], eax
mov ecx, dword [0x419114]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
mov dword [0x419128], eax
jmp 0x411340
mov dword [ebp - 0xcc], 0xeb
mov ecx, dword [0x4190c4]
xor ecx, dword [0x41911c]
mov dword [0x419130], ecx
jmp 0x4112b6
mov edx, dword [0x419110]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [ebp + 0xc]
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret