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

Disassembly:
push ebp
lea ebp, [esp - 0x45c]
sub esp, 0x4dc
mov eax, dword [0x619e70]
xor eax, ebp
mov dword [ebp + 0x458], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x80]
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, 0x9c
push esi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.0057f470
add esp, 0xc
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push eax
call esi
test eax, eax
jne 0x557dd9
mov ebx, 0x94
push ebx
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.0057f470
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 0x44], ebx
call esi
test eax, eax
je 0x558365
call fcn.0043bf70
mov eax, dword [eax + 0x20]
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x58]
push ecx
mov ecx, eax
call fcn.0055317c
test eax, eax
je 0x557e11
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x40]
jbe 0x557e11
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], ecx
jmp 0x557e14
mov eax, dword [ebp - 0x3c]
movzx esi, word [ebp + 0x50]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x40]
mov dword [edi + 0x18], esi
movzx esi, word [ebp + 0x52]
mov dword [edi + 0xc], ecx
sub ecx, 0
mov dword [edi + 0x10], edx
mov dword [edi + 0x14], eax
mov dword [edi + 0x1c], esi
je 0x55834d
dec ecx
je 0x5582d7
dec ecx
jne 0x558362
push eax
push edx
mov ebx, str.Microsoft_Windows_NT_d._d
push ebx
mov esi, 0x400
push esi
push dword [edi + 0x20]
call fcn.0043a290
mov ecx, dword [ebp - 0x40]
add esp, 0x14
cmp ecx, 4
ja 0x557e7f
push str.Microsoft_Windows_NT
push esi
push dword [edi + 0x20]
call fcn.0057eed3
add esp, 0xc
jmp 0x558021
cmp ecx, 5
jne 0x557f1f
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x557e96
push str.Microsoft_Windows_2000
jmp 0x557e6e
cmp eax, 1
jne 0x557ee7
push str.Microsoft_Windows_XP
push esi
push dword [edi + 0x20]
call fcn.0057eed3
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
add esp, 0xc
push 0x57
call ebx
test eax, eax
je 0x557ecb
push str.Media_Center_Edition
push esi
push dword [edi + 0x20]
call fcn.0043a370
add esp, 0xc
push 0x56
call ebx
test eax, eax
je 0x558021
push str.Tablet_PC_Edition
push esi
push dword [edi + 0x20]
call fcn.0043a370
jmp 0x557e77
cmp eax, 2
jne 0x557f17
cmp byte [ebp + 0x56], 1
jne 0x557f0d
cmp word [ebp - 0x80], 6
jne 0x557f03
push str.Microsoft_Windows_XP_IA64
jmp 0x557e6e
push str.Microsoft_Windows_XP_x64
jmp 0x557e6e
push str.Microsoft_Windows_Server_2003
jmp 0x557e6e
push eax
push 5
jmp 0x558014
push 6
pop eax
cmp ecx, eax
jne 0x557fb3
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
jne 0x557f4a
cmp byte [ebp + 0x56], 1
jne 0x557f43
push ecx
push eax
push str.Microsoft_Windows_Vista___d._d_
jmp 0x557feb
push str.Microsoft_Windows_Server_2008
jmp 0x557f94
cmp ecx, 1
jne 0x557f67
cmp byte [ebp + 0x56], cl
jne 0x557f60
push ecx
push eax
push str.Microsoft_Windows_7___d._d_
jmp 0x557feb
push str.Microsoft_Windows_Server_2008_R2
jmp 0x557f94
cmp ecx, 2
jne 0x557f7b
cmp byte [ebp + 0x56], 1
jne 0x557f8f
push ecx
push eax
push str.Microsoft_Windows_8___d._d_
jmp 0x557feb
cmp ecx, 3
jne 0x557f9f
cmp byte [ebp + 0x56], 1
jne 0x557f8f
push ecx
push eax
push str.Microsoft_Windows_8.1___d._d_
jmp 0x557feb
push str.Microsoft_Windows_Server_2012_R2
push esi
push dword [edi + 0x20]
call fcn.0057eed3
jmp 0x557fdc
cmp ecx, 4
jne 0x557ff7
cmp byte [ebp + 0x56], 1
push ecx
push eax
jne 0x557fe6
push str.Microsoft_Windows_10___d._d_
jmp 0x557feb
cmp ecx, 0xa
jne 0x558010
cmp byte [ebp + 0x56], 1
jne 0x557fe1
cmp dword [ebp - 0x38], 0x55ec
jb 0x557fce
push str.Microsoft_Windows_11
jmp 0x557fd3
push str.Microsoft_Windows_10
push esi
push dword [edi + 0x20]
call fcn.0043a290
add esp, 0xc
jmp 0x557ff7
push dword [ebp - 0x3c]
push 0xa
push str.Microsoft_Windows_Server___d._d_
push esi
push dword [edi + 0x20]
call fcn.0043a290
add esp, 0x14
movzx eax, word [ebp + 0x52]
push eax
movzx eax, word [ebp + 0x50]
push eax
push dword [ebp - 0x3c]
mov ecx, edi
push dword [ebp - 0x40]
call fcn.00557917
jmp 0x558021
push dword [ebp - 0x3c]
push ecx
push ebx
push esi
push dword [edi + 0x20]
call fcn.0043a290
add esp, 0x14
cmp byte [ebp + 0x56], 1
mov ebx, 0x200
jne 0x55805f
cmp dword [ebp - 0x40], 4
jne 0x55803c
push str.Workstation_4.0
jmp 0x5580fd
cmp dword [ebp - 0x40], 5
jne 0x558109
test dword [ebp + 0x54], ebx
je 0x558055
push str.Home_Edition
jmp 0x5580fd
push str.Professional
jmp 0x5580fd
cmp byte [ebp + 0x56], 3
je 0x55806f
cmp byte [ebp + 0x56], 2
jne 0x558109
cmp dword [ebp - 0x40], 5
jne 0x5580e1
cmp dword [ebp - 0x3c], 2
jne 0x5580b6
mov eax, dword [ebp + 0x54]
test al, al
jns 0x558089
push str.Datacenter_Edition
jmp 0x5580fd
test al, 2
je 0x558094
push str.Enterprise_Edition
jmp 0x5580fd
mov ecx, esi
cmp ax, cx
jne 0x5580a2
push str.Web_Edition
jmp 0x5580fd
cmp ax, 1
jne 0x5580af
push str.Small_Business_Edition
jmp 0x5580fd
push str.Standard_Edition
jmp 0x5580fd
cmp dword [ebp - 0x3c], 0
jne 0x5581b1
test byte [ebp + 0x54], 0x80
je 0x5580cd
push str.Datacenter_Server
jmp 0x5580fd
test byte [ebp + 0x54], 2
je 0x5580da
push str.Advanced_Server
jmp 0x5580fd
push str.Server
jmp 0x5580fd
cmp dword [ebp - 0x40], 4
ja 0x5581b1
test byte [ebp + 0x54], 2
je 0x5580f8
push str.Server_4.0__Enterprise_Edition
jmp 0x5580fd
push str.Server_4.0
push esi
push dword [edi + 0x20]
call fcn.0043a370
add esp, 0xc
cmp dword [ebp - 0x40], 4
jne 0x5581b1
push str.Service_Pack_6
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x5581b1
lea eax, [ebp - 0x48]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
movzx eax, word [ebp - 0x38]
push eax
jne 0x558176
push str.Service_Pack_6a__Build__d_
lea eax, [ebp + 0x258]
push 0x100
push eax
call fcn.0043a290
lea eax, [ebp + 0x258]
push eax
push ebx
push dword [edi + 0x24]
call fcn.0043a290
add esp, 0x1c
jmp 0x5581a3
lea eax, [ebp - 0x30]
push eax
push str._s__Build__d_
lea eax, [ebp + 0x258]
push 0x100
push eax
call fcn.0043a290
lea eax, [ebp + 0x258]
push eax
push ebx
push dword [edi + 0x24]
call fcn.0043a290
add esp, 0x20
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x558362
cmp byte [ebp - 0x30], 0
movzx eax, word [ebp - 0x38]
push eax
je 0x5581ee
lea eax, [ebp - 0x30]
push eax
push str._s__Build__d_
lea eax, [ebp + 0x258]
push 0x100
push eax
call fcn.0043a290
lea eax, [ebp + 0x258]
push eax
push ebx
push dword [edi + 0x24]
call fcn.0043a290
add esp, 0x20
jmp 0x558362
push str.Build__d
mov ebx, 0x100
lea eax, [ebp + 0x258]
push ebx
push eax
call fcn.0043a290
add esp, 0x10
lea eax, [ebp - 0x48]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5582be
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp + 0x58]
push eax
push 0
push 0
push str.DisplayVersion
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], 0x200
call esi
test eax, eax
jne 0x558280
lea eax, [ebp + 0x58]
push eax
push str.Version__s
lea eax, [ebp + 0x258]
push 0x200
push eax
call fcn.0043a290
lea eax, [ebp + 0x258]
push eax
push 0x200
push dword [edi + 0x28]
call fcn.0043a290
add esp, 0x1c
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x5c]
push eax
push 0
push 0
push 0x5c6d58
push dword [ebp - 0x48]
mov dword [ebp - 0x4c], 4
call esi
test eax, eax
jne 0x5582be
push dword [ebp - 0x5c]
movzx eax, word [ebp - 0x38]
push eax
push str.Build__d._d
lea eax, [ebp + 0x258]
push ebx
push eax
call fcn.0043a290
add esp, 0x14
lea eax, [ebp + 0x258]
push eax
push 0x200
push dword [edi + 0x24]
call fcn.0043a290
jmp 0x55835f
cmp edx, 4
jne 0x558346
test eax, eax
jne 0x558312
push str.Microsoft_Windows_95
mov esi, 0x400
push esi
push dword [edi + 0x20]
call fcn.0057eed3
add esp, 0xc
cmp byte [ebp - 0x2f], 0x43
je 0x558302
cmp byte [ebp - 0x2f], 0x42
jne 0x558362
push str._OSR2
push esi
push dword [edi + 0x20]
call fcn.0043a370
jmp 0x55835f
cmp eax, 0xa
jne 0x55833a
push str.Microsoft_Windows_98
mov esi, 0x400
push esi
push dword [edi + 0x20]
call fcn.0057eed3
add esp, 0xc
cmp byte [ebp - 0x2f], 0x41
jne 0x558362
push 0x5c041c
jmp 0x558307
cmp eax, 0x5a
jne 0x558362
push str.Microsoft_Windows_Millennium_Edition
jmp 0x558352
push str.Microsoft_Windows_9x
jmp 0x558352
push str.Microsoft_Win32s
push 0x400
push dword [edi + 0x20]
call fcn.0057eed3
add esp, 0xc
xor eax, eax
inc eax
mov ecx, dword [ebp + 0x458]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057db4c
add ebp, 0x45c
leave
ret