Function at 0x18001b220
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0x488]
sub rsp, 0x588
mov rax, qword [0x1800a98a0]
xor rax, rsp
mov qword [rbp + 0x470], rax
lea rdx, [rsp + 0x48]
lea rcx, str.PerProcessSystemDpi
call fcn.18001b3c8
mov rcx, qword gs:[0x60]
test eax, eax
jne 0x180040490
movabs rdi, 0x40000000000000
test qword [rcx + 0x2d0], rdi
jne 0x18001b3a7
mov qword [rsp + 0x5a0], rbx
lea rdx, [rbp + 0x50]
xor ebx, ebx
mov qword [rsp + 0x5a8], rsi
mov r8d, 0x104
mov qword [rsp + 0x38], rbx
xor ecx, ecx
mov qword [rsp + 0x5b8], r14
mov esi, ebx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
je 0x18001b311
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rdx, str.RegistryMachineSoftwarePoliciesMicrosoftWindowsDisplay
lea rcx, [rbp - 0x30]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rbp - 0x30]
mov dword [rbp - 0x10], 0x30
xorps xmm0, xmm0
mov qword [rbp], rax
lea r8, [rbp - 0x10]
mov qword [rbp - 8], rbx
mov edx, 0x20019
mov dword [rbp + 8], 0x240
lea rcx, [rsp + 0x38]
movdqu xmmword [rbp + 0x10], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
test eax, eax
jns 0x1800404d9
mov r8d, 0x104
mov qword [rsp + 0x40], rbx
lea rdx, [rbp + 0x260]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
je 0x18001b38f
lea rdx, [rbp + 0x260]
lea rcx, [rbp - 0x70]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rdx, str.RegistryMachineSoftwarePoliciesMicrosoftWindowsDisplay
lea rcx, [rbp - 0x20]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rbp - 0x20]
mov dword [rbp + 0x20], 0x30
xorps xmm0, xmm0
mov qword [rbp + 0x30], rax
lea r8, [rbp + 0x20]
mov qword [rbp + 0x28], rbx
mov edx, 0x20019
mov dword [rbp + 0x38], 0x240
lea rcx, [rsp + 0x40]
movdqu xmmword [rbp + 0x40], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
test eax, eax
jns 0x18004071f
mov rsi, qword [rsp + 0x5a8]
mov rbx, qword [rsp + 0x5a0]
mov r14, qword [rsp + 0x5b8]
mov rcx, qword [rbp + 0x470]
xor rcx, rsp
call fcn.180033470
add rsp, 0x588
pop rdi
pop rbp
ret
cmp dword [rsp + 0x48], 0
mov rcx, qword [rcx + 0x2d0]
mov rax, qword gs:[0x60]
je 0x1800404c0
movabs rdx, 0x20000000000000
or rcx, rdx
mov qword [rax + 0x2d0], rcx
jmp 0x18001b3a7
movabs rdi, 0x40000000000000
or rcx, rdi
mov qword [rax + 0x2d0], rcx
jmp 0x18001b3a7
lea rdx, str.DisablePerProcessSystemDPIForProcesses
lea rcx, [rbp - 0x50]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x50]
mov dword [rsp + 0x20], ebx
lea r8d, [r9 + 2]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
cmp eax, 0xc0000023
jne 0x1800406d7
mov r8d, dword [rsp + 0x30]
mov edx, 8
mov rcx, qword [0x1800a9f20]
mov qword [rsp + 0x580], r15
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r15, rax
test rax, rax
je 0x1800406cf
mov ecx, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x50]
mov dword [rsp + 0x20], ecx
mov r9, r15
mov rcx, qword [rsp + 0x38]
mov r8d, 2
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
test eax, eax
js 0x1800406bd
cmp dword [r15 + 4], 1
jne 0x1800406bd
mov rdx, qword [rsp + 0x78]
movzx r8d, word [rsp + 0x70]
mov eax, r8d
mov qword [rsp + 0x5b0], r12
shr rax, 1
lea rcx, [rdx + rax*2]
cmp rcx, rdx
jbe 0x1800405c1
movzx eax, word [rcx]
cmp ax, 0x5c
je 0x1800405bd
cmp ax, 0x3a
je 0x1800405bd
sub rcx, 2
cmp rcx, rdx
ja 0x1800405a3
jmp 0x1800405c1
add rcx, 2
mov qword [rbp - 0x78], rcx
lea r14, [r15 + 0xc]
sub rcx, rdx
sar rcx, 1
add cx, cx
sub r8w, cx
mov word [rbp - 0x80], r8w
mov word [rbp - 0x7e], r8w
mov eax, dword [r15 + 8]
shr rax, 1
lea r12, [r14 + rax*2]
cmp r14, r12
jae 0x1800406b5
mov rdx, r14
cmp r14, r12
jae 0x180040613
movzx eax, word [rdx]
cmp ax, 0x3b
je 0x180040613
test ax, ax
je 0x180040613
add rdx, 2
cmp rdx, r12
jb 0x1800405fc
mov rcx, r14
lea rax, [rdx - 2]
lea r14, [rdx + 2]
cmp rax, rcx
jb 0x180040714
movzx edx, word [rax]
cmp dx, 0x20
je 0x180040636
cmp dx, 9
jne 0x18004063f
sub rax, 2
cmp rax, rcx
jae 0x180040627
cmp rax, rcx
jbe 0x180040714
movzx edx, word [rcx]
cmp dx, 0x20
je 0x180040707
cmp dx, 9
je 0x180040707
cmp rcx, rax
jae 0x180040714
sub rax, rcx
mov qword [rsp + 0x58], rcx
sar rax, 1
lea rdx, [rsp + 0x70]
inc ax
lea rcx, [rsp + 0x50]
add ax, ax
mov r8b, 1
mov word [rsp + 0x50], ax
mov word [rsp + 0x52], ax
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
jne 0x1800406b0
mov r8b, 1
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
je 0x180040714
mov esi, 1
mov r12, qword [rsp + 0x5b0]
mov rcx, qword [0x1800a9f20]
mov r8, r15
xor edx, edx
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r15, qword [rsp + 0x580]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1800406e7
call qword [sym.imp.ntdll.dll_NtClose]
test esi, esi
je 0x18001b311
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x2d0]
or rcx, rdi
jmp 0x180040928
add rcx, 2
cmp rax, rcx
ja 0x180040648
cmp r14, r12
jb 0x1800405f4
jmp 0x1800406b5
lea rdx, str.EnablePerProcessSystemDPIForProcesses
lea rcx, [rbp - 0x40]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x34]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x40]
mov dword [rsp + 0x20], ebx
lea r8d, [r9 + 2]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
cmp eax, 0xc0000023
jne 0x1800408f3
mov r8d, dword [rsp + 0x34]
mov edx, 8
mov rcx, qword [0x1800a9f20]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rsi, rax
test rax, rax
je 0x1800408f3
mov ecx, dword [rsp + 0x34]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rdx, [rbp - 0x40]
mov dword [rsp + 0x20], ecx
mov r9, rsi
mov rcx, qword [rsp + 0x40]
mov r8d, 2
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
test eax, eax
js 0x1800408e1
cmp dword [rsi + 4], 1
jne 0x1800408e1
mov r8, qword [rbp - 0x68]
movzx edx, word [rbp - 0x70]
mov eax, edx
shr rax, 1
lea rcx, [r8 + rax*2]
cmp rcx, r8
jbe 0x1800407f2
movzx eax, word [rcx]
cmp ax, 0x5c
je 0x1800407ee
cmp ax, 0x3a
je 0x1800407ee
sub rcx, 2
cmp rcx, r8
ja 0x1800407d4
jmp 0x1800407f2
add rcx, 2
mov qword [rbp - 0x58], rcx
lea rdi, [rsi + 0xc]
sub rcx, r8
sar rcx, 1
add cx, cx
sub dx, cx
mov word [rbp - 0x60], dx
mov word [rbp - 0x5e], dx
mov eax, dword [rsi + 8]
shr rax, 1
lea r14, [rdi + rax*2]
cmp rdi, r14
jae 0x1800408e1
mov rdx, rdi
cmp rdi, r14
jae 0x180040840
movzx eax, word [rdx]
cmp ax, 0x3b
je 0x180040840
test ax, ax
je 0x180040840
add rdx, 2
cmp rdx, r14
jb 0x180040829
mov rcx, rdi
lea rax, [rdx - 2]
lea rdi, [rdx + 2]
cmp rax, rcx
jb 0x18004094a
movzx edx, word [rax]
cmp dx, 0x20
je 0x180040863
cmp dx, 9
jne 0x18004086c
sub rax, 2
cmp rax, rcx
jae 0x180040854
cmp rax, rcx
jbe 0x18004094a
movzx edx, word [rcx]
cmp dx, 0x20
je 0x18004093d
cmp dx, 9
je 0x18004093d
cmp rcx, rax
jae 0x18004094a
sub rax, rcx
mov qword [rsp + 0x68], rcx
sar rax, 1
lea rdx, [rbp - 0x70]
inc ax
lea rcx, [rsp + 0x60]
add ax, ax
mov r8b, 1
mov word [rsp + 0x60], ax
mov word [rsp + 0x62], ax
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
jne 0x1800408dc
mov r8b, 1
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
je 0x18004094a
mov ebx, 1
mov rcx, qword [0x1800a9f20]
mov r8, rsi
xor edx, edx
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180040903
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
je 0x18001b38f
mov rax, qword gs:[0x60]
movabs rdx, 0x20000000000000
mov rcx, qword [rax + 0x2d0]
or rcx, rdx
mov rax, qword gs:[0x60]
mov qword [rax + 0x2d0], rcx
jmp 0x18001b38f
add rcx, 2
cmp rax, rcx
ja 0x180040875
cmp rdi, r14
jb 0x180040821
jmp 0x1800408e1