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

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebx
mov ebx, dword [esp + 0x1d4]
push ebp
push edi
push 0
push 0x63a990
mov ecx, ebx
call fcn.00408ea0
push pe_nt_image_headers32
lea eax, [esp + 0xd8]
push 0
push eax
call fcn.005c0cf0
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor eax, eax
add esp, 0xc
push str.GetNativeSystemInfo
push 0x6019f4
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 0x518731
lea ecx, [esp + 0x14]
push ecx
call eax
jmp 0x51873c
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, pe_nt_image_headers32
sub esi, ecx
lea ecx, [edx + 0x7ffffefe]
test ecx, ecx
je 0x51876f
mov cl, byte [esi + eax]
test cl, cl
je 0x51876f
mov byte [eax], cl
add eax, 1
sub edx, 1
jne 0x518752
jmp 0x518773
test edx, edx
jne 0x518776
sub eax, 1
mov byte [eax], 0
call fcn.005069d0
test eax, eax
pop esi
je 0x518a42
lea edx, [esp + 0xc]
push edx
call fcn.00506aa0
add esp, 4
test eax, eax
jne 0x5187b2
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x1cc
ret
mov eax, dword [esp + 0xc]
add eax, 0xfffffff7
cmp eax, 0xd
ja case.0x5187c2.11
jmp dword [eax*4 + 0x518d08]
push str.Windows_Vista
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x5188bd
push str.Windows_7
jmp 0x5188b0
push str.Windows_Server_2008
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x5188bd
push str.Windows_Server_2008_R2
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x5188bd
push str.Windows_8
jmp 0x5188b0
push str.Windows_Server_2012
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x5188bd
push str.Windows_8.1
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x5188bd
push str.Windows_Server_2012_R2
jmp 0x5188b0
push str.Windows_10
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x5188bd
push str.Windows_Server_2016
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x5188bd
push str.Windows_11
jmp 0x5188b0
push str.Windows_Server_2019
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x5188bd
push str.Windows_Server_2022
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x5188bd
push str.Windows_Unknown_Version
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
call fcn.00516be0
push str.GetProductInfo
push 0x6019f4
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.0x5188f0.4
jmp dword [eax*4 + 0x518d40]
push str.Ultimate_Edition
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x518a09
push str.Home_Premium_Edition
jmp 0x5189fc
push str.Home_Basic_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518a09
push str.Enterprise_Edition
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x518a09
push str.Business_Edition
jmp 0x5189fc
push str.Starter_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518a09
push str.Cluster_Server_Edition
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x518a09
push str.Datacenter_Edition
jmp 0x5189fc
push str.Datacenter_Edition__core_installation_
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518a09
push str.Enterprise_Edition__core_installation_
jmp 0x5189fc
push str.Enterprise_Edition_for_Itanium_based_Systems
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518a09
push str.Small_Business_Server
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x518a09
push str.Small_Business_Server_Premium_Edition
jmp 0x5189fc
push str.Standard_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518a09
push str.Standard_Edition__core_installation_
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
jmp 0x518a09
push str.Web_Server_Edition
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
call fcn.00516be0
mov eax, dword [esp + 0x14]
cmp ax, 9
jne 0x518a2f
push str.__64_bit
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518cbf
test ax, ax
jne 0x518cc4
push str.__32_bit
jmp 0x518cb2
push 0x9c
lea ecx, [esp + 0x3c]
push 0
push ecx
call fcn.005c0cf0
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 0x518798
mov eax, dword [esp + 0x40]
sub eax, 0
je 0x518c4e
sub eax, 1
je 0x518c0f
sub eax, 1
je 0x518a96
push str.Windows_Unknown_Version
jmp 0x518cb2
cmp word [esp + 0xd0], 0x2000
jne 0x518ab6
push str.Windows_Storage_Server_2003
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518aee
cmp byte [esp + 0xd2], 1
jne 0x518adc
cmp word [esp + 0x14], 9
jne 0x518adc
push str.Windows_XP_Professional_x64_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518aee
push str.Windows_Server_2003_
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
call fcn.00516be0
cmp byte [esp + 0xd2], 1
je 0x518cc4
mov eax, dword [esp + 0x14]
cmp ax, 6
jne 0x518b4c
mov al, byte [esp + 0xd0]
test al, al
jns 0x518b2d
push str.Datacenter_Edition_for_Itanium_based_Systems
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
test al, 2
je 0x518cc4
push str.Enterprise_Edition_for_Itanium_based_Systems
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518cbf
cmp ax, 9
jne 0x518b99
mov al, byte [esp + 0xd0]
test al, al
jns 0x518b67
push str.Datacenter_x64_Edition
jmp 0x518cb2
test al, 2
je 0x518b82
push str.Enterprise_x64_Edition
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
push str.Standard_x64_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518cbf
mov eax, dword [esp + 0xd0]
test eax, 0x4000
je 0x518bb1
push str.Compute_Cluster_Edition
jmp 0x518cb2
test al, al
jns 0x518bcc
push str.Datacenter_Edition
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
test al, 2
je 0x518be7
push str.Enterprise_Edition
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518cbf
test eax, 0x400
je 0x518bf8
push str.Web_Edition
jmp 0x518cb2
push str.Standard_Edition
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
push str.Windows_XP
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
call fcn.00516be0
test dword [esp + 0xd0], 0x200
je 0x518c3a
push str.Home_Edition
jmp 0x518cb2
push str.Professional
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
push str.Windows_2000
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
call fcn.00516be0
cmp byte [esp + 0xd2], 1
jne 0x518c76
push str.Professional
jmp 0x518cb2
mov al, byte [esp + 0xd0]
test al, al
jns 0x518c95
push str.Datacenter_Server
push pe_nt_image_headers32
lea ecx, [esp + 0xdc]
push ecx
jmp 0x518cbf
test al, 2
je 0x518cad
push str.Advanced_Server
push pe_nt_image_headers32
lea edx, [esp + 0xdc]
push edx
jmp 0x518cbf
push str.Server
push pe_nt_image_headers32
lea eax, [esp + 0xdc]
push eax
call fcn.00516be0
lea eax, [esp + 0xd4]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x518cd0
sub eax, edx
push eax
lea ecx, [esp + 0xd8]
push ecx
mov ecx, ebx
call fcn.00408ea0
mov ecx, dword [esp + 0x1d4]
pop edi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005bd2d7
add esp, 0x1cc
ret