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

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebx
mov ebx, dword [esp + 0x1d4]
push ebp
push edi
push 0
push 0x62b600
mov ecx, ebx
call fcn.00409790
push 0x100
lea eax, [esp + 0xd8]
push 0
push eax
call fcn.005b5540
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor eax, eax
add esp, 0xc
push str.GetNativeSystemInfo
push 0x5f4994
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 0x51edd1
lea ecx, [esp + 0x14]
push ecx
call eax
jmp 0x51eddc
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 0x51ee0f
mov cl, byte [esi + eax]
test cl, cl
je 0x51ee0f
mov byte [eax], cl
add eax, 1
sub edx, 1
jne 0x51edf2
jmp 0x51ee13
test edx, edx
jne 0x51ee16
sub eax, 1
mov byte [eax], 0
call fcn.004ff520
test eax, eax
pop esi
je 0x51f0e2
lea edx, [esp + 0xc]
push edx
call fcn.004ff5f0
add esp, 4
test eax, eax
jne 0x51ee52
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.005b1988
add esp, 0x1cc
ret
mov eax, dword [esp + 0xc]
add eax, 0xfffffff7
cmp eax, 0xd
ja case.0x51ee62.11
jmp dword [eax*4 + 0x51f3a8]
push str.Windows_Vista
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51ef5d
push str.Windows_7
jmp 0x51ef50
push str.Windows_Server_2008
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51ef5d
push str.Windows_Server_2008_R2
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51ef5d
push str.Windows_8
jmp 0x51ef50
push str.Windows_Server_2012
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51ef5d
push str.Windows_8.1
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51ef5d
push str.Windows_Server_2012_R2
jmp 0x51ef50
push str.Windows_10
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51ef5d
push str.Windows_Server_2016
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51ef5d
push str.Windows_11
jmp 0x51ef50
push str.Windows_Server_2019
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51ef5d
push str.Windows_Server_2022
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51ef5d
push str.Windows_Unknown_Version
push 0x100
lea ecx, [esp + 0xdc]
push ecx
call fcn.0051d280
push str.GetProductInfo
push 0x5f4994
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.0x51ef90.4
jmp dword [eax*4 + 0x51f3e0]
push str.Ultimate_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51f0a9
push str.Home_Premium_Edition
jmp 0x51f09c
push str.Home_Basic_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f0a9
push str.Enterprise_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51f0a9
push str.Business_Edition
jmp 0x51f09c
push str.Starter_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f0a9
push str.Cluster_Server_Edition
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51f0a9
push str.Datacenter_Edition
jmp 0x51f09c
push str.Datacenter_Edition__core_installation_
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f0a9
push str.Enterprise_Edition__core_installation_
jmp 0x51f09c
push str.Enterprise_Edition_for_Itanium_based_Systems
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f0a9
push str.Small_Business_Server
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51f0a9
push str.Small_Business_Server_Premium_Edition
jmp 0x51f09c
push str.Standard_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f0a9
push str.Standard_Edition__core_installation_
push 0x100
lea eax, [esp + 0xdc]
push eax
jmp 0x51f0a9
push str.Web_Server_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
call fcn.0051d280
mov eax, dword [esp + 0x14]
cmp ax, 9
jne 0x51f0cf
push str.__64_bit
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f35f
test ax, ax
jne 0x51f364
push str.__32_bit
jmp 0x51f352
push 0x9c
lea ecx, [esp + 0x3c]
push 0
push ecx
call fcn.005b5540
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 0x51ee38
mov eax, dword [esp + 0x40]
sub eax, 0
je 0x51f2ee
sub eax, 1
je 0x51f2af
sub eax, 1
je 0x51f136
push str.Windows_Unknown_Version
jmp 0x51f352
cmp word [esp + 0xd0], 0x2000
jne 0x51f156
push str.Windows_Storage_Server_2003
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f18e
cmp byte [esp + 0xd2], 1
jne 0x51f17c
cmp word [esp + 0x14], 9
jne 0x51f17c
push str.Windows_XP_Professional_x64_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f18e
push str.Windows_Server_2003_
push 0x100
lea eax, [esp + 0xdc]
push eax
call fcn.0051d280
cmp byte [esp + 0xd2], 1
je 0x51f364
mov eax, dword [esp + 0x14]
cmp ax, 6
jne 0x51f1ec
mov al, byte [esp + 0xd0]
test al, al
jns 0x51f1cd
push str.Datacenter_Edition_for_Itanium_based_Systems
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
test al, 2
je 0x51f364
push str.Enterprise_Edition_for_Itanium_based_Systems
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f35f
cmp ax, 9
jne 0x51f239
mov al, byte [esp + 0xd0]
test al, al
jns 0x51f207
push str.Datacenter_x64_Edition
jmp 0x51f352
test al, 2
je 0x51f222
push str.Enterprise_x64_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
push str.Standard_x64_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f35f
mov eax, dword [esp + 0xd0]
test eax, 0x4000
je 0x51f251
push str.Compute_Cluster_Edition
jmp 0x51f352
test al, al
jns 0x51f26c
push str.Datacenter_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
test al, 2
je 0x51f287
push str.Enterprise_Edition
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f35f
test eax, 0x400
je 0x51f298
push str.Web_Edition
jmp 0x51f352
push str.Standard_Edition
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
push str.Windows_XP
push 0x100
lea edx, [esp + 0xdc]
push edx
call fcn.0051d280
test dword [esp + 0xd0], 0x200
je 0x51f2da
push str.Home_Edition
jmp 0x51f352
push str.Professional
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
push str.Windows_2000
push 0x100
lea edx, [esp + 0xdc]
push edx
call fcn.0051d280
cmp byte [esp + 0xd2], 1
jne 0x51f316
push str.Professional
jmp 0x51f352
mov al, byte [esp + 0xd0]
test al, al
jns 0x51f335
push str.Datacenter_Server
push 0x100
lea ecx, [esp + 0xdc]
push ecx
jmp 0x51f35f
test al, 2
je 0x51f34d
push str.Advanced_Server
push 0x100
lea edx, [esp + 0xdc]
push edx
jmp 0x51f35f
push str.Server
push 0x100
lea eax, [esp + 0xdc]
push eax
call fcn.0051d280
lea eax, [esp + 0xd4]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x51f370
sub eax, edx
push eax
lea ecx, [esp + 0xd8]
push ecx
mov ecx, ebx
call fcn.00409790
mov ecx, dword [esp + 0x1d4]
pop edi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005b1988
add esp, 0x1cc
ret