Function at 0x406450
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x548b59
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x5b39c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x224], esp
push str.TArcEnv
call fcn.00402210
mov eax, dword [edi + 0x14]
push ecx
sub eax, 0x10
mov esi, esp
push eax
mov dword [ebp - 4], 0
call fcn.00401200
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [ebp - 0x21c]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.00403a20
add esp, 8
mov ecx, esp
mov dword [ebp - 0x228], esp
push str.tarc.ini
mov dword [ebp - 4], 1
call fcn.00402210
mov eax, dword [ebp - 0x21c]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
mov byte [ebp - 4], 2
call fcn.00401200
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [ebp - 0x234]
push eax
mov byte [ebp - 4], 1
call fcn.00403a20
mov eax, dword [ebp - 0x21c]
add esp, 8
add eax, 0xfffffff0
mov esi, esp
push eax
mov byte [ebp - 4], 3
call fcn.00401200
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00404150
add esp, 4
or ebx, 0xffffffff
cmp eax, 1
je 0x406545
or edi, ebx
jmp 0x4067fe
mov eax, dword [ebp - 0x234]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00401200
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004041e0
add esp, 4
cmp eax, 1
je 0x406576
mov edi, 0xfffffffe
jmp 0x4067fe
push ecx
mov esi, esp
mov dword [ebp - 0x228], esp
push ecx
mov ecx, esp
mov dword [ebp - 0x224], esp
push str.TStarter.exe
call fcn.00402210
push ecx
mov ecx, esp
push str.TOOL
mov byte [ebp - 4], 4
call fcn.00402210
push esi
mov byte [ebp - 4], 3
call fcn.00403a20
mov eax, dword [ebp - 0x21c]
add esp, 8
add eax, 0xfffffff0
mov esi, esp
push eax
mov byte [ebp - 4], 5
call fcn.00401200
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [ebp - 0x230]
push eax
mov byte [ebp - 4], 3
call fcn.00403a20
mov eax, dword [ebp - 0x230]
add esp, 8
add eax, 0xfffffff0
mov esi, esp
push eax
mov byte [ebp - 4], 6
call fcn.00401200
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004041e0
add esp, 4
cmp eax, 1
je 0x406614
mov edi, 0xfffffffd
jmp 0x4067db
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ecx
mov ecx, esp
mov dword [ebp - 0x22c], esp
push str._tarc_
call fcn.00402210
push ecx
lea eax, [ebp - 0x218]
mov ecx, esp
push eax
mov byte [ebp - 4], 7
call fcn.00402210
lea eax, [ebp - 0x220]
push eax
mov byte [ebp - 4], 6
call fcn.00403a20
add esp, 0xc
push dword [ebp - 0x220]
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406684
and eax, 0xfffffffd
push eax
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x220]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x22c], esp
mov esi, esp
push eax
call fcn.00401200
add eax, 0x10
mov dword [esi], eax
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
mov esi, esp
push eax
mov byte [ebp - 4], 9
call fcn.00401200
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov byte [ebp - 4], 8
call fcn.00403b80
add esp, 8
test eax, eax
jns 0x4066d8
mov edi, 0xfffffffc
jmp 0x4067b8
mov esi, dword [ebp - 0x220]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x224]
call fcn.004010e0
cmp dword [0x5b4fcc], 0
push dword [edi + 0x24]
mov byte [ebp - 4], 0xa
push dword [edi + 0x20]
lea eax, [ebp - 0x224]
push dword [edi + 0x14]
push dword [edi + 0x18]
push dword [ebp - 0x21c]
je 0x406727
push str.__s____s____s___d___s__1
jmp 0x40672c
push str.__s____s____s___d___s_
push eax
call fcn.00403100
mov esi, dword [ebp - 0x21c]
mov edi, dword [ebp - 0x220]
add esp, 0x1c
call fcn.00418af2
test eax, eax
je 0x406753
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x74]
jmp 0x406755
xor eax, eax
push 5
push esi
mov esi, dword [ebp - 0x224]
push esi
push edi
push 0
push dword [eax + 0x20]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jg 0x406799
mov eax, dword [ebp - 0x220]
push ecx
add eax, 0xfffffff0
mov edi, esp
push eax
call fcn.00401200
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00404070
add esp, 4
mov edi, 0xfffffff5
jmp 0x40679b
xor edi, edi
add esi, 0xfffffff0
mov byte [ebp - 4], 8
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4067b8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4067db
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x230]
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4067fe
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406821
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x21c]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x406845
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052db16
mov esp, ebp
pop ebp
ret