Function at 0x668667
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xf8
push esi
push edi
mov esi, eax
mov byte [ebp + 0x77], 0
call fcn.00668630
mov edi, 0x9c
push edi
lea eax, [ebp - 0x30]
push 0
push eax
call fcn.004bee40
add esp, 0xc
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push eax
call edi
test eax, eax
jne 0x6686c2
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x30], 0x94
call edi
test eax, eax
jne 0x6686c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x668902
mov byte [ebp + 0x77], 1
mov eax, dword [ebp - 0x2c]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 8], eax
movzx eax, word [ebp + 0x68]
mov dword [esi + 0xc], eax
movzx eax, word [ebp + 0x64]
mov dword [esi + 0x20], eax
movzx eax, word [ebp - 0x24]
mov dword [esi + 0x14], eax
push ebx
lea eax, [ebp - 0x1c]
push eax
lea edi, [esi + 0x24]
xor ebx, ebx
mov eax, 0x80
call fcn.0040d718
mov eax, dword [ebp - 0x20]
sub eax, ebx
pop ecx
je 0x668888
dec eax
je 0x668846
dec eax
jne 0x66888e
mov eax, dword [ebp - 0x2c]
push 2
pop ebx
mov dword [esi], ebx
cmp eax, 3
jne 0x668735
cmp dword [ebp - 0x28], 0x33
jne 0x6687b1
mov dword [esi + 0x1c], 5
jmp 0x6687b1
cmp eax, 4
jne 0x668743
mov dword [esi + 0x1c], 6
jmp 0x6687b1
cmp eax, 5
jne 0x668774
cmp dword [ebp - 0x28], 0
jne 0x668757
mov dword [esi + 0x1c], 7
jmp 0x6687b1
cmp dword [ebp - 0x28], 1
jne 0x668766
mov dword [esi + 0x1c], 8
jmp 0x6687b1
cmp dword [ebp - 0x28], ebx
jne 0x6687b1
mov dword [esi + 0x1c], 9
jmp 0x6687b1
cmp eax, 6
jne 0x6687a5
cmp dword [ebp - 0x28], 0
jne 0x668788
mov dword [esi + 0x1c], 0xa
jmp 0x6687b1
cmp dword [ebp - 0x28], 1
jne 0x668797
mov dword [esi + 0x1c], 0xb
jmp 0x6687b1
cmp dword [ebp - 0x28], ebx
jb 0x6687b1
mov dword [esi + 0x1c], 0xc
jmp 0x6687b1
cmp eax, 0xa
jne 0x6687b1
mov dword [esi + 0x1c], 0xd
cmp byte [ebp + 0x77], 0
je 0x6687ca
cmp byte [ebp + 0x6a], 1
jne 0x6687c4
mov dword [esi + 0x10], 1
cmp byte [ebp + 0x6a], 3
jmp 0x66883f
call fcn.004b7bf7
neg eax
sbb eax, eax
and eax, 0x100
lea ecx, [ebp + 0x70]
push ecx
inc eax
push eax
xor edi, edi
push edi
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.WSOCK32.dll_bind
mov byte [ebp - 0x80], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp - 0x80]
push eax
push edi
push edi
push str.ProductType
push dword [ebp + 0x70]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0x70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x80]
push eax
push str.WINNT
call edi
test eax, eax
jne 0x668832
mov dword [esi + 0x10], 1
lea eax, [ebp - 0x80]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x66888e
mov dword [esi + 0x10], ebx
jmp 0x66888e
push 2
pop ebx
xor eax, eax
push 4
inc eax
pop ecx
mov dword [esi], eax
cmp dword [ebp - 0x2c], ecx
jbe 0x668859
mov dword [esi + 0x1c], ebx
jne 0x668883
mov edx, dword [ebp - 0x28]
cmp edx, 0x5a
jb 0x668868
mov dword [esi + 0x1c], ecx
jmp 0x66888e
dec edx
cmp edx, 0x58
ja 0x668883
cmp dword [esi + 0x14], 0x8ae
mov dword [esi + 0x1c], ebx
jne 0x66888e
mov dword [esi + 0x1c], 3
jmp 0x66888e
mov dword [esi + 0x1c], eax
jmp 0x66888e
mov dword [esi], 3
call fcn.004b7bf7
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
neg eax
sbb eax, eax
and eax, 0x20
add eax, 0x20
push 0x57
mov dword [esi + 0x18], eax
call edi
pop ebx
test eax, eax
je 0x6688b6
or dword [esi + 0xc], 0x80000000
push 0x56
call edi
test eax, eax
je 0x6688c5
or dword [esi + 0xc], 0x40000000
push str.GetProductInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x668900
lea ecx, [ebp + 0x70]
push ecx
movzx ecx, word [ebp + 0x66]
push ecx
movzx ecx, word [ebp + 0x64]
push ecx
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call eax
test eax, eax
je 0x668900
mov eax, dword [ebp + 0x70]
mov dword [esi + 0x10], eax
xor eax, eax
pop edi
pop esi
add ebp, 0x78
leave
ret