Function at 0x408f3e
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c0
push ebx
push esi
push edi
mov esi, str._rename_
lea edi, [ebp - 0x24]
xor ebx, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x80
mov byte [ebp - 1], bl
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
test eax, eax
je 0x409048
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
test eax, eax
je 0x408f85
mov al, 1
jmp 0x4091e0
push 0x24
xor eax, eax
pop ecx
lea edi, [ebp - 0xb4]
mov dword [ebp - 0xb8], 0x94
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xb8]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
test eax, eax
je 0x409048
cmp dword [ebp - 0xa8], 2
jne 0x408fec
push str.kernel32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push str.MoveFileExA
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, ebx
je 0x4091dd
push 4
push ebx
push dword [ebp + 8]
call eax
test eax, eax
setne byte [ebp - 1]
jmp 0x4091dd
lea eax, [ebp - 0x4c0]
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
test eax, eax
je 0x409048
lea eax, [ebp - 0x4c0]
push eax
lea eax, [ebp - 0x3bc]
push eax
call fcn.0040bb60
lea eax, [ebp - 0x3bc]
push str.WININIT.INI
push eax
call fcn.0040bb70
add esp, 0x10
lea eax, [ebp - 0x3bc]
push ebx
push esi
push 4
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40904f
xor al, al
jmp 0x4091e0
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x4091d6
lea esi, [eax + 1]
push esi
call fcn.0040d003
push esi
mov dword [ebp - 8], eax
call fcn.0040d003
push esi
push ebx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
call fcn.0040bc80
push esi
mov esi, dword [ebp - 0x10]
push ebx
push esi
call fcn.0040bc80
add esp, 0x20
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4091ba
push dword [ebp - 8]
push esi
call fcn.0040bb60
push esi
call fcn.0040e701
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.0040c9d0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2b8]
push str.NUL
push eax
call fcn.0040bb60
push dword [ebp + 8]
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040bb70
mov esi, 0x41bac4
lea eax, [ebp - 0x2b8]
push esi
push eax
call fcn.0040bb70
add esp, 0x2c
cmp dword [ebp - 0x14], ebx
jne 0x409122
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x4091ba
lea eax, [ebp - 0xc]
push ebx
push eax
push 0xc
push str._r_n_rename__r_n
jmp 0x409139
push esi
push dword [ebp - 0x14]
call fcn.0040c9d0
pop ecx
cmp eax, ebx
pop ecx
jne 0x40915d
lea eax, [ebp - 0xc]
push ebx
push eax
push 2
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040c050
pop ecx
push eax
lea eax, [ebp - 0x2b8]
jmp 0x4091b2
sub eax, dword [ebp - 0x10]
push ebx
push ebx
inc eax
inc eax
push eax
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x4091ba
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040c050
mov esi, dword [sym.imp.KERNEL32.DLL_WriteFile]
pop ecx
push eax
lea eax, [ebp - 0x2b8]
push eax
push edi
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 8]
call fcn.0040c050
pop ecx
mov ecx, eax
mov eax, dword [ebp + 8]
sub ecx, eax
push ecx
mov ecx, dword [ebp - 8]
add eax, ecx
push eax
push edi
call esi
mov byte [ebp - 1], 1
cmp dword [ebp - 8], ebx
je 0x4091c8
push dword [ebp - 8]
call fcn.0040b5d6
pop ecx
cmp dword [ebp - 0x10], ebx
je 0x4091d6
push dword [ebp - 0x10]
call fcn.0040b5d6
pop ecx
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret