Function at 0x406bc4
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
push esi
push edi
lea ecx, [ebx + 0xc]
call fcn.004019d1
lea eax, [ebp - 0x164]
push eax
mov byte [ebx + 0x2e], 0
mov dword [ebp - 0x164], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x160]
mov dword [ebx], eax
mov eax, dword [ebp - 0x15c]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x158]
mov dword [ebx + 8], eax
lea eax, [ebp - 0x150]
push eax
lea eax, [ebx + 0xc]
call fcn.00402172
mov edi, dword [ebx + 0x10]
and dword [ebp - 8], 0
test edi, edi
je 0x406c63
mov eax, dword [ebx + 0xc]
and dword [ebp - 0xc], 0
and dword [ebp - 4], 0
movzx edx, word [eax]
push 0x20
pop ecx
cmp dx, cx
jne 0x406c3f
inc dword [ebp - 4]
inc dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
movzx ecx, word [ecx*2 + 0x46e420]
test cx, cx
jne 0x406c37
cmp dword [ebp - 4], 0
je 0x406cd5
inc dword [ebp - 8]
add eax, 2
cmp dword [ebp - 8], edi
jb 0x406c29
or eax, 0xffffffff
xor edi, edi
lea ecx, [ebx + 0xc]
cmp eax, 0xffffffff
jne 0x406c72
or eax, eax
call fcn.004021f0
push 0x46e420
lea ecx, [ebx + 0xc]
call fcn.00406e71
mov eax, dword [ebx]
sub eax, 5
mov byte [ebx + 0x2a], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov word [ebx + 0x28], 0
je 0x406d0a
dec eax
jne 0x406d55
mov eax, dword [ebx + 4]
mov byte [ebx + 0x1d], 1
mov byte [ebx + 0x1f], 1
mov byte [ebx + 0x21], 1
test eax, eax
jne 0x406ce6
cmp byte [ebp - 0x4a], 1
jne 0x406cda
mov word [ebx + 0x22], 0x101
jmp 0x406d55
mov eax, dword [ebp - 8]
jmp 0x406c66
mov byte [ebx + 0x23], 1
mov word [ebx + 0x24], 0x101
jmp 0x406d55
cmp eax, 1
jne 0x406d55
mov byte [ebx + 0x23], al
mov byte [ebx + 0x25], al
cmp byte [ebp - 0x4a], al
jne 0x406cfe
mov word [ebx + 0x26], 0x101
jmp 0x406d55
mov byte [ebx + 0x27], 1
mov word [ebx + 0x28], 0x101
jmp 0x406d55
mov eax, dword [ebx + 4]
test eax, eax
jne 0x406d19
mov word [ebx + 0x1c], 0x101
jmp 0x406d4a
cmp eax, 1
jne 0x406d29
mov byte [ebx + 0x1d], al
mov word [ebx + 0x1e], 0x101
jmp 0x406d4a
cmp eax, 2
jne 0x406d4a
cmp byte [ebp - 0x4a], 1
mov byte [ebx + 0x1d], 1
mov byte [ebx + 0x1f], 1
mov byte [ebx + 0x21], 1
jne 0x406d46
mov byte [ebx + 0x1e], 1
jmp 0x406d4a
mov byte [ebx + 0x20], 1
mov al, byte [ebp - 0x4c]
shr al, 6
and al, 1
mov byte [ebx + 0x2e], al
and dword [ebp - 0x24], 0
and dword [ebp - 0x1c], 0
lea esi, [ebp - 0x24]
call fcn.00406e13
test al, al
je 0x406d95
and dword [ebp - 4], 0
call fcn.00406e13
mov esi, dword [ebp - 0x1c]
test al, al
jne 0x406d7e
mov esi, 0x405bd1
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 4], 1
jne 0x406d95
mov byte [ebx + 0x2a], 1
and dword [ebp - 0x48], 0
push 8
xor eax, eax
pop ecx
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [ebx + 0x2a], al
je 0x406df0
and dword [ebp - 0x18], eax
and dword [ebp - 0x10], eax
lea esi, [ebp - 0x18]
call fcn.00406e42
test al, al
je 0x406dd9
call fcn.00406e42
test al, al
mov eax, dword [ebp - 0x10]
jne 0x406dd1
mov eax, 0x406edc
lea ecx, [ebp - 0x48]
push ecx
call eax
jmp 0x406de3
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x18], 0
je 0x406dfa
push dword [ebp - 0x18]
call edi
jmp 0x406dfa
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x24], 0
mov ax, word [ebp - 0x48]
mov word [ebx + 0x2c], ax
je 0x406e0d
push dword [ebp - 0x24]
call edi
pop edi
mov eax, ebx
pop esi
leave
ret