Function at 0x40f18d
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.004139c0
add esp, 0xc
mov eax, str.NULL
mov ecx, eax
test ebx, ebx
je 0x40f1e7
mov ecx, ebx
test esi, esi
je 0x40f1ed
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.0040cb43
add esp, 0x14
test esi, esi
jne 0x40f21d
xor eax, eax
jmp 0x40f433
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov dword [ebp - 0x74], eax
call fcn.0040bc83
test eax, eax
jne 0x40f430
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 0x40f262
push ebx
lea eax, [ebp + 0x6d0]
push eax
push dword [ebp - 0x70]
call esi
jmp 0x40f28c
push dword [ebp - 0x78]
call fcn.0040f17c
test eax, eax
pop ecx
lea eax, [ebp + 0x6d0]
je 0x40f27c
push str.DIRNUL
jmp 0x40f281
push 0x428fbc
push 0x426af4
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 0x40f430
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 0x40f418
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
cmp ebx, esi
je 0x40f40c
lea eax, [ebp + 0x7d4]
push eax
push ebx
call fcn.004137e0
pop ecx
pop ecx
cmp eax, esi
jne 0x40f378
lea eax, [ebp + 0x7d4]
push eax
lea eax, [ebx + edi]
push 0x426af4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add edi, eax
mov eax, edi
jmp 0x40f3ca
mov ecx, dword [0x432fdc]
cmp ecx, esi
je 0x40f3a1
push ecx
push eax
call fcn.004137e0
push dword [0x432fdc]
mov dword [ebp - 0x78], eax
call fcn.00413eb0
mov esi, eax
add esp, 0xc
add esi, dword [ebp - 0x78]
jmp 0x40f3ae
push 0xa
push eax
call fcn.00417100
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.004171c0
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.00413b40
mov eax, dword [0x432fdc]
add esp, 0xc
cmp eax, esi
je 0x40f3ec
push eax
call fcn.004137a0
pop ecx
lea eax, [ebp - 0x6c]
push eax
call fcn.004248a4
pop ecx
push ebx
mov dword [0x432fdc], 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.00413f3b
add ebp, 0x7e4
leave
ret