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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov esi, edx
mov eax, dword [0x43300c]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [edx + 8]
lea edx, [eax + 1]
cmp edx, 2
jb 0x4095bb
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
mov dword [ebp - 0x30], ecx
mov dword [esi + 8], 0xffffffff
xor eax, eax
mov dword [ebp - 0x34], esi
lea ebx, [ebp - 0x2c]
mov dword [ebx], eax
mov dword [ebx + 4], eax
movzx eax, word [0x42b510]
lea edi, [ebp - 0x24]
mov word [edi + 0x10], ax
movups xmm0, xmmword [str._s.bak_u]
movups xmmword [edi], xmm0
push 3
push dword [ecx + 4]
push edi
push ebx
call fcn.00426a10
add esp, 0x10
test eax, eax
jne 0x40964b
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
call fcn.0040a170
mov esi, eax
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x409627
test esi, esi
js 0x409627
mov dword [ebx], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x409627
mov word [eax], 0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x409637
push eax
call fcn.0040d268
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040dac1
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.00426a50
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4095fd
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 0x409695
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4097cb
mov eax, dword [ecx + 4]
mov dword [ecx + 4], edi
mov dword [ecx], ebx
xor esi, esi
jmp 0x40962a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
je 0x4097b9
mov ebx, esi
cmp eax, 5
je 0x4096bc
cmp eax, 0xb7
jne 0x4095fd
push 1
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edx
push ebx
push ecx
call fcn.00426a50
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4095fd
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 0x40967e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
je 0x4097b9
mov ebx, esi
cmp eax, 0xb7
je 0x409717
cmp eax, 5
jne 0x4095fd
push 2
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edx
push ebx
push ecx
call fcn.00426a50
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4095fd
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 0x40967e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea ecx, [ebp - 0x2c]
lea edi, [ebp - 0x24]
je 0x4097b9
cmp eax, 0xb7
je 0x409770
cmp eax, 5
jne 0x4095fd
push 3
mov eax, dword [ebp - 0x30]
push dword [eax + 4]
push edi
push esi
push ecx
call fcn.00426a50
add esp, 0x14
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x4095fd
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 0x40967e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4095fd
xor esi, esi
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x409615
jmp 0x409627
xor esi, esi
jmp 0x409627