Function at 0x180052748
Capabilities:
Access peb ldr_data
Get ntdll base address
Query environment variable
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov rdi, rcx
mov dword [rax + 0x20], r15d
mov r14, rdx
mov dword [rax + 0x18], r15d
mov r8d, 0x410
mov rcx, qword gs:[0x60]
mov esi, r15d
lea edx, [r15 + 8]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rbx, rax
test rax, rax
je 0x180052b33
lea rbp, [rax + 0x208]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [r14 + rcx*2], si
jne 0x1800527a2
test ecx, ecx
je 0x1800527c9
mov eax, ecx
lea rsi, [r14 + rax*2]
sub rsi, 2
cmp word [rsi], 0x5c
je 0x1800527c5
add ecx, 0xffffffff
jne 0x1800527b6
test ecx, ecx
jne 0x1800527e8
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
xor eax, eax
jmp 0x180052b39
lea rdx, str.SystemCurrentControlSetServices_
mov r8d, 0x104
sub rdx, rbp
mov rcx, rbp
lea rax, [r8 + 0x7ffffefa]
test rax, rax
je 0x18005281d
movzx eax, word [rdx + rcx]
test ax, ax
je 0x18005281d
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x1800527fb
test r8, r8
lea rax, [rcx - 2]
lea r8, [rsi + 2]
mov edx, 0x104
cmovne rax, rcx
mov rcx, rbp
mov word [rax], r15w
call fcn.18002d798
lea rax, [rsp + 0x30]
mov r9d, 0x2000000
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, 0xffffffff80000002
mov r14b, 1
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x180052a2a
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x88]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.MofImagePath
mov dword [rsp + 0x80], 0x208
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1800528ae
xor bpl, bpl
jmp 0x1800528f2
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x88]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.ImagePath
mov dword [rsp + 0x80], 0x208
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
movzx ebp, r14b
cmove ebp, r15d
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test bpl, bpl
jne 0x180052a2a
mov eax, dword [rsp + 0x88]
dec eax
cmp eax, 1
ja 0x180052a2a
cmp dword [rsp + 0x80], 4
jb 0x180052a2a
mov r8d, 0xc
lea rdx, str.SystemRoot_
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x18005299a
lea rcx, str._SystemRoot__
mov r8d, 0x104
sub rcx, rbx
mov rdx, rbx
lea rax, [r8 + 0x7ffffefa]
test rax, rax
je 0x180052975
movzx eax, word [rcx + rdx]
test ax, ax
je 0x180052975
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x180052953
test r8, r8
lea r8, [rdi + 0x18]
lea rax, [rdx - 2]
mov rcx, rbx
cmovne rax, rdx
mov edx, 0x104
mov word [rax], r15w
call fcn.18002d798
jmp 0x180052b00
cmp word [rdi], 0x25
je 0x180052a25
cmp dword [rsp + 0x80], 6
jbe 0x1800529b5
cmp word [rdi + 2], 0x3a
je 0x180052a25
mov r8d, 4
lea rdx, [0x1800779f0]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x1800529e5
lea r8, [rdi + 8]
mov edx, 0x104
mov rcx, rbx
call fcn.180024350
jmp 0x180052b00
lea rcx, str._SystemRoot__
mov r8d, 0x104
sub rcx, rbx
mov rdx, rbx
lea rax, [r8 + 0x7ffffefa]
test rax, rax
je 0x180052a1a
movzx eax, word [rcx + rdx]
test ax, ax
je 0x180052a1a
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x1800529f8
test r8, r8
mov r8, rdi
jmp 0x18005297c
mov r8, rdi
jmp 0x1800529d3
lea r8, str._SystemRoot_System32Drivers_
mov edx, 0x104
sub r8, rbx
mov rcx, rbx
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x180052a5f
movzx eax, word [r8 + rcx]
test ax, ax
je 0x180052a5f
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x180052a3c
test rdx, rdx
lea rax, [rcx - 2]
lea r8, [rsi + 2]
mov edx, 0x104
cmovne rax, rcx
mov rcx, rbx
mov word [rax], r15w
call fcn.18002d798
mov ecx, 0x104
mov rax, rbx
cmp word [rax], r15w
je 0x180052a97
add rax, 2
sub rcx, 1
jne 0x180052a87
test rcx, rcx
je 0x180052aa6
mov eax, 0x104
sub rax, rcx
jmp 0x180052aa9
mov rax, r15
test rcx, rcx
je 0x180052b00
mov edx, 0x104
lea rcx, [rbx + rax*2]
sub rdx, rax
je 0x180052af1
lea r9, [rax + 0x7ffffefa]
add r9, rdx
lea rax, str..SYS
sub rax, rcx
test r9, r9
je 0x180052af1
movzx r8d, word [rax + rcx]
test r8w, r8w
je 0x180052af1
mov word [rcx], r8w
dec r9
add rcx, 2
sub rdx, 1
jne 0x180052ad0
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r15w
mov r8d, 0x104
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [rsp + 0x80], eax
mov r8, rbx
mov rcx, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x180052b36
mov rdi, r15
mov rax, rdi
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret