Function at 0x40df90
Capabilities:
Check for peb beingdebugged flag
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43a792
mov eax, dword fs:[0]
push eax
sub esp, 0x3f0
mov eax, dword [0x448e28]
xor eax, esp
mov dword [esp + 0x3e8], eax
push ebx
push esi
push edi
mov eax, dword [0x448e28]
xor eax, esp
push eax
lea eax, [esp + 0x400]
mov dword fs:[0], eax
xor edi, edi
xor eax, eax
mov word [esp + 0x20], ax
mov eax, 0x44e3c8
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40dff0
sub eax, edx
sar eax, 1
push eax
mov eax, 0x44e3c8
lea esi, [esp + 0x20]
call fcn.0040c490
mov dword [esp + 0x408], edi
mov eax, dword [esp + 0x30]
xor edi, edi
mov ecx, esi
call fcn.0040c8d0
test eax, eax
setne bl
mov dword [esp + 0x408], 0xffffffff
cmp dword [esp + 0x34], 8
jb 0x40e046
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00412e16
add esp, 4
test bl, bl
jne 0x40e559
xor edx, edx
xor edi, edi
push 7
mov eax, 0x4405b8
lea esi, [esp + 0xe4]
mov dword [esp + 0xfc], 7
mov dword [esp + 0xf8], edi
mov word [esp + 0xe8], dx
call fcn.0040c490
lea eax, [esp + 0xfc]
mov esi, 1
mov dword [esp + 0x408], esi
push eax
mov dword [esp + 0x100], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ebx, dword [esp + 0x194]
mov al, byte [esp + 0x196]
and ebx, 0x200
cmp al, 3
je 0x40e0c4
mov dword [esp + 0x18], edi
cmp al, 2
jne 0x40e0c8
mov dword [esp + 0x18], esi
push 0x256
lea edx, [esp + 0x1a2]
xor ecx, ecx
push edi
push edx
mov word [esp + 0x1a8], cx
call fcn.004221b0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push esi
push edi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
mov dword [esp + 0x28], 0x258
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e149
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1a0]
push edx
push edi
push edi
push 0x440624
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40e134
cmp dword [esp + 0x14], esi
jae 0x40e13e
xor ecx, ecx
mov word [esp + 0x19c], cx
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x44e5d0]
add eax, 0xfffffff9
cmp eax, 6
ja case.default.0x40e15a
jmp dword [eax*4 + 0x40e584]
lea eax, [esp + 0xe0]
push eax
mov eax, str.2000
call fcn.0040c2d0
jmp 0x40e2c4
lea ecx, [esp + 0xe0]
push ecx
mov eax, 0x440648
call fcn.0040c2d0
mov eax, str._Home
cmp ebx, edi
jne 0x40e198
mov eax, str._Professional
lea edx, [esp + 0xe0]
push edx
call fcn.0040c2d0
jmp 0x40e2c4
lea eax, [esp + 0xe0]
push eax
mov eax, str.2003
call fcn.0040c2d0
jmp 0x40e2c4
lea ecx, [esp + 0xe0]
push ecx
mov eax, str.Vista
call fcn.0040c2d0
jmp 0x40e2c4
lea edx, [esp + 0xe0]
push edx
mov eax, str.2008
call fcn.0040c2d0
jmp 0x40e2c4
lea eax, [esp + 0xe0]
push eax
mov eax, 0x44069c
call fcn.0040c2d0
jmp 0x40e2c4
lea ecx, [esp + 0x54]
push ecx
call fcn.0040e9e0
mov byte [esp + 0x408], 2
mov edx, dword [0x44e3c0]
mov eax, dword [0x44e3bc]
push edx
push ecx
push 0x43fc4c
push ecx
push eax
lea ecx, [esp + 0x70]
push ecx
call fcn.0040e850
add esp, 4
push eax
call fcn.00410f60
add esp, 0xc
push eax
call fcn.0040e850
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x54]
call fcn.0040eb10
push edi
push eax
or eax, 0xffffffff
lea esi, [esp + 0xe8]
mov byte [esp + 0x410], 3
call fcn.0040c630
cmp dword [esp + 0x34], 8
jb 0x40e282
mov edx, dword [esp + 0x20]
push edx
call fcn.00412e16
add esp, 4
xor eax, eax
lea ecx, [esp + 0xa8]
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], edi
mov word [esp + 0x20], ax
mov byte [esp + 0x408], 1
call fcn.0040ea80
lea ecx, [esp + 0xa8]
push ecx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.00437fec
add esp, 4
cmp dword [esp + 0x18], edi
je 0x40e2dd
push 7
mov eax, 0x4406a0
lea ecx, [esp + 0xe4]
call fcn.0040c300
mov edx, dword [0x44e3bc]
shl edx, 8
or edx, dword [0x44e3c0]
shl edx, 8
or edx, dword [0x44e3c4]
cmp edx, 0x60000
jl 0x40e414
cmp ebx, edi
je 0x40e31d
push 5
mov eax, str._Home
lea ecx, [esp + 0xe4]
call fcn.0040c300
jmp 0x40e414
lea eax, [esp + 0x19c]
push str.Standard
push eax
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e34e
push 9
mov eax, str._Standard
lea ecx, [esp + 0xe4]
call fcn.0040c300
jmp 0x40e414
lea ecx, [esp + 0x19c]
push str.Professional
push ecx
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e379
lea edx, [esp + 0xe0]
push edx
mov eax, str._Professional
jmp 0x40e40f
lea eax, [esp + 0x19c]
push str.Business
push eax
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e399
mov eax, str._Business
jmp 0x40e407
lea edx, [esp + 0x19c]
push str.Enterprise
push edx
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e3c1
lea eax, [esp + 0xe0]
push eax
mov eax, str._Enterprise
jmp 0x40e40f
lea ecx, [esp + 0x19c]
push str.Datacenter
push ecx
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e3e9
lea edx, [esp + 0xe0]
push edx
mov eax, str._Datacenter
jmp 0x40e40f
lea eax, [esp + 0x19c]
push str.Ultimate
push eax
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e414
mov eax, str._Ultimate
lea ecx, [esp + 0xe0]
push ecx
call fcn.0040c2d0
push 0x58
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x40e429
push 8
mov eax, str._Starter
jmp 0x40e449
lea edx, [esp + 0x19c]
push 0x4407b8
push edx
call fcn.0041f78a
add esp, 8
test eax, eax
je 0x40e455
push 6
mov eax, str._Basic
lea ecx, [esp + 0xe4]
call fcn.0040c300
call fcn.0040df40
test eax, eax
je 0x40e471
push 4
mov eax, str._X64
lea ecx, [esp + 0xe4]
call fcn.0040c300
cmp dword [0x44e3c4], edi
jle 0x40e518
lea eax, [esp + 0x54]
push eax
call fcn.0040e9e0
mov byte [esp + 0x408], 4
mov ecx, dword [0x44e3c4]
push ecx
push ecx
lea edx, [esp + 0x64]
push 0x4407e0
push edx
call fcn.00410f60
add esp, 0xc
push eax
call fcn.0040e850
lea ecx, [esp + 0x38]
lea eax, [esp + 0x54]
call fcn.0040eb10
push edi
push eax
or eax, 0xffffffff
lea esi, [esp + 0xe8]
mov byte [esp + 0x410], 5
call fcn.0040c630
cmp dword [esp + 0x50], 8
jb 0x40e4e9
mov eax, dword [esp + 0x3c]
push eax
call fcn.00412e16
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0x408], 1
call fcn.0040ea80
lea ecx, [esp + 0xa8]
push ecx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.00437fec
add esp, 4
mov eax, dword [esp + 0xe4]
mov esi, 8
cmp dword [esp + 0xf8], esi
jae 0x40e534
lea eax, [esp + 0xe4]
push eax
push 0x44e3c8
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [esp + 0xf8], esi
jb 0x40e559
mov edx, dword [esp + 0xe4]
push edx
call fcn.00412e16
add esp, 4
mov eax, 0x44e3c8
mov ecx, dword [esp + 0x400]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3e8]
xor ecx, esp
call fcn.0041f350
mov esp, ebp
pop ebp
ret