Function at 0x406740
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x98
mov eax, dword [0x4191b4]
push ebx
push esi
push edi
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
mov dword [esp + 0xac], eax
mov dword [esp + 0x1c], str._tWinMain
call fcn.00408100
push str._tWinMain
push str._s:_Enter
push 0x419da0
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x3f4
call fcn.00403010
mov edi, dword [0x419da4]
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
inc edi
push 0x419dac
mov dword [0x419da4], edi
call fcn.00408100
mov esi, dword [esp + 0xd4]
xor edi, edi
mov ebx, 7
push esi
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x3f5
mov dword [esp + 0x70], ebx
mov dword [esp + 0x6c], edi
mov word [esp + 0x5c], di
call fcn.00408082
add esp, 0x28
push eax
push esi
lea ecx, [esp + 0x38]
call fcn.00403eb0
lea eax, [esp + 0x30]
push eax
call fcn.00404460
push eax
push str.lpCmdLine____s_
push 0x419da0
call fcn.00403010
mov eax, dword [esp + 0x58]
add esp, 0x10
cmp eax, 8
jb 0x40682a
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00407316
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov word [esi + eax*2], di
mov dword [esp + 0xc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004089a8
add esp, 4
cmp esi, edi
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], edi
mov word [esp + 0x6c], di
je 0x406874
push esi
call fcn.00408082
add esp, 4
push eax
push esi
lea ecx, [esp + 0x70]
call fcn.00403eb0
push ebp
lea edx, [esp + 0x6c]
push edx
mov ebp, 1
call fcn.004033c0
add esp, 4
test eax, eax
jne 0x4068c4
lea eax, [esp + 0x88]
push eax
xor ebp, ebp
call fcn.00404540
add esp, 4
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x78]
call fcn.00403da0
cmp dword [esp + 0xa0], 8
jb 0x4068c4
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.00407316
add esp, 4
lea edx, [esp + 0x6c]
push edx
call fcn.00404cb0
add esp, 4
test eax, eax
jne 0x406b70
lea eax, [esp + 0x88]
push eax
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa0], edi
mov word [esp + 0x90], di
call fcn.00405d00
add esp, 4
test eax, eax
je 0x406b37
mov ecx, dword [0x4190d4]
push ecx
push 0x4157b8
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x5c]
push eax
call fcn.00404080
add esp, 0xc
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00404080
mov eax, dword [esp + 0x74]
add esp, 0xc
cmp eax, 8
jb 0x40694c
mov edx, dword [esp + 0x54]
push edx
call fcn.00407316
add esp, 4
mov eax, dword [0x4190d4]
push eax
mov esi, eax
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], edi
mov word [esp + 0x58], di
call fcn.00408082
add esp, 4
push eax
push esi
lea ecx, [esp + 0x58]
call fcn.00403eb0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00403690
add esp, 8
mov ebx, eax
mov eax, dword [esp + 0x68]
neg ebx
sbb bl, bl
mov esi, 8
inc bl
cmp eax, esi
jb 0x4069a8
mov edx, dword [esp + 0x54]
push edx
call fcn.00407316
add esp, 4
test bl, bl
je 0x406abd
cmp ebp, edi
jne 0x406aad
mov eax, dword [0x4190d4]
push eax
push 0x4157b8
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.00404080
add esp, 0xc
push eax
lea eax, [esp + 0x58]
push eax
call fcn.00404080
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.004039b0
cmp dword [esp + 0x4c], esi
mov eax, dword [esp + 0x38]
jae 0x4069fa
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406a23
test al, 1
je 0x406a23
cmp dword [esp + 0x4c], esi
mov ecx, dword [esp + 0x38]
jae 0x406a18
lea ecx, [esp + 0x38]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x4c], esi
mov ecx, dword [esp + 0x38]
jae 0x406a31
lea ecx, [esp + 0x38]
cmp dword [esp + 0x68], esi
mov eax, dword [esp + 0x54]
jae 0x406a3f
lea eax, [esp + 0x54]
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push edi
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00403420
add esp, 0xc
test eax, eax
je 0x406a71
lea ecx, [esp + 0x50]
mov dword [esp + 0x10], edi
call fcn.004039b0
jmp 0x406aff
push 0x432
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
mov ecx, 0x419da0
call fcn.00402fe0
lea eax, [esp + 0x34]
push eax
call fcn.00404460
push eax
push str.Execute_Duplicate__s_Failed
push 0x419da0
call fcn.00403010
add esp, 0x10
lea ecx, [esp + 0x50]
call fcn.004039b0
jmp 0x406aff
call fcn.004050e0
call fcn.004060c0
mov dword [esp + 0x10], eax
jmp 0x406aff
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
lea ecx, [esp + 0x40]
push ecx
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x43e
call fcn.00404460
push eax
push str.Duplicate__s_is_already_running
push 0x419da0
call fcn.00403010
add esp, 0x1c
cmp dword [esp + 0x4c], esi
jb 0x406b12
mov edx, dword [esp + 0x38]
push edx
call fcn.00407316
add esp, 4
mov ebx, 7
cmp dword [esp + 0xa0], 8
jb 0x406ba7
mov eax, dword [esp + 0x8c]
push eax
call fcn.00407316
add esp, 4
jmp 0x406ba7
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
push str.GetDuplicateDir_Failed
push 0x419da0
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x443
call fcn.00403010
add esp, 0x14
jmp 0x406b17
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
push str.InitFilePath_Failed
push 0x419da0
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x448
call fcn.00403010
add esp, 0x14
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
mov eax, dword [esp + 0x90]
add esp, 0xc
cmp eax, 8
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x44a
pop ebp
jb 0x406be9
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00407316
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], edi
mov word [esp + 0x6c], di
call fcn.00403110
mov ecx, dword [esp + 0xa0]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
call fcn.00407a34
add esp, 0x98
ret 0x10