Function at 0x14003f180
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
sub rsp, 0x60
xor r12d, r12d
lea r8, [rax + 0x10]
mov rdi, rcx
mov dword [rax + 0x18], r12d
lea rdx, [rax + 0x18]
mov dword [rax + 0x10], r12d
xor bpl, bpl
lea ecx, [r12 + 0x42]
call qword [sym.imp.USER32.dll_GetDisplayConfigBufferSizes]
test eax, eax
jne 0x14003f3ed
mov ecx, dword [rsp + 0x90]
mov eax, 0x48
mul rcx
mov qword [rsp + 0x80], rbx
mov rbx, 0xffffffffffffffff
mov qword [rsp + 0x98], rsi
cmovo rax, rbx
mov qword [rsp + 0x58], r14
mov rcx, rax
call fcn.14004feec
mov edx, dword [rsp + 0x88]
mov rsi, rax
mov eax, 0x40
mul rdx
cmovo rax, rbx
mov rcx, rax
call fcn.14004feec
lea r9, [rsp + 0x88]
mov qword [rsp + 0x28], r12
mov r8, rsi
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x90]
mov r14, rax
lea ecx, [rbx + 0x43]
call qword [sym.imp.USER32.dll_QueryDisplayConfig]
test eax, eax
jne 0x14003f38a
mov edx, dword [rsi + 0x20]
mov bpl, 1
mov ecx, dword [rsi + 0xc]
mov r8d, edx
mov r10d, dword [rsi + 8]
mov eax, ecx
mov rbx, qword [rsi + 0x14]
shl rax, 6
shl r8, 6
shl rdx, 6
shl rcx, 6
mov eax, dword [rax + r14 + 0x14]
mov qword [rsp + 0x50], r15
mov r15d, dword [r8 + r14 + 4]
mov dword [rdi + 0x58], eax
mov eax, dword [rcx + r14 + 0x10]
mov dword [rdi + 0x54], eax
mov eax, dword [rdx + r14 + 0x20]
mov dword [rdi + 0x5c], eax
mov eax, dword [r8 + r14 + 0x24]
mov dword [rdi + 0x60], eax
mov eax, dword [r8 + r14 + 0x18]
mov dword [rdi + 0x64], eax
mov eax, dword [r8 + r14 + 0x1c]
mov dword [rdi + 0x68], eax
mov eax, dword [rsi + 0x28]
mov dword [rdi + 0x3c], eax
mov edx, dword [rsi + 0x30]
mov dword [rdi + 0x44], edx
mov eax, dword [rsi + 0x34]
mov dword [rdi + 0x48], eax
cmp dword [rsi + 0x24], 0x80000000
jne 0x14003f2e0
test byte [rsi + 0x44], 0x10
mov ecx, dword [rdi + 0x4c]
je 0x14003f2d5
or ecx, 1
mov dword [rdi + 0x50], edx
and ecx, 0xfffffffd
lea eax, [rdx + rdx]
mov dword [rdi + 0x4c], ecx
mov dword [rdi + 0x44], eax
jmp 0x14003f2f2
and ecx, 0xfffffffe
and ecx, 0xfffffffd
mov dword [rdi + 0x4c], ecx
jmp 0x14003f2f2
mov eax, dword [rdi + 0x4c]
test al, 1
je 0x14003f2f2
cmp edx, dword [rdi + 0x50]
jbe 0x14003f2f2
or eax, 2
mov dword [rdi + 0x4c], eax
lea r9, [rdi + 0x38]
mov qword [rsp + 0x20], r12
mov r8d, r10d
mov rdx, rbx
mov rcx, rdi
call fcn.14003efe0
xor eax, eax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x40], rax
add rdi, 0x40
mov dword [rsp + 0x30], 9
mov dword [rsp + 0x34], 0x20
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x48], rax
call qword [sym.imp.USER32.dll_DisplayConfigGetDeviceInfo]
mov r15, qword [rsp + 0x50]
test eax, eax
jne 0x14003f35e
test rdi, rdi
je 0x14003f35e
mov eax, dword [rsp + 0x44]
shr eax, 1
and eax, 1
mov dword [rdi], eax
jmp 0x14003f3bb
cmp qword [0x1400da5d8], r12
je 0x14003f3bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400da5d8]
lea r8, str.DisplaySettingsManager::GetHDRSetting:_DisplayConfigGetDeviceInfo_failed_with_error_code__d
mov r9d, eax
mov edx, 2
call fcn.140040750
jmp 0x14003f3bb
cmp qword [0x1400da5d8], r12
je 0x14003f3bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400da5d8]
lea r9, str.DisplaySettingsManager::SaveDisplaySettings:_QueryDisplayConfig_failed_with_error_code__d
mov edx, 0x60004004
mov dword [rsp + 0x20], eax
mov r8d, 1
call fcn.140040490
mov rcx, rsi
call fcn.14004fef4
mov rcx, r14
call fcn.14004fef4
mov r14, qword [rsp + 0x58]
movzx eax, bpl
mov rsi, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x80]
add rsp, 0x60
pop r12
pop rdi
pop rbp
ret
cmp qword [0x1400da5d8], r12
je 0x14003f41e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400da5d8]
lea r9, str.DisplaySettingsManager::SaveDisplaySettings:_GetDisplayConfigBufferSizes_failed_with_error_code__d
mov edx, 0x60004004
mov dword [rsp + 0x20], eax
mov r8d, 1
call fcn.140040490
movzx eax, bpl
add rsp, 0x60
pop r12
pop rdi
pop rbp
ret