Function at 0x18001b030
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
lea rbp, [rsp - 0x490]
sub rsp, 0x590
mov rax, qword [0x1800a98a0]
xor rax, rsp
mov qword [rbp + 0x470], rax
lea rdx, [rsp + 0x48]
lea rcx, str.GdiScaling
call fcn.18001b3c8
mov rcx, qword gs:[0x60]
test eax, eax
jne 0x180040008
mov qword [rsp + 0x5a0], rbx
movabs rax, 0x4000000000000000
mov qword [rsp + 0x5a8], rsi
mov qword [rsp + 0x5b0], rdi
mov qword [rsp + 0x588], r14
test qword [rcx + 0x2d0], rax
jne 0x18004024d
xor ebx, ebx
lea rdx, [rbp + 0x50]
mov r8d, 0x104
mov qword [rsp + 0x38], rbx
xor ecx, ecx
mov edi, ebx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
je 0x18001b128
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 0x180040047
call fcn.18001b414
test eax, eax
jne 0x18001b1eb
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 0x18001b1b3
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 0x180040287
mov rdi, qword [rsp + 0x5b0]
mov rsi, qword [rsp + 0x5a8]
mov rbx, qword [rsp + 0x5a0]
mov r14, qword [rsp + 0x588]
mov rcx, qword [rbp + 0x470]
xor rcx, rsp
call fcn.180033470
add rsp, 0x590
pop rbp
ret
mov rax, qword gs:[0x60]
movabs rdx, 0x800000000000000
mov rcx, qword [rax + 0x2d0]
or rcx, rdx
mov rax, qword gs:[0x60]
mov qword [rax + 0x2d0], rcx
jmp 0x18001b1b3
cmp dword [rsp + 0x48], 0
mov rcx, qword [rcx + 0x2d0]
je 0x180040025
movabs rdx, 0x800000000000000
or rcx, rdx
jmp 0x180040032
movabs rax, 0xf7ffffffffffffff
and rcx, rax
mov rax, qword gs:[0x60]
mov qword [rax + 0x2d0], rcx
jmp 0x18001b1d3
lea rdx, str.DisableGdiDPIScaling
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 0x180040235
mov r8d, dword [rsp + 0x30]
mov edx, 8
mov rcx, qword [0x1800a9f20]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r14, rax
test rax, rax
je 0x180040235
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, r14
mov rcx, qword [rsp + 0x38]
mov r8d, 2
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
test eax, eax
js 0x180040223
cmp dword [r14 + 4], 1
jne 0x180040223
mov rdx, qword [rsp + 0x78]
movzx r8d, word [rsp + 0x70]
mov eax, r8d
mov qword [rsp + 0x580], r15
shr rax, 1
lea rcx, [rdx + rax*2]
cmp rcx, rdx
jbe 0x180040127
movzx eax, word [rcx]
cmp ax, 0x5c
je 0x180040123
cmp ax, 0x3a
je 0x180040123
sub rcx, 2
cmp rcx, rdx
ja 0x180040109
jmp 0x180040127
add rcx, 2
mov qword [rbp - 0x78], rcx
lea rsi, [r14 + 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 [r14 + 8]
shr rax, 1
lea r15, [rsi + rax*2]
cmp rsi, r15
jae 0x18004021b
mov rdx, rsi
cmp rsi, r15
jae 0x180040179
movzx eax, word [rdx]
cmp ax, 0x3b
je 0x180040179
test ax, ax
je 0x180040179
add rdx, 2
cmp rdx, r15
jb 0x180040162
mov rcx, rsi
lea rax, [rdx - 2]
lea rsi, [rdx + 2]
cmp rax, rcx
jb 0x18004027c
movzx edx, word [rax]
cmp dx, 0x20
je 0x18004019c
cmp dx, 9
jne 0x1800401a5
sub rax, 2
cmp rax, rcx
jae 0x18004018d
cmp rax, rcx
jbe 0x18004027c
movzx edx, word [rcx]
cmp dx, 0x20
je 0x18004026f
cmp dx, 9
je 0x18004026f
cmp rcx, rax
jae 0x18004027c
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 0x180040216
mov r8b, 1
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
je 0x18004027c
mov edi, 1
mov r15, qword [rsp + 0x580]
mov rcx, qword [0x1800a9f20]
mov r8, r14
xor edx, edx
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180040245
call qword [sym.imp.ntdll.dll_NtClose]
test edi, edi
je 0x18001b128
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x2d0]
movabs rax, 0xf7ffffffffffffff
and rcx, rax
jmp 0x18001b208
add rcx, 2
cmp rax, rcx
ja 0x1800401ae
cmp rsi, r15
jb 0x18004015a
jmp 0x18004021b
lea rdx, str.EnableGdiDPIScaling
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 0x18004045b
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 0x18004045b
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 0x180040449
cmp dword [rsi + 4], 1
jne 0x180040449
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 0x18004035a
movzx eax, word [rcx]
cmp ax, 0x5c
je 0x180040356
cmp ax, 0x3a
je 0x180040356
sub rcx, 2
cmp rcx, r8
ja 0x18004033c
jmp 0x18004035a
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 0x180040449
mov rdx, rdi
cmp rdi, r14
jae 0x1800403a8
movzx eax, word [rdx]
cmp ax, 0x3b
je 0x1800403a8
test ax, ax
je 0x1800403a8
add rdx, 2
cmp rdx, r14
jb 0x180040391
mov rcx, rdi
lea rax, [rdx - 2]
lea rdi, [rdx + 2]
cmp rax, rcx
jb 0x180040485
movzx edx, word [rax]
cmp dx, 0x20
je 0x1800403cb
cmp dx, 9
jne 0x1800403d4
sub rax, 2
cmp rax, rcx
jae 0x1800403bc
cmp rax, rcx
jbe 0x180040485
movzx edx, word [rcx]
cmp dx, 0x20
je 0x180040478
cmp dx, 9
je 0x180040478
cmp rcx, rax
jae 0x180040485
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 0x180040444
mov r8b, 1
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlEqualUnicodeString]
test al, al
je 0x180040485
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 0x18004046b
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
je 0x18001b1b3
jmp 0x18001b1eb
add rcx, 2
cmp rax, rcx
ja 0x1800403dd
cmp rdi, r14
jb 0x180040389
jmp 0x180040449