Function at 0x845da0
Capabilities:
Move file

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, dword [esp + 0x70]
mov ebx, dword [esi + 0x75f0]
mov eax, dword [ebx + 0xf0]
test eax, eax
je 0x845e11
lea edx, [esp + 0x20]
mov edi, 1
mov dword [esp + 4], edx
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__fstati64
test eax, eax
jne 0x845deb
movzx eax, word [esp + 0x26]
and eax, 0xf000
cmp eax, 0x8000
sete al
mov edi, eax
mov eax, dword [ebx + 0xf0]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, edi
test al, al
jne 0x845f56
mov eax, dword [ebx + 0xf4]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0xf8]
test eax, eax
je 0x845e7f
lea edx, [esp + 0x20]
mov edi, 1
mov dword [esp + 4], edx
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__fstati64
test eax, eax
jne 0x845e4b
movzx eax, word [esp + 0x26]
and eax, 0xf000
cmp eax, 0x8000
sete al
mov edi, eax
mov eax, dword [ebx + 0xf8]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, edi
test al, al
jne 0x845fc7
mov eax, dword [ebx + 0xfc]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x100]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x104]
test eax, eax
je 0x845e91
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [ebx + 0x80]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x214]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x10c]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x188]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x18c]
mov dword [esp], eax
call fcn.0080d1d0
mov eax, dword [ebx + 0x224]
test eax, eax
je 0x845f46
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call fcn.0080d1d0
mov ebp, dword [ebx + 0x220]
cmp ebp, 1
jle 0x846038
mov edx, dword [ebx + 0x224]
mov edi, 0x18
mov esi, 1
nop
lea esi, [esi]
mov eax, dword [edx + edi + 0x14]
cmp eax, dword [edx + 0x14]
je 0x845f34
mov ecx, dword [eax + 0x320]
test ecx, ecx
je 0x845f34
mov dword [esp], eax
call ecx
mov ebp, dword [ebx + 0x220]
mov edx, dword [ebx + 0x224]
add esi, 1
add edi, 0x18
cmp ebp, esi
jg 0x845f10
mov dword [esp], edx
call fcn.0080d1d0
mov dword [esp], ebx
call fcn.0080d1d0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x108]
cmp dword [esi + 0x574], eax
jl 0x845e03
mov eax, dword [esi + 0x2a8]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, dword [esi + 0x2a8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xf4]
mov dword [esp], eax
call sub.msvcrt.dll_rename
test eax, eax
je 0x845e03
mov eax, dword [esi + 0x2a8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0xf4]
mov dword [esp + 8], str.failed_to_rename___s__to___s__n
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.0080cd70
jmp 0x845e03
mov eax, dword [ebx + 0x108]
cmp dword [esi + 0x574], eax
jl 0x845e63
mov eax, dword [ebx + 0x100]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, dword [ebx + 0x100]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xfc]
mov dword [esp], eax
call sub.msvcrt.dll_rename
test eax, eax
je 0x845e63
mov eax, dword [ebx + 0x100]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0xfc]
mov dword [esp + 8], str.failed_to_rename___s__to___s__n
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.0080cd70
jmp 0x845e63
mov edx, dword [ebx + 0x224]
jmp 0x845f3e