Function at 0x401670
Capabilities:
Check if file exists
Copy file
Create process on windows
Delete file
Get common file path
Get file attributes
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3054
call fcn.00402be0
push ebx
push esi
push edi
lea eax, [ebp - 0x1054]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [sym.imp.MSVCR100.dll_wcscpy_s]
lea ecx, [ebp - 0x1054]
push ecx
lea edx, [ebp - 0x854]
push 0x400
push edx
call esi
mov edi, dword [sym.imp.MSVCR100.dll_wcscat_s]
push 0x40428c
lea eax, [ebp - 0x854]
push 0x400
push eax
call edi
lea ecx, [ebp - 0x1054]
push ecx
lea edx, [ebp - 0x2854]
push 0x400
push edx
call esi
push str.msvcr100.dll
lea eax, [ebp - 0x2854]
push 0x400
push eax
call edi
lea ecx, [ebp - 0x1054]
push ecx
lea edx, [ebp - 0x2054]
push 0x400
push edx
call esi
push str.msvcp100.dll
lea eax, [ebp - 0x2054]
push 0x400
push eax
call edi
mov edi, dword [ebp + 8]
add esp, 0x48
push edi
lea ecx, [ebp - 0x1854]
push 0x400
push ecx
call esi
mov ebx, dword [sym.imp.MSVCR100.dll_wcsrchr]
lea edx, [ebp - 0x1854]
push 0x5c
push edx
call ebx
add esp, 0x14
test eax, eax
je 0x40176c
push str.msvcr100.dll
add eax, 2
push 0x400
push eax
call esi
add esp, 0xc
push 0
lea eax, [ebp - 0x2854]
push eax
lea ecx, [ebp - 0x1854]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push edi
lea edx, [ebp - 0x3054]
push 0x400
push edx
call esi
lea eax, [ebp - 0x3054]
push 0x5c
push eax
call ebx
add esp, 0x14
test eax, eax
je 0x4017b6
push str.msvcp100.dll
add eax, 2
push 0x400
push eax
call esi
add esp, 0xc
push 0
lea ecx, [ebp - 0x2054]
push ecx
lea edx, [ebp - 0x3054]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x854]
push eax
call esi
lea ecx, [ebp - 0x854]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
lea edx, [ebp - 0x854]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4018cf
lea eax, [ebp - 0x854]
push eax
call esi
and eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x854]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x4000000
push 3
push 0
push 1
push 0
lea edx, [ebp - 0x854]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4018cf
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp byte [ebp + 0xc], 0
push eax
je 0x40184e
lea eax, [ebp - 0x854]
push eax
push str.__s___d___s___quiet
lea ecx, [ebp - 0x1054]
push ecx
jmp 0x401861
lea edx, [ebp - 0x854]
push edx
push str.__s___d___s_
lea eax, [ebp - 0x1054]
push eax
call fcn.00401000
add esp, 0x14
push 0x44
lea ecx, [ebp - 0x54]
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
lea ecx, [ebp - 0x1054]
push ecx
push 0
mov dword [ebp - 0x54], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4018cf
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [ebp - 0xc]
push eax
call edi
push esi
call edi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret