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

Disassembly:
push ebp
lea ebp, [esp - 0x7e4]
sub esp, 0x864
mov eax, dword [0x431420]
xor eax, ebp
mov dword [ebp + 0x7e0], eax
push ebx
mov ebx, dword [ebp + 0x7f0]
push esi
mov esi, dword [ebp + 0x7ec]
push edi
push 0x30b
lea eax, [ebp + 0x1bd]
push 0
push eax
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x70], ebx
mov byte [ebp + 0x1bc], 0
call fcn.00413c80
add esp, 0xc
mov eax, str.NULL
mov ecx, eax
test ebx, ebx
je 0x40f35a
mov ecx, ebx
test esi, esi
je 0x40f360
mov eax, esi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push ecx
push eax
lea eax, [ebp + 0x1bc]
push str.___Start_in_MoveFileOnReboot:__s_to__s___
push eax
call edi
lea eax, [ebp + 0x1bc]
push eax
call fcn.0040ca21
add esp, 0x14
test esi, esi
jne 0x40f390
xor eax, eax
jmp 0x40f5a6
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 0x74], eax
call fcn.0040ba57
test eax, eax
jne 0x40f5a3
mov ebx, 0x104
push ebx
lea eax, [ebp + 0x4c8]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
call esi
cmp dword [ebp - 0x70], 0
je 0x40f3d5
push ebx
lea eax, [ebp + 0x6d0]
push eax
push dword [ebp - 0x70]
call esi
jmp 0x40f3ff
push dword [ebp - 0x78]
call fcn.0040f2ef
test eax, eax
pop ecx
lea eax, [ebp + 0x6d0]
je 0x40f3ef
push str.DIRNUL
jmp 0x40f3f4
push 0x42907c
push 0x426ae4
push eax
call edi
add esp, 0xc
lea eax, [ebp + 0x4c8]
push eax
lea eax, [ebp + 0x6d0]
push eax
lea eax, [ebp - 0x6c]
push str._hs_hs_r_n
push eax
call edi
mov esi, str._Rename__r_n
lea edi, [ebp + 0x7d4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
movsw word es:[edi], word [esi]
mov dword [ebp - 0x70], eax
push ebx
lea eax, [ebp + 0x5cc]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.WinInit.Ini
lea eax, [ebp + 0x5cc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor esi, esi
push esi
push 0x8000080
push 4
push esi
push esi
push 0xc0000000
lea eax, [ebp + 0x5cc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x7c], ebx
cmp ebx, 0xffffffff
je 0x40f5a3
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov eax, dword [ebp - 0x70]
push esi
lea eax, [edi + eax + 0xa]
push eax
push esi
push 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x80], eax
cmp eax, esi
je 0x40f58b
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
cmp ebx, esi
je 0x40f57f
lea eax, [ebp + 0x7d4]
push eax
push ebx
call fcn.00413aa0
pop ecx
pop ecx
cmp eax, esi
jne 0x40f4eb
lea eax, [ebp + 0x7d4]
push eax
lea eax, [ebx + edi]
push 0x426ae4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add edi, eax
mov eax, edi
jmp 0x40f53d
mov ecx, dword [0x432dcc]
cmp ecx, esi
je 0x40f514
push ecx
push eax
call fcn.00413aa0
push dword [0x432dcc]
mov dword [ebp - 0x78], eax
call fcn.00414170
mov esi, eax
add esp, 0xc
add esi, dword [ebp - 0x78]
jmp 0x40f521
push 0xa
push eax
call fcn.004173c0
pop ecx
pop ecx
lea esi, [eax + 1]
mov eax, ebx
sub eax, esi
add eax, edi
push eax
mov eax, dword [ebp - 0x70]
add eax, esi
push esi
push eax
call fcn.00417480
sub esi, ebx
add esp, 0xc
mov eax, esi
xor esi, esi
push dword [ebp - 0x70]
lea ecx, [ebp - 0x6c]
push ecx
add eax, ebx
push eax
call fcn.00413e00
mov eax, dword [0x432dcc]
add esp, 0xc
cmp eax, esi
je 0x40f55f
push eax
call fcn.00413a64
pop ecx
lea eax, [ebp - 0x6c]
push eax
call fcn.00424b54
pop ecx
push ebx
mov dword [0x432dcc], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add edi, dword [ebp - 0x70]
mov dword [ebp - 0x74], 1
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x7c]
push esi
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp + 0x7e0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004141fb
add ebp, 0x7e4
leave
ret