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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0xee37e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x58], 0xe8493c
mov dword [ebp - 0x54], str.Aladdin_Ghostscript
mov dword [ebp - 0x50], str.GPL_Ghostscript
mov dword [ebp - 0x4c], str.GNU_Ghostscript
call fcn.0043526b
mov ebx, 0x20219
mov dword [ebp - 0x64], ebx
xor esi, esi
mov edx, dword [ebp + esi*4 - 0x58]
mov ecx, str.Software_
push 0
push 0
call fcn.005b0ffb
pop ecx
pop ecx
mov edi, eax
lea eax, [ebp - 0x60]
push eax
push ebx
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x47f190
and dword [ebp - 0x5c], eax
lea eax, [ebp - 0x48]
push 0x20
push eax
push 0
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x47f187
mov ebx, dword [ebp - 0x5c]
push 0xffffffffffffffff
lea edx, [ebp - 0x48]
xor ecx, ecx
call fcn.005b0c60
pop ecx
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x120]
lea eax, [ebp - 0x5c]
push eax
call fcn.004354ee
push 0x20
lea eax, [ebp - 0x48]
inc ebx
push eax
push ebx
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x47f150
mov ebx, dword [ebp - 0x64]
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.00702f96
inc esi
pop ecx
cmp esi, 4
jb 0x47f108
test ebx, 0x200
je 0x47f1be
mov ebx, 0x20119
mov dword [ebp - 0x64], ebx
call fcn.005b669d
test al, al
jne 0x47f106
push 0x43563c
push 4
push dword [ebp - 0x11c]
push dword [ebp - 0x110]
call fcn.00703b80
mov edi, dword [ebp - 0x11c]
add esp, 0x10
test edi, edi
je 0x47f2d1
lea esi, [edi*4 - 4]
mov dword [ebp - 0x60], esi
xor ebx, ebx
mov dword [ebp - 0x64], ebx
lea eax, [edi - 1]
cmp eax, dword [ebp - 0x11c]
sbb cl, cl
inc cl
call fcn.00420997
mov eax, dword [ebp - 0x110]
push dword [esi + eax]
push dword [ebp + ebx*4 - 0x58]
push str.Software_s_s
call fcn.005b24d2
mov ebx, eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
push str.GS_DLL
mov edx, ebx
call fcn.005b6721
add esp, 0x10
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x47f2a4
mov ecx, eax
call fcn.005b49ea
mov esi, eax
mov edx, str.gswin32c.exe
push 0
mov ecx, esi
mov dword [ebp - 0x6c], esi
call fcn.005b4b63
pop ecx
mov ecx, eax
mov dword [ebp - 0x68], eax
call fcn.005b5305
test al, al
jne 0x47f2f9
push 0
mov edx, str.gswin64c.exe
mov ecx, esi
call fcn.005b4b63
push dword [ebp - 0x68]
mov esi, eax
call fcn.00702f96
pop ecx
pop ecx
mov ecx, esi
call fcn.005b5305
test al, al
jne 0x47f2fc
push esi
call fcn.00702f96
push dword [ebp - 0x6c]
call fcn.00702f96
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x60]
pop ecx
pop ecx
push eax
call fcn.00702f96
push ebx
call fcn.00702f96
mov ebx, dword [ebp - 0x64]
inc ebx
mov dword [ebp - 0x64], ebx
pop ecx
pop ecx
cmp ebx, 4
jb 0x47f1f6
sub esi, 4
mov dword [ebp - 0x60], esi
sub edi, 1
jne 0x47f1f1
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0
push 0
push str.PATH
call edi
mov esi, eax
push 2
push esi
call fcn.00705f80
mov ebx, eax
pop ecx
pop ecx
test esi, esi
jne 0x47f31c
jmp 0x47f3ed
mov esi, dword [ebp - 0x68]
push 0
call fcn.00702f96
push dword [ebp - 0x6c]
call fcn.00702f96
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00702f96
add esp, 0xc
jmp 0x47f3ed
push esi
push ebx
push str.PATH
call edi
lea ecx, [ebp - 0xc8]
call fcn.0043526b
push 1
push 0xe77bf4
push ebx
lea ecx, [ebp - 0xc8]
call fcn.0043559a
mov eax, dword [ebp - 0xc4]
xor edi, edi
test eax, eax
je 0x47f3d5
cmp edi, eax
sbb cl, cl
inc cl
call fcn.00420997
mov ecx, dword [ebp - 0xb8]
mov edx, str.gswin32c.exe
push 0
mov ecx, dword [ecx + edi*4]
call fcn.005b4b63
mov esi, eax
pop ecx
mov ecx, esi
mov dword [ebp - 0x5c], esi
call fcn.005b5305
test al, al
jne 0x47f41b
cmp edi, dword [ebp - 0xc4]
sbb cl, cl
inc cl
call fcn.00420997
mov ecx, dword [ebp - 0xb8]
mov edx, str.gswin64c.exe
push 0
mov ecx, dword [ecx + edi*4]
call fcn.005b4b63
push dword [ebp - 0x5c]
mov esi, eax
call fcn.00702f96
pop ecx
pop ecx
mov ecx, esi
call fcn.005b5305
test al, al
jne 0x47f41b
push esi
call fcn.00702f96
mov eax, dword [ebp - 0xc4]
inc edi
pop ecx
cmp edi, eax
jb 0x47f355
xor esi, esi
lea ecx, [ebp - 0xc8]
call fcn.00435514
lea ecx, [ebp - 0xc8]
call fcn.00421c7c
push ebx
call fcn.00702f96
pop ecx
lea ecx, [ebp - 0x120]
call fcn.00435514
lea ecx, [ebp - 0x120]
call fcn.00421c7c
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006f3e28
leave
ret
push 0
call fcn.00702f96
pop ecx
jmp 0x47f3d7