Function at 0x40c770
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30c
mov eax, dword [0x4d04a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp dword [esi + 0x10], 0x104
mov dword [ebp - 0x234], ebx
jb 0x40c7ab
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004271c4
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0xc], bl
jne 0x40c845
lea ecx, [ebp - 0x25c]
call fcn.00414290
lea eax, [ebp - 0x25c]
push eax
push esi
call fcn.0040c5a0
add esp, 8
test al, al
je 0x40c80c
cmp byte [ebp - 0x254], bl
je 0x40c80c
cmp dword [esi + 0x14], 8
jb 0x40c7e3
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
lea ecx, [ebp - 0x25c]
setne bl
call fcn.004150c0
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004271c4
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x14], 8
jb 0x40c816
mov eax, dword [esi]
jmp 0x40c818
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x25c]
test eax, eax
je 0x40c840
call fcn.004150c0
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004271c4
mov esp, ebp
pop ebp
ret
call fcn.004150c0
xor ecx, ecx
push 0x208
push ecx
lea edx, [ebp - 0x20e]
push edx
mov word [ebp - 0x210], cx
call fcn.00426fc0
add esp, 0xc
cmp byte [0x4d236c], bl
je 0x40c8b1
call fcn.00409390
cmp eax, 1
jg 0x40c89e
mov ebx, 1
push ebx
push 0x66
push str.file_util_win.cc
lea ecx, [ebp - 0x30c]
call fcn.0040b170
add eax, 8
push str.copying
push eax
call fcn.00402810
add esp, 8
test bl, 1
je 0x40c8b1
lea ecx, [ebp - 0x30c]
and ebx, 0xfffffffe
call fcn.0040b9e0
cmp dword [esi + 0x14], 8
jb 0x40c8bb
mov eax, dword [esi]
jmp 0x40c8bd
mov eax, esi
lea edx, [ebp - 0x210]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40c8c5
xor eax, eax
cmp byte [ebp + 0xc], 0
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x210]
mov ecx, 0x414
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 3
mov dword [ebp - 0x228], eax
mov word [ebp - 0x220], cx
jne 0x40c93f
mov edx, 0x1494
mov word [ebp - 0x220], dx
cmp byte [0x4d236c], 0
je 0x40c98d
call fcn.00409390
cmp eax, 1
jg 0x40c97a
push 1
push 0x70
push str.file_util_win.cc
lea ecx, [ebp - 0x30c]
or ebx, 2
call fcn.0040b170
add eax, 8
push str.Performing_shell_operation
push eax
call fcn.00402810
add esp, 8
test bl, 2
je 0x40c98d
lea ecx, [ebp - 0x30c]
and ebx, 0xfffffffd
call fcn.0040b9e0
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
cmp byte [0x4d236c], 0
mov esi, eax
je 0x40c9ef
call fcn.00409390
cmp eax, 1
jg 0x40c9df
push 1
push 0x73
push str.file_util_win.cc
lea ecx, [ebp - 0x30c]
or ebx, 4
call fcn.0040b170
push esi
add eax, 8
push str.Done:
push eax
call fcn.00402810
add esp, 8
mov ecx, eax
call fcn.00405b50
test bl, 4
je 0x40c9ef
lea ecx, [ebp - 0x30c]
call fcn.0040b9e0
cmp dword [ebp - 0x21e], 0
jne 0x40c799
test esi, esi
je 0x40ca1f
cmp esi, 2
je 0x40ca1f
cmp esi, 0x402
je 0x40ca1f
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004271c4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004271c4
mov esp, ebp
pop ebp
ret