Function at 0x51aec4
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 0x51b27d
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x748]
xor ecx, ecx
mov edx, 0x114
call fcn.00403a4c
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 0x51af58
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x51b252
cmp eax, 2
jne 0x51af9d
cmp edi, 1
jne 0x51af7a
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 0x51b252
cmp edi, 2
jne 0x51b252
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 0x51b252
mov dl, 1
mov eax, dword [0x48743c]
call fcn.0048d374
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.00406c08
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x51afee
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x51afee
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405c28
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x51b00b
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x51b00b
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00405c28
test eax, eax
je 0x51b014
sub eax, 4
mov eax, dword [eax]
cmp word [ebx + eax*2 - 2], 0x5c
je 0x51b029
lea eax, [ebp - 4]
mov edx, 0x51b29c
call fcn.00406e1c
lea eax, [ebp - 4]
mov edx, 0x51b2ac
call fcn.00406e1c
mov eax, dword [ebp - 4]
call fcn.004713d4
test al, al
je 0x51b04c
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x51b2d0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x51b067
mov edx, 0x51b2d0
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.00406bb4
mov eax, dword [ebp - 0x74c]
call fcn.004713d4
test al, al
je 0x51b0b3
push 0x105
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x51b18c
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call fcn.00406bb4
mov eax, dword [ebp - 0x750]
lea edx, [ebp - 8]
call fcn.00471bc4
mov edx, dword [ebp - 8]
mov eax, 0x51b2f0
call fcn.00407524
mov ebx, eax
test ebx, ebx
jne 0x51b125
mov eax, dword [ebp - 8]
test eax, eax
je 0x51b0ff
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x51b0ff
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405c28
test eax, eax
je 0x51b108
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jle 0x51b179
mov ecx, 0x51b300
mov dl, 1
mov eax, dword [fcn.0046e8d0]
call fcn.0047804c
call fcn.00405214
jmp 0x51b179
mov eax, ebx
dec eax
cmp eax, 8
jle 0x51b131
mov al, 1
jmp 0x51b15f
mov eax, dword [ebp - 8]
test eax, eax
je 0x51b14e
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x51b14e
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00405c28
test eax, eax
je 0x51b157
sub eax, 4
mov eax, dword [eax]
sub eax, ebx
cmp eax, 3
setg al
test al, al
je 0x51b179
mov ecx, 0x51b300
mov dl, 1
mov eax, dword [fcn.0046e8d0]
call fcn.0047804c
call fcn.00405214
lea eax, [ebp - 0x634]
mov ecx, 0x105
mov edx, dword [ebp - 0x10]
call fcn.00471e9c
cmp edi, 1
jne 0x51b1db
mov edx, 0x51b2d0
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.00406c08
mov ecx, dword [ebp - 0x758]
lea eax, [ebp - 0x754]
mov edx, 0x51b328
call fcn.00406edc
mov ecx, dword [ebp - 0x754]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x51b249
cmp edi, 2
jne 0x51b249
mov edx, 0x51b2d0
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.00406c08
push dword [ebp - 0x760]
push 0x51b340
lea eax, [ebp - 0x764]
lea edx, [ebp - 0x428]
mov ecx, 0x106
call fcn.00406c08
push dword [ebp - 0x764]
lea eax, [ebp - 0x75c]
mov edx, 3
call fcn.00406fc0
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.0040437c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51b284
lea eax, [ebp - 0x764]
mov edx, 7
call fcn.00406a00
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406a00
ret