Function at 0x4017c0
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xe0
push ebx
push ebp
xor eax, eax
push esi
push edi
mov dword [esp + 0x11], eax
mov ecx, 0x18
lea edi, [esp + 0x1d]
mov byte [esp + 0x15], al
mov byte [esp + 0x1c], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x1c]
push 0x64
push ecx
push 0
mov byte [esp + 0x1c], 0
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x1c]
push 0x2e
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
jne 0x40181b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xe0
ret
mov byte [eax], 0
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x80]
push eax
push str._s.exe
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x80]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
test eax, eax
je 0x401884
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xe0
ret
lea edx, [esp + 0x1c]
push 0x404050
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4018aa
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xe0
ret
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov ebx, eax
call edi
lea edi, [ebx + 1]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
push esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push 1
rep stosb byte es:[edi], al
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
xor eax, eax
lea esi, [ebp + 0x5a08]
mov dword [esp + 0x44], eax
add esi, 4
mov word [esp + 0x48], ax
mov eax, dword [esi - 4]
mov ecx, esi
push 6
add esi, 6
mov dword [esp + 0x50], eax
mov edx, dword [ecx]
mov dword [esp + 0x48], edx
lea edx, [esp + 0x48]
mov cx, word [ecx + 4]
push edx
push eax
push esi
mov word [esp + 0x58], cx
call fcn.00401670
xor eax, eax
add esp, 0x44
mov dword [esp + 0x10], eax
push eax
mov word [esp + 0x18], ax
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 8
xor edi, edi
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0xa
idiv ecx
push edx
lea edx, [esp + edi + 0x14]
push 0x404058
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
inc edi
cmp edi, 6
jl 0x401956
mov ecx, dword [esp + 0x10]
lea eax, [esi - 6]
push 6
mov dword [eax], ecx
mov dx, word [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov word [eax + 4], dx
lea eax, [esp + 0x14]
push eax
push ecx
push esi
call fcn.00401670
lea edx, [esp + 0x90]
push 0x404054
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4019cb
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xe0
ret
push esi
push ebx
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 0x18
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe0
ret