Function at 0x1400b40f0
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rbx, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetVersion]
movsd xmm0, qword [str.gsdll64.dll]
shr eax, 0x10
movsd qword [rdi], xmm0
mov ecx, dword [0x14021cdb0]
mov dword [rdi + 8], ecx
mov ecx, 0x8000
mov byte [rbx], 0
test cx, ax
je 0x1400b4156
mov ecx, 0x4000
test cx, ax
jne 0x1400b4156
xor eax, eax
jmp 0x1400b4619
mov rcx, rdi
mov qword [rsp + 0x4c0], rsi
call fcn.14006e770
lea rcx, [rdi - 1]
nop word [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400b4170
movups xmm0, xmmword [str.gs_bingsdll32.dll]
movups xmmword [rcx], xmm0
movzx eax, word [0x14021cdc8]
mov word [rcx + 0x10], ax
movzx eax, byte [0x14021cdca]
mov byte [rcx + 0x12], al
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x1400b41ef
mov rcx, rbx
call fcn.14006e770
dec rbx
cmp byte [rbx + 1], 0
lea rbx, [rbx + 1]
jne 0x1400b41b5
mov eax, dword [str.gslib]
mov rcx, rsi
mov dword [rbx], eax
movzx eax, word [0x14021cdd0]
mov word [rbx + 4], ax
movzx eax, byte [0x14021cdd2]
mov byte [rbx + 6], al
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
jmp 0x1400b4611
lea rcx, str.XNVIEW_GS_DLL
call fcn.1401c52dc
test rax, rax
je 0x1400b4254
mov rdx, rdi
sub rdx, rax
nop word [rax + rax]
movzx ecx, byte [rax]
lea rax, [rax + 1]
mov byte [rdx + rax - 1], cl
test cl, cl
jne 0x1400b4210
lea rcx, str.XNVIEW_GS_LIB
call fcn.1401c52dc
test rax, rax
je 0x1400b4254
sub rbx, rax
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [rax]
lea rax, [rax + 1]
mov byte [rbx + rax - 1], cl
test cl, cl
jne 0x1400b4240
jmp 0x1400b460f
lea rsi, str.GPL_Ghostscript
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8d, 0x10
call fcn.1400b6080
test al, al
jne 0x1400b43f4
lea rsi, str.AFPL_Ghostscript
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8d, 0x10
call fcn.1400b6080
test al, al
jne 0x1400b43f4
lea rsi, str.GNU_Ghostscript
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8d, 0x10
call fcn.1400b6080
test al, al
jne 0x1400b43f4
lea rsi, str.Aladdin_Ghostscript
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
mov r9, rsi
mov r8d, 0x10
call fcn.1400b6080
test al, al
jne 0x1400b43f4
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.DirectoryGhostscriptBinaries
lea rdx, str.SoftwarePDFCreatorGhostscript
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x30], 0x200
mov qword [rsp + 0x20], rax
call fcn.1400b61f0
test eax, eax
jne 0x1400b438f
lea rax, [rbp - 0x80]
mov rdx, rdi
lea rcx, [rbp - 0x80]
sub rdx, rax
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx + rcx - 1], al
test al, al
jne 0x1400b4340
lea rcx, [rdi - 1]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400b4353
movzx eax, word [0x140211050]
dec rdi
mov word [rcx], ax
nop word [rax + rax]
cmp byte [rdi + 1], 0
lea rdi, [rdi + 1]
jne 0x1400b4370
movsd xmm0, qword [str.gsdll32.dll]
movsd qword [rdi], xmm0
mov eax, dword [0x14021ce90]
mov dword [rdi + 8], eax
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.DirectoryGhostscriptLibraries
lea rdx, str.SoftwarePDFCreatorGhostscript
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x30], 0x200
mov qword [rsp + 0x20], rax
call fcn.1400b61f0
test eax, eax
jne 0x1400b460f
lea rax, [rbp - 0x80]
lea rcx, [rbp - 0x80]
sub rbx, rax
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rbx + rcx - 1], al
test al, al
jne 0x1400b43e0
jmp 0x1400b460f
movsxd rax, dword [rsp + 0x30]
test eax, eax
jle 0x1400b460f
mov ecx, dword [rsp + rax*4 + 0x3c]
mov eax, 0x51eb851f
mov r8, rsi
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov r9d, edx
imul eax, edx, 0x64
lea rdx, str.Software_s_d._02d
sub ecx, eax
mov dword [rsp + 0x20], ecx
lea rcx, [rbp + 0x180]
call fcn.1401bea4c
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.GS_DLL
lea rdx, [rbp + 0x180]
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0x200
call fcn.1400b61f0
test eax, eax
jne 0x1400b4524
lea rax, [rbp - 0x80]
mov r8, rdi
lea rdx, [rbp - 0x80]
sub r8, rax
nop
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [r8 + rdx - 1], al
test al, al
jne 0x1400b4480
mov edx, 0x5c
mov rcx, rdi
call fcn.1401c2968
test rax, rax
je 0x1400b44b8
movsd xmm0, qword [str.gsdll64.dll]
movsd qword [rax + 1], xmm0
mov ecx, dword [0x14021cdb0]
mov dword [rax + 9], ecx
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.GS_LIB
lea rdx, [rbp + 0x180]
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x30], 0x200
mov qword [rsp + 0x20], rax
call fcn.1400b61f0
test eax, eax
jne 0x1400b460f
lea edx, [rax + 0x3b]
lea rcx, [rbp - 0x80]
call fcn.1401c2968
test rax, rax
je 0x1400b4504
mov byte [rax], 0
lea rax, [rbp - 0x80]
lea rcx, [rbp - 0x80]
sub rbx, rax
nop
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rbx + rcx - 1], al
test al, al
jne 0x1400b4510
jmp 0x1400b460f
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.GS_DLL
lea rdx, [rbp + 0x180]
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x30], 0x200
mov qword [rsp + 0x20], rax
call fcn.1400b61f0
test eax, eax
jne 0x1400b460f
lea rax, [rbp - 0x80]
mov rdx, rdi
lea rcx, [rbp - 0x80]
sub rdx, rax
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx + rcx - 1], al
test al, al
jne 0x1400b4570
mov edx, 0x5c
mov rcx, rdi
call fcn.1401c2968
test rax, rax
je 0x1400b45a7
movsd xmm0, qword [str.gsdll64.dll]
movsd qword [rax + 1], xmm0
mov edx, dword [0x14021cdb0]
mov dword [rax + 9], edx
lea rax, [rsp + 0x30]
lea r9, [rbp - 0x80]
lea r8, str.GS_LIB
lea rdx, [rbp + 0x180]
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x30], 0x200
mov qword [rsp + 0x20], rax
call fcn.1400b61f0
test eax, eax
jne 0x1400b460f
lea edx, [rax + 0x3b]
lea rcx, [rbp - 0x80]
call fcn.1401beaec
test rax, rax
je 0x1400b45ef
mov byte [rax], 0
lea rax, [rbp - 0x80]
lea rcx, [rbp - 0x80]
sub rbx, rax
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rbx + rcx - 1], al
test al, al
jne 0x1400b4600
xor eax, eax
mov rsi, qword [rsp + 0x4c0]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1401bd600
add rsp, 0x490
pop rdi
pop rbx
pop rbp
ret