Function at 0x404060
Capabilities:
Get common file path
Get file size
Move file
Set file attributes

Disassembly:
sub esp, 0x624
push ebx
push ebp
push esi
mov esi, dword [esp + 0x634]
push edi
push esi
mov ebp, ecx
call fcn.00404020
test al, al
jne 0x40408a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x624
ret 8
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [esp + 0x63c]
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
cmp eax, 1
sete bl
test bl, bl
mov byte [esp + 0x13], bl
jne 0x4042b3
lea eax, [esp + 0x130]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x4040ec
push 0x40ae8c
mov ecx, ebp
call fcn.004023a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
test edi, edi
mov eax, 0x40ae84
je 0x4040f7
mov eax, edi
lea ecx, [esp + 0x130]
lea edx, [esp + 0x234]
push ecx
push eax
push 0x40ae78
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x40ae70]
mov dx, word [0x40ae74]
mov esi, eax
mov eax, dword [0x40ae6c]
add esp, 0x10
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
mov al, byte [0x40ae76]
lea ecx, [esp + 0x2c]
push 0x104
push ecx
mov dword [esp + 0x1c], esi
mov word [esp + 0x28], dx
mov byte [esp + 0x2a], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x40ae5c]
repne scasb al, byte es:[edi]
mov eax, dword [0x40ae60]
mov ecx, dword [0x40ae64]
dec edi
push 0
push 0x8000080
push 4
mov dword [edi], edx
mov dl, byte [0x40ae68]
push 0
push 0
mov dword [edi + 4], eax
lea eax, [esp + 0x40]
push 0xc0000000
push eax
mov dword [edi + 8], ecx
mov byte [edi + 0xc], dl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
jne 0x4041b9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push 0
lea ecx, [esi + ebp + 0xa]
push ecx
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
mov dword [esp + 0x28], esi
je 0x404299
push 0
push 0
push 0
push 2
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x40428e
lea edx, [esp + 0x18]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x40422f
lea eax, [esp + 0x18]
lea ecx, [ebx + ebp]
push eax
push 0x4098e4
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebp, eax
mov eax, ebp
jmp 0x404258
push 0xa
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
mov eax, dword [esp + 0x1c]
inc esi
mov edx, ebx
sub edx, esi
add edx, ebp
lea ecx, [esi + eax]
push edx
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0x14
sub esi, ebx
mov eax, esi
mov ecx, dword [esp + 0x14]
lea esi, [esp + 0x234]
mov edx, ecx
lea edi, [eax + ebx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
add ebp, eax
mov byte [esp + 0x13], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [esp + 0x13]
push 0
push 0
push ebp
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]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x624
ret 8