Function at 0x405838
Capabilities:
Delete file
Get common file path
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x544
push 4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x405862
mov eax, dword [ebp - 4]
jmp 0x405b4f
cmp dword [ebp + 0xc], 0
jne 0x405874
mov dword [ebp - 0x540], 0x40a7f8
jmp 0x40587d
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x540], edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x540]
push ecx
push str._hs_hs_r_n
lea edx, [ebp - 0x408]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [ebp - 0x51c], eax
mov eax, dword [str._Rename__r_n]
mov dword [ebp - 0x518], eax
mov ecx, dword [0x40a80c]
mov dword [ebp - 0x514], ecx
mov dx, word [0x40a810]
mov word [ebp - 0x510], dx
mov al, byte [0x40a812]
mov byte [ebp - 0x50e], al
mov dword [ebp - 0x524], 0xa
push 0x104
lea ecx, [ebp - 0x50c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.WinInit.Ini
lea edx, [ebp - 0x50c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x8000080
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x50c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x52c], 0xffffffff
jne 0x405937
mov eax, dword [ebp - 4]
jmp 0x405b4f
push 0
mov ecx, dword [ebp - 0x52c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
push 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x51c]
add edx, dword [ebp - 0x524]
push edx
push 0
push 4
push 0
mov eax, dword [ebp - 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x520], eax
cmp dword [ebp - 0x520], 0
je 0x405b1d
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x520]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x530], eax
cmp dword [ebp - 0x530], 0
je 0x405b10
lea edx, [ebp - 0x518]
push edx
mov eax, dword [ebp - 0x530]
push eax
call fcn.00406000
add esp, 8
mov dword [ebp - 0x538], eax
cmp dword [ebp - 0x538], 0
je 0x4059e6
mov ecx, dword [ebp - 0x538]
mov edx, dword [ebp - 0x530]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x544], eax
jmp 0x4059f0
mov dword [ebp - 0x544], 0
mov ecx, dword [ebp - 0x544]
mov dword [ebp - 0x534], ecx
cmp dword [ebp - 0x534], 0
jne 0x405a3a
lea edx, [ebp - 0x518]
push edx
push 0x40a824
mov eax, dword [ebp - 0x530]
add eax, dword [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 8]
add ecx, eax
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x528], edx
jmp 0x405ac4
lea eax, [ebp - 0x408]
push eax
mov ecx, dword [ebp - 0x534]
push ecx
call fcn.00406000
add esp, 8
test eax, eax
je 0x405a60
mov dword [ebp - 0x51c], 0
jmp 0x405ac4
push 0xa
mov edx, dword [ebp - 0x534]
push edx
call fcn.00406c20
add esp, 8
mov dword [ebp - 0x53c], eax
mov eax, dword [ebp - 0x53c]
add eax, 1
mov dword [ebp - 0x53c], eax
mov ecx, dword [ebp - 0x530]
add ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x53c]
push ecx
mov edx, dword [ebp - 0x53c]
push edx
mov eax, dword [ebp - 0x53c]
add eax, dword [ebp - 0x51c]
push eax
call fcn.004064d0
add esp, 0xc
mov ecx, dword [ebp - 0x53c]
sub ecx, dword [ebp - 0x530]
mov dword [ebp - 0x528], ecx
cmp dword [ebp - 0x51c], 0
je 0x405b09
mov edx, dword [ebp - 0x51c]
push edx
lea eax, [ebp - 0x408]
push eax
mov ecx, dword [ebp - 0x530]
add ecx, dword [ebp - 0x528]
push ecx
call fcn.00406810
add esp, 0xc
mov edx, dword [ebp - 0x530]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x51c]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x520]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x52c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edx, dword [ebp - 0x52c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 8