Function at 0x51c228
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff28
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xcc], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x51c65f
push dword fs:[eax]
mov dword fs:[eax], esp
or edi, 0xffffffff
or esi, 0xffffffff
xor ebx, ebx
lea edx, [ebp - 4]
mov eax, dword [0x535214]
mov eax, dword [eax]
call fcn.004097b8
mov eax, dword [0x535830]
mov eax, dword [eax]
dec eax
je 0x51c28f
dec eax
je 0x51c319
jmp case.default.0x51c4f4
mov eax, dword [0x5355f4]
mov eax, dword [eax]
sub eax, 0xa
jb 0x51c2a7
sub eax, 0x50
jb 0x51c2d3
je 0x51c312
jmp case.default.0x51c4f4
mov eax, dword [ebp - 4]
mov edx, 0x51c678
call fcn.00404b60
je 0x51c2c5
mov eax, dword [ebp - 4]
mov edx, 0x51c684
call fcn.00404b60
jne 0x51c2cc
mov bl, 2
jmp case.default.0x51c4f4
mov bl, 1
jmp case.default.0x51c4f4
cmp dword [0x538ec8], 0x4005a
jne 0x51c2e6
mov bl, 5
jmp case.default.0x51c4f4
mov eax, dword [ebp - 4]
mov edx, 0x51c690
call fcn.00404b60
je 0x51c304
mov eax, dword [ebp - 4]
mov edx, 0x51c678
call fcn.00404b60
jne 0x51c30b
mov bl, 4
jmp case.default.0x51c4f4
mov bl, 3
jmp case.default.0x51c4f4
mov bl, 5
jmp case.default.0x51c4f4
mov eax, dword [0x535258]
mov eax, dword [eax]
add eax, 0xfffffffd
cmp eax, 7
ja case.default.0x51c4f4
jmp dword [eax*4 + 0x51c333]
mov eax, dword [0x5355f4]
mov eax, dword [eax]
dec eax
je 0x51c36c
sub eax, 4
je 0x51c373
sub eax, 0x2e
je 0x51c37a
jmp case.default.0x51c4f4
mov bl, 6
jmp case.default.0x51c4f4
mov bl, 7
jmp case.default.0x51c4f4
mov bl, 8
jmp case.default.0x51c4f4
mov bl, 9
jmp case.default.0x51c4f4
mov eax, dword [0x5355f4]
mov eax, dword [eax]
sub eax, 1
jb 0x51c39e
je 0x51c3a5
dec eax
je 0x51c3ac
jmp case.default.0x51c4f4
mov bl, 0xa
jmp case.default.0x51c4f4
mov bl, 0xb
jmp case.default.0x51c4f4
mov dword [ebp - 0xc8], 0x9c
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
call fcn.0051ca0c
push 0x59
call sub.user32.dll_GetSystemMetrics
test eax, eax
je 0x51c3d5
mov bl, 0xe
jmp case.default.0x51c4f4
cmp word [ebp - 0x2c], 0
je 0x51c3f9
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c3f9
cmp byte [ebp - 0x2e], 1
jne 0x51c3f9
mov bl, 0xd
jmp case.default.0x51c4f4
mov bl, 0xc
jmp case.default.0x51c4f4
mov eax, dword [0x5355f4]
cmp dword [eax], 2
jne 0x51c4e1
push 0
lea eax, [ebp - 8]
push eax
mov ecx, 0x51c69c
mov edx, 0x51c6b0
mov eax, 0x80000002
call fcn.00520b9c
lea edx, [ebp - 0xcc]
mov eax, dword [0x53555c]
call fcn.00406c48
mov eax, dword [ebp - 0xcc]
mov edx, dword [ebp - 8]
call fcn.00404d5c
dec eax
je 0x51c46a
lea edx, [ebp - 0xd0]
mov eax, dword [0x5355fc]
call fcn.00406c48
mov eax, dword [ebp - 0xd0]
mov edx, dword [ebp - 8]
call fcn.00404d5c
dec eax
jne 0x51c471
mov esi, 3
jmp 0x51c4e9
lea edx, [ebp - 0xd4]
mov eax, dword [0x535768]
call fcn.00406c48
mov eax, dword [ebp - 0xd4]
mov edx, dword [ebp - 8]
call fcn.00404d5c
dec eax
je 0x51c4b3
lea edx, [ebp - 0xd8]
mov eax, dword [0x5357b4]
call fcn.00406c48
mov eax, dword [ebp - 0xd8]
mov edx, dword [ebp - 8]
call fcn.00404d5c
dec eax
jne 0x51c4ba
mov esi, 2
jmp 0x51c4e9
call fcn.0051c6e0
mov edi, eax
cmp edi, 6
jne 0x51c4cd
mov esi, 4
jmp 0x51c4e9
cmp edi, 0xa
jne 0x51c4d7
or esi, 0xffffffff
jmp 0x51c4e9
mov esi, dword [0x5355f4]
mov esi, dword [esi]
jmp 0x51c4e9
mov esi, dword [0x5355f4]
mov esi, dword [esi]
mov eax, esi
cmp eax, 4
ja case.default.0x51c4f4
jmp dword [eax*4 + 0x51c4fb]
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c536
cmp byte [ebp - 0x2e], 1
jne 0x51c536
mov bl, 0xf
jmp case.default.0x51c4f4
mov bl, 0x10
jmp case.default.0x51c4f4
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c564
cmp byte [ebp - 0x2e], 1
jne 0x51c564
mov bl, 0x11
jmp case.default.0x51c4f4
mov bl, 0x12
jmp case.default.0x51c4f4
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c58f
cmp byte [ebp - 0x2e], 1
jne 0x51c58f
mov bl, 0x13
jmp case.default.0x51c4f4
mov bl, 0x15
jmp case.default.0x51c4f4
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c5b7
cmp byte [ebp - 0x2e], 1
jne 0x51c5b7
mov bl, 0x16
jmp case.default.0x51c4f4
mov bl, 0x18
jmp case.default.0x51c4f4
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c5df
cmp byte [ebp - 0x2e], 1
jne 0x51c5df
mov bl, 0x19
jmp case.default.0x51c4f4
mov bl, 0x1a
jmp case.default.0x51c4f4
mov edi, dword [0x535258]
mov edi, dword [edi]
mov esi, dword [0x5355f4]
mov esi, dword [esi]
cmp edi, 0xa
jl 0x51c634
sub edi, 0xa
jne 0x51c634
cmp esi, 0xffffffff
jne 0x51c609
call fcn.0051c874
mov esi, eax
sub esi, 1
jae 0x51c634
mov dword [ebp - 0xc8], 0x9c
lea eax, [ebp - 0xc8]
push eax
call sub.kernel32.dll_GetVersionExA_1
test eax, eax
je 0x51c632
cmp byte [ebp - 0x2e], 1
jne 0x51c632
mov bl, 0x19
jmp 0x51c634
mov bl, 0x1a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c666
lea eax, [ebp - 0xd8]
mov edx, 4
call fcn.00404768
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404768
ret