Function at 0x51dda0
Capabilities:
Check os version
Get system information on windows

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x65b4e4]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebx
mov ebx, dword [esp + 0x1d4]
push ebp
push edi
push 0
push 0x62a4a0
mov ecx, ebx
call fcn.004098b0
push 0x100
lea eax, [esp + 0xd8]
push 0
push eax
call fcn.005b4520
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor eax, eax
add esp, 0xc
push str.GetNativeSystemInfo
push 0x5f3994
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebp
test eax, eax
je 0x51de31
lea ecx, [esp + 0x14]
push ecx
call eax
jmp 0x51de3c
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push esi
lea eax, [esp + 0xd8]
mov esi, str.Microsoft
mov ecx, eax
mov edx, 0x100
sub esi, ecx
lea ecx, [edx + 0x7ffffefe]
test ecx, ecx
je 0x51de6f
mov cl, byte [esi + eax]
test cl, cl
je 0x51de6f
mov byte [eax], cl
add eax, 1
sub edx, 1
jne 0x51de52
jmp 0x51de73
test edx, edx
jne 0x51de76
sub eax, 1
mov byte [eax], 0
call fcn.004fe500
test eax, eax
pop esi
je 0x51e142
lea edx, [esp + 0xc]
push edx
call fcn.004fe5d0
add esp, 4
test eax, eax
jne 0x51deb2
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.005b0968
add esp, 0x1cc
ret
mov eax, dword [esp + 0xc]
add eax, 0xfffffff7
cmp eax, 0xd
ja case.0x51dec2.11
jmp dword [eax*4 + 0x51e408]
push str.Windows_Vista
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51dfbd
push str.Windows_7
jmp 0x51dfb0
push str.Windows_Server_2008
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51dfbd
push str.Windows_Server_2008_R2
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51dfbd
push str.Windows_8
jmp 0x51dfb0
push str.Windows_Server_2012
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51dfbd
push str.Windows_8.1
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51dfbd
push str.Windows_Server_2012_R2
jmp 0x51dfb0
push str.Windows_10
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51dfbd
push str.Windows_Server_2016
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51dfbd
push str.Windows_11
jmp 0x51dfb0
push str.Windows_Server_2019
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51dfbd
push str.Windows_Server_2022
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51dfbd
push str.Windows_Unknown_Version
push 0x100
lea ecx, [esp + 0xdc]
push ecx
call fcn.0051c2e0
push str.GetProductInfo
push 0x5f3994
call edi
push eax
call ebp
lea edx, [esp + 0x10]
push edx
push 0
push 0
push 0
push 6
call eax
mov eax, dword [esp + 0x10]
add eax, 0xffffffff
cmp eax, 0x18
ja case.0x51dff0.4
jmp dword [eax*4 + 0x51e440]
push str.Ultimate_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51e109
push str.Home_Premium_Edition
jmp 0x51e0fc
push str.Home_Basic_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e109
push str.Enterprise_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51e109
push str.Business_Edition
jmp 0x51e0fc
push str.Starter_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e109
push str.Cluster_Server_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51e109
push str.Datacenter_Edition
jmp 0x51e0fc
push str.Datacenter_Edition__core_installation_
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e109
push str.Enterprise_Edition__core_installation_
jmp 0x51e0fc
push str.Enterprise_Edition_for_Itanium_based_Systems
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e109
push str.Small_Business_Server
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51e109
push str.Small_Business_Server_Premium_Edition
jmp 0x51e0fc
push str.Standard_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e109
push str.Standard_Edition__core_installation_
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51e109
push str.Web_Server_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
call fcn.0051c2e0
mov eax, dword [esp + 0x14]
cmp ax, 9
jne 0x51e12f
push str.__64_bit
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e3bf
test ax, ax
jne 0x51e3c4
push str.__32_bit
jmp 0x51e3b2
push 0x9c
lea ecx, [esp + 0x3c]
push 0
push ecx
call fcn.005b4520
add esp, 0xc
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x51de98
mov eax, dword [esp + 0x40]
sub eax, 0
je 0x51e34e
sub eax, 1
je 0x51e30f
sub eax, 1
je 0x51e196
push str.Windows_Unknown_Version
jmp 0x51e3b2
cmp word [esp + 0xd0], 0x2000
jne 0x51e1b6
push str.Windows_Storage_Server_2003
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e1ee
cmp byte [esp + 0xd2], 1
jne 0x51e1dc
cmp word [esp + 0x14], 9
jne 0x51e1dc
push str.Windows_XP_Professional_x64_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e1ee
push str.Windows_Server_2003_
push 0x100
lea eax, [esp + 0xdc]
push eax
call fcn.0051c2e0
cmp byte [esp + 0xd2], 1
je 0x51e3c4
mov eax, dword [esp + 0x14]
cmp ax, 6
jne 0x51e24c
mov al, byte [esp + 0xd0]
test al, al
jns 0x51e22d
push str.Datacenter_Edition_for_Itanium_based_Systems
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
test al, 2
je 0x51e3c4
push str.Enterprise_Edition_for_Itanium_based_Systems
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e3bf
cmp ax, 9
jne 0x51e299
mov al, byte [esp + 0xd0]
test al, al
jns 0x51e267
push str.Datacenter_x64_Edition
jmp 0x51e3b2
test al, 2
je 0x51e282
push str.Enterprise_x64_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
push str.Standard_x64_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e3bf
mov eax, dword [esp + 0xd0]
test eax, 0x4000
je 0x51e2b1
push str.Compute_Cluster_Edition
jmp 0x51e3b2
test al, al
jns 0x51e2cc
push str.Datacenter_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
test al, 2
je 0x51e2e7
push str.Enterprise_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e3bf
test eax, 0x400
je 0x51e2f8
push str.Web_Edition
jmp 0x51e3b2
push str.Standard_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
push str.Windows_XP
push 0x100
lea edx, [esp + 0xdc]
push edx
call fcn.0051c2e0
test dword [esp + 0xd0], 0x200
je 0x51e33a
push str.Home_Edition
jmp 0x51e3b2
push str.Professional
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
push str.Windows_2000
push 0x100
lea edx, [esp + 0xdc]
push edx
call fcn.0051c2e0
cmp byte [esp + 0xd2], 1
jne 0x51e376
push str.Professional
jmp 0x51e3b2
mov al, byte [esp + 0xd0]
test al, al
jns 0x51e395
push str.Datacenter_Server
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51e3bf
test al, 2
je 0x51e3ad
push str.Advanced_Server
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51e3bf
push str.Server
push 0x100
lea eax, [esp + 0xdc]
push eax
call fcn.0051c2e0
lea eax, [esp + 0xd4]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x51e3d0
sub eax, edx
push eax
lea ecx, [esp + 0xd8]
push ecx
mov ecx, ebx
call fcn.004098b0
mov ecx, dword [esp + 0x1d4]
pop edi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005b0968
add esp, 0x1cc
ret