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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x938
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
je 0x405798
mov esi, dword [ebp + 0xc]
push 5
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test esi, esi
mov dword [ebp + 0xc], eax
je 0x4055f8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, eax
push edi
push esi
push str._Autoup__ReplaceFileOnReboot__Before_:__s_is__d
push 1
call fcn.00408bf4
add esp, 0x10
and edi, 0xfffffffe
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
push esi
push str._Autoup__ReplaceFileOnReboot__After_:__s_is__d
push 1
call fcn.00408bf4
add esp, 0x10
cmp dword [ebp + 0xc], 0
jne 0x405877
and byte [ebp - 0x32c], 0
push 0x41
pop edx
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x32b]
rep stosd dword es:[edi], eax
and byte [ebp - 0x11c], 0
mov ecx, edx
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
and byte [ebp - 0x224], 0
mov ecx, edx
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x223]
and byte [ebp - 0x434], al
mov ebx, 0x104
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0x433]
test esi, esi
rep stosd dword es:[edi], eax
je 0x40566a
push ebx
lea eax, [ebp - 0x224]
push esi
push eax
call fcn.00437e70
add esp, 0xc
push ebx
lea eax, [ebp - 0x434]
push dword [ebp + 8]
push eax
call fcn.00437e70
add esp, 0xc
mov edi, 0x106
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
jne 0x4056a1
lea eax, [ebp - 0x11c]
push 0x44e32c
push eax
call fcn.00436ac0
pop ecx
pop ecx
jmp 0x4056d2
lea eax, [ebp - 0x11c]
push edi
push eax
lea eax, [ebp - 0x224]
push eax
call esi
test eax, eax
jne 0x4056d2
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x11c]
push str.__s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x32c]
push edi
push eax
lea eax, [ebp - 0x434]
push eax
call esi
test eax, eax
jne 0x405703
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x32c]
push str.__s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
and byte [ebp - 0x938], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x937]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x938]
push str._hs_hs_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, str._Rename__r_n
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
mov dword [ebp + 8], eax
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x538]
push ebx
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x538]
push str.WinInit.Ini
push eax
call fcn.00436ad0
pop ecx
xor ebx, ebx
pop ecx
lea eax, [ebp - 0x538]
push ebx
push 0x8000080
push 4
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 8], esi
jne 0x40579f
xor eax, eax
jmp 0x40587a
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
lea eax, [edi + eax + 0xa]
push eax
push ebx
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40585f
push ebx
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x405854
lea eax, [ebp - 0x14]
push eax
push ebx
call fcn.00405c97
pop ecx
test eax, eax
pop ecx
jne 0x405806
lea eax, [ebp - 0x14]
push eax
lea eax, [ebx + edi]
push 0x44d388
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add edi, eax
mov eax, edi
jmp 0x40582e
push 0xa
push eax
call fcn.00437db0
mov esi, eax
mov eax, ebx
inc esi
sub eax, esi
add eax, edi
push eax
mov eax, dword [ebp + 8]
add eax, esi
push esi
push eax
call fcn.00437a60
add esp, 0x14
sub esi, ebx
mov eax, esi
mov esi, dword [ebp - 8]
push dword [ebp + 8]
lea ecx, [ebp - 0x938]
add eax, ebx
push ecx
push eax
call fcn.004371c0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add edi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
push ebx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret