Function at 0x40bcf8
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x4d7c14
call fcn.004aef44
sub esp, 0x14
push ebx
push esi
push edi
mov esi, ecx
push 1
pop ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40bd2a
and dword [ebp - 0x10], 0
jmp 0x40bdca
test al, 6
je 0x40bd51
cmp dword [esi + 0x1c], 0
jne 0x40bd51
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
lea eax, [ebp + 8]
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040c455
sub dword [esi + 0x60], eax
xor ebx, ebx
jmp 0x40bdca
push 0
push dword [ebp + 0xc]
call fcn.004b0b55
pop ecx
test eax, eax
pop ecx
jne 0x40bdca
cmp dword [esi + 0x10], eax
jne 0x40bd6e
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
jmp 0x40bd3a
push 0x80
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x40bd9f
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040c455
sub dword [esi + 0x60], eax
and dword [ebp - 0x10], 0
jmp 0x40bd4d
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40bdca
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040c455
sub dword [esi + 0x60], eax
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [0x51f03c]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x24]
mov edi, dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
mov byte [ebp - 4], 2
je 0x40be2d
push dword [eax + 0x1c]
call edi
test eax, eax
je 0x40be2d
push dword [esi + 0x30]
lea eax, [ebp + 8]
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.004c5c1f
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.0040c5c3
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push dword [ebp - 0x14]
mov ecx, dword [esi + 0x24]
call fcn.004c9476
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40be7e
push dword [eax + 0x1c]
call edi
test eax, eax
je 0x40be7e
push dword [esi + 0x30]
lea eax, [ebp + 0xc]
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.004c5c1f
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.0040c5c3
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.004c5eaa
push dword [ebp - 0x14]
mov ecx, dword [esi + 0x2c]
call fcn.004c9476
cmp dword [ebp - 0x10], 0
je 0x40bf2e
test ebx, ebx
je 0x40bec2
push ecx
lea eax, [ebp + 0xc]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.004c5c1f
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
mov byte [ebp - 4], 5
call fcn.004c5c1f
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0040c17f
test eax, eax
jne 0x40bec2
xor ebx, ebx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], 0
je 0x40bf2e
test ebx, ebx
je 0x40bf2e
cmp dword [esi + 0x14], 0
je 0x40bf2e
push 0x80
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x40bf13
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
test eax, eax
mov ecx, esp
jne 0x40befe
mov dword [ebp - 0x20], esp
push str.Failed_to_delete_file_after_copy
jmp 0x40bf1e
lea eax, [ebp + 8]
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040c4cd
jmp 0x40bf2e
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_set_source_file_attribute_to_normal_durign_move
call fcn.004c5f18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004c5eaa
and byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8