Function at 0x578164
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 0x578518
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x748]
xor ecx, ecx
mov edx, 0x114
call fcn.004039c8
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 0x5781f8
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x5784ed
cmp eax, 2
jne 0x57823d
cmp edi, 1
jne 0x57821a
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 0x5784ed
cmp edi, 2
jne 0x5784ed
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 0x5784ed
mov dl, 1
mov eax, dword [0x47121c]
call fcn.00476d94
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.004066f4
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x57828e
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x57828e
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.004057fc
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x5782ab
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5782ab
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.004057fc
test eax, eax
je 0x5782b4
sub eax, 4
mov eax, dword [eax]
cmp word [ebx + eax*2 - 2], 0x5c
je 0x5782c9
lea eax, [ebp - 4]
mov edx, 0x578534
call fcn.00406848
lea eax, [ebp - 4]
mov edx, 0x578544
call fcn.00406848
mov eax, dword [ebp - 4]
call fcn.0045cf74
test al, al
je 0x5782ec
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x578568
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x578307
mov edx, 0x578568
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.004066a0
mov eax, dword [ebp - 0x74c]
call fcn.0045cf74
test al, al
je 0x578353
push 0x105
lea eax, [ebp - 0x634]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x578427
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call fcn.004066a0
mov eax, dword [ebp - 0x750]
lea edx, [ebp - 8]
call fcn.0045d4bc
mov edx, dword [ebp - 8]
mov eax, 0x578588
call fcn.00406e60
mov ebx, eax
test ebx, ebx
jne 0x5783c5
mov eax, dword [ebp - 8]
test eax, eax
je 0x57839f
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x57839f
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004057fc
test eax, eax
je 0x5783a8
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jle 0x578419
mov ecx, 0x578598
mov dl, 1
mov eax, dword [0x45a5e0]
call fcn.00463340
call fcn.00404e34
jmp 0x578419
mov eax, ebx
dec eax
cmp eax, 8
jle 0x5783d1
mov al, 1
jmp 0x5783ff
mov eax, dword [ebp - 8]
test eax, eax
je 0x5783ee
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5783ee
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004057fc
test eax, eax
je 0x5783f7
sub eax, 4
mov eax, dword [eax]
sub eax, ebx
cmp eax, 3
setg al
test al, al
je 0x578419
mov ecx, 0x578598
mov dl, 1
mov eax, dword [0x45a5e0]
call fcn.00463340
call fcn.00404e34
lea eax, [ebp - 0x634]
mov edx, dword [ebp - 0x10]
call fcn.0045d6f8
cmp edi, 1
jne 0x578476
mov edx, 0x578568
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.004066f4
mov ecx, dword [ebp - 0x758]
lea eax, [ebp - 0x754]
mov edx, 0x5785c0
call fcn.004068c8
mov ecx, dword [ebp - 0x754]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x5784e4
cmp edi, 2
jne 0x5784e4
mov edx, 0x578568
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.004066f4
push dword [ebp - 0x760]
push 0x5785d8
lea eax, [ebp - 0x764]
lea edx, [ebp - 0x428]
mov ecx, 0x106
call fcn.004066f4
push dword [ebp - 0x764]
lea eax, [ebp - 0x75c]
mov edx, 3
call fcn.00406998
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.004042e8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x57851f
lea eax, [ebp - 0x764]
mov edx, 7
call fcn.004064ec
lea eax, [ebp - 8]
mov edx, 2
call fcn.004064ec
ret