Function at 0x406540
Capabilities:
Create process memory minidump

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x49b0c8]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x40657f
xor al, al
jmp 0x406798
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x6c], 0x11005
cmp dword [ebp + 0x10], 0
je 0x4066c1
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 0xb8]
xor eax, eax
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], eax
push 0x1c
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x4066c1
cmp dword [ebp - 0x2c], 0x1000
jne 0x4066c1
mov dword [ebp - 0xa8], 0x100
mov dword [ebp - 0xa4], 0
mov eax, dword [ebp - 0x4c]
sub eax, 0x80
mov ecx, dword [ebp - 0x48]
sbb ecx, 0
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], ecx
mov eax, dword [ebp - 0x3c]
cdq
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], edx
lea edx, [ebp - 0x7c]
push edx
lea eax, [ebp - 0x84]
push eax
call fcn.00407b40
add esp, 8
mov ecx, dword [eax]
mov dword [ebp - 0x64], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x3c]
cdq
xor ecx, ecx
add eax, dword [ebp - 0x30]
adc edx, ecx
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], edx
mov edx, dword [ebp - 0x4c]
add edx, 0x80
mov eax, dword [ebp - 0x48]
adc eax, 0
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x90], eax
lea ecx, [ebp - 0x8c]
push ecx
lea edx, [ebp - 0x94]
push edx
call fcn.00407b90
add esp, 8
mov ecx, dword [eax]
mov dword [ebp - 0x74], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x70], edx
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x70]
sbb ecx, dword [ebp - 0x60]
mov dword [ebp - 0x68], eax
call fcn.00405a20
add eax, 0x60
mov ecx, eax
call fcn.004070f0
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x64]
mov dword [edx], eax
mov ecx, dword [ebp - 0x60]
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x68]
mov dword [edx + 8], eax
lea ecx, [ebp - 0xc]
call fcn.004067b0
lea ecx, [ebp - 0x98]
push ecx
call fcn.00405a20
add eax, 0x60
mov ecx, eax
call fcn.00407170
mov edx, dword [eax]
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x9c]
push eax
call fcn.00405a20
add eax, 0x60
mov ecx, eax
call fcn.00407110
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0xc]
call fcn.00407030
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx]
or ecx, dword [eax + 4]
jne 0x406728
push 0
lea edx, [ebp - 0xa0]
push edx
lea ecx, [ebp - 0xc]
call fcn.00407080
mov dword [ebp - 0x14], 0x4067e0
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x10], 0
je 0x406743
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x58], ecx
jmp 0x40674a
mov dword [ebp - 0x58], 0
lea edx, [ebp - 0x14]
push edx
push 0
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x6c]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.dbghelp.dll_MiniDumpWriteDump]
cmp eax, 1
jne 0x40677e
mov dword [ebp - 0x5c], 1
jmp 0x406785
mov dword [ebp - 0x5c], 0
mov al, byte [ebp - 0x5c]
mov byte [ebp - 0x3d], al
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x3d]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456b9f
mov esp, ebp
pop ebp
ret