Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/xampp/perl/vendor/lib/Win32/Exe/ResourceEntry/ |
# Copyright 2004 by Audrey Tang <cpan@audreyt.org> package Win32::Exe::ResourceEntry::Name; use strict; use base 'Win32::Exe::ResourceEntry'; use constant SUBFORMAT => ( N_RVA => 'V', ); sub NameAddress { my ($self) = @_; $self->N_RVA & ~($self->high_bit); } sub SetNameAddress { my ($self, $data) = @_; $self->SetN_RVA($data | $self->IsDirectory); } sub IsEscaped { my ($self) = @_; $self->N_RVA & ($self->high_bit); } sub Name { my ($self) = @_; my $section = $self->first_parent('Resources'); my $addr = $self->NameAddress; my $size = unpack('v', $section->substr($addr, 2)); my $ustr = $section->substr($addr + 2, $size * 2); my $name = $self->decode_ucs2($ustr); $name =~ s{([%#/])}{sprintf('%%%02X', ord($1))}eg; return $name; } sub SetName { die "XXX unimplemented"; } 1;