Function at 0x402371
Capabilities:
Get system information on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, 0x1094
call fcn.004047d0
sub esp, eax
lea eax, [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetSystemInfo]
call eax
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
sub esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4023ed
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.____Error_opening_dump_filepath:__S_n
call fcn.00401560
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004015f9
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
jmp 0x4025cf
mov dword [esp + 0xc], 0x1c
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
call eax
sub esp, 0x10
test eax, eax
jne 0x40243c
add dword [ebp - 0xc], 0x1000
jmp 0x4025cf
mov eax, dword [ebp - 0x48]
and eax, 0x1000
test eax, eax
je 0x402460
mov eax, dword [ebp - 0x44]
and eax, 0x100
test eax, eax
jne 0x402460
mov eax, dword [ebp - 0x40]
and eax, 0x1060000
test eax, eax
jne 0x40246b
mov eax, dword [ebp - 0x4c]
add dword [ebp - 0xc], eax
jmp 0x4025cf
mov eax, dword [ebp - 0xc]
mov edx, 0
mov dword [ebp - 0x1078], eax
mov dword [ebp - 0x1074], edx
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x1070], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x106c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x1068], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1064], eax
cmp dword [ebp + 0x10], 0
je 0x402500
cmp dword [ebp + 0x14], 0
je 0x402500
mov ecx, dword [ebp - 0x1078]
mov ebx, dword [ebp - 0x1074]
mov eax, dword [ebp + 0x10]
mov edx, 0
cmp ebx, edx
jb 0x4024f4
cmp ebx, edx
ja 0x4024cf
cmp ecx, eax
jb 0x4024f4
mov eax, dword [ebp - 0x1078]
mov edx, dword [ebp - 0x1074]
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
add ecx, ebx
mov ebx, 0
cmp edx, ebx
jb 0x402500
cmp edx, ebx
ja 0x4024f4
cmp eax, ecx
jbe 0x402500
add dword [ebp - 0xc], 0x1000
jmp 0x4025cf
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x5c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x18
lea eax, [ebp - 0x1078]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0xc]
add eax, edx
mov dword [ebp - 0x18], eax
jmp 0x4025c3
lea eax, [ebp - 0x60]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x1000
lea eax, [ebp - 0x1060]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call eax
sub esp, 0x14
test eax, eax
je 0x40257f
mov eax, dword [ebp - 0x60]
cmp eax, 0x1000
je 0x40258b
mov dword [esp], str.____Unable_to_read_a_full_page__
call fcn.00401560
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x5c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1060]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
add dword [ebp - 0xc], 0x1000
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jb 0x402541
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0xc]
ja 0x402406
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret