Function at 0x405f3d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
or dword [ebp - 0x24], 0xffffffff
push ebx
push esi
mov esi, 0x200
push edi
xor ebx, ebx
push esi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], esi
call fcn.0040505d
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x405f8b
push esi
mov dword [ebp - 0x28], esi
call fcn.0040505d
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jne 0x405f92
push dword [ebp - 0xc]
call fcn.00405081
xor eax, eax
jmp 0x4061c1
mov eax, 0x4000
push eax
mov dword [ebp - 8], eax
call fcn.0040505d
mov edi, dword [sym.imp.ntdll.dll_ZwQuerySystemInformation]
push ebx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
push eax
push 0x10
call edi
mov esi, 0xc0000004
cmp eax, esi
jne 0x405fe6
push dword [ebp - 0x10]
call fcn.00405081
mov eax, dword [ebp - 8]
cmp eax, 0x1000000
ja 0x405f8b
add eax, eax
push eax
mov dword [ebp - 8], eax
call fcn.0040505d
push ebx
mov dword [ebp - 0x10], eax
push dword [ebp - 8]
push eax
push 0x10
call edi
jmp 0x405fb7
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], ebx
cmp dword [eax], ebx
jbe 0x406189
mov edi, dword [sym.imp.ntdll.dll_ZwQueryObject]
add eax, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 4], ebx
je 0x406011
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x24], 0xffffffff
je 0x406026
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
cmp eax, dword [ebp - 0x24]
jne 0x406154
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 4]
cmp eax, dword [ebp - 0x30]
je 0x406064
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ebx
je 0x406045
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x40606d
mov dword [ebp - 0x34], 1
jmp 0x406154
cmp dword [ebp - 0x34], ebx
jne 0x406154
push 2
push ebx
lea eax, [ebp - 4]
push ebx
push eax
mov eax, dword [ebp - 0x14]
push 0xffffffffffffffff
movzx eax, word [eax + 2]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x406154
cmp dword [ebp - 0x24], 0xffffffff
jne 0x4060f2
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0xc]
push 2
push dword [ebp - 4]
call edi
cmp eax, esi
jne 0x4060ce
mov eax, dword [ebp - 8]
push dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
call fcn.00405081
push dword [ebp - 0x20]
call fcn.0040505d
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push dword [ebp - 0x20]
push eax
jmp 0x4060a0
mov eax, dword [ebp + 0xc]
push dword [eax*4 + 0x41fe88]
mov eax, dword [ebp - 0xc]
push dword [eax + 4]
call fcn.00415020
pop ecx
test eax, eax
pop ecx
jne 0x406154
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
push 1
push dword [ebp - 4]
call edi
cmp eax, esi
jne 0x40612a
mov eax, dword [ebp - 8]
push dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
call fcn.00405081
push dword [ebp - 0x28]
call fcn.0040505d
lea ecx, [ebp - 8]
mov dword [ebp - 0x1c], eax
push ecx
push dword [ebp - 0x28]
push eax
jmp 0x4060fc
mov eax, dword [ebp - 0x1c]
cmp word [eax], bx
je 0x406154
push dword [ebp + 8]
push dword [eax + 4]
call fcn.00415020
pop ecx
test eax, eax
pop ecx
je 0x40616b
cmp dword [ebp - 4], ebx
je 0x406154
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], ebx
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x2c]
add dword [ebp - 0x14], 0x10
cmp ecx, dword [eax]
jb 0x406000
jmp 0x40617b
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
shl eax, 4
mov eax, dword [eax + ecx + 0xc]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x18], ebx
je 0x406189
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x406197
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], ebx
je 0x4061a4
push dword [ebp - 0x1c]
call fcn.00405081
cmp dword [ebp - 0xc], ebx
je 0x4061b1
push dword [ebp - 0xc]
call fcn.00405081
cmp dword [ebp - 0x10], ebx
je 0x4061be
push dword [ebp - 0x10]
call fcn.00405081
mov eax, dword [ebp - 0x38]
pop edi
pop esi
pop ebx
leave
ret 8