Function at 0x140054508
Capabilities:
Query environment variable
Query or enumerate registry key

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r13
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov rax, qword [0x14016a040]
xor rax, rsp
mov qword [rbp + 0x37], rax
and dword [rbp - 0x35], 0
lea rax, str.AFPL_Ghostscript
and dword [rbp - 0x31], 0
xorps xmm0, xmm0
mov qword [rbp - 0x29], rax
or r13, 0xffffffffffffffff
lea rax, str.Aladdin_Ghostscript
mov dword [rbp - 0x39], 0x100
mov qword [rbp - 0x21], rax
mov edi, 0x20219
lea rax, str.GPL_Ghostscript
mov qword [rbp - 0x19], rax
lea r14d, [r13 + 0x21]
lea rax, str.GNU_Ghostscript
mov qword [rbp - 0x11], rax
movdqu xmmword [rbp - 0x49], xmm0
lea rbx, [rbp - 0x29]
mov rdx, qword [rbx]
lea rcx, str.Software_
xor r8d, r8d
call fcn.1400b2d6c
mov rsi, rax
test rax, rax
je 0x1400545ba
call fcn.1400b2af0
mov r8, rax
mov rdx, r13
mov rcx, rsi
call fcn.1400be600
lea rcx, [rsp + 0x30]
mov r9d, edi
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140054631
xor esi, esi
xor edx, edx
jmp 0x140054610
call fcn.1400b2af0
mov r9, rax
lea rdx, [rbp - 9]
mov r8, r13
mov ecx, 0xfde9
call fcn.1400be6d0
mov r8d, r13d
lea rcx, [rbp - 0x49]
mov rdx, rax
call fcn.1400bb18c
inc esi
mov edx, esi
mov rcx, qword [rsp + 0x30]
lea r8, [rbp - 9]
mov r9d, r14d
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x1400545e4
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rbx, 8
lea rax, [rbp - 9]
cmp rbx, rax
jne 0x14005458d
bt edi, 9
jae 0x140054652
mov edi, 0x20119
jmp 0x140054589
lea rdx, [0x1400baa78]
lea rcx, [rbp - 0x49]
call fcn.1400bb9e0
mov edi, dword [rbp - 0x35]
test edi, edi
jle 0x140054720
lea r14d, [rdi - 1]
mov edi, r14d
lea rsi, [rbp - 0x29]
mov edx, r14d
lea rcx, [rbp - 0x49]
call fcn.1400bb548
mov rdx, qword [rsi]
lea rcx, str.Software_s_s
mov r8, rax
call fcn.1400b2dac
lea r8, str.GS_DLL
mov rdx, rax
mov rcx, 0xffffffff80000002
call fcn.1400b5da0
test rax, rax
je 0x140054706
mov rcx, rax
call fcn.1400b43c0
xor r8d, r8d
lea rdx, str.gswin32c.exe
mov rcx, rax
mov r15, rax
call fcn.1400b41a4
mov rcx, rax
mov rbx, rax
call fcn.1400b4efc
test al, al
jne 0x1400548a2
xor r8d, r8d
lea rdx, str.gswin64c.exe
mov rcx, r15
call fcn.1400b41a4
mov rcx, rax
mov rbx, rax
call fcn.1400b4efc
test al, al
jne 0x1400548a2
add rsi, 8
lea rax, [rbp - 9]
cmp rsi, rax
jne 0x140054678
test r14d, r14d
jg 0x14005466d
xor r8d, r8d
lea rcx, str.PATH
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, 2
mov ebx, eax
lea ecx, [rax + 1]
call fcn.140109ad8
mov rdi, rax
test ebx, ebx
jne 0x14005474f
xor ebx, ebx
jmp 0x14005489a
mov r8d, ebx
lea rcx, str.PATH
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
and dword [rbp - 0x6d], 0
xorps xmm0, xmm0
and dword [rbp - 0x69], 0
mov dword [rbp - 0x71], 0x100
movdqu xmmword [rsp + 0x38], xmm0
test rdi, rdi
jne 0x140054783
xor eax, eax
jmp 0x14005479b
call fcn.1400b2af0
mov r9, rax
mov r8, r13
mov rdx, rdi
mov ecx, 0xfde9
call fcn.1400be6d0
mov r9b, 1
mov dword [rsp + 0x20], r13d
lea r8, [0x140142d98]
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.1400bba78
mov r10, qword [rbp - 0x79]
lea r9, [rsp + 0x38]
mov rcx, qword [rsp + 0x38]
xor r8d, r8d
mov qword [rbp - 0x61], r9
mov dword [rbp - 0x59], r8d
test r10, r10
jne 0x1400547f8
xor edx, edx
mov rax, rcx
test rcx, rcx
je 0x1400547ef
cmp dword [rax + 0xc], edx
jg 0x1400547f1
sub edx, dword [rax + 0xc]
mov rax, qword [rax]
test rax, rax
jne 0x1400547df
xor edx, edx
mov qword [rbp - 0x51], rax
mov dword [rbp - 0x55], edx
mov esi, dword [rbp - 0x6d]
test r10, r10
jne 0x140054817
test rcx, rcx
je 0x140054817
mov eax, esi
cmp dword [rcx + 0xc], eax
jg 0x140054821
sub eax, dword [rcx + 0xc]
mov rcx, qword [rcx]
test rcx, rcx
jne 0x140054807
lea rax, [rsp + 0x38]
cmp r9, rax
jne 0x140054826
cmp r8d, esi
je 0x14005488c
lea rcx, [rbp - 0x61]
call fcn.1400bb858
xor r8d, r8d
lea rdx, str.gswin32c.exe
mov rcx, rax
mov r14, rax
call fcn.1400b41a4
mov rcx, rax
mov rbx, rax
call fcn.1400b4efc
test al, al
jne 0x140054868
xor r8d, r8d
lea rdx, str.gswin64c.exe
mov rcx, r14
call fcn.1400b41a4
mov rbx, rax
mov rcx, rbx
call fcn.1400b4efc
test al, al
jne 0x14005488e
mov edx, 1
lea rcx, [rbp - 0x61]
call fcn.1400bb8c4
mov r8d, dword [rbp - 0x59]
mov r9, qword [rbp - 0x61]
jmp 0x140054817
xor ebx, ebx
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.1400baff0
mov rcx, rdi
call fcn.140107298
xor edx, edx
lea rcx, [rbp - 0x49]
call fcn.1400baff0
mov rax, rbx
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400f44c0
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret