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

Disassembly:
push 0xffffffffffffffff
push 0x46553a
mov eax, dword fs:[0]
push eax
sub esp, 0x388
mov eax, dword [0x4792b0]
xor eax, esp
mov dword [esp + 0x380], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4792b0]
xor eax, esp
push eax
lea eax, [esp + 0x39c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3ac]
xor ebx, ebx
lea esi, [ebp + 0x1c]
mov dword [ebp], ebx
mov dword [ebp + 4], ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], ebx
call fcn.00405de0
inc dword [0x47bb40]
mov edi, vtable.HString.0
xor eax, eax
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], ebx
mov dword [esp + 0x1c4], edi
mov dword [esp + 0x1e0], 7
mov dword [esp + 0x1dc], ebx
mov word [esp + 0x1cc], ax
push 0x11c
lea ecx, [esp + 0x228]
push ebx
push ecx
mov dword [esp + 0x3b0], ebx
call fcn.0044e9d0
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea edx, [esp + 0x224]
push edx
mov dword [esp + 0x228], 0x11c
call esi
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x40684a
lea eax, [esp + 0x224]
push eax
mov dword [esp + 0x228], 0x114
call esi
test eax, eax
jne 0x40684a
dec dword [0x47bb40]
cmp dword [esp + 0x1e0], 8
mov dword [esp + 0x1c4], edi
jb 0x406842
mov ecx, dword [esp + 0x1cc]
push ecx
call fcn.004493e1
add esp, 4
or eax, 0xffffffff
jmp 0x4071d9
cmp dword [esp + 0x228], 6
jne 0x406962
cmp dword [esp + 0x22c], 2
jne 0x406962
mov eax, dword fs:[0x18]
cmp eax, ebx
je 0x406962
mov esi, dword [eax + 0x30]
cmp esi, ebx
je 0x406962
mov edx, dword [esi + 0xa4]
mov dword [esp + 0x228], edx
mov eax, dword [esi + 0xa8]
mov dword [esp + 0x22c], eax
movzx ecx, word [esi + 0xac]
mov dword [esp + 0x230], ecx
movzx eax, word [esi + 0xae]
cmp ax, bx
je 0x406955
movzx edi, ax
lea edx, [esp + 0x1e4]
push edx
mov ecx, 0x472cb4
shr edi, 8
call fcn.00405560
push edi
lea edi, [esp + 0x1a8]
mov byte [esp + 0x3a8], 1
call fcn.004052f0
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x1b0]
push eax
lea ecx, [esp + 0x1f4]
mov byte [esp + 0x3b0], 2
call fcn.00405e80
mov ecx, edi
call fcn.00405800
cmp dword [esp + 0x200], 8
mov ecx, dword [esp + 0x1ec]
jae 0x406922
lea ecx, [esp + 0x1ec]
lea edx, [esp + 0x238]
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x406930
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x3a4], 0
call fcn.00405800
mov ecx, dword [esi + 0xb0]
mov dword [esp + 0x234], ecx
mov edx, dword [esp + 0x228]
mov ecx, dword [esp + 0x230]
mov eax, dword [esp + 0x22c]
mov dword [ebp + 0xc], edx
lea edx, [esp + 0x184]
mov dword [ebp + 0x14], ecx
push edx
mov ecx, 0x472acc
mov dword [ebp + 0x10], eax
call fcn.00405560
lea eax, [esp + 0x44]
push eax
mov ecx, 0x472acc
mov byte [esp + 0x3a8], 3
call fcn.00405560
mov byte [esp + 0x3a4], 4
mov ecx, dword [ebp + 0x14]
push ecx
lea edi, [esp + 0xc8]
call fcn.004052f0
mov esi, eax
mov byte [esp + 0x3a4], 5
mov edx, dword [ebp + 0x10]
push edx
lea edi, [esp + 0x108]
call fcn.004052f0
mov ebx, eax
mov byte [esp + 0x3a4], 6
mov eax, dword [ebp + 0xc]
push eax
lea edi, [esp + 0x128]
call fcn.004052f0
lea ecx, [esp + 0x44]
push ecx
mov ecx, eax
lea edi, [esp + 0x148]
mov byte [esp + 0x3a8], 7
call fcn.00405c50
add esp, 4
push ebx
mov ecx, eax
lea edi, [esp + 0x168]
mov byte [esp + 0x3a8], 8
call fcn.00405c50
add esp, 4
lea edx, [esp + 0x184]
push edx
mov ecx, eax
lea edi, [esp + 0xa8]
mov byte [esp + 0x3a8], 9
call fcn.00405c50
add esp, 4
push esi
mov ecx, eax
lea edi, [esp + 0xe8]
mov byte [esp + 0x3a8], 0xa
call fcn.00405c50
add esp, 4
push 0xffffffffffffffff
push 0
add eax, 4
push eax
lea ecx, [ebp + 0x1c]
mov byte [esp + 0x3b0], 0xb
call fcn.004036c0
dec dword [0x47bb40]
cmp dword [esp + 0x100], 8
mov dword [esp + 0xe4], vtable.HString.0
jb 0x406aab
mov eax, dword [esp + 0xec]
push eax
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor esi, esi
xor ecx, ecx
mov ebx, 8
mov edi, 7
mov dword [esp + 0x100], edi
mov dword [esp + 0xfc], esi
mov word [esp + 0xec], cx
mov dword [esp + 0xa4], vtable.HString.0
cmp dword [esp + 0xc0], ebx
jb 0x406af9
mov edx, dword [esp + 0xac]
push edx
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor eax, eax
mov dword [esp + 0xc0], edi
mov dword [esp + 0xbc], esi
mov word [esp + 0xac], ax
mov dword [esp + method.HString.virtual_0], vtable.HString.0
cmp dword [esp + 0x180], ebx
jb 0x406b3b
mov ecx, dword [esp + 0x16c]
push ecx
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor edx, edx
mov dword [esp + 0x180], edi
mov dword [esp + 0x17c], esi
mov word [esp + 0x16c], dx
mov dword [esp + method.HString.virtual_0], vtable.HString.0
cmp dword [esp + 0x160], ebx
jb 0x406b7d
mov eax, dword [esp + 0x14c]
push eax
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor ecx, ecx
mov dword [esp + 0x160], edi
mov dword [esp + 0x15c], esi
mov word [esp + 0x14c], cx
mov dword [esp + method.HString.virtual_0], vtable.HString.0
cmp dword [esp + 0x140], ebx
jb 0x406bbf
mov edx, dword [esp + 0x12c]
push edx
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor eax, eax
mov dword [esp + 0x140], edi
mov dword [esp + 0x13c], esi
mov word [esp + 0x12c], ax
mov dword [esp + method.HString.virtual_0], vtable.HString.0
cmp dword [esp + 0x120], ebx
jb 0x406c01
mov ecx, dword [esp + 0x10c]
push ecx
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor edx, edx
mov dword [esp + 0x120], edi
mov dword [esp + 0x11c], esi
mov word [esp + 0x10c], dx
mov dword [esp + 0xc4], vtable.HString.0
cmp dword [esp + 0xe0], ebx
jb 0x406c43
mov eax, dword [esp + 0xcc]
push eax
call fcn.004493e1
add esp, 4
dec dword [0x47bb40]
xor ecx, ecx
mov dword [esp + 0xe0], edi
mov dword [esp + 0xdc], esi
mov word [esp + 0xcc], cx
mov dword [esp + 0x44], vtable.HString.0
cmp dword [esp + 0x60], ebx
jb 0x406c7c
mov edx, dword [esp + 0x4c]
push edx
call fcn.004493e1
add esp, 4
xor eax, eax
mov byte [esp + 0x3a4], al
dec dword [0x47bb40]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], esi
mov word [esp + 0x4c], ax
mov dword [esp + method.HString.virtual_0], vtable.HString.0
cmp dword [esp + 0x1a0], ebx
jb 0x406cbc
mov ecx, dword [esp + 0x18c]
push ecx
call fcn.004493e1
add esp, 4
movzx eax, byte [esp + 0x33e]
movzx edx, word [esp + 0x33c]
mov dword [ebp + 0x3c], eax
mov eax, dword [esp + 0x234]
sub eax, 1
mov dword [ebp + 0x38], edx
je 0x407174
sub eax, 1
jne 0x4071ac
mov eax, dword [esp + 0x228]
cmp eax, 6
jne 0x406d42
mov eax, dword [esp + 0x22c]
test eax, eax
jne 0x406d0a
mov dword [ebp], ebx
jmp 0x406d97
cmp eax, 1
jne 0x406d18
mov dword [ebp], 9
jmp 0x406d97
cmp eax, 2
jne 0x406d26
mov dword [ebp], 0xa
jmp 0x406d97
cmp eax, 3
jne 0x406d34
mov dword [ebp], 0xb
jmp 0x406d97
cmp eax, 4
jne 0x406d97
mov dword [ebp], 0xc
jmp 0x406d97
cmp eax, 0xa
jne 0x406d5a
cmp dword [esp + 0x22c], 0
jne 0x406d97
mov dword [ebp], 0xd
jmp 0x406d97
cmp eax, 5
jne 0x406d8b
mov eax, dword [esp + 0x22c]
cmp eax, 2
jne 0x406d70
mov dword [ebp], edi
jmp 0x406d97
cmp eax, 1
jne 0x406d7e
mov dword [ebp], 6
jmp 0x406d97
test eax, eax
jne 0x406d97
mov dword [ebp], 5
jmp 0x406d97
cmp eax, 4
ja 0x406d97
mov dword [ebp], 4
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x23c]
call fcn.00405560
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x1d4]
mov byte [esp + 0x3b0], 0xc
call fcn.004036c0
mov byte [esp + 0x3a4], 0
mov ebx, 1
sub dword [0x47bb40], ebx
cmp dword [esp + 0x80], 8
mov esi, vtable.HString.0
mov dword [esp + 0x64], esi
jb 0x406df8
mov eax, dword [esp + 0x6c]
push eax
call fcn.004493e1
add esp, 4
xor ecx, ecx
lea edx, [esp + 0x84]
mov word [esp + 0x6c], cx
push edx
mov ecx, 0x472ac0
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], 0
call fcn.00405560
lea eax, [esp + 0x84]
push eax
lea edi, [esp + 0x1c8]
mov byte [esp + 0x3a8], 0xd
call fcn.00405900
mov byte [esp + 0x3a4], 0
sub dword [0x47bb40], ebx
cmp dword [esp + 0xa0], 8
mov dword [esp + 0x84], esi
jb 0x406e72
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.004493e1
add esp, 4
lea eax, [esp + 0x24]
xor edx, edx
push eax
mov dword [esp + 0xa4], 7
mov dword [esp + 0xa0], 0
mov word [esp + 0x90], dx
call fcn.004054a0
mov edi, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
cmp edi, 8
jae 0x406ead
lea edx, [esp + 0x2c]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406eb2
sub eax, esi
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x1cc]
call fcn.00406200
dec dword [0x47bb40]
mov ebx, 8
mov esi, eax
mov dword [esp + 0x24], vtable.HString.0
cmp edi, ebx
jb 0x406ef6
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004493e1
add esp, 4
xor edx, edx
mov edi, 7
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], 0
mov word [esp + 0x2c], dx
test esi, esi
jl 0x406f5d
lea eax, [esp + 0x204]
push eax
lea ecx, [esp + 0x256]
call fcn.00405560
mov eax, dword [esp + 0x20c]
cmp dword [esp + 0x220], ebx
jae 0x406f3d
lea eax, [esp + 0x20c]
push eax
call fcn.0044c9b9
lea ecx, [eax - 1]
add esp, 4
cmp ecx, 9
ja 0x406f51
mov dword [ebp + 8], eax
lea ecx, [esp + 0x204]
call fcn.00405800
cmp dword [esp + 0x20], 0
je 0x407068
mov al, byte [esp + 0x33e]
cmp al, 1
jne 0x406fc8
mov ecx, 4
cmp dword [esp + 0x228], ecx
jne 0x406f8d
mov dword [ebp + 4], 1
jmp 0x407136
mov eax, dword [esp + 0x33c]
test eax, 0x200
je 0x406fa3
mov dword [ebp + 4], ecx
jmp 0x40712c
test eax, 0x100
je 0x406fbc
cmp dword [ebp], 0xb
jne 0x406fbc
mov dword [ebp + 4], 3
jmp 0x40712c
mov dword [ebp + 4], 2
jmp 0x40712c
cmp al, 3
jne 0x40712c
cmp dword [esp + 0x228], 5
jne 0x40704d
mov eax, dword [esp + 0x22c]
cmp eax, 2
jne 0x407021
mov eax, dword [esp + 0x33c]
test al, al
jns 0x406ff9
mov dword [ebp + 4], edi
jmp 0x4071ac
test al, 2
je 0x407009
mov dword [ebp + 4], 3
jmp 0x4071ac
xor ecx, ecx
mov edx, 0x400
cmp ax, dx
sete cl
add ecx, 5
mov dword [ebp + 4], ecx
jmp 0x4071ac
test eax, eax
jne 0x40704d
mov al, byte [esp + 0x33c]
test al, al
jns 0x407038
mov dword [ebp + 4], ebx
jmp 0x4071ac
test al, 2
mov edx, 0
setne dl
add edx, 0xb
mov dword [ebp + 4], edx
jmp 0x4071ac
test byte [esp + 0x33c], 2
mov eax, 0
setne al
add eax, 9
mov dword [ebp + 4], eax
jmp 0x40712c
lea ecx, [esp + 0x18]
push ecx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
mov esi, 0x50
push reloc.WS2_32.dll_bind
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4070a2
lea ecx, [esp + 0x1c4]
call fcn.00405800
or eax, 0xffffffff
jmp 0x4071d9
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x348]
push eax
push 0
push 0
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40708e
cmp dword [esp + 0x14], esi
ja 0x40708e
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0x344]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x4070f8
mov dword [ebp + 4], 1
lea ecx, [esp + 0x344]
push ecx
push str.LANMANNT
call esi
test eax, eax
jne 0x407112
mov dword [ebp + 4], 0xb
lea edx, [esp + 0x344]
push edx
push str.SERVERNT
call esi
test eax, eax
jne 0x40712c
mov dword [ebp + 4], 0xc
cmp dword [esp + 0x228], 4
jne 0x4071ac
lea eax, [esp + 0x238]
push str.Service_Pack_6
push eax
call fcn.0044ad7c
add esp, 8
test eax, eax
jne 0x4071ac
lea ecx, [esp + 0x1c]
push ecx
push 1
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4071ac
cmp dword [esp + 0x228], 4
jne 0x4071ac
mov eax, dword [esp + 0x22c]
test eax, eax
jne 0x407192
mov dword [ebp], 1
jmp 0x4071ac
cmp eax, 0xa
jne 0x4071a0
mov dword [ebp], 2
jmp 0x4071ac
cmp eax, 0x5a
jne 0x4071ac
mov dword [ebp], 3
dec dword [0x47bb40]
cmp dword [esp + 0x1e0], 8
mov dword [esp + method.HString.virtual_0], vtable.HString.0
jb 0x4071d7
mov eax, dword [esp + 0x1cc]
push eax
call fcn.004493e1
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x39c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x380]
xor ecx, esp
call fcn.004493ec
add esp, 0x394
ret 4