Function at 0x140041310
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rbp
push rdi
sub rsp, 0x208
lea rax, [rcx + 0xb4]
mov rdi, rcx
lea rcx, [r11 + 8]
mov rbp, rdx
mov qword [rsp + 0x28], rcx
lea r9, [r11 + 0x18]
lea rdx, str.DeviceProfile
xor r8d, r8d
mov rcx, rbp
mov dword [r11 + 8], 0x1a0
mov dword [r11 + 0x18], 3
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x14004136e
xor eax, eax
add rsp, 0x208
pop rdi
pop rbp
ret
mov qword [rsp + 0x228], rbx
mov qword [rsp + 0x238], rsi
xor esi, esi
cmp dword [0x1400df344], esi
mov qword [rsp + 0x200], r12
mov dword [rsp + 0x230], 3
mov dword [rsp + 0x220], 0xe4
je 0x140041464
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
lea r8, [rsp + 0x50]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x50], 0x1a8
xor ebx, ebx
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
je 0x140041464
mov eax, dword [rsp + 0xf4]
test al, 4
je 0x1400413ef
test al, 1
jne 0x14004140a
add ebx, 1
lea r8, [rsp + 0x50]
xor r9d, r9d
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
test eax, eax
jne 0x1400413e0
jmp 0x140041464
xor ecx, ecx
nop
movzx eax, byte [rsp + rcx + 0x54]
add rcx, 1
test al, al
mov byte [rsp + rcx + 0x3f], al
jne 0x140041410
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x1a8
call fcn.14007cd30
lea edx, [rbx + 1]
lea r8, [rsp + 0x50]
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x50], 0x1a8
call qword [sym.imp.USER32.dll_EnumDisplayDevicesA]
xor r11d, r11d
movzx eax, byte [rsp + r11 + 0x54]
add r11, 1
test al, al
mov byte [rsp + r11 + 0x2f], al
jne 0x140041451
lea rcx, [rsp + 0x220]
lea rax, [rdi + 0x254]
lea r9, [rsp + 0x230]
mov qword [rsp + 0x28], rcx
lea rdx, str.Device1
xor r8d, r8d
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov r12d, 1
test eax, eax
je 0x1400414c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Device1
lea rcx, str.CAutoDisplayProfile::UpdateFromRegistry.__s_failed._err_d_n
mov r8d, eax
call fcn.14000cbb0
jmp 0x140041538
cmp dword [0x1400df344], esi
je 0x14004151e
lea r8, [rdi + 0x258]
lea rax, [rsp + 0x40]
mov r9, r8
sub r9, rax
nop
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r9]
sub edx, ecx
jne 0x1400414f3
add rax, r12
test ecx, ecx
jne 0x1400414e0
test edx, edx
je 0x14004151e
lea rax, [rsp + 0x40]
lea rcx, [rsp + 0x40]
sub r8, rax
nop
nop
nop
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
add rcx, r12
test al, al
jne 0x140041510
lea rdx, [rdi + 0x258]
lea rcx, [0x1400e0890]
call fcn.14003a020
cmp eax, 0xffffffff
cmovne esi, r12d
lea rcx, [rsp + 0x220]
lea rax, [rdi + 0x338]
lea r9, [rsp + 0x230]
mov qword [rsp + 0x28], rcx
lea rdx, str.Device2
xor r8d, r8d
mov rcx, rbp
mov dword [rsp + 0x230], 3
mov dword [rsp + 0x220], 0xe4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x1400415a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Device2
lea rcx, str.CAutoDisplayProfile::UpdateFromRegistry.__s_failed._err_d_n
mov r8d, eax
call fcn.14000cbb0
jmp 0x140041616
cmp dword [0x1400df344], 0
je 0x1400415fe
lea r8, [rdi + 0x33c]
lea rax, [rsp + 0x30]
mov r9, r8
sub r9, rax
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r9]
sub edx, ecx
jne 0x1400415d3
add rax, r12
test ecx, ecx
jne 0x1400415c0
test edx, edx
je 0x1400415fe
lea rax, [rsp + 0x30]
lea rdx, [rsp + 0x30]
sub r8, rax
nop
nop
nop
movzx eax, byte [rdx]
mov byte [r8 + rdx], al
add rdx, r12
test al, al
jne 0x1400415f0
lea rdx, [rdi + 0x33c]
lea rcx, [0x1400e0890]
call fcn.14003a020
cmp eax, 0xffffffff
jne 0x140041621
test esi, esi
jne 0x140041621
xor eax, eax
jmp 0x140041753
lea rax, [rsp + 0x220]
lea rbx, [rdi + 0x44]
lea r9, [rsp + 0x230]
mov qword [rsp + 0x28], rax
lea rdx, str.DisplayLimits
xor r8d, r8d
mov rcx, rbp
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x230], 3
mov dword [rsp + 0x220], 0x70
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x140041696
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x70]
call fcn.14007cd30
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.DisplayLimits
lea rcx, str.CAutoDisplayProfile::UpdateFromRegistry.__s_value_is_not_found._err_d_n
mov r8d, eax
call fcn.14000cbb0
lea rax, [rsp + 0x220]
lea rbx, [rdi + 0x41c]
lea r9, [rsp + 0x230]
mov qword [rsp + 0x28], rax
lea rdx, str.ProfileFlags
xor r8d, r8d
mov rcx, rbp
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x230], 4
mov dword [rsp + 0x220], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x140041706
mov dword [rbx], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.ProfileFlags
lea rcx, str.CAutoDisplayProfile::UpdateFromRegistry.__s_failed._err_d_n
mov r8d, eax
call fcn.14000cbb0
lea rdx, [rsp + 0x220]
lea rcx, [rdi + 0x420]
lea r9, [rsp + 0x230]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], rcx
lea rdx, str.Timestamp
xor r8d, r8d
mov rcx, rbp
mov dword [rsp + 0x220], 0x10
mov dword [rsp + 0x230], 3
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, r12d
mov rsi, qword [rsp + 0x238]
mov rbx, qword [rsp + 0x228]
mov r12, qword [rsp + 0x200]
add rsp, 0x208
pop rdi
pop rbp
ret