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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xba
push 0
push 0
dec ecx
jne 0x512791
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.0040436c
xor eax, eax
push ebp
push 0x512aa0
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x104
lea eax, [ebp - 0x4a4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
test eax, eax
jne 0x5127f1
push 0x30
push 0x512ab0
push 0x512ac4
mov eax, edi
call fcn.00439b40
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x512a65
lea eax, [ebp - 0x5ac]
lea edx, [ebp - 0x4a4]
call fcn.00402f74
lea edx, [ebp - 0x5ac]
lea eax, [ebp - 0x4ac]
call fcn.0040415c
push dword [ebp - 0x4ac]
push 0x512ae4
push dword [ebp - 4]
lea eax, [ebp - 0x4a8]
mov edx, 3
call fcn.00404278
mov edx, dword [ebp - 0x4a8]
lea eax, [ebp - 0x1d4]
call fcn.00406716
lea eax, [ebp - 0x1d4]
call fcn.00406b27
call fcn.004028c4
lea eax, [ebp - 0x5ac]
lea edx, [ebp - 0x4a4]
call fcn.00402f74
lea edx, [ebp - 0x5ac]
lea eax, [ebp - 0x5b4]
call fcn.0040415c
push dword [ebp - 0x5b4]
push 0x512ae4
push dword [ebp - 4]
push 0x512af0
lea eax, [ebp - 0x5b0]
mov edx, 4
call fcn.00404278
mov edx, dword [ebp - 0x5b0]
lea eax, [ebp - 0x3a0]
call fcn.00406716
lea eax, [ebp - 0x3a0]
call fcn.00406b2e
call fcn.004028c4
jmp 0x512942
lea edx, [ebp - 8]
lea eax, [ebp - 0x1d4]
call fcn.004045a4
lea eax, [ebp - 0x1d4]
call fcn.00406ac4
call fcn.004028c4
lea edx, [ebp - 0x5b8]
mov eax, dword [ebp - 8]
call fcn.004098e8
mov eax, dword [ebp - 0x5b8]
call fcn.0040437c
call fcn.0040a638
mov edx, eax
lea eax, [ebp - 8]
call fcn.004040f0
lea eax, [ebp - 0x5bc]
mov edx, ebx
call fcn.004040f0
mov edx, dword [ebp - 0x5bc]
mov eax, dword [ebp - 8]
call fcn.004042c8
jne 0x51292a
lea eax, [ebp - 8]
mov edx, esi
call fcn.004040f0
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x3a0]
call fcn.0040457c
call fcn.00406d5f
call fcn.004028c4
lea eax, [ebp - 0x1d4]
call fcn.004068bc
call fcn.004028c4
test al, al
je 0x5128bd
lea eax, [ebp - 0x1d4]
call fcn.00406880
call fcn.004028c4
lea eax, [ebp - 0x3a0]
call fcn.00406880
call fcn.004028c4
lea eax, [ebp - 0x5ac]
lea edx, [ebp - 0x4a4]
call fcn.00402f74
lea edx, [ebp - 0x5ac]
lea eax, [ebp - 0x5c4]
call fcn.0040415c
push dword [ebp - 0x5c4]
push 0x512ae4
push dword [ebp - 4]
lea eax, [ebp - 0x5c0]
mov edx, 3
call fcn.00404278
mov eax, dword [ebp - 0x5c0]
call fcn.00506800
lea eax, [ebp - 0x5ac]
lea ebx, [ebp - 0x4a4]
mov edx, ebx
call fcn.00402f74
lea edx, [ebp - 0x5ac]
lea eax, [ebp - 0x5cc]
call fcn.0040415c
push dword [ebp - 0x5cc]
push 0x512ae4
push dword [ebp - 4]
lea eax, [ebp - 0x5c8]
mov edx, 3
call fcn.00404278
mov eax, dword [ebp - 0x5c8]
call fcn.0040437c
push eax
lea eax, [ebp - 0x5ac]
mov edx, ebx
call fcn.00402f74
lea edx, [ebp - 0x5ac]
lea eax, [ebp - 0x5d4]
call fcn.0040415c
push dword [ebp - 0x5d4]
push 0x512ae4
push dword [ebp - 4]
push 0x512af0
lea eax, [ebp - 0x5d0]
mov edx, 4
call fcn.00404278
mov eax, dword [ebp - 0x5d0]
call fcn.0040437c
push eax
call sub.kernel32.dll_MoveFileA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x512aa7
lea eax, [ebp - 0x5d4]
mov edx, 0xa
call fcn.00403f5c
lea eax, [ebp - 0x4ac]
mov edx, 2
call fcn.00403f5c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403f5c
ret