Function at 0x407670
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x56800c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x5689b8]
push ebx
push esi
shr eax, 1
mov esi, ecx
mov dword [ebp - 0x278], esi
push edi
test al, 1
je 0x407960
mov ecx, dword [esi]
test ecx, ecx
je 0x407960
cmp dword [0x56b084], 0
jne 0x407960
mov eax, dword [ecx]
call dword [eax + 4]
test eax, eax
je 0x407955
push eax
call fcn.004c91a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407957
lea eax, [ebp - 0x268]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x407957
test byte [ebp - 0x268], 0x10
jne 0x407957
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 8]
push ecx
mov edi, eax
lea ecx, [ebp - 0x244]
push 0x100
mov dword [ebp - 0x280], edi
call fcn.0040c090
mov edx, ecx
mov ecx, dword [esi]
call fcn.004066e0
push edi
lea eax, [ebp - 0x244]
push 0x4ef6c0
push eax
call fcn.0040bfe0
mov ecx, dword [ebp - 0x238]
add esp, 0xc
mov edx, 0x4ef708
push 0x4ef704
call fcn.0041a040
add esp, 4
mov ecx, ebx
call fcn.0041cc50
mov edx, eax
test edx, edx
je 0x407789
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x27c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407767
sub ecx, dword [ebp - 0x27c]
sar ecx, 1
cmp ecx, 0x103
jb 0x40778b
mov ecx, 0x103
jmp 0x40778b
xor ecx, ecx
push ecx
push edx
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.004cb865
add esp, 0x10
lea ecx, [ebp - 0x210]
mov edx, edi
call fcn.004198b0
test al, al
je 0x4077e5
mov ecx, edi
call fcn.00419500
lea ecx, [ebp - 0x210]
mov esi, eax
call fcn.00419500
sub eax, esi
add eax, eax
cmp eax, 0x208
jae 0x407971
mov esi, dword [ebp - 0x278]
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
mov ecx, ebx
call fcn.0041cd60
push 0x54
mov edi, eax
lea eax, [ebp - 0x2d4]
push 0
push eax
call fcn.004bef30
mov eax, dword [esi + 0x5c]
add esp, 0xc
mov dword [ebp - 0x2d4], eax
mov ecx, str.Rename_To
lea eax, [ebp - 0x210]
mov dword [ebp - 0x2d8], 0x58
mov dword [ebp - 0x2bc], eax
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x2b8], 0x104
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 0x2c0], 1
call fcn.00489000
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x280]
add eax, 2
mov dword [ebp - 0x2ac], edi
mov dword [ebp - 0x29c], eax
lea eax, [ebp - 0x2d8]
push eax
mov dword [ebp - 0x2a4], 0x806
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
je 0x4078f1
mov edx, dword [esi + 0x58]
mov ecx, esi
call fcn.004021f0
push 1
mov dl, 1
mov ecx, esi
call fcn.004060d0
add esp, 4
push dword [esi + 0x5c]
call dword [sym.imp.USER32.dll_SetFocus]
push 3
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x407907
call fcn.00416ba0
lea ecx, [ebp - 0x274]
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x270], esi
mov dword [ebp - 0x26c], 0x1000101
call fcn.004048c0
push 1
push 3
mov ecx, str.Failed_to_rename_the_file_
call fcn.00489000
push eax
mov ecx, esi
call fcn.00467aa0
push edi
call fcn.004bf8aa
add esp, 4
lea ecx, [ebp - 0x244]
call fcn.004014b0
jmp 0x407957
lea ecx, [ebp - 0x210]
call fcn.0041ce70
mov esi, eax
mov ecx, ebx
mov edx, esi
call fcn.00404610
lea eax, [ebp - 0x210]
mov dword [ebp - 0x26c], 0x1000101
mov dword [ebp - 0x274], eax
lea ecx, [ebp - 0x274]
mov eax, dword [ebp - 0x278]
mov dword [ebp - 0x270], eax
call fcn.004048c0
push esi
call fcn.004bf8aa
add esp, 4
jmp 0x4078f1
xor ebx, ebx
push ebx
call fcn.004bf8aa
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bcb15
mov esp, ebp
pop ebp
ret
call fcn.004bcc49
int3