Function at 0x4010f0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x64], edx
mov edi, ecx
push eax
mov dword [ebp - 0x6c], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [ebp - 0x44]
lea eax, [ebp - 0xc]
push 0x403148
push str.scan_results.txt
push eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0xc], 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
test eax, eax
jne 0x40131a
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40131a
cmp esi, dword [ebp - 0x40]
jae 0x401300
push ebx
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp eax, 0x1c
jne 0x4012fc
cmp dword [ebp - 0x18], 0x1000
jne 0x4012ed
mov eax, dword [ebp - 0x14]
cmp eax, 4
je 0x40118a
cmp eax, 2
jne 0x4012ed
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x5c], ebx
test ebx, ebx
je 0x4012ed
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x1c]
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4012e3
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4012e3
mov esi, dword [ebp - 0x64]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x60], eax
mov edi, dword [esi]
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4011d7
sub edi, ecx
mov dword [ebp - 0x58], 0
mov eax, edx
sub eax, edi
je 0x4012cd
mov eax, dword [ebp - 0x54]
sub eax, dword [ebp - 0x5c]
mov dword [ebp - 0x68], eax
nop word [eax + eax]
mov eax, dword [esi]
mov edx, ebx
mov esi, edi
sub esi, 4
jb 0x401221
nop dword [eax + eax]
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x401226
add edx, 4
add eax, 4
sub esi, 4
jae 0x401210
cmp esi, 0xfffffffc
je 0x401257
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x4012af
cmp esi, 0xfffffffd
je 0x401257
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x4012af
cmp esi, 0xfffffffe
je 0x401257
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x4012af
cmp esi, 0xffffffff
je 0x401257
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
jne 0x4012af
mov eax, dword [ebp - 0x68]
mov esi, dword [ebp - 0x50]
add eax, ebx
push eax
push dword [esi]
push str.Found_string___s__at_address:_0x_p_n
push dword [ebp - 0xc]
call fcn.00401020
push ebx
push str.Content_around_address:__.20s_n
push dword [ebp - 0xc]
call fcn.00401020
push dword [ebp - 0x1c]
push str.Region_size:__zu_bytes_n
push dword [ebp - 0xc]
call fcn.00401020
push dword [ebp - 0x14]
push str.Protection:__ld_n
push dword [ebp - 0xc]
call fcn.00401020
push 0x4031dc
push dword [ebp - 0xc]
call fcn.00401020
add esp, 0x3c
jmp 0x4012b2
mov esi, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x58]
inc ebx
mov eax, dword [ebp - 8]
inc ecx
sub eax, edi
mov dword [ebp - 0x58], ecx
cmp ecx, eax
jb 0x401200
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x5c]
add esi, 4
sub dword [ebp - 0x60], 1
mov dword [ebp - 0x50], esi
jne 0x4011d2
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x6c]
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
add esi, dword [ebp - 0x1c]
mov dword [ebp - 0x54], esi
cmp esi, dword [ebp - 0x40]
jb 0x401155
mov eax, dword [ebp - 0xc]
pop ebx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016de
mov esp, ebp
pop ebp
ret
push str.scan_results.txt
push str.Failed_to_open_output_file:__s_n
call fcn.00401050
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
call fcn.004016de
mov esp, ebp
pop ebp
ret