Function at 0x47022c
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 0x4705e0
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x748]
xor ecx, ecx
mov edx, 0x114
call fcn.004035c0
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 0x4702c0
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x4705b5
cmp eax, 2
jne 0x470305
cmp edi, 1
jne 0x4702e2
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 0x4705b5
cmp edi, 2
jne 0x4705b5
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 0x4705b5
mov dl, 1
mov eax, dword [0x417f58]
call fcn.0041ce04
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.004057e4
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x470356
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x470356
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00404fec
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x470373
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x470373
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.00404fec
test eax, eax
je 0x47037c
sub eax, 4
mov eax, dword [eax]
cmp word [ebx + eax*2 - 2], 0x5c
je 0x470391
lea eax, [ebp - 4]
mov edx, 0x4705fc
call fcn.00405938
lea eax, [ebp - 4]
mov edx, 0x47060c
call fcn.00405938
mov eax, dword [ebp - 4]
call fcn.0040b334
test al, al
je 0x4703b4
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x470630
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x4703cf
mov edx, 0x470630
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.004057a8
mov eax, dword [ebp - 0x74c]
call fcn.0040b334
test al, al
je 0x47041b
push 0x105
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x4704ef
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call fcn.004057a8
mov eax, dword [ebp - 0x750]
lea edx, [ebp - 8]
call fcn.0040b7c8
mov edx, dword [ebp - 8]
mov eax, 0x470650
call fcn.00405f48
mov ebx, eax
test ebx, ebx
jne 0x47048d
mov eax, dword [ebp - 8]
test eax, eax
je 0x470467
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x470467
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00404fec
test eax, eax
je 0x470470
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jle 0x4704e1
mov ecx, 0x470660
mov dl, 1
mov eax, dword [0x408f10]
call fcn.0040f4c0
call fcn.00404680
jmp 0x4704e1
mov eax, ebx
dec eax
cmp eax, 8
jle 0x470499
mov al, 1
jmp 0x4704c7
mov eax, dword [ebp - 8]
test eax, eax
je 0x4704b6
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x4704b6
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.00404fec
test eax, eax
je 0x4704bf
sub eax, 4
mov eax, dword [eax]
sub eax, ebx
cmp eax, 3
setg al
test al, al
je 0x4704e1
mov ecx, 0x470660
mov dl, 1
mov eax, dword [0x408f10]
call fcn.0040f4c0
call fcn.00404680
lea eax, [ebp - 0x634]
mov edx, dword [ebp - 0x10]
call fcn.0040ba04
cmp edi, 1
jne 0x47053e
mov edx, 0x470630
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.004057e4
mov ecx, dword [ebp - 0x758]
lea eax, [ebp - 0x754]
mov edx, 0x470688
call fcn.004059b8
mov ecx, dword [ebp - 0x754]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x4705ac
cmp edi, 2
jne 0x4705ac
mov edx, 0x470630
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.004057e4
push dword [ebp - 0x760]
push 0x4706a0
lea eax, [ebp - 0x764]
lea edx, [ebp - 0x428]
mov ecx, 0x106
call fcn.004057e4
push dword [ebp - 0x764]
lea eax, [ebp - 0x75c]
mov edx, 3
call fcn.00405a88
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.00403c8c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4705e7
lea eax, [ebp - 0x764]
mov edx, 7
call fcn.00405624
lea eax, [ebp - 8]
mov edx, 2
call fcn.00405624
ret