Function at 0x408630
Capabilities:
Check if file exists
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [0x43200c]
mov esi, edx
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edx + 8]
lea edx, [eax + 1]
cmp edx, 2
jb 0x40865b
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
xor eax, eax
lea ebx, [ebp - 0x2c]
mov dword [esi + 8], 0xffffffff
movsd xmm0, qword [0x42a406]
movsd xmm1, qword [str._s.bak_u]
lea edi, [ebp - 0x24]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], esi
mov dword [ebx], eax
mov dword [ebx + 4], eax
movzx eax, word [0x42a40e]
movsd qword [edi + 8], xmm0
movsd qword [edi], xmm1
mov word [edi + 0x10], ax
push 3
push dword [ecx + 4]
push edi
push ebx
call fcn.00409670
add esp, 0x10
test eax, eax
jne 0x408701
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
call fcn.004096f0
mov ebx, dword [ebp + 8]
mov esi, eax
test ebx, ebx
je 0x4086d6
test esi, esi
js 0x4086d6
mov dword [ebx], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x4086d6
mov word [eax], 0
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], 0
test eax, eax
je 0x4086ed
push eax
call fcn.0040d78d
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dec1
mov eax, esi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, eax
inc esi
push 0
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edi
push esi
push ebx
call fcn.004096b0
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4086ac
mov eax, dword [ebp - 0x28]
mov edi, eax
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40874f
mov ecx, dword [ebp + 8]
xor esi, esi
test ecx, ecx
je 0x4086d6
mov eax, dword [ecx + 4]
mov dword [ecx + 4], edi
mov dword [ebp - 0x28], eax
mov eax, dword [ecx]
mov dword [ebp - 0x2c], eax
mov dword [ecx], ebx
jmp 0x4086d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
je 0x408873
mov ebx, esi
cmp eax, 5
je 0x408776
cmp eax, 0xb7
jne 0x4086ac
push 1
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edx
push ebx
push ecx
call fcn.004096b0
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4086ac
mov eax, dword [ebp - 0x28]
mov edi, eax
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x408734
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
je 0x408873
mov ebx, esi
cmp eax, 0xb7
je 0x4087d1
cmp eax, 5
jne 0x4086ac
push 2
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edx
push ebx
push ecx
call fcn.004096b0
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4086ac
mov eax, dword [ebp - 0x28]
mov edi, eax
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x408734
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edi, [ebp - 0x24]
je 0x408873
cmp eax, 0xb7
je 0x40882a
cmp eax, 5
jne 0x4086ac
push 3
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edi
push esi
push ecx
call fcn.004096b0
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4086ac
mov eax, dword [ebp - 0x28]
push 1
mov edi, eax
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x408734
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4086ac
mov ebx, dword [ebp + 8]
xor esi, esi
test ebx, ebx
jne 0x4086c4
jmp 0x4086d6