Function at 0x514d9c
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 0x515155
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 0x514e30
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x51512a
cmp eax, 2
jne 0x514e75
cmp edi, 1
jne 0x514e52
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 0x51512a
cmp edi, 2
jne 0x51512a
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 0x51512a
mov dl, 1
mov eax, dword [0x48bccc]
call fcn.00492014
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 0x514ec6
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x514ec6
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405d0c
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x514ee3
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x514ee3
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405d0c
test eax, eax
je 0x514eec
sub eax, 4
mov eax, dword [eax]
cmp word [ebx + eax*2 - 2], 0x5c
je 0x514f01
lea eax, [ebp - 4]
mov edx, 0x515174
call fcn.00406f0c
lea eax, [ebp - 4]
mov edx, 0x515184
call fcn.00406f0c
mov eax, dword [ebp - 4]
call fcn.00471a44
test al, al
je 0x514f24
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x5151a8
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x514f3f
mov edx, 0x5151a8
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.00471a44
test al, al
je 0x514f8b
push 0x105
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x515064
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call fcn.00406d64
mov eax, dword [ebp - 0x750]
lea edx, [ebp - 8]
call fcn.00472234
mov edx, dword [ebp - 8]
mov eax, 0x5151c8
call fcn.0040757c
mov ebx, eax
test ebx, ebx
jne 0x514ffd
mov eax, dword [ebp - 8]
test eax, eax
je 0x514fd7
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x514fd7
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405d0c
test eax, eax
je 0x514fe0
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jle 0x515051
mov ecx, 0x5151d8
mov dl, 1
mov eax, dword [0x46ec60]
call fcn.004791a8
call fcn.00405328
jmp 0x515051
mov eax, ebx
dec eax
cmp eax, 8
jle 0x515009
mov al, 1
jmp 0x515037
mov eax, dword [ebp - 8]
test eax, eax
je 0x515026
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x515026
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405d0c
test eax, eax
je 0x51502f
sub eax, 4
mov eax, dword [eax]
sub eax, ebx
cmp eax, 3
setg al
test al, al
je 0x515051
mov ecx, 0x5151d8
mov dl, 1
mov eax, dword [0x46ec60]
call fcn.004791a8
call fcn.00405328
lea eax, [ebp - 0x634]
mov ecx, 0x105
mov edx, dword [ebp - 0x10]
call fcn.0047252c
cmp edi, 1
jne 0x5150b3
mov edx, 0x5151a8
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, 0x515200
call fcn.00406f8c
mov ecx, dword [ebp - 0x754]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x515121
cmp edi, 2
jne 0x515121
mov edx, 0x5151a8
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 0x515218
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 0x51515c
lea eax, [ebp - 0x764]
mov edx, 7
call fcn.00406ba0
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406ba0
ret