Function at 0x40f359
Capabilities:
Check if file exists
Copy file
Create process on windows
Delete file
Get common file path
Move file
Set current directory

Disassembly:
push 0x724
mov eax, 0x465494
call fcn.0044584f
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 8
pop esi
mov dword [ebp - 0x6b4], edi
mov dword [ebp - 0x6b8], ebx
cmp dword [ebx + 0x14], esi
jb 0x40f386
mov eax, dword [ebx]
jmp 0x40f388
mov eax, ebx
cmp dword [edi + 0x14], esi
jb 0x40f391
mov ecx, dword [edi]
jmp 0x40f393
mov ecx, edi
push dword [ebp + 0x14]
push eax
push ecx
push str.CFileCopy::StartNormalFileCopy____s________s___bInstall_d
push 0
push 2
push str.FileCopy.cpp
push 0x77
call fcn.0042ab69
add esp, 0x20
cmp dword [edi + 0x10], 0
je 0x40fd26
cmp dword [ebx + 0x10], 0
je 0x40fd26
cmp dword [ebx + 0x14], esi
jb 0x40f3cd
mov eax, dword [ebx]
jmp 0x40f3cf
mov eax, ebx
push eax
call fcn.0040b2d9
pop ecx
cmp dword [ebx + 0x14], esi
jb 0x40f3df
mov eax, dword [ebx]
jmp 0x40f3e1
mov eax, ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40fd26
mov ecx, dword [edi + 0x10]
cmp dword [edi + 0x14], esi
jb 0x40f3fc
mov eax, dword [edi]
jmp 0x40f3fe
mov eax, edi
push 0x5c
pop edx
cmp word [eax + ecx*2 - 2], dx
je 0x40f423
push 0x47b858
call fcn.004012f1
pop ecx
push eax
push 0x47b858
mov ecx, edi
call fcn.00402a5c
push 0x5c
pop edx
mov ecx, dword [ebx + 0x10]
cmp dword [ebx + 0x14], esi
jb 0x40f42f
mov eax, dword [ebx]
jmp 0x40f431
mov eax, ebx
cmp word [eax + ecx*2 - 2], dx
je 0x40f450
push 0x47b858
call fcn.004012f1
pop ecx
push eax
push 0x47b858
mov ecx, ebx
call fcn.00402a5c
cmp dword [ebp + 0x14], 0
je 0x40f461
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [ebp - 0x6ac], ecx
cmp ecx, eax
je 0x40fd21
mov eax, dword [ecx + 0x28]
mov dword [ebp - 0x6b0], eax
mov esi, dword [eax]
jmp 0x40fcfc
mov eax, dword [esi]
mov dword [ebp - 0x6a4], eax
test eax, eax
je 0x40fcf3
mov eax, dword [eax + 0xbc]
cmp eax, 1
je 0x40f4b4
cmp dword [ebp + 0x14], 0
je 0x40fcf3
cmp eax, 2
jne 0x40fcf3
push edi
lea ecx, [ebp - 0x688]
call fcn.00404375
and dword [ebp - 4], 0
lea ecx, [ebp - 0x640]
push ebx
call fcn.00404375
cmp dword [ebp + 0x14], 0
lea eax, [ebp - 0x640]
mov ebx, dword [ebp - 0x6a4]
mov ecx, ebx
push eax
lea eax, [ebp - 0x688]
mov byte [ebp - 4], 1
push eax
je 0x40f4f7
call fcn.0040f219
jmp 0x40f4fc
call fcn.0040f0d9
push 8
pop edi
cmp dword [ebp - 0x62c], edi
lea ecx, [ebp - 0x640]
push 0
cmovae ecx, dword [ebp - 0x640]
lea eax, [ebp - 0x688]
cmp dword [ebp - 0x674], edi
push ecx
cmovae eax, dword [ebp - 0x688]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40f585
cmp dword [ebp - 0x62c], edi
lea ecx, [ebp - 0x640]
lea eax, [ebp - 0x688]
mov dword [ebx + 0xc0], 3
cmovae ecx, dword [ebp - 0x640]
cmp dword [ebp - 0x674], edi
push ecx
cmovae eax, dword [ebp - 0x688]
push eax
push str.CopyFile___s________s__SUCCESS___
push 0
push 2
push str.FileCopy.cpp
push 0x99
call fcn.0042ab69
add esp, 0x1c
jmp 0x40f869
cmp dword [ebp - 0x62c], edi
lea ebx, [ebp - 0x640]
lea edi, [ebp - 0x688]
cmovae ebx, dword [ebp - 0x640]
cmp dword [ebp - 0x674], 8
cmovae edi, dword [ebp - 0x688]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push edi
push str.CopyFile___s________s__FAILED___d____
push 0
push 8
pop edi
push edi
push str.FileCopy.cpp
push 0x9d
call fcn.0042ab69
add esp, 0x20
cmp dword [ebp + 0x14], 0
je 0x40fcc5
lea eax, [ebp - 0x640]
push eax
lea ecx, [ebp - 0x670]
call fcn.00404375
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x6a8]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x670]
mov dword [ebp - 0x6a8], 0x2e
call fcn.00402904
cmp eax, 0xffffffff
je 0x40f623
push eax
lea ecx, [ebp - 0x670]
call fcn.00401ce8
mov ebx, str..tmp
push ebx
call fcn.004012f1
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x670]
call fcn.00402a5c
cmp dword [ebp - 0x65c], edi
lea ecx, [ebp - 0x670]
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x640]
cmovae ecx, dword [ebp - 0x670]
cmp dword [ebp - 0x62c], edi
push 1
cmovae eax, dword [ebp - 0x640]
push ecx
push eax
call ebx
test eax, eax
je 0x40f717
cmp dword [ebp - 0x65c], edi
lea ecx, [ebp - 0x670]
lea eax, [ebp - 0x640]
cmovae ecx, dword [ebp - 0x670]
cmp dword [ebp - 0x62c], edi
push ecx
cmovae eax, dword [ebp - 0x640]
push eax
push str.MoveFileEx___s________s__SUCCESS___
push 0
push 2
push str.FileCopy.cpp
push 0xa8
call fcn.0042ab69
add esp, 0x1c
lea eax, [ebp - 0x670]
cmp dword [ebp - 0x65c], edi
cmovae eax, dword [ebp - 0x670]
push 4
push 0
push eax
call ebx
test eax, eax
jne 0x40f764
cmp dword [ebp - 0x65c], 8
lea edi, [ebp - 0x670]
cmovae edi, dword [ebp - 0x670]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.MoveFileEx___s_______NULL____d__FAILED___
push 0
push 4
push str.FileCopy.cpp
push 0xaa
call fcn.0042ab69
add esp, 0x1c
push 8
pop edi
jmp 0x40f764
cmp dword [ebp - 0x65c], edi
lea ebx, [ebp - 0x670]
lea edi, [ebp - 0x640]
cmovae ebx, dword [ebp - 0x670]
cmp dword [ebp - 0x62c], 8
cmovae edi, dword [ebp - 0x640]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push edi
push 0x47fa60
push 0
push 8
pop edi
push edi
push str.FileCopy.cpp
push 0xad
call fcn.0042ab69
add esp, 0x20
cmp dword [ebp - 0x62c], edi
lea ecx, [ebp - 0x640]
push 0
cmovae ecx, dword [ebp - 0x640]
lea eax, [ebp - 0x688]
cmp dword [ebp - 0x674], edi
push ecx
cmovae eax, dword [ebp - 0x688]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40f7ed
cmp dword [ebp - 0x62c], edi
lea ecx, [ebp - 0x640]
mov ebx, dword [ebp - 0x6a4]
lea eax, [ebp - 0x688]
cmovae ecx, dword [ebp - 0x640]
cmp dword [ebp - 0x674], edi
push ecx
cmovae eax, dword [ebp - 0x688]
push eax
push str.CopyFile___s________s__SUCCESS___
push 0
push 2
push str.FileCopy.cpp
push 0xb2
mov dword [ebx + 0xc0], 3
call fcn.0042ab69
add esp, 0x1c
jmp 0x40f840
cmp dword [ebp - 0x62c], edi
lea ebx, [ebp - 0x640]
lea edi, [ebp - 0x688]
cmovae ebx, dword [ebp - 0x640]
cmp dword [ebp - 0x674], 8
cmovae edi, dword [ebp - 0x688]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push edi
push str.CopyFile___s________s__FAILED___d____
push 0
push 8
pop edi
push edi
push str.FileCopy.cpp
push 0xb5
call fcn.0042ab69
mov ebx, dword [ebp - 0x6a4]
add esp, 0x20
cmp dword [ebp - 0x65c], edi
lea eax, [ebp - 0x670]
cmovae eax, dword [ebp - 0x670]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 1
lea ecx, [ebp - 0x670]
call fcn.00401833
cmp dword [ebp + 0x14], 0
je 0x40fcc5
cmp dword [ebx + 0xc0], 3
jne 0x40fcc5
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00447ae0
and dword [ebp - 0x690], 0
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x68c], 7
mov word [ebp - 0x6a0], ax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x640]
push eax
lea ecx, [ebp - 0x658]
call fcn.00404375
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x6a8]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x658]
mov dword [ebp - 0x6a8], 0x5c
call fcn.00402904
cmp eax, 0xffffffff
je 0x40f939
push eax
push 0
lea eax, [ebp - 0x670]
push eax
lea ecx, [ebp - 0x658]
call fcn.004027da
push eax
lea ecx, [ebp - 0x6a0]
call fcn.0040439d
push 0
push 1
lea ecx, [ebp - 0x670]
call fcn.00401833
cmp dword [ebp - 0x690], 0
je 0x40f95c
cmp dword [ebp - 0x68c], edi
lea eax, [ebp - 0x6a0]
cmovae eax, dword [ebp - 0x6a0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea edi, [ebx + 0x6c]
mov ebx, 0x47fab0
push ebx
call fcn.004012f1
pop ecx
push eax
push ebx
push dword [edi + 0x10]
xor ebx, ebx
mov ecx, edi
push ebx
call fcn.00402823
test eax, eax
jne 0x40f9fc
push 8
pop ebx
cmp dword [ebp - 0x644], ebx
lea ecx, [ebp - 0x658]
cmovae ecx, dword [ebp - 0x658]
call fcn.0040f044
test eax, eax
jne 0x40f9d0
cmp dword [ebp - 0x644], ebx
lea edi, [ebp - 0x658]
cmovae edi, dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.RegisterDllModule___s__FAILED______d_
push 0
push ebx
mov edi, str.FileCopy.cpp
push edi
push 0xcf
jmp 0x40fc65
cmp dword [ebp - 0x644], ebx
lea eax, [ebp - 0x658]
cmovae eax, dword [ebp - 0x658]
push eax
push str.RegisterDllModule___s__SUCCESS___
push 0
push 2
push str.FileCopy.cpp
push 0xd1
jmp 0x40fc92
push 0x47fb4c
call fcn.004012f1
pop ecx
push eax
push 0x47fb4c
push dword [edi + 0x10]
mov ecx, edi
push ebx
call fcn.00402823
test eax, eax
jne 0x40fb3b
push 0x206
push eax
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push eax
call fcn.00447ae0
add esp, 0xc
lea ecx, [ebp - 0x628]
lea eax, [ebp - 0x658]
push 8
pop ebx
cmp dword [ebp - 0x644], ebx
push 0x104
cmovae eax, dword [ebp - 0x658]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push 0x38
lea eax, [ebp - 0x6f0]
push 0
push eax
call fcn.00447ae0
and dword [ebp - 0x6d8], 0
lea eax, [ebp - 0x628]
add esp, 0xc
mov dword [ebp - 0x6e4], eax
cmp dword [ebp - 0x68c], ebx
lea eax, [ebp - 0x6a0]
mov dword [ebp - 0x6f4], 0x3c
cmovae eax, dword [ebp - 0x6a0]
mov dword [ebp - 0x6dc], eax
lea eax, [ebp - 0x6f4]
push eax
mov dword [ebp - 0x6f0], 0x100
mov dword [ebp - 0x6e8], 0x47fb50
mov dword [ebp - 0x6e0], 0x47fb5c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x40fb0f
cmp dword [ebp - 0x644], ebx
lea edi, [ebp - 0x658]
cmovae edi, dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Register_file___s__with__r_FAILED______d_
push 0
push ebx
push str.FileCopy.cpp
push 0xe0
jmp 0x40fc65
cmp dword [ebp - 0x644], ebx
lea eax, [ebp - 0x658]
cmovae eax, dword [ebp - 0x658]
push eax
push str.Register_file___s__with__r_SUCCESS___
push 0
push 2
push str.FileCopy.cpp
push 0xe2
jmp 0x40fc92
push 0x47fc0c
call fcn.004012f1
pop ecx
push eax
push 0x47fc0c
push dword [edi + 0x10]
mov ecx, edi
push ebx
call fcn.00402823
test eax, eax
jne 0x40fc9a
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.00447ae0
add esp, 0xc
lea ecx, [ebp - 0x420]
lea eax, [ebp - 0x658]
push 8
pop ebx
cmp dword [ebp - 0x644], ebx
push 0x104
cmovae eax, dword [ebp - 0x658]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push 0x47bb10
push 0
push 2
mov edi, str.FileCopy.cpp
push edi
push 0xe8
call fcn.0042ab69
add esp, 0x14
lea eax, [ebp - 0x72c]
push 0x38
push 0
push eax
call fcn.00447ae0
and dword [ebp - 0x714], 0
lea eax, [ebp - 0x420]
add esp, 0xc
mov dword [ebp - 0x720], eax
cmp dword [ebp - 0x68c], ebx
lea eax, [ebp - 0x6a0]
mov dword [ebp - 0x730], 0x3c
cmovae eax, dword [ebp - 0x6a0]
mov dword [ebp - 0x718], eax
lea eax, [ebp - 0x730]
push eax
mov dword [ebp - 0x72c], 0x100
mov dword [ebp - 0x724], 0x47fb50
mov dword [ebp - 0x71c], 0x47fc10
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x40fc6f
cmp dword [ebp - 0x644], ebx
lea edi, [ebp - 0x658]
cmovae edi, dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Register_file___s__with__p_FAILED______d_
push 0
push ebx
push str.FileCopy.cpp
push 0xf2
call fcn.0042ab69
add esp, 0x1c
jmp 0x40fc9a
cmp dword [ebp - 0x644], ebx
lea eax, [ebp - 0x658]
cmovae eax, dword [ebp - 0x658]
push eax
push str.Register_file___s__with__p_SUCCESS___
push 0
push 2
push edi
push 0xf4
call fcn.0042ab69
add esp, 0x18
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push 1
lea ecx, [ebp - 0x658]
call fcn.00401833
push 0
push 1
lea ecx, [ebp - 0x6a0]
call fcn.00401833
push 0
push 1
lea ecx, [ebp - 0x640]
call fcn.00401833
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x688]
push 0
push 1
call fcn.00401833
mov ebx, dword [ebp - 0x6b8]
mov edi, dword [ebp - 0x6b4]
mov eax, dword [ebp - 0x6b0]
add esi, 4
cmp esi, dword [eax + 4]
jne 0x40f486
lea ecx, [ebp - 0x6ac]
call fcn.00404bde
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x6ac]
cmp ecx, dword [eax]
jne 0x40f476
xor eax, eax
inc eax
jmp 0x40fd28
xor eax, eax
call fcn.004457fe
ret 0x10