Function at 0x40fa10
Capabilities:
Get common file path
Get file size
Move file

Disassembly:
sub esp, 0x82c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x83c]
push edi
mov edi, dword [esp + 0x844]
push 5
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40fc6e
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [esp + 0x2c]
push 0x104
push eax
push esi
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
jne 0x40fa63
lea ecx, [esp + 0x2c]
push esi
push ecx
call ebp
test edi, edi
jne 0x40fa76
lea edx, [esp + 0x130]
push 0x5a56a8
push edx
jmp 0x40faa5
lea eax, [esp + 0x338]
push 0x104
push eax
push edi
call ebx
test eax, eax
jne 0x40fa95
lea ecx, [esp + 0x338]
push edi
push ecx
call ebp
lea edx, [esp + 0x338]
lea eax, [esp + 0x130]
push edx
push eax
call ebp
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x130]
push ecx
push edx
lea eax, [esp + 0x444]
push str._hs_hs_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [0x5a5694]
mov ecx, dword [str._Rename__r_n]
add esp, 0x10
mov dword [esp + 0x1c], edx
mov esi, eax
mov ax, word [0x5a5698]
mov dword [esp + 0x18], ecx
mov cl, byte [0x5a569a]
lea edx, [esp + 0x234]
push 0x104
push edx
mov dword [esp + 0x1c], esi
mov word [esp + 0x28], ax
mov byte [esp + 0x2a], cl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x234]
push str.WinInit.Ini
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x8000080
push 4
push 0
push 0
lea ecx, [esp + 0x248]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x28], edi
jne 0x40fb57
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x82c
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push 0
lea edx, [ebx + esi + 0xa]
push edx
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esp + 0x24], eax
je 0x40fc50
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x40fc45
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.005271a0
add esp, 8
test eax, eax
jne 0x40fbcc
lea ecx, [esp + 0x18]
lea edx, [ebx + ebp]
push ecx
push 0x5a3e24
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov dword [esp + 0x10], ebx
jmp 0x40fbf9
push 0xa
push eax
call fcn.00526d60
mov ecx, dword [esp + 0x1c]
mov esi, eax
inc esi
mov eax, ebp
sub eax, esi
add eax, ebx
lea edx, [esi + ecx]
push eax
push esi
push edx
call fcn.00527c60
add esp, 0x14
sub esi, ebp
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x43c]
push eax
push ebp
call fcn.005271a0
add esp, 8
test eax, eax
jne 0x40fc34
mov edx, dword [esp + 0x10]
mov ecx, esi
mov eax, ecx
lea esi, [esp + 0x43c]
lea edi, [edx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add ebx, esi
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x82c
ret