Function at 0x40f400
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ee202
mov eax, dword fs:[0]
push eax
sub esp, 0x14c
mov eax, dword [0x51f584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push 0x11c
lea eax, [ebp - 0x12c]
mov dword [ebp - 4], ebx
push ebx
push eax
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x130], ebx
call fcn.004868c0
add esp, 0xc
push str.RtlGetVersion
push 0x50e740
mov dword [ebp - 0x12c], 0x11c
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, ebx
je 0x40f481
lea ecx, [ebp - 0x12c]
push ecx
call eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x11c]
dec eax
mov dword [ebp - 0x130], 1
je 0x40f6d0
dec eax
je 0x40f4cd
push 0x2d7
push str.d:workspace_st_projects_xy_tpsp_tpsp
push 0x50e21c
call fcn.00483ce7
add esp, 0xc
push 7
push str.UNKNOWN
jmp 0x40f6d7
mov eax, dword [ebp - 0x128]
sub eax, 5
je 0x40f600
dec eax
je 0x40f557
sub eax, 4
je 0x40f507
push 0x2ca
push str.d:workspace_st_projects_xy_tpsp_tpsp
push 0x50e21c
call fcn.00483ce7
add esp, 0xc
push 7
push str.UNKNOWN
jmp 0x40f6d7
cmp dword [ebp - 0x124], ebx
je 0x40f532
push 0x2c0
push str.d:workspace_st_projects_xy_tpsp_tpsp
push 0x50e21c
call fcn.00483ce7
add esp, 0xc
push 7
push str.UNKNOWN
jmp 0x40f6d7
cmp byte [ebp - 0x12], 1
mov edx, str.Windows_10
je 0x40f542
mov edx, str.Windows_Server_2016
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f547
sub eax, edi
push eax
push edx
jmp 0x40f6d7
mov eax, dword [ebp - 0x124]
cmp eax, 3
ja case.default.0x40f562
jmp dword [eax*4 + 0x40f6fc]
cmp byte [ebp - 0x12], 1
mov eax, str.Windows_Vista
je 0x40f579
mov eax, str.Windows_Server_2008
push eax
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
cmp byte [ebp - 0x12], 1
mov eax, str.Windows_7
je 0x40f596
mov eax, str.Windows_Server_2008_R2
push eax
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
cmp byte [ebp - 0x12], 1
mov eax, str.Windows_8
je 0x40f5b3
mov eax, str.Windows_Server_2012
push eax
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
cmp byte [ebp - 0x12], 1
mov eax, str.Windows_8.1
je 0x40f5d0
mov eax, str.Windows_Server_2012_R2
push eax
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
push 0x2af
push str.d:workspace_st_projects_xy_tpsp_tpsp
push 0x50e21c
call fcn.00483ce7
add esp, 0xc
push 7
push str.UNKNOWN
jmp 0x40f6d7
mov eax, dword [ebp - 0x124]
sub eax, ebx
je 0x40f6c2
dec eax
je 0x40f6b4
dec eax
je 0x40f640
push 0x291
push str.d:workspace_st_projects_xy_tpsp_tpsp
push 0x50e21c
call fcn.00483ce7
add esp, 0xc
push str.UNKNOWN
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
lea edx, [ebp - 0x158]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
cmp byte [ebp - 0x12], 1
jne 0x40f66b
cmp word [ebp - 0x158], 9
jne 0x40f66b
push str.Windows_XP_Professional_x64_Edition
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x59
call edi
test eax, eax
jne 0x40f687
push str.Windows_Server_2003
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
push 0x59
call edi
test eax, eax
je 0x40f69d
push str.Windows_Server_2003_R2
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
test dword [ebp - 0x14], 0x8000
je 0x40f6de
push str.Windows_Home_Server
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
push str.Windows_XP
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
push str.Windows_2000
mov ecx, esi
call fcn.0040c840
jmp 0x40f6de
push 5
push str.Win9x
mov ecx, esi
call fcn.00402a50
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004822c9
mov esp, ebp
pop ebp
ret