Function at 0x50a8d0
Capabilities:
Check os version

Disassembly:
sub esp, 0x6a4
mov eax, dword [0x562940]
xor eax, dword [esp + 0x6a4]
mov ecx, dword [esp + 0x6ac]
mov dword [esp + 0x6a0], eax
mov eax, dword [0x153370c]
test eax, eax
push esi
mov esi, edx
mov edx, dword [esp + 0x6ac]
je 0x50ac39
mov eax, dword [0x1533694]
push edi
mov edi, dword [eax + 0x20]
test edi, edi
jne 0x50ac38
mov eax, dword [0x182fc64]
test eax, eax
je 0x50ac38
lea edi, [ecx + 1]
sub ecx, esi
push ebx
mov ebx, dword [esp + 0x6b8]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x6b4]
push ebp
lea ebp, [edx + 3]
sub edx, esi
sub ecx, ebx
lea eax, [esp + 0x2b0]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0x20
jmp 0x50a960
xor ebx, ebx
movzx cx, byte [esi + edx]
mov bh, cl
or ebx, ecx
mov word [eax - 0x200], bx
xor ebx, ebx
movzx cx, byte [esi]
mov bh, cl
or ebx, ecx
mov word [eax], bx
xor ebx, ebx
mov ecx, dword [esp + 0x18]
movzx cx, byte [esi + ecx]
mov bh, cl
or ebx, ecx
mov ecx, dword [esp + 0x14]
movzx cx, byte [edi + ecx]
mov word [eax + 0x200], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi + 1]
mov word [eax - 0x1fe], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi]
mov word [eax + 2], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp - 1]
mov word [eax + 0x202], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi + 2]
mov word [eax - 0x1fc], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi + 1]
mov word [eax + 4], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp]
mov word [eax + 0x204], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi + 3]
mov word [eax - 0x1fa], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi + 2]
mov word [eax + 6], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp + 1]
mov word [eax + 0x206], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi + 4]
mov word [eax - 0x1f8], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi + 3]
mov word [eax + 8], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp + 2]
mov word [eax + 0x208], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi + 5]
mov word [eax - 0x1f6], bx
xor ebx, ebx
mov bh, cl
add esi, 8
add edi, 8
add ebp, 8
add eax, 0x10
or ebx, ecx
movzx cx, byte [edi - 4]
mov word [eax - 6], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp - 5]
mov word [eax + 0x1fa], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi - 2]
mov word [eax - 0x204], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi - 3]
mov word [eax - 4], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [ebp - 4]
mov word [eax + 0x1fc], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [esi - 1]
mov word [eax - 0x202], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
movzx cx, byte [edi - 2]
mov word [eax - 2], bx
xor ebx, ebx
mov bh, cl
or ebx, ecx
mov ecx, dword [esp + 0x10]
mov word [eax + 0x1fe], bx
dec ecx
mov dword [esp + 0x10], ecx
jne 0x50a960
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x20], 5
jne 0x50ab9a
cmp dword [esp + 0x2c], 2
jne 0x50ab9a
push str.performing_W2K_gamma_clamp._n
call fcn.0042e360
add esp, 4
lea esi, [esp + 0x1ae]
mov edi, 3
xor edx, edx
mov eax, 0x8000
lea ecx, [esi - 0xfe]
nop
movzx ebx, word [ecx]
cmp ebx, eax
jle 0x50ab73
lea ebx, [edx + 0x80]
shl ebx, 8
mov word [ecx], bx
add eax, 0x100
inc edx
add ecx, 2
cmp eax, 0x10000
jl 0x50ab60
cmp word [esi], 0xfe00
jbe 0x50ab8f
mov word [esi], 0xfe00
add esi, 0x200
dec edi
jne 0x50ab52
jmp 0x50aba7
push str.skipping_W2K_gamma_clamp._n
call fcn.0042e360
add esp, 4
pop ebp
lea esi, [esp + 0xae]
mov edi, 3
pop ebx
mov eax, esi
mov edx, 0x33
lea esp, [esp]
mov cx, word [eax - 2]
cmp word [eax], cx
jae 0x50abcc
mov word [eax], cx
mov cx, word [eax]
cmp word [eax + 2], cx
jae 0x50abd9
mov word [eax + 2], cx
mov cx, word [eax + 2]
cmp word [eax + 4], cx
jae 0x50abe7
mov word [eax + 4], cx
mov cx, word [eax + 4]
cmp word [eax + 6], cx
jae 0x50abf5
mov word [eax + 6], cx
mov cx, word [eax + 6]
cmp word [eax + 8], cx
jae 0x50ac03
mov word [eax + 8], cx
add eax, 0xa
dec edx
jne 0x50abc0
add esi, 0x200
dec edi
jne 0x50abb5
mov ecx, dword [0x182fc64]
lea eax, [esp + 0xa8]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetDeviceGammaRamp]
test eax, eax
jne 0x50ac38
push str.SetDeviceGammaRamp_failed._n
call fcn.0042e2f0
add esp, 4
pop edi
mov ecx, dword [esp + 0x6a4]
xor ecx, dword [esp + 0x6a8]
pop esi
add esp, 0x6a4
jmp fcn.00523319