Function at 0x40e67d
Capabilities:
Create process memory minidump
Get common file path
Get file size
Read file on windows

Disassembly:
push 0x6ac
mov eax, 0x42ef02
call fcn.0042d090
mov ebx, edx
mov dword [ebp - 0x694], ebx
mov dword [ebp - 0x6a0], ecx
push dword [ebx + 0xc]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x6b8], esi
and dword [ebp - 4], 0
test esi, esi
je 0x40e9c0
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x690]
push eax
push 8
lea eax, [ebp - 0x6a8]
push eax
push dword [ebx + 0x14]
push esi
call edi
test eax, eax
je 0x40e7c3
cmp dword [ebp - 0x690], 8
jne 0x40e7c3
push 0x2cc
call fcn.004171b3
pop ecx
lea ecx, [ebp - 0x690]
mov dword [ebp - 0x69c], eax
push ecx
push 0x2cc
push eax
push dword [ebp - 0x6a4]
push esi
call edi
test eax, eax
je 0x40e7c3
cmp dword [ebp - 0x690], 0x2cc
jne 0x40e7c3
push 0x50
call fcn.004171b3
pop ecx
mov edi, eax
lea eax, [ebp - 0x690]
push eax
push 0x50
push edi
push dword [ebp - 0x6a8]
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x40e7c3
cmp dword [ebp - 0x690], 0x50
jne 0x40e7c3
cmp dword [edi + 8], 0
je 0x40e7aa
mov ebx, edi
push 0x50
call fcn.004171b3
pop ecx
lea ecx, [ebp - 0x690]
mov dword [ebp - 0x698], eax
push ecx
push 0x50
push eax
push dword [ebx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x40e7a4
cmp dword [ebp - 0x690], 0x50
jne 0x40e7a4
mov eax, dword [ebp - 0x698]
mov dword [ebx + 8], eax
mov ebx, eax
cmp dword [eax + 8], 0
jne 0x40e764
mov ebx, dword [ebp - 0x694]
push 8
call fcn.004171b3
mov dword [ebx + 0x18], eax
pop ecx
mov ecx, dword [ebp - 0x69c]
mov dword [eax], edi
mov eax, dword [ebx + 0x18]
mov dword [eax + 4], ecx
mov eax, dword [ebx + 0x10]
and dword [ebp - 0x6ac], 0
mov dword [ebp - 0x6b4], eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x6b0], eax
lea eax, [ebp - 0x25c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
and dword [ebp - 0x68c], 0
lea eax, [ebp - 0x680]
mov dword [ebp - 0x688], 0x200
mov dword [ebp - 0x684], eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea edx, [ebp - 0x25c]
mov ebx, eax
lea ecx, [ebp - 0x68c]
call fcn.00405200
mov edx, str._se_crashdump_
mov ecx, eax
call fcn.00405200
push 0xa
mov edi, eax
lea eax, [ebp - 0x54]
push 0x20
push eax
push ebx
call fcn.00422793
add esp, 0x10
lea edx, [ebp - 0x54]
mov ecx, edi
call fcn.00405200
push 0x5f
pop edx
mov ecx, eax
call fcn.004050e0
mov edx, str..dmp
mov ecx, eax
call fcn.00405200
mov eax, dword [ebp - 0x68c]
xor edx, edx
mov ecx, dword [ebp - 0x684]
mov word [ecx + eax*2], dx
xor eax, eax
push eax
push 0x4000180
push 2
push eax
push eax
push 0xc0000000
push dword [ebp - 0x684]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40e99f
xor eax, eax
lea edx, [ebp - 0x26c]
mov ebx, 0x140
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x264], eax
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x26c], eax
call fcn.0040a812
test al, al
je 0x40e915
and dword [ebp - 0x274], 0
xor eax, eax
mov dword [ebp - 0x27c], 6
mov dword [ebp - 0x278], 1
mov dword [ebp - 0x270], 0x1db0
mov ecx, dword [ebp + eax - 0x27c]
cmp dword [ebp + eax - 0x26c], ecx
ja 0x40e910
jb 0x40e915
add eax, 4
cmp eax, 0x10
jl 0x40e8f6
mov ebx, 0x940
mov ecx, dword [ebp - 0x694]
lea eax, [ebp - 0x6b4]
push 0
xor edx, edx
push 0
cmp dword [ecx + 0x18], edx
cmove eax, edx
push eax
push ebx
push edi
push dword [ecx + 0xc]
push esi
call dword [sym.imp.dbghelp.dll_MiniDumpWriteDump]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call fcn.0041747f
pop ecx
mov dword [ebp - 0x694], eax
xor eax, eax
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x690]
push eax
push ebx
push dword [ebp - 0x694]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x690], ebx
jne 0x40e998
push ecx
mov ecx, dword [ebp - 0x6a0]
mov edx, str.crash.dmp
push ebx
push dword [ebp - 0x694]
call fcn.0041178a
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x680]
cmp dword [ebp - 0x684], eax
je 0x40e9b9
push dword [ebp - 0x684]
call fcn.0041aac0
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0042d04b
ret