Function at 0x40f160
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x523f1e
mov eax, dword fs:[0]
push eax
sub esp, 0x270
push ebx
push esi
push edi
mov eax, dword [0x581500]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x11c], 0
lea eax, [esi + 0xc]
jne 0x40f1a3
mov eax, dword [esi + 8]
push 0x80
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [ebp + 0x10], 0
jne 0x40f294
cmp byte [esi + 0x11c], 0
lea eax, [esi + 0xc]
jne 0x40f1cb
mov eax, dword [esi + 8]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f50a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0xc], 0
mov edi, eax
jne 0x40f1fa
mov ecx, esi
call fcn.0040eac0
test al, al
je 0x40f50a
cmp byte [esi + 0x11c], 0
je 0x40f208
add esi, 0xc
jmp 0x40f20b
mov esi, dword [esi + 8]
lea ecx, [esp + 0x34]
call fcn.004114e0
lea eax, [esi + 4]
lea edx, [esp + 0x34]
call fcn.00411710
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov dword [esp + 0x288], 1
call fcn.00409990
mov esi, eax
call fcn.0040a650
mov ecx, ebx
call fcn.00409990
mov esi, eax
push 0x55d3d0
lea eax, [esp + 0x38]
call fcn.0040a800
cmp byte [esp + 0x150], 0
mov dword [esp + 0x34], vtable.t_str.0
jne 0x40f27a
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x40]
cmp eax, ecx
je 0x40f27a
push eax
call fcn.004faac5
add esp, 4
xor al, al
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp byte [ebp + 0xc], 0
jne 0x40f2a9
mov ecx, esi
call fcn.0040eac0
test al, al
je 0x40f50a
mov ebx, dword [esi + 4]
add ebx, 2
lea eax, [ebx + ebx]
push eax
mov dword [esp + 0x14], eax
call fcn.004faba2
mov edi, eax
add esp, 4
test edi, edi
jne 0x40f332
cmp byte [esi + 0x11c], al
je 0x40f2d2
add esi, 0xc
jmp 0x40f2d5
mov esi, dword [esi + 8]
lea ecx, [esp + 0x34]
call fcn.004114e0
lea eax, [esi + 4]
lea edx, [esp + 0x34]
call fcn.00411710
mov ecx, dword [ebp + 8]
push 0x55d3e0
mov dword [esp + 0x28c], 3
call fcn.00409990
mov esi, eax
lea eax, [esp + 0x38]
call fcn.0040a800
cmp byte [esp + 0x150], 0
mov dword [esp + 0x34], vtable.t_str.0
jne 0x40f27a
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x40]
cmp eax, edx
jmp 0x40f26f
cmp byte [esi + 0x11c], 0
lea eax, [esi + 0xc]
jne 0x40f341
mov eax, dword [esi + 8]
add eax, 4
push eax
push ebx
push edi
call fcn.004fa6de
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov word [ecx + edi - 2], ax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov word [esp + 0x3c], ax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
add esp, 0xc
lea eax, [esp + 0x14]
mov edx, 0x454
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], 3
mov word [esp + 0x28], dx
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
push edi
mov ebx, eax
call fcn.004faac5
add esp, 4
test ebx, ebx
je 0x40f50a
cmp ebx, 0x402
jne 0x40f46f
cmp byte [esi + 0x11c], 0
je 0x40f3cd
add esi, 0xc
jmp 0x40f3d0
mov esi, dword [esi + 8]
lea ecx, [esp + 0x34]
call fcn.004114e0
lea eax, [esi + 4]
lea edx, [esp + 0x34]
call fcn.00411710
push 0x55d3f8
lea ecx, [esp + 0x15c]
mov dword [esp + 0x28c], 5
call fcn.00411610
mov esi, eax
push 0x402
push 0x55db50
mov edx, esi
mov byte [esp + 0x290], 6
call fcn.00411e80
add esp, 8
push 0x5595d4
mov ecx, esi
call fcn.00411ca0
add eax, 8
cmp byte [eax + 0x114], 0
je 0x40f43c
add eax, 4
jmp 0x40f43e
mov eax, dword [eax]
mov ebx, dword [ebp + 8]
add eax, 4
push eax
call fcn.0040a620
mov esi, eax
lea eax, [esp + 0x38]
call fcn.0040a800
lea ecx, [esp + 0x158]
call fcn.00411680
lea ecx, [esp + 0x34]
call fcn.00411680
jmp 0x40f27a
cmp byte [esi + 0x11c], 0
je 0x40f47d
add esi, 0xc
jmp 0x40f480
mov esi, dword [esi + 8]
lea ecx, [esp + 0x34]
call fcn.004114e0
lea eax, [esi + 4]
lea edx, [esp + 0x34]
call fcn.00411710
push 0x55d3f8
lea ecx, [esp + 0x15c]
mov dword [esp + 0x28c], 8
call fcn.00411610
mov esi, eax
push ebx
push 0x55db50
mov edx, esi
mov byte [esp + 0x290], 9
call fcn.00411e80
add esp, 8
push 0x5595d4
mov ecx, esi
call fcn.00411ca0
add eax, 8
cmp byte [eax + 0x114], 0
je 0x40f4f7
mov ecx, dword [ebp + 8]
add eax, 4
add eax, 4
push eax
call fcn.00409990
jmp 0x40f44a
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
add eax, 4
push eax
call fcn.00409990
jmp 0x40f44a
mov al, 1
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc