Function at 0x40f0f0
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x674
mov eax, dword [0x491870]
xor eax, esp
mov dword [esp + 0x670], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x14], esi
test esi, esi
je 0x40f39f
xor eax, eax
cmp ax, word [esi]
je 0x40f39f
push 0x208
push eax
lea ecx, [esp + 0x270]
push ecx
mov dword [esp + 0x1c], eax
call fcn.00451570
push 0x250
lea edx, [esp + 0x28]
push 0
push edx
call fcn.00451570
push esi
lea eax, [esp + 0x48c]
push 0x104
push eax
call fcn.0044e23f
lea eax, [esp + 0x494]
add esp, 0x24
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f170
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x46e], 0x5c
je 0x40f1a4
push 0x47a654
lea ecx, [esp + 0x474]
push 0x104
push ecx
call fcn.0044e2ae
add esp, 0xc
lea edx, [esp + 0x470]
push edx
lea eax, [esp + 0x26c]
push 0x104
push eax
call fcn.0044e23f
push 0x47a678
lea ecx, [esp + 0x278]
push 0x104
push ecx
call fcn.0044e2ae
add esp, 0x18
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f20e
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0044dee5
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ebx, [ebx]
mov ecx, 0x478e04
lea eax, [esp + 0x44]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f256
test dx, dx
je 0x40f252
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f256
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f230
xor eax, eax
jmp 0x40f25b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40f357
mov ecx, 0x47a67c
lea eax, [esp + 0x44]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f296
test dx, dx
je 0x40f292
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f296
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f270
xor eax, eax
jmp 0x40f29b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40f357
test byte [esp + 0x18], 0x10
je 0x40f2ed
lea ecx, [esp + 0x470]
push ecx
lea edx, [esp + 0x26c]
push 0x104
push edx
call fcn.0044e23f
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x278]
push 0x104
push ecx
call fcn.0044e2ae
lea edx, [esp + 0x280]
push edx
call fcn.0040f0f0
add esp, 0x1c
jmp 0x40f357
lea eax, [esp + 0x470]
push eax
lea ecx, [esp + 0x26c]
push 0x104
push ecx
call fcn.0044e23f
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x278]
push 0x104
push eax
call fcn.0044e2ae
mov eax, dword [esp + 0x30]
add esp, 0x18
test al, 1
je 0x40f33b
and eax, 0xfffffffe
push eax
lea ecx, [esp + 0x26c]
push ecx
mov dword [esp + 0x20], eax
call esi
lea edx, [esp + 0x268]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f357
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push eax
push edi
call ebx
test eax, eax
jne 0x40f220
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40f38d
cmp dword [esp + 0x10], eax
jne 0x40f394
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], 0
je 0x40f3b6
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0044dee5
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x67c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0044dee5
mov esp, ebp
pop ebp
ret