Function at 0x406b9c
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.0040214f
mov edi, dword [ebx + 0x10]
and dword [ebp - 8], 0
test edi, edi
je 0x406c3b
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 0x406c17
inc dword [ebp - 4]
inc dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
movzx ecx, word [ecx*2 + 0x46e410]
test cx, cx
jne 0x406c0f
cmp dword [ebp - 4], 0
je 0x406cad
inc dword [ebp - 8]
add eax, 2
cmp dword [ebp - 8], edi
jb 0x406c01
or eax, 0xffffffff
xor edi, edi
lea ecx, [ebx + 0xc]
cmp eax, 0xffffffff
jne 0x406c4a
or eax, eax
call fcn.004021cd
push 0x46e410
lea ecx, [ebx + 0xc]
call fcn.00406e49
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 0x406ce2
dec eax
jne 0x406d2d
mov eax, dword [ebx + 4]
mov byte [ebx + 0x1d], 1
mov byte [ebx + 0x1f], 1
mov byte [ebx + 0x21], 1
test eax, eax
jne 0x406cbe
cmp byte [ebp - 0x4a], 1
jne 0x406cb2
mov word [ebx + 0x22], 0x101
jmp 0x406d2d
mov eax, dword [ebp - 8]
jmp 0x406c3e
mov byte [ebx + 0x23], 1
mov word [ebx + 0x24], 0x101
jmp 0x406d2d
cmp eax, 1
jne 0x406d2d
mov byte [ebx + 0x23], al
mov byte [ebx + 0x25], al
cmp byte [ebp - 0x4a], al
jne 0x406cd6
mov word [ebx + 0x26], 0x101
jmp 0x406d2d
mov byte [ebx + 0x27], 1
mov word [ebx + 0x28], 0x101
jmp 0x406d2d
mov eax, dword [ebx + 4]
test eax, eax
jne 0x406cf1
mov word [ebx + 0x1c], 0x101
jmp 0x406d22
cmp eax, 1
jne 0x406d01
mov byte [ebx + 0x1d], al
mov word [ebx + 0x1e], 0x101
jmp 0x406d22
cmp eax, 2
jne 0x406d22
cmp byte [ebp - 0x4a], 1
mov byte [ebx + 0x1d], 1
mov byte [ebx + 0x1f], 1
mov byte [ebx + 0x21], 1
jne 0x406d1e
mov byte [ebx + 0x1e], 1
jmp 0x406d22
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.00406deb
test al, al
je 0x406d6d
and dword [ebp - 4], 0
call fcn.00406deb
mov esi, dword [ebp - 0x1c]
test al, al
jne 0x406d56
mov esi, 0x416667
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 4], 1
jne 0x406d6d
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 0x406dc8
and dword [ebp - 0x18], eax
and dword [ebp - 0x10], eax
lea esi, [ebp - 0x18]
call fcn.00406e1a
test al, al
je 0x406db1
call fcn.00406e1a
test al, al
mov eax, dword [ebp - 0x10]
jne 0x406da9
mov eax, 0x42c7d2
lea ecx, [ebp - 0x48]
push ecx
call eax
jmp 0x406dbb
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x18], 0
je 0x406dd2
push dword [ebp - 0x18]
call edi
jmp 0x406dd2
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 0x406de5
push dword [ebp - 0x24]
call edi
pop edi
mov eax, ebx
pop esi
leave
ret