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

Disassembly:
push ebp
lea ebp, [esp - 0x7e0]
sub esp, 0x860
mov eax, dword [0x10080f6c]
xor eax, ebp
mov dword [ebp + 0x7dc], eax
mov eax, dword [ebp + 0x7ec]
push edi
mov edi, dword [ebp + 0x7e8]
mov dword [ebp - 0x74], eax
test edi, edi
jne 0x10017d56
xor eax, eax
jmp 0x10017f83
push 5
push eax
push edi
call dword [sym.imp.kernel32.dll_MoveFileExW]
mov dword [ebp - 0x78], eax
call fcn.1002cfd0
test eax, eax
jne 0x10017f80
push ebx
push esi
mov esi, dword [sym.imp.kernel32.dll_GetShortPathNameW]
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x70]
push eax
push edi
call esi
cmp dword [ebp - 0x74], 0
je 0x10017d9a
push ebx
lea eax, [ebp + 0x5c8]
push eax
push dword [ebp - 0x74]
call esi
jmp 0x10017dcb
push edi
call fcn.10017696
test eax, eax
pop ecx
lea eax, [ebp + 0x5c8]
je 0x10017db7
push str.DIRNUL
push 0x1005f88c
jmp 0x10017dc1
push 0x1005f894
push 0x1005f89c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp + 0x5c8]
push eax
lea eax, [ebp + 0x198]
push str._ls_ls_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, str._Rename__r_n
lea edi, [ebp + 0x7d0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
movsw word es:[edi], word [esi]
mov dword [ebp - 0x74], eax
push ebx
lea eax, [ebp + 0x3c0]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
push str.WinInit.Ini
lea eax, [ebp + 0x3c0]
push ebx
push eax
call fcn.1002b477
add esp, 0xc
xor esi, esi
push esi
push 0x8000080
push 4
push esi
push esi
push 0xc0000000
lea eax, [ebp + 0x3c0]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x7c], edi
cmp edi, 0xffffffff
je 0x10017f7e
push esi
push edi
call dword [sym.imp.kernel32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp - 0x74]
push esi
lea eax, [ebx + eax + 0xa]
push eax
push esi
push 4
push esi
push edi
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
mov dword [ebp - 0x80], eax
cmp eax, esi
je 0x10017f66
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.kernel32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x10017f5a
lea eax, [ebp + 0x7d0]
push eax
push edi
call fcn.1003e120
pop ecx
pop ecx
cmp eax, esi
jne 0x10017ebe
lea eax, [ebp + 0x7d0]
push eax
lea eax, [edi + ebx]
push 0x1005f8d8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov eax, ebx
jmp 0x10017f12
mov ecx, dword [0x10082568]
cmp ecx, esi
je 0x10017ee9
push ecx
push eax
call fcn.1003e120
pop ecx
pop ecx
mov ecx, dword [0x10082568]
mov esi, eax
lea eax, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x10017edc
sub ecx, eax
add esi, ecx
jmp 0x10017ef6
push 0xa
push eax
call fcn.1003e060
pop ecx
pop ecx
lea esi, [eax + 1]
mov eax, edi
sub eax, esi
add eax, ebx
push eax
mov eax, dword [ebp - 0x74]
add eax, esi
push esi
push eax
call fcn.1002b477
sub esi, edi
add esp, 0xc
mov eax, esi
xor esi, esi
push dword [ebp - 0x74]
lea ecx, [ebp + 0x198]
push ecx
add eax, edi
push eax
call fcn.1002b477
mov eax, dword [0x10082568]
add esp, 0xc
cmp eax, esi
je 0x10017f37
push eax
call fcn.1002b477
pop ecx
lea eax, [ebp + 0x198]
push eax
call fcn.1002b477
pop ecx
push edi
mov dword [0x10082568], eax
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
add ebx, dword [ebp - 0x74]
mov dword [ebp - 0x78], 1
push dword [ebp - 0x80]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edi, dword [ebp - 0x7c]
push esi
push esi
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]
pop esi
pop ebx
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp + 0x7dc]
xor ecx, ebp
pop edi
call fcn.10039bc2
add ebp, 0x7e0
leave
ret