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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5598bd
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x5f7350]
xor eax, esp
mov dword [esp + 0x2a8], eax
push ebx
push esi
push edi
mov eax, dword [0x5f7350]
xor eax, esp
push eax
lea eax, [esp + 0x2c0]
mov dword fs:[0], eax
mov esi, 0x114
push esi
xor ebx, ebx
lea eax, [esp + 0x1a0]
push ebx
push eax
call fcn.00517e90
add esp, 0xc
lea eax, [esp + 0x19c]
push eax
mov dword [esp + 0x1a0], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4978cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [esp + 0x34]
push eax
call fcn.004036c8
mov esi, eax
push str.GetVersionEx_failed__err_
push esi
mov dword [esp + 0x2d0], ebx
call fcn.00405d7d
pop ecx
pop ecx
push edi
push esi
call fcn.0041056c
lea eax, [esp + 0x180]
push eax
mov eax, esi
call fcn.00403732
mov byte [esp + 0x2c8], 1
cmp dword [esp + 0x194], 8
mov eax, dword [esp + 0x180]
jae 0x4978ab
lea eax, [esp + 0x180]
push eax
xor ecx, ecx
call fcn.00492b4d
pop ecx
push 1
xor edi, edi
lea esi, [esp + 0x184]
call fcn.00404145
lea eax, [esp + 0x34]
jmp 0x497ab0
push 0x24
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00517e90
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [esp + 0x1a0]
push 2
pop edi
cmp ecx, 4
jne 0x49790c
cmp dword [esp + 0x1ac], 1
jne 0x497a17
xor eax, eax
jmp 0x497ac0
push 5
pop eax
cmp ecx, eax
jne 0x49795e
cmp dword [esp + 0x1a4], ebx
jne 0x497924
xor eax, eax
inc eax
jmp 0x497ac0
cmp dword [esp + 0x1a4], 1
jne 0x497936
push 2
pop eax
jmp 0x497ac0
cmp dword [esp + 0x1a4], edi
jne 0x497a17
cmp word [esp + 0x10], 9
je 0x49795a
cmp word [esp + 0x10], 6
je 0x49795a
mov eax, edi
jmp 0x497ac0
push 3
jmp 0x497930
push 6
pop edx
cmp ecx, edx
jne 0x4979ec
mov ecx, dword [esp + 0x1a4]
cmp ecx, ebx
jne 0x49798e
cmp word [esp + 0x10], 9
je 0x497987
cmp word [esp + 0x10], dx
jne 0x497ac0
mov eax, edx
jmp 0x497ac0
cmp ecx, 1
jne 0x4979aa
cmp word [esp + 0x10], 9
je 0x4979a6
cmp word [esp + 0x10], dx
je 0x4979a6
push 7
jmp 0x497930
push 8
jmp 0x497930
cmp ecx, edi
jne 0x4979ca
push 9
pop eax
cmp word [esp + 0x10], ax
je 0x4979c3
cmp word [esp + 0x10], dx
jne 0x497ac0
push 0xa
jmp 0x497930
cmp ecx, 3
jne 0x497a17
cmp word [esp + 0x10], 9
je 0x4979e5
cmp word [esp + 0x10], dx
je 0x4979e5
push 0xb
jmp 0x497930
push 0xc
jmp 0x497930
cmp ecx, 0xa
jne 0x497a17
cmp dword [esp + 0x1a4], ebx
jne 0x497a17
cmp word [esp + 0x10], 9
je 0x497a10
cmp word [esp + 0x10], dx
je 0x497a10
push 0xd
jmp 0x497930
push 0xe
jmp 0x497930
lea eax, [esp + 0xcc]
push eax
call fcn.004036c8
mov esi, eax
push str.Unknown_version:_major
push esi
mov dword [esp + 0x2d0], edi
call fcn.00405d7d
pop ecx
pop ecx
push dword [esp + 0x1a0]
push esi
call fcn.0041056c
push str.__minor
push esi
call fcn.00405d7d
pop ecx
pop ecx
push dword [esp + 0x1a4]
push esi
call fcn.0041056c
lea eax, [esp + 0x164]
push eax
mov eax, esi
call fcn.00403732
mov byte [esp + 0x2c8], 3
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x497a90
lea eax, [esp + 0x164]
push eax
xor ecx, ecx
call fcn.00492b4d
pop ecx
push 1
xor edi, edi
lea esi, [esp + 0x168]
call fcn.00404145
lea eax, [esp + 0xcc]
or dword [esp + 0x2c8], 0xffffffff
call fcn.00402669
or eax, 0xffffffff
mov ecx, dword [esp + 0x2c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2a8]
xor ecx, esp
call fcn.0051497f
mov esp, ebp
pop ebp
ret