Function at 0x4016f8
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x8a8]
sub esp, 0x928
mov eax, dword [0x41a4c0]
xor eax, ebp
mov dword [ebp + 0x8a4], eax
push esi
mov esi, dword [ebp + 0x8b0]
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x401941
push esi
push 0x4162d8
push str._hs_hs_r_n
lea eax, [ebp + 0x390]
push 0x400
push eax
call fcn.0040b259
add esp, 0x14
cmp eax, 0xffffffff
jne 0x401762
push 0x777
push str.sfxhead.c
call fcn.0040281f
pop ecx
pop ecx
push ebx
lea eax, [ebp + 0x390]
push edi
push eax
call fcn.0040acf0
mov esi, str._Rename__r_n
lea edi, [ebp + 0x898]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ebx, eax
movsb byte es:[edi], byte [esi]
lea eax, [ebp + 0x790]
mov dword [esp], 0x104
xor esi, esi
push eax
mov dword [ebp - 0x7c], esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x105
lea eax, [ebp + 0x790]
push edi
push eax
call fcn.00401300
push str.WinInit.Ini
lea eax, [ebp + 0x790]
push edi
push eax
call fcn.0040b135
push eax
call fcn.00401065
add esp, 0x18
test al, al
jne 0x4017dd
push 0x782
push str.sfxhead.c
call fcn.0040281f
pop ecx
pop ecx
push esi
push 0x8000080
push 4
push esi
push esi
push 0xc0000000
lea eax, [ebp + 0x790]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x78], eax
je 0x40193f
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push esi
push 4
push esi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, esi
mov dword [ebp - 0x80], eax
je 0x401921
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, esi
mov dword [ebp - 0x74], eax
je 0x401918
lea ecx, [ebp + 0x898]
push ecx
push eax
call fcn.0040ac60
cmp eax, esi
pop ecx
pop ecx
jne 0x4018c6
lea eax, [ebp + 0x898]
push eax
push 0x4162b0
lea eax, [ebp - 0x70]
push 0x400
push eax
call fcn.0040b259
add esp, 0x10
cmp eax, 0xffffffff
jne 0x40188a
push 0x7a0
push str.sfxhead.c
call fcn.0040281f
pop ecx
pop ecx
lea eax, [ebp - 0x70]
push eax
call fcn.0040acf0
add edi, eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebx + 0xa]
push eax
mov eax, dword [ebp - 0x74]
add eax, edi
push eax
call fcn.0040b259
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4018c1
push 0x7a3
push str.sfxhead.c
call fcn.0040281f
pop ecx
pop ecx
mov dword [ebp - 0x7c], edi
jmp 0x4018f4
push 0xa
push eax
call fcn.0040aba0
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4018f2
mov eax, dword [ebp - 0x74]
inc esi
sub eax, esi
add eax, edi
push eax
lea eax, [esi + ebx]
push esi
push eax
call fcn.0040b2e0
add esp, 0xc
sub esi, dword [ebp - 0x74]
mov dword [ebp - 0x7c], esi
xor esi, esi
mov ecx, dword [ebp - 0x7c]
push ebx
lea eax, [ebp + 0x390]
push eax
mov eax, dword [ebp - 0x74]
add eax, ecx
push eax
call fcn.0040138e
add esp, 0xc
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add edi, ebx
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push esi
push edi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
mov ecx, dword [ebp + 0x8a4]
xor ecx, ebp
pop esi
call fcn.0040b060
add ebp, 0x8a8
leave
ret