Function at 0x40e387
Capabilities:
Check for sandbox and av modules
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, 0x426a18
push edi
mov edi, dword [ebp + 0x18]
push edi
push esi
push 0x42c1d8
push ebx
mov dword [esp + 0x28], ecx
call fcn.00419776
add esp, 0x10
test esi, esi
je 0x40e677
cmp dword [ebp + 8], 0
je 0x40e677
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e3d7
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x40e689
mov esi, 0x42c274
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40e42a
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x40e42a
push str.Load_dbghelp.dll_failed
push ebx
call fcn.00419776
pop ecx
pop ecx
jmp 0x40e689
push str.MiniDumpWriteDump
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
jne 0x40e45a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetProcAddress_of_MiniDumpWriteDump_failed___ld_
push ebx
call fcn.00419776
add esp, 0xc
jmp 0x40e689
and dword [esp + 0x1c], 0
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jne 0x40e496
push dword [ebp + 0x10]
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [esp + 0x1c], 1
test ebx, ebx
jne 0x40e496
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcess_failed___ld_
push 0x426a18
jmp 0x40e44d
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x30]
push ecx
mov eax, dword [ecx]
lea eax, [eax*8 + 4]
push eax
push ecx
push 0x10fff
mov ecx, edx
call fcn.0040e694
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x10], 0xc
mov eax, dword [ecx + 0x14]
sub eax, dword [ecx + 0x10]
cdq
idiv dword [esp + 0x10]
test eax, eax
je 0x40e4db
mov edx, dword [ecx + 0x10]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
xor edx, edx
mov dword [esp + 0x24], ecx
cmp edx, eax
mov dword [esp + 0x20], 0x40e0fe
lea edx, [esp + 0x28]
sbb eax, eax
lea ecx, [esp + 0x20]
push ecx
and eax, edx
push eax
push dword [ebp + 8]
mov dword [esp + 0x1c], eax
push edi
push dword [esp + 0x1c]
push dword [ebp + 0x10]
push ebx
call esi
test eax, eax
jne 0x40e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.MiniDumpWriteDump_failed_1__08X_
push 0x426a18
call fcn.00419776
add esp, 0xc
cmp esi, 0x80070057
jne 0x40e689
lea eax, [esp + 0x20]
and edi, 0xfffff7ff
push eax
push dword [esp + 0x14]
push dword [ebp + 8]
push edi
push dword [esp + 0x1c]
push dword [ebp + 0x10]
push ebx
call dword [esp + 0x30]
test eax, eax
jne 0x40e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 2
push str.MiniDumpWriteDump_failed__u__08X_
push 0x426a18
call fcn.00419776
add esp, 0x10
cmp esi, 0x80070057
jne 0x40e689
lea eax, [esp + 0x20]
and edi, 0xfffffeff
push eax
push dword [esp + 0x14]
push dword [ebp + 8]
push edi
push dword [esp + 0x1c]
push dword [ebp + 0x10]
push ebx
call dword [esp + 0x30]
test eax, eax
jne 0x40e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 3
push str.MiniDumpWriteDump_failed__u__08X_
push 0x426a18
call fcn.00419776
add esp, 0x10
cmp esi, 0x80070057
jne 0x40e689
lea eax, [esp + 0x20]
and edi, 0xffffffbf
push eax
push dword [esp + 0x14]
push dword [ebp + 8]
push edi
push dword [esp + 0x1c]
push dword [ebp + 0x10]
push ebx
call dword [esp + 0x30]
test eax, eax
jne 0x40e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 4
push str.MiniDumpWriteDump_failed__u__08X_
push 0x426a18
call fcn.00419776
add esp, 0x10
cmp esi, 0x80070057
jne 0x40e689
lea eax, [esp + 0x20]
and edi, 0xffffffdf
push eax
push dword [esp + 0x14]
push dword [ebp + 8]
push edi
push dword [esp + 0x1c]
push dword [ebp + 0x10]
push ebx
call dword [esp + 0x30]
test eax, eax
jne 0x40e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 5
push str.MiniDumpWriteDump_failed__u__08X_
push 0x426a18
jmp 0x40e681
mov edx, dword [esp + 0x18]
push dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [edx + 0x2c], 0
call esi
cmp dword [esp + 0x1c], 0
je 0x40e672
push ebx
call esi
xor eax, eax
inc eax
jmp 0x40e68b
push dword [ebp + 8]
push esi
push str.Invalid_parameters__file_s__exceptioninfo_p
push ebx
call fcn.00419776
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14