Function at 0x401000
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create process on windows
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x40c0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push 3
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [ebp - 0x9c], 0
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xfc], 0
jmp 0x40105a
mov ecx, dword [ebp - 0xfc]
add ecx, 1
mov dword [ebp - 0xfc], ecx
mov edx, dword [ebp - 0xfc]
cmp edx, dword [ebp - 0x9c]
jge 0x40106a
jmp 0x40104b
cmp dword [ebp - 0x9c], 3
je 0x401083
cmp dword [ebp - 0x9c], 4
je 0x401083
xor eax, eax
jmp 0x40138b
mov eax, dword [ebp - 0x98]
mov ecx, dword [eax + 4]
push ecx
lea ecx, [ebp - 0x94]
call fcn.00401420
mov edx, dword [ebp - 0x98]
mov eax, dword [edx + 8]
push eax
lea ecx, [ebp - 0xbc]
call fcn.00401420
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
lea ecx, [ebp - 0xf8]
call fcn.00401420
mov ecx, dword [0x409150]
push ecx
push 0x409138
lea ecx, [ebp - 0xf8]
call fcn.00401650
mov dword [ebp - 0xa0], eax
mov edx, dword [0x409150]
cmp edx, dword [ebp - 0xa0]
je 0x401106
mov eax, dword [ebp - 0xa0]
add eax, 1
push eax
push 0
lea ecx, [ebp - 0xf8]
call fcn.00401530
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
lea ecx, [ebp - 0x78]
call fcn.00401420
mov ecx, dword [0x409150]
push ecx
push 0x40913c
lea ecx, [ebp - 0x78]
call fcn.00401650
mov dword [ebp - 0xc0], eax
mov edx, dword [0x409150]
cmp edx, dword [ebp - 0xc0]
je 0x401160
lea ecx, [ebp - 0xf8]
call fcn.00401630
push eax
mov eax, dword [ebp - 0xc0]
add eax, 1
push eax
lea ecx, [ebp - 0x78]
call fcn.00401530
push 0x80
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
lea ecx, [ebp - 0xbc]
call fcn.00401610
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4011d7
push 0
lea ecx, [ebp - 0xbc]
call fcn.00401610
push eax
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4011d5
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4011d7
jmp 0x4011e0
mov ecx, 1
test ecx, ecx
jne 0x40118e
push 0x409140
lea ecx, [ebp - 0xdc]
call fcn.00401420
cmp dword [ebp - 0x9c], 4
jne 0x4012ac
mov edx, dword [ebp - 0x98]
mov eax, dword [edx + 0xc]
push eax
lea ecx, [ebp - 0x118]
call fcn.00401420
lea ecx, [ebp - 0x118]
call fcn.00401630
push eax
call fcn.00402570
add esp, 4
mov dword [ebp - 0x11c], eax
mov ecx, dword [ebp - 0x11c]
push ecx
call fcn.0040282b
add esp, 4
mov dword [ebp - 0x128], eax
mov edx, dword [ebp - 0x128]
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0x120]
push eax
lea ecx, [ebp - 0x118]
call fcn.00401630
push eax
lea ecx, [ebp - 0x118]
push ecx
call fcn.004023e0
add esp, 0xc
mov dword [ebp - 0x124], eax
mov edx, dword [ebp - 0x124]
shr edx, 1
push edx
mov eax, dword [ebp - 0x120]
push eax
lea ecx, [ebp - 0x20]
call fcn.004013a0
push eax
lea ecx, [ebp - 0xdc]
call fcn.004014a0
lea ecx, [ebp - 0x20]
call fcn.004014d0
lea ecx, [ebp - 0x118]
call fcn.004014d0
push 0x3c
push 0
lea ecx, [ebp - 0x5c]
push ecx
call fcn.00402920
add esp, 0xc
mov dword [ebp - 0x5c], 0x3c
mov dword [ebp - 0x50], str.open
lea ecx, [ebp - 0xbc]
call fcn.00401610
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x9c], 4
jne 0x4012ef
lea ecx, [ebp - 0xdc]
call fcn.00401610
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0x440
mov dword [ebp - 0x40], 1
lea edx, [ebp - 0x5c]
push edx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x401321
jmp 0x401347
lea ecx, [ebp - 0x94]
call fcn.00401610
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
test eax, eax
jne 0x401307
mov dword [ebp - 0x12c], 0
lea ecx, [ebp - 0xdc]
call fcn.004014d0
lea ecx, [ebp - 0x78]
call fcn.004014d0
lea ecx, [ebp - 0xf8]
call fcn.004014d0
lea ecx, [ebp - 0xbc]
call fcn.004014d0
lea ecx, [ebp - 0x94]
call fcn.004014d0
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040299a
mov esp, ebp
pop ebp
ret 0x10