Function at 0x404d00
Capabilities:
Check os version
Get system information on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov ecx, 9
xor eax, eax
lea edi, [esp + 0xb4]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
rep stosd dword es:[edi], eax
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x9c
push eax
call esi
mov edi, eax
test edi, edi
jne 0x404d60
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x94
push ecx
call esi
test eax, eax
jne 0x404d60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
push str.GetNativeSystemInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x404d87
lea edx, [esp + 0xb4]
push edx
call eax
jmp 0x404d95
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x4052eb
dec eax
je 0x405265
dec eax
jne 0x4052f8
mov eax, dword [esp + 0x1c]
mov ebp, 5
cmp eax, ebp
mov esi, 2
jbe 0x404e0f
cmp byte [esp + 0xb2], 1
jne 0x404dd3
push str.Windows_Vista
jmp 0x404dd8
push str.Windows_Server__Longhorn_
call fcn.004121a0
mov al, byte [esp + 0xb6]
add esp, 4
cmp al, 1
jne 0x404e0b
mov ax, word [esp + 0xb4]
cmp ax, 9
jne 0x404dfe
mov dword [ebx + 0x14], esi
jmp 0x404e0b
cmp ax, 6
jne 0x404e0b
mov dword [ebx + 0x14], 3
cmp dword [esp + 0x1c], ebp
jne 0x404e82
cmp dword [esp + 0x20], esi
jne 0x404e51
cmp byte [esp + 0xb2], 1
jne 0x404e3e
cmp word [esp + 0xb4], 9
jne 0x404e3e
push str.Microsoft_Windows_XP_Professional_x64_Edition
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], esi
jmp 0x404e4b
push str.Microsoft_Windows_Server_2003_
call fcn.004121a0
add esp, 4
cmp dword [esp + 0x1c], ebp
jne 0x404e82
cmp dword [esp + 0x20], 1
jne 0x404e6d
push str.Microsoft_Windows_XP
call fcn.004121a0
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, ebp
jne 0x404e82
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x404e96
push str.Microsoft_Windows_2000
call fcn.004121a0
add esp, 4
cmp dword [esp + 0x1c], 4
ja 0x404e96
push str.Microsoft_Windows_NT
call fcn.004121a0
add esp, 4
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test edi, edi
je 0x4050ad
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x404f07
cmp word [esp + 0xb4], 9
je 0x405191
cmp dword [esp + 0x1c], 4
jne 0x404ed7
push str.Workstation_4.0
call fcn.004121a0
add esp, 4
jmp 0x405191
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x404ef5
push str.Home_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
push str.Professional
call fcn.004121a0
add esp, 4
jmp 0x405191
cmp al, 3
je 0x404f13
cmp al, 2
jne 0x405191
cmp dword [esp + 0x1c], 5
jne 0x40507f
mov eax, dword [esp + 0x20]
cmp eax, 2
jne 0x405036
mov ax, word [esp + 0xb4]
cmp ax, 6
jne 0x404f7a
mov al, byte [esp + 0xb0]
test al, 0x80
je 0x404f5d
push str.Datacenter_Edition_for_Itanium_based_Systems
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], 3
jmp 0x405191
test al, 2
je 0x404f6e
push str.Enterprise_Edition_for_Itanium_based_Systems
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], 3
jmp 0x405191
cmp ax, 9
jne 0x404fda
mov al, byte [esp + 0xb0]
test al, 0x80
je 0x404fa4
push str.Datacenter_x64_Edition
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], 2
jmp 0x405191
test al, 2
je 0x404fc1
push str.Enterprise_x64_Edition
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], 2
jmp 0x405191
push str.Standard_x64_Edition
call fcn.004121a0
add esp, 4
mov dword [ebx + 0x14], 2
jmp 0x405191
mov eax, dword [esp + 0xb0]
test al, 0x80
je 0x404ff7
push str.Datacenter_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
test al, 2
je 0x40500d
push str.Enterprise_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
test ah, 4
je 0x405024
push str.Web_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
push str.Standard_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
test eax, eax
jne 0x40507f
mov al, byte [esp + 0xb0]
test al, 0x80
je 0x405057
push str.Datacenter_Server
call fcn.004121a0
add esp, 4
jmp 0x405191
test al, 2
je 0x40506d
push str.Advanced_Server
call fcn.004121a0
add esp, 4
jmp 0x405191
push str.Server
call fcn.004121a0
add esp, 4
jmp 0x405191
test byte [esp + 0xb0], 2
je 0x40509b
push str.Server_4.0__Enterprise_Edition
call fcn.004121a0
add esp, 4
jmp 0x405191
push str.Server_4.0
call fcn.004121a0
add esp, 4
jmp 0x405191
lea ecx, [esp + 0x14]
mov edi, 0x50
push ecx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], edi
call ebp
test eax, eax
je 0x4050dc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x118
ret
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
lea eax, [esp + 0xd8]
push edx
push eax
push 0
push 0
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x14]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4050cf
cmp dword [esp + 0x10], edi
ja 0x4050cf
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0xd8]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x40513a
push str.Workstation
call fcn.004121a0
add esp, 4
lea ecx, [esp + 0xd8]
push ecx
push str.LANMANNT
call esi
test eax, eax
jne 0x40515a
push str.Server
call fcn.004121a0
add esp, 4
lea edx, [esp + 0xd8]
push edx
push str.SERVERNT
call esi
test eax, eax
jne 0x40517a
push str.Advanced_Server
call fcn.004121a0
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push str._d._d
call fcn.004121a0
add esp, 0xc
cmp dword [esp + 0x1c], 4
jne 0x405238
lea edx, [esp + 0x2c]
push str.Service_Pack_6
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x405238
lea eax, [esp + 0x10]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
jne 0x405200
mov ecx, dword [esp + 0x24]
and ecx, 0xffff
push ecx
push str.Service_Pack_6a__Build__d__n
call fcn.004121a0
mov ecx, dword [esp + 0x18]
add esp, 8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x118
ret
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
and edx, 0xffff
push edx
push eax
push str._s__Build__d__n
call fcn.004121a0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x118
ret
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
and edx, 0xffff
push edx
push eax
push str._s__Build__d__n
call fcn.004121a0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov eax, dword [esp + 0x1c]
mov esi, 4
cmp eax, esi
jne 0x4052f8
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4052aa
push str.Microsoft_Windows_95
call fcn.004121a0
mov al, byte [esp + 0x31]
add esp, 4
cmp al, 0x43
je 0x405297
cmp al, 0x42
jne 0x4052a4
push str.OSR2
call fcn.004121a0
add esp, 4
cmp dword [esp + 0x1c], esi
jne 0x4052f8
cmp dword [esp + 0x20], 0xa
jne 0x4052dd
push str.Microsoft_Windows_98
call fcn.004121a0
mov al, byte [esp + 0x31]
add esp, 4
cmp al, 0x41
je 0x4052ca
cmp al, 0x42
jne 0x4052d7
push 0x438518
call fcn.004121a0
add esp, 4
cmp dword [esp + 0x1c], esi
jne 0x4052f8
cmp dword [esp + 0x20], 0x5a
jne 0x4052f8
push str.Microsoft_Windows_Millennium_Edition_n
jmp 0x4052f0
push str.Microsoft_Win32s_n
call fcn.004121a0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x118
ret