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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov dword [esp + 0xc], edx
mov esi, ecx
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esp + 0x68], eax
pcmpeqd xmm0, xmm0
lea ebx, [esp + 0x30]
movdqa xmmword [ebx + 0x20], xmm0
movdqa xmmword [ebx + 0x10], xmm0
movdqa xmmword [ebx], xmm0
lea edi, [esp + 0x20]
push 0x119
push str.file_util_win.cc
push str.DoDeleteFile
push edi
call fcn.005068d0
add esp, 0x10
xor eax, eax
mov ecx, ebx
push eax
push eax
call fcn.00520200
mov dword [esp + 0x60], 0xa
mov al, byte [0x649446]
test al, al
jne 0x40f3ce
movsx ecx, byte [esi + 0xb]
test ecx, ecx
mov eax, dword [esi + 4]
mov edx, ecx
cmovs edx, eax
test edx, edx
je 0x40f28a
test cl, cl
jns 0x40f1e4
cmp eax, 0x103
ja 0x40f331
mov dword [esp + 8], esi
mov ecx, esi
push edi
call fcn.00525da0
movsx ecx, byte [esp + 0x2b]
test ecx, ecx
mov ebx, ecx
cmovs ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov esi, edi
mov dword [esp + 0x10], eax
cmovs esi, eax
test ebx, ebx
je 0x40f34c
lea edi, [esi + ebx*2]
add ebx, ebx
mov edx, esi
movzx eax, word [edx]
cmp eax, 0x2a
je 0x40f231
cmp eax, 0x3f
je 0x40f231
add edx, 2
add ebx, 0xfffffffe
jne 0x40f21a
mov edx, edi
cmp edx, edi
sete al
sub edx, esi
cmp edx, 0xfffffffe
sete bl
or bl, al
test cl, cl
jns 0x40f250
push dword [esp + 0x10]
call fcn.00564ea0
add esp, 4
test bl, bl
mov esi, dword [esp + 8]
lea edi, [esp + 0x20]
je 0x40f369
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x40f26a
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40f2bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
and eax, 0xfffffffe
cmp eax, 2
jne 0x40f3b6
lea ecx, [esp + 0x30]
call fcn.0053b480
mov bl, 1
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.00568175
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [esi + 0xb], 0
jns 0x40f2b2
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f28a
jmp 0x40f276
mov ebx, eax
test bl, 1
jne 0x40f3fc
test bl, 0x10
je 0x40f2aa
cmp byte [esp + 0xc], 0
je 0x40f338
mov byte [esp + 0x2b], 1
cmp edi, 0x62f2ce
ja 0x40f2f2
lea eax, [esp + 0x22]
cmp eax, 0x62f2ce
ja 0x40f43b
lea ebx, [esp + 0x20]
mov dword [ebx], 0x2a
mov ecx, esi
mov edx, ebx
push 1
call fcn.0040f440
add esp, 4
mov edi, eax
cmp byte [ebx + 0xb], 0
js 0x40f42a
test edi, edi
je 0x40f338
lea ecx, [esp + 0x30]
call fcn.0053b480
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
jmp 0x40f295
mov edi, 0xa1
jmp 0x40f31a
cmp byte [esi + 0xb], 0
jns 0x40f340
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40f2b9
test cl, cl
jns 0x40f35c
push dword [esp + 0x10]
call fcn.00564ea0
add esp, 4
mov esi, dword [esp + 8]
lea edi, [esp + 0x20]
jmp 0x40f260
mov ecx, esi
push edi
call fcn.00525da0
lea ebx, [esp + 0x14]
mov ecx, esi
push ebx
call fcn.0053dde0
movzx eax, byte [esp + 0xc]
mov ecx, ebx
mov edx, edi
push eax
call fcn.0040f440
add esp, 4
mov edi, eax
cmp byte [ebx + 0xb], 0
jns 0x40f3a3
push dword [esp + 0x14]
call fcn.00564ea0
add esp, 4
cmp byte [esp + 0x2b], 0
jns 0x40f3b6
push dword [esp + 0x20]
call fcn.00564ea0
add esp, 4
lea ecx, [esp + 0x30]
call fcn.0053b480
mov bl, 1
test edi, edi
je 0x40f295
jmp 0x40f323
movzx ecx, al
lea eax, [esp + 0x14]
mov dword [eax], edi
mov ebx, edi
mov edi, esi
lea esi, [esp + 0x64]
mov dword [esi], str.ScopedBlockingCall
lea edx, [esp + 0x60]
push eax
push esi
mov esi, edi
mov edi, ebx
call fcn.005b8bd0
add esp, 8
jmp 0x40f1bf
mov eax, ebx
and eax, 0xfffffffe
cmp byte [esi + 0xb], 0
jns 0x40f40d
mov ecx, dword [esp + 8]
mov esi, dword [ecx]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
mov esi, dword [esp + 8]
lea edi, [esp + 0x20]
jne 0x40f2ca
jmp 0x40f276
push dword [esp + 0x20]
call fcn.00564ea0
add esp, 4
jmp 0x40f316
int3