Function at 0x514998
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff89c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x75c], ebx
mov dword [ebp - 0x760], ebx
mov dword [ebp - 0x764], ebx
mov dword [ebp - 0x754], ebx
mov dword [ebp - 0x758], ebx
mov dword [ebp - 0x750], ebx
mov dword [ebp - 0x74c], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov edi, ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x514d51
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x748]
xor ecx, ecx
mov edx, 0x114
call fcn.00403bd8
mov dword [ebp - 0x748], 0x114
lea eax, [ebp - 0x748]
push eax
call sub.kernel32.dll_GetVersionExW
mov eax, dword [ebp - 0x738]
test eax, eax
jne 0x514a2c
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x514d26
cmp eax, 2
jne 0x514a71
cmp edi, 1
jne 0x514a4e
push 5
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_MoveFileExW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x514d26
cmp edi, 2
jne 0x514d26
push 5
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_MoveFileExW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x514d26
mov dl, 1
mov eax, dword [0x48b8c0]
call fcn.00491c08
mov esi, eax
push 0x105
lea eax, [ebp - 0x21c]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
lea eax, [ebp - 4]
lea edx, [ebp - 0x21c]
mov ecx, 0x106
call fcn.00406db8
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x514ac2
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x514ac2
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405d0c
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x514adf
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x514adf
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405d0c
test eax, eax
je 0x514ae8
sub eax, 4
mov eax, dword [eax]
cmp word [ebx + eax*2 - 2], 0x5c
je 0x514afd
lea eax, [ebp - 4]
mov edx, 0x514d70
call fcn.00406f0c
lea eax, [ebp - 4]
mov edx, 0x514d80
call fcn.00406f0c
mov eax, dword [ebp - 4]
call fcn.00471a2c
test al, al
je 0x514b20
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x514da4
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x514b3b
mov edx, 0x514da4
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x38]
push 0x105
lea eax, [ebp - 0x428]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetShortPathNameW
lea eax, [ebp - 0x74c]
mov edx, dword [ebp - 0x10]
call fcn.00406d64
mov eax, dword [ebp - 0x74c]
call fcn.00471a2c
test al, al
je 0x514b87
push 0x105
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x514c60
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call fcn.00406d64
mov eax, dword [ebp - 0x750]
lea edx, [ebp - 8]
call fcn.0047221c
mov edx, dword [ebp - 8]
mov eax, 0x514dc4
call fcn.0040757c
mov ebx, eax
test ebx, ebx
jne 0x514bf9
mov eax, dword [ebp - 8]
test eax, eax
je 0x514bd3
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x514bd3
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405d0c
test eax, eax
je 0x514bdc
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jle 0x514c4d
mov ecx, 0x514dd4
mov dl, 1
mov eax, dword [0x46ec48]
call fcn.00478e00
call fcn.00405328
jmp 0x514c4d
mov eax, ebx
dec eax
cmp eax, 8
jle 0x514c05
mov al, 1
jmp 0x514c33
mov eax, dword [ebp - 8]
test eax, eax
je 0x514c22
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x514c22
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405d0c
test eax, eax
je 0x514c2b
sub eax, 4
mov eax, dword [eax]
sub eax, ebx
cmp eax, 3
setg al
test al, al
je 0x514c4d
mov ecx, 0x514dd4
mov dl, 1
mov eax, dword [0x46ec48]
call fcn.00478e00
call fcn.00405328
lea eax, [ebp - 0x634]
mov ecx, 0x105
mov edx, dword [ebp - 0x10]
call fcn.00472514
cmp edi, 1
jne 0x514caf
mov edx, 0x514da4
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
push eax
lea eax, [ebp - 0x758]
lea edx, [ebp - 0x428]
mov ecx, 0x106
call fcn.00406db8
mov ecx, dword [ebp - 0x758]
lea eax, [ebp - 0x754]
mov edx, 0x514dfc
call fcn.00406f8c
mov ecx, dword [ebp - 0x754]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x514d1d
cmp edi, 2
jne 0x514d1d
mov edx, 0x514da4
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
push eax
lea eax, [ebp - 0x760]
lea edx, [ebp - 0x634]
mov ecx, 0x106
call fcn.00406db8
push dword [ebp - 0x760]
push 0x514e14
lea eax, [ebp - 0x764]
lea edx, [ebp - 0x428]
mov ecx, 0x106
call fcn.00406db8
push dword [ebp - 0x764]
lea eax, [ebp - 0x75c]
mov edx, 3
call fcn.0040705c
mov ecx, dword [ebp - 0x75c]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
mov bl, 1
mov eax, esi
call fcn.00404490
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x514d58
lea eax, [ebp - 0x764]
mov edx, 7
call fcn.00406ba0
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406ba0
ret