Function at 0x404020
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, dword [esp + 0x68]
push edi
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x14], eax
xor eax, eax
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x44]
xor ecx, ecx
add eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00406b64
mov ecx, dword [esp + 0x48]
lea edx, [ecx + ecx + 2]
push edx
push 0
push eax
mov dword [esp + 0x20], eax
call fcn.00407e80
mov eax, dword [esp + 0x58]
add esp, 0x10
cmp eax, dword [esp + 0x4c]
mov ebp, eax
jae 0x404265
mov ecx, dword [esp + 0x14]
push 0x1c
lea eax, [esp + 0x28]
push eax
push ebp
push ecx
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp dword [esp + 0x3c], 0x20000
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
lea ebp, [edx + eax]
mov dword [esp + 0x20], ebp
jne 0x40425b
cmp dword [esp + 0x2c], 4
jne 0x40425b
cmp eax, ebp
mov edi, eax
mov dword [esp + 0x18], eax
jae 0x40425b
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push eax
mov eax, dword [esp + 0x1c]
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
mov eax, dword [esp + 0x44]
je 0x40424d
xor ebx, ebx
test eax, eax
jle 0x40424d
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 4
mov ecx, esi
mov edx, edi
jb 0x404179
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x40417d
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x404165
test eax, eax
je 0x4041da
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x4041cc
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4041da
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x4041cc
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4041da
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x4041cc
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x4041da
movzx esi, byte [edx]
movzx ecx, byte [ecx]
sub esi, ecx
je 0x4041da
test esi, esi
mov eax, 1
jg 0x4041dc
or eax, 0xffffffff
jmp 0x4041dc
xor eax, eax
test eax, eax
jne 0x40422f
mov word [edi], ax
mov edx, dword [esp + 0x44]
test edx, edx
jle 0x404205
mov ecx, edi
lea ecx, [ecx]
cmp word [ecx], 0x5c
je 0x404202
add eax, 1
sub ecx, 2
cmp eax, edx
jl 0x4041f0
jmp 0x404205
sub eax, 1
mov esi, dword [esp + 0x68]
mov edx, ebx
sub edx, eax
mov eax, dword [esp + 0x10]
lea ecx, [eax + edx*2]
push ecx
push 0x41ce8c
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov eax, esi
call fcn.00403ff0
test eax, eax
je 0x404271
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x6c]
add ebx, 1
add edi, 2
cmp ebx, eax
jl 0x404155
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
add edi, eax
cmp edi, ebp
mov dword [esp + 0x18], edi
jb 0x404124
cmp ebp, dword [esp + 0x4c]
jb 0x4040d3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x54
ret 8