Function at 0x416410
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x5f3fcc]
xor eax, esp
mov dword [esp + 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x416436
mov eax, dword [ecx]
push 1
call dword [eax]
cmp byte [edi + 0xb], 0
je 0x4164d4
mov eax, dword [edi + 0x1058]
push 0
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x105c]
push 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
push 8
push 0x407
push dword [edi + 0x1054]
call dword [sym.imp.GDI32.dll_ExtEscape]
test eax, eax
jg 0x416488
push eax
push str.Cant_unmap_buffer:_error_code___d
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
push dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call esi
xor ecx, ecx
test eax, eax
setne cl
push ecx
push str.ret0_code___d
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
push dword [esp + 0x10]
call esi
xor ecx, ecx
test eax, eax
setne cl
push ecx
push str.ret1_code___d
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
mov byte [edi + 0xb], 0
cmp byte [edi + 9], 0
je 0x416652
mov eax, dword [edi + 0x1054]
test eax, eax
je 0x41650c
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
push str.The_mirror_driver_device_context_released
push dword [0x5fd6d0]
mov dword [edi + 0x1054], 0
call fcn.0040b090
add esp, 8
cmp byte [edi + 0xa], 0
je 0x41662c
push str.Unloading_mirror_driver...
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 8
mov byte [edi + 0xa], 0
mov dword [edi + 0x424], 0
mov dword [edi + 0x428], 0
cmp dword [0x5fd718], 0
jne 0x416569
push 0x5fd718
mov dword [0x5fd718], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
neg eax
sbb eax, eax
and dword [0x5fd718], eax
cmp dword [0x5fd71c], 5
jne 0x41657f
cmp dword [0x5fd720], 0
je 0x41662c
lea esi, [edi + 0x18]
push esi
push str.commitDisplayChanges_1_:___s_
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
lea ebx, [edi + 0x378]
push 0
test ebx, ebx
je 0x4165f4
push 1
push 0
push ebx
push esi
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsExW]
test eax, eax
jns 0x4165c6
push eax
push str.1st_ChangeDisplaySettingsEx___failed_with_code__d
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
push esi
push str.CommitDisplayChanges_2_:___s_
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
push 0
push 0
push 0
push ebx
push esi
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsExW]
test eax, eax
jns 0x416619
push eax
push str.2nd_ChangeDisplaySettingsEx___failed_with_code__d
jmp 0x41660b
push 0
push 0
push 0
push esi
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsExW]
test eax, eax
jns 0x416619
push eax
push str.ChangeDisplaySettingsEx___failed_with_code__d
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 0xc
push str.Mirror_driver_is_unloaded
push dword [0x5fd6d0]
call fcn.0040b090
add esp, 8
push 0xcdc
lea eax, [edi + 0x378]
push 0
push eax
call fcn.0056a3b0
mov eax, 0xdc
mov byte [edi + 9], 0
add esp, 0xc
mov word [edi + 0x3bc], ax
cmp byte [edi + 8], 0
je 0x41667f
mov eax, dword [edi + 0x360]
test eax, eax
je 0x41667b
cmp eax, dword [edi + 0x364]
je 0x416671
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [edi + 0x360], 0
mov byte [edi + 8], 0
mov ecx, dword [esp + 0x14]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00567879
mov esp, ebp
pop ebp
ret