Function at 0x40c040
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 [0x64a040]
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.0051dbb0
add esp, 0x10
xor eax, eax
mov ecx, ebx
push eax
push eax
call fcn.00536a30
mov dword [esp + 0x60], 0xa
mov al, byte [0x64f42e]
test al, al
jne 0x40c2bc
movsx ecx, byte [esi + 0xb]
test ecx, ecx
mov eax, dword [esi + 4]
mov edx, ecx
cmovs edx, eax
test edx, edx
je 0x40c17a
test cl, cl
jns 0x40c0d4
cmp eax, 0x103
ja 0x40c252
mov dword [esp + 8], esi
mov ecx, esi
push edi
call fcn.00545430
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 0x40c235
lea edi, [esi + ebx*2]
add ebx, ebx
mov edx, esi
movzx eax, word [edx]
cmp eax, 0x2a
je 0x40c121
cmp eax, 0x3f
je 0x40c121
add edx, 2
add ebx, 0xfffffffe
jne 0x40c10a
mov edx, edi
cmp edx, edi
sete al
sub edx, esi
cmp edx, 0xfffffffe
sete bl
or bl, al
test cl, cl
jns 0x40c140
push dword [esp + 0x10]
call fcn.0057dc2b
add esp, 4
test bl, bl
mov esi, dword [esp + 8]
lea edi, [esp + 0x20]
je 0x40c259
cmp byte [esi + 0xb], 0
mov eax, esi
jns 0x40c15a
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40c1af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
and eax, 0xfffffffe
cmp eax, 2
jne 0x40c2a6
lea ecx, [esp + 0x30]
call fcn.00545870
mov bl, 1
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.005810d5
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [esi + 0xb], 0
jns 0x40c1a2
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40c17a
jmp 0x40c166
mov ebx, eax
test bl, 1
jne 0x40c2ea
test bl, 0x10
je 0x40c19a
cmp byte [esp + 0xc], 0
je 0x40c221
mov byte [esp + 0x2b], 1
cmp edi, 0x63527e
ja 0x40c1e2
lea eax, [esp + 0x22]
cmp eax, 0x63527e
ja 0x40c329
lea ebx, [esp + 0x20]
mov dword [ebx], 0x2a
mov ecx, esi
mov edx, ebx
push 1
call fcn.0040c330
add esp, 4
mov edi, eax
cmp byte [ebx + 0xb], 0
js 0x40c318
test edi, edi
je 0x40c221
lea ecx, [esp + 0x30]
call fcn.00545870
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
jmp 0x40c185
cmp byte [esi + 0xb], 0
jns 0x40c229
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40c1a9
test cl, cl
jns 0x40c245
push dword [esp + 0x10]
call fcn.0057dc2b
add esp, 4
mov esi, dword [esp + 8]
lea edi, [esp + 0x20]
jmp 0x40c150
mov edi, 0xa1
jmp 0x40c20a
mov ecx, esi
push edi
call fcn.00545430
lea ebx, [esp + 0x14]
mov ecx, esi
push ebx
call fcn.00552270
movzx eax, byte [esp + 0xc]
mov ecx, ebx
mov edx, edi
push eax
call fcn.0040c330
add esp, 4
mov edi, eax
cmp byte [ebx + 0xb], 0
jns 0x40c293
push dword [esp + 0x14]
call fcn.0057dc2b
add esp, 4
cmp byte [esp + 0x2b], 0
jns 0x40c2a6
push dword [esp + 0x20]
call fcn.0057dc2b
add esp, 4
lea ecx, [esp + 0x30]
call fcn.00545870
test edi, edi
jne 0x40c213
jmp 0x40c183
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.005da0b0
add esp, 8
jmp 0x40c0af
mov eax, ebx
and eax, 0xfffffffe
cmp byte [esi + 0xb], 0
jns 0x40c2fb
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 0x40c1ba
jmp 0x40c166
push dword [esp + 0x20]
call fcn.0057dc2b
add esp, 4
jmp 0x40c206
int3