Function at 0x140058890
Capabilities:
Check os version

Disassembly:
mov dword [rsp + 8], ecx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x16e8
call fcn.1400a12b0
sub rsp, rax
xor r12d, r12d
bt dword [0x1400dd138], 0x10
mov dword [rsp + 0x1740], r12d
mov dword [rsp + 0x1738], r12d
mov r15d, r12d
mov r14d, r12d
mov dword [rsp + 0x30], r12d
jae 0x1400588e1
lea rcx, str.PowerXpressChangeDisplaySettings:_Start_n
call fcn.14000cbb0
lea rcx, [rsp + 0x7f0]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
lea rcx, [rsp + 0x3f0]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
lea rbx, [rsp + 0x9a0]
lea rdi, [rsp + 0x9a0]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov esi, 8
nop
nop
nop
xor edx, edx
mov r8d, 0x1a8
mov rcx, rdi
call fcn.14007cd30
mov dword [rbx], 0x1a8
add rbx, 0x1a8
add rdi, 0x1a8
sub rsi, 1
jne 0x140058940
mov r13d, r12d
nop
lea r8, [rsp + 0x9a0]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov ebp, r12d
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
je 0x140058b44
mov rdi, r12
lea rsi, [rsp + 0xa44]
lea r12, [rsp + 0x38]
mov ebx, dword [rsi]
test bl, 4
je 0x1400589cf
test bl, 1
je 0x1400589cf
lea rcx, [rsp + 0x7f0]
lea rdx, [rsi - 0xa4]
mov r8d, 0x1a8
call fcn.14007d090
mov r15d, ebp
mov r13d, 1
test bl, 8
jne 0x140058afc
lea rbx, [rsp + rdi + 0xa48]
lea rdx, str.PCIVEN_1002DEV_9581
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9583
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_95C2
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_95C4
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9591
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9593
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9552
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9553
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9480
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
je 0x140058af3
lea rdx, str.PCIVEN_1002DEV_9488
mov r8d, 0x15
mov rcx, rbx
call fcn.14007f2bc
test eax, eax
mov eax, 1
jne 0x140058af8
mov eax, 2
mov dword [r12], eax
add ebp, 1
xor r9d, r9d
xor ecx, ecx
mov edi, ebp
mov edx, ebp
add rsi, 0x1a8
add r12, 4
imul rdi, rdi, 0x1a8
lea r8, [rsp + rdi + 0x9a0]
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
jne 0x1400589a0
test r13d, r13d
mov dword [rsp + 0x1748], r15d
jne 0x140058be0
xor r12d, r12d
lea rbx, [rsp + 0x9a0]
lea rdi, [rsp + 0x9a0]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
mov esi, 8
nop
xor edx, edx
mov r8d, 0x1a8
mov rcx, rdi
call fcn.14007cd30
mov dword [rbx], 0x1a8
add rbx, 0x1a8
add rdi, 0x1a8
sub rsi, 1
jne 0x140058b70
lea ecx, [rsi + 0x64]
call qword [sym.imp.KERNEL32.dll_Sleep]
add r14d, 1
cmp r14d, 0xc8
jne 0x140058970
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_No_primary_desktop__timeout_for_20_secs_n
call fcn.14000cbb0
xor eax, eax
add rsp, 0x16e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
test r14d, r14d
je 0x140058bfe
bt dword [0x1400dd138], 0x10
jae 0x140058bfe
lea rcx, str.PowerXpressChangeDisplaySettings:_Before_ChangeDisplaySettingsEx__wait_for_100_d_millisec_n
mov edx, r14d
call fcn.14000cbb0
mov r15d, dword [rsp + 0x1740]
xor r12d, r12d
lea rdi, [rsp + 0xa44]
mov esi, r12d
lea rbx, [rsp + 0x38]
nop
nop
mov eax, dword [rdi]
test al, 1
je 0x140058c29
or r15d, dword [rbx]
mov ecx, dword [rsp + 0x1738]
or ecx, dword [rbx]
test al, 8
mov dword [rsp + 0x1738], ecx
jne 0x140058c8a
mov eax, esi
lea rdx, str..DISPLAY
mov r8d, 0xb
imul rax, rax, 0x1a8
lea rbp, [rsp + rax + 0x9a4]
mov rcx, rbp
call fcn.14007f2bc
test eax, eax
jne 0x140058c83
bt dword [0x1400dd138], 0x10
jae 0x140058c83
mov r8d, dword [rdi]
lea rcx, str.DeviceName:__s__StateFlag:__.8X
mov rdx, rbp
call fcn.14000cbb0
mov ecx, dword [rsp + 0x1738]
add esi, 1
add rbx, 4
add rdi, 0x1a8
cmp esi, 8
jb 0x140058c20
test cl, 1
mov dword [rsp + 0x1740], r15d
mov r15d, dword [rsp + 0x1748]
jne 0x140058ccc
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_integrated_display_device_is_not_enabled_loaded__n
jmp 0x140058bc5
test cl, 2
jne 0x140058ceb
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_discrete_display_device_is_not_enabled_loaded__n
jmp 0x140058bc5
mov eax, dword [rsp + 0x1740]
test al, 1
je 0x140058d17
test al, 2
je 0x140058d17
bt dword [0x1400dd138], 0x10
jae 0x140058d10
lea rcx, str.PowerXpressChangeDisplaySettings:_already_has_an_extended_desktop_n
call fcn.14000cbb0
mov edi, 1
jmp 0x140058d4c
cmp dword [rsp + r15*4 + 0x38], 2
jne 0x140058d49
cmp dword [rsp + 0x1730], 2
jne 0x140058d49
bt dword [0x1400dd138], 0x10
jae 0x140058d3f
lea rcx, str.PowerXpressChangeDisplaySettings:_Os_automatically_setup_primary_to_discrete_already_n
call fcn.14000cbb0
mov eax, 1
jmp 0x140058bcc
mov edi, r12d
mov ebx, dword [rsp + r15*4 + 0x38]
mov eax, r12d
lea rcx, [rsp + 0x38]
cmp ebx, 1
jne 0x140058d73
nop
cmp dword [rcx], 2
je 0x140058d86
add eax, 1
add rcx, 4
cmp eax, 8
jb 0x140058d60
jmp 0x140058da8
cmp dword [rcx], 1
je 0x140058d86
add eax, 1
add rcx, 4
cmp eax, 8
jb 0x140058d73
jmp 0x140058da8
imul rax, rax, 0x1a8
lea rcx, [rsp + 0x3f0]
mov r8d, 0x1a8
lea rdx, [rsp + rax + 0x9a0]
call fcn.14007d090
mov r15d, dword [rsp + 0x1730]
cmp r15d, 1
jne 0x140058e21
lea rcx, [rsp + 0x1a0]
mov dword [rsp + 0x1a0], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x140058e21
cmp dword [rsp + 0x1a4], 6
mov ecx, r12d
mov eax, r12d
sete cl
cmp dword [rsp + 0x1b0], 2
sete al
cmp eax, ecx
jne 0x140058e21
call fcn.1400680e0
test eax, eax
je 0x140058e21
lea r8d, [r15 + 0xb]
lea rdx, str.Service_Pack
lea rcx, [rsp + 0x1b4]
mov esi, r15d
call fcn.14007f2bc
test eax, eax
cmove esi, r12d
mov dword [rsp + 0x30], esi
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x9c
call fcn.14007cd30
lea rcx, [rsp + 0x750]
xor edx, edx
mov r8d, 0x9c
call fcn.14007cd30
lea rcx, [rsp + 0x100]
xor edx, edx
mov r8d, 0x9c
call fcn.14007cd30
lea r8, [rsp + 0x60]
lea rcx, [rsp + 0x7f4]
or edx, 0xffffffff
call qword [sym.imp.USER32.dll_EnumDisplaySettingsA]
lea r8, [rsp + 0x750]
lea rcx, [rsp + 0x3f4]
or edx, 0xffffffff
call qword [sym.imp.USER32.dll_EnumDisplaySettingsA]
bt dword [0x1400dd138], 0x10
jae 0x140058ecf
mov eax, dword [rsp + 0x88]
mov r9d, dword [rsp + 0xc8]
mov r8d, dword [rsp + 0xd0]
mov edx, dword [rsp + 0xcc]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0xd8]
lea rcx, str.PowerXpressChangeDisplaySettings:_current_mode__.4dx_.4dx_2d__2dHz:_.8x_n
mov dword [rsp + 0x20], eax
call fcn.14000cbb0
lea r9, [rsp + 0x100]
lea r8, [rsp + 0x60]
lea rcx, [rsp + 0x3f4]
or edx, 0xffffffff
call fcn.14006ad80
test eax, eax
je 0x140058f51
bt dword [0x1400dd138], 0x10
mov r9d, dword [rsp + 0x168]
mov r8d, dword [rsp + 0x170]
mov edx, dword [rsp + 0x16c]
mov ecx, dword [rsp + 0x178]
mov dword [rsp + 0xc8], r9d
mov dword [rsp + 0xd0], r8d
mov dword [rsp + 0xcc], edx
mov dword [rsp + 0xd8], ecx
jae 0x140058f51
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rcx, str.PowerXpressChangeDisplaySettings:_Candidate_mode_to_set__.4dx_.4dx_2d__2dHz:_.8x_n
call fcn.14000cbb0
mov r13d, dword [rsp + 0xcc]
mov r14d, dword [rsp + 0xd0]
xor esi, esi
test edi, edi
je 0x14005901d
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x3f4]
mov r9d, 0x10000001
xor r8d, r8d
mov dword [rsp + 0x8c], esi
mov dword [rsp + 0x90], esi
mov dword [rsp + 0xcc], esi
mov dword [rsp + 0xd0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x140058fc6
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_cannot_remove_extended_dekstop_ChangeDisplaySettingsEx_1__fail_n
jmp 0x140058bc5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x140058ff9
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_cannot_remove_extended_dekstop_ChangeDisplaySettingsEx_2__fail_n
jmp 0x140058bc5
bt dword [0x1400dd138], 0x10
jae 0x14005900f
lea rcx, str.PowerXpressChangeDisplaySettings:_successfully_remove_extended_desktop_before_perform_change_desktop_n
call fcn.14000cbb0
cmp ebx, 2
jne 0x14005901d
cmp r15d, ebx
je 0x140058d3f
bt dword [0x1400dd138], 0x10
jae 0x140059033
lea rcx, str.PowerXpressChangeDisplaySettings:_Ready_to_ChangeDisplaySettingsEx_n
call fcn.14000cbb0
bt dword [rsp + 0x494], 0x1b
jae 0x140059051
cmp r15d, 1
jne 0x140059051
lea rcx, [rsp + 0x498]
call fcn.1400569f0
call fcn.1400673f0
cmp eax, 9
jne 0x1400591e8
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x8c], r13d
mov dword [rsp + 0x90], esi
bt eax, 0x1d
mov dword [rsp + 0xcc], r13d
mov dword [rsp + 0xd0], r14d
mov word [rsp + 0x8c], r12w
mov word [rsp + 0x8e], r12w
jae 0x1400590a8
btr eax, 0x1d
mov dword [rsp + 0x88], eax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x3f4]
mov r9d, 0x10000011
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x1400590e3
bt dword [0x1400dd138], 0x10
jae 0x1400590e3
lea rcx, str._1_win7:_CDS_fail_n
call fcn.14000cbb0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x140059112
bt dword [0x1400dd138], 0x10
jae 0x140059112
lea rcx, str._2_win7:_CDS_fail_n
call fcn.14000cbb0
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x7f4]
mov r9d, 0x10000001
xor r8d, r8d
mov dword [rsp + 0x8c], esi
mov dword [rsp + 0x90], esi
mov dword [rsp + 0xcc], esi
mov dword [rsp + 0xd0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x14005916d
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str._3_win7:_CDS_fail_n
jmp 0x140058bc5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x14005919c
bt dword [0x1400dd138], 0x10
jae 0x14005919c
lea rcx, str._4_win7:_CDS_fail_n
call fcn.14000cbb0
cmp dword [rsp + 0x30], 0
je 0x1400591c8
bt dword [0x1400dd138], 0x10
jae 0x1400591b9
lea rcx, str.PowerXpressChangeDisplaySettings:_apply_workaround_to_disable_enable_DWM_n
call fcn.14000cbb0
call fcn.140067fe0
cmp eax, 1
jne 0x1400591c8
call fcn.140068060
bt dword [0x1400dd138], 0x10
jae 0x1400591de
lea rcx, str.PowerXpressChangeDisplaySettings:_End_n
call fcn.14000cbb0
mov eax, 1
jmp 0x140058bcc
mov r12d, esi
nop
nop
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x7f4]
mov r9d, 0x10000001
xor r8d, r8d
mov dword [rsp + 0x8c], esi
mov dword [rsp + 0x90], esi
mov dword [rsp + 0xcc], esi
mov dword [rsp + 0xd0], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
jne 0x1400595db
mov dword [rsp + 0x8c], esi
mov word [rsp + 0x8c], ax
mov word [rsp + 0x8e], ax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x90], esi
mov dword [rsp + 0xcc], r13d
bt eax, 0x1d
mov dword [rsp + 0xd0], r14d
jae 0x14005927b
btr eax, 0x1d
mov dword [rsp + 0x88], eax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x3f4]
mov r9d, 0x10000011
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x1400592b6
bt dword [0x1400dd138], 0x10
jae 0x1400592b6
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_ChangeDisplaySettingsEx_2__fail_n
call fcn.14000cbb0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
test eax, eax
je 0x1400592e5
bt dword [0x1400dd138], 0x10
jae 0x1400592e5
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_ChangeDisplaySettingsEx_3__fail_n
call fcn.14000cbb0
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edi, esi
mov ebp, esi
nop
nop
nop
lea rcx, [rsp + 0x5a0]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
lea r8, [rsp + 0x5a0]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x5a0], 0x1a8
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
je 0x1400593db
nop
mov ebx, dword [rsp + 0x644]
test bl, 4
je 0x140059371
test bl, 1
je 0x140059371
lea rcx, [rsp + 0x240]
lea rdx, [rsp + 0x5a0]
mov r8d, 0x1a8
call fcn.14007d090
mov edi, 1
test bl, 8
jne 0x140059397
bt dword [0x1400dd138], 0x10
jae 0x140059397
lea rdx, [rsp + 0x5a4]
lea rcx, str.DeviceName:__s__StateFlag:__.8X
mov r8d, ebx
call fcn.14000cbb0
lea rcx, [rsp + 0x5a0]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
add esi, 1
lea r8, [rsp + 0x5a0]
mov edx, esi
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x5a0], 0x1a8
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
jne 0x140059340
test edi, edi
jne 0x1400593e9
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
add ebp, 1
cmp ebp, 0xc8
je 0x140059402
test edi, edi
mov esi, 0
je 0x140059300
test ebp, ebp
je 0x14005941a
bt dword [0x1400dd138], 0x10
jae 0x14005941a
lea rcx, str.PowerXpressChangeDisplaySettings:_After_ChangeDisplaySettingEx__wait_for_100_d_millisec
mov edx, ebp
call fcn.14000cbb0
lea rdx, str.PCIVEN_1002DEV_9581
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9583
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_95C2
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_95C4
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9591
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9593
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9552
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9553
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9480
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
lea rdx, str.PCIVEN_1002DEV_9488
lea rcx, [rsp + 0x2e8]
mov r8d, 0x15
call fcn.14007f2bc
test eax, eax
je 0x140059560
cmp r15d, 1
jmp 0x140059564
cmp r15d, 2
je 0x1400595a1
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
bt dword [0x1400dd138], 0x10
jae 0x14005958c
lea edx, [r12 + 1]
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_and_retry__d
call fcn.14000cbb0
add r12d, 1
mov esi, 0
cmp r12d, 0x32
jb 0x1400591f0
jmp 0x1400595b7
bt dword [0x1400dd138], 0x10
jae 0x1400595b7
lea rcx, str.PowerXpressChangeDisplaySettings:_desktop_correctly_set_on_target_adapter
call fcn.14000cbb0
cmp r12d, 0x32
jne 0x14005919c
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_End_n
jmp 0x140058bc5
bt dword [0x1400dd138], 0x10
jae 0x140058bca
lea rcx, str.PowerXpressChangeDisplaySettings:_fail_due_to_ChangeDisplaySettingsEx_1__fail_n
jmp 0x140058bc5