ó
    ¯iZP  ã                   óê   • S SK r S SKrS SKJr  S rSrS rS rS r " S S	5      r	SS
 jr
S r " S S5      r " S S5      r " S S5      r " S S5      rS r " S S5      r " S S5      rS rS rg)é    N)Úwin32apic                 ó’   •  [         R                  " U SS9n[        UR                  R                  S-  5      $ ! [
         a     gf = f)a6  
Checks if the specified PE file has CFG (Control Flow Guard) enabled.

Parameters
----------
filename : str
    Path to the PE file to inspect.

Returns
----------
bool
    True if file is a PE file with CFG enabled. False if CFG is not enabled or if file could not be processed using
    the pefile library.
T©Ú	fast_loadi @  F)ÚpefileÚPEÚboolÚOPTIONAL_HEADERÚDllCharacteristicsÚ	Exception)ÚfilenameÚpes     ÚPC:\des-py\RoboSAPF\venv\Lib\site-packages\PyInstaller\utils\win32\versioninfo.pyÚpefile_check_control_flow_guardr      sG   € ðÜ�YŠY�x¨4Ñ0ˆô �B×&Ñ&×9Ñ9¸FÑBÓCÐCøÜó Ùðús   ‚69 ¹
AÁAé   c                 ó$   • U R                  S5      $ )zD
Encodes text as UTF-16LE (Microsoft 'Unicode') for use in structs.
úUTF-16LE)Úencode)Útexts    r   ÚgetRawr   /   s   € ð �;‰;�zÓ"Ð"ó    c                 ój  • [         R                  " U S[        5      n[         R                  " U[        R
                  S   5      n[        U5      (       d  g[         R                  " U[        R
                  S   US   5      n[        5       nUR                  U5        [         R                  " U5        U$ )zŠ
Read the version information structure from the given executable's resources, and return it as an instance of
`VSVersionInfo` structure.
r   Ú
RT_VERSIONN)r   ÚLoadLibraryExÚLOAD_LIBRARY_AS_DATAFILEÚEnumResourceNamesr   ÚRESOURCE_TYPEÚlenÚLoadResourceÚVSVersionInfoÚfromRawÚFreeLibrary)Úexe_filenameÚhÚresÚdataÚinfos        r   Ú!read_version_info_from_executabler(   6   s‹   € ô
 	×Ò˜|¨QÔ0HÓI€AÜ
×
$Ò
$ Q¬×(<Ñ(<¸\Ñ(JÓ
K€CÜˆs�8‰8ØÜ× Ò  ¤F×$8Ñ$8¸Ñ$FÈÈAÉÓO€DÜ‹?€DØ‡L�L�ÔÜ×Ò˜ÔØ€Kr   c                 ó   • U S-   S-	  S-  $ )z-
Align `offset` to the next 4-byte boundary.
é   r   © )Úoffsets    r   Ú	nextDWordr-   F   s   € ð �a‰Z˜AÑ !Ñ#Ð#r   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)r    éM   aï  
WORD  wLength;        // length of the VS_VERSION_INFO structure
WORD  wValueLength;   // length of the Value member
WORD  wType;          // 1 means text, 0 means binary
WCHAR szKey[];        // Contains the Unicode string "VS_VERSION_INFO".
WORD  Padding1[];
VS_FIXEDFILEINFO Value;
WORD  Padding2[];
WORD  Children[];     // zero or more StringFileInfo or VarFileInfo
                      // structures (or both) that are children of the
                      // current version structure.
Nc                 ó0   • Xl         U=(       d    / U l        g ©N©ÚffiÚkids)Úselfr3   r4   s      r   Ú__init__ÚVSVersionInfo.__init__Z   s   € ØŒØ—J˜Bˆ�	r   c           	      ó  • [        U5      u  nu  p4pV[        U5      n[        5       U l        U R                  R	                  X5      nUnX#:  a¸  Un[        X5      u  nu  p‰p¦UR                  5       S:X  a>  [        5       nUR	                  X‰XaX'U-   5      nU R                  R                  U5        UnO=[        5       nUR	                  X‰XaX'U-   5      nU R                  R                  U5        UnXx-   n[        U5      nX#:  a  M¸  U$ ©NÚStringFileInfo)
ÚparseCommonr-   ÚFixedFileInfor3   r!   Ústripr:   r4   ÚappendÚVarFileInfo)r5   r&   ÚiÚsublenÚvallenÚwTypeÚnmÚjÚcsublenÚcvallenÚctypÚsfiÚkÚvfis                 r   r!   ÚVSVersionInfo.fromRaw^   sõ   € Ü)4°TÓ):Ñ&ˆÑ&ˆF˜Eä�a‹Lˆä “?ˆŒØ�H‰H×Ñ˜TÓ%ˆØˆØ‹jØˆAÜ.9¸$Ó.BÑ+ˆAÑ+� $Ø�x‰x‹zÐ-Ó-Ü$Ó&�Ø—K‘K °"¸AÀ7¹{ÓK�Ø—	‘	× Ñ  Ô%Ø‘ä!“m�Ø—K‘K °"¸AÀ7¹{ÓK�Ø—	‘	× Ñ  Ô%Ø�Ø‘ˆAÜ˜!“ˆAð �jð ˆr   c                 óæ  • [        S5      nU R                  R                  5       n[        U5      nSnS[        U5      -   S-   nSnUS-  (       a  SnU[        U5      -   U-   nSnUS-  (       a  SnSR	                  U R
                   Vs/ s H  oˆR                  5       PM     sn5      n	U[        U5      -   [        U	5      -   n[        R                  " SXSU5      U-   S-   U-   U-   U-   U	-   $ s  snf )	NÚVS_VERSION_INFOr   é   r   r   é   ó     ÚHHH)r   r3   ÚtoRawr   Újoinr4   ÚstructÚpack)
r5   Úraw_nameÚrawffirB   ÚtyprA   ÚpadÚpad2ÚkidÚtmps
             r   rS   ÚVSVersionInfo.toRaww   sé   € ÜÐ+Ó,ˆØ—‘—‘Ó!ˆÜ�V“ˆØˆØ”S˜“]Ñ" QÑ&ˆØˆØ�A�:ØˆCØœ#˜c›(Ñ" VÑ+ˆØˆØ�A�:ØˆDØ�h‰h¨t¯yªyÓ9ªy¨Ÿ	™	ž©yÑ9Ó:ˆØœ#˜d›)Ñ#¤c¨#£hÑ.ˆÜ�{Š{˜5 &°#Ó6¸ÑAÀKÑOÐRUÑUÐX^Ñ^ÐaeÑeÐhkÑkÐkùò :s   Â
C.c                 ó(   • U R                  5       U:H  $ r1   ©rS   ©r5   Úothers     r   Ú__eq__ÚVSVersionInfo.__eq__ˆ   ó   € Ø�z‰z‹|˜uÑ$Ð$r   c                 ó  • US-   nU R                    Vs/ s H  o"R                  US-   5      PM     nnSR                  U5      nSR                  SSSSSUS	U R                  R                  U5       S
3-   US-   UUS-   S/
5      $ s  snf )Nú  ú, 
Ú
z# UTF-8Ú#z3# For more details about fixed file info 'ffi' see:z7# http://msdn.microsoft.com/en-us/library/ms646997.aspxzVSVersionInfo(zffi=Ú,zkids=[Ú]Ú))r4   Ú__str__rT   r3   )r5   Úindentr\   r]   s       r   rn   ÚVSVersionInfo.__str__‹   s�   € Ø˜$‘ˆØ59·Y²YÓ?²Y¨c�{‰{˜6 D™=Ö)±YˆÐ?Ø�k‰k˜#ÓˆØ�y‰yØØØAØEØØ�t˜DŸH™H×,Ñ,¨VÓ4Ð5°QÐ7Ñ7Ø�XÑØØ�S‰LØð
ó ð 	ùò @s   ”Bc                 ó@   • SU R                   < SU R                  < S3$ )Nzversioninfo.VSVersionInfo(ffi=z, kids=rm   r2   ©r5   s    r   Ú__repr__ÚVSVersionInfo.__repr__œ   s   � Ø?C¿x¼xÈÏÌÐSÐSr   r2   ©NN©Ú ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r6   r!   rS   rc   rn   rs   Ú__static_attributes__r+   r   r   r    r    M   s'   † ñôòò2lò"%ôõ"Tr   r    c                 óp   • US-   n[         R                  " SXU 5      u  p4n[        XX#-   5      u  p&X#XEU44$ )NrO   Ú3H)rU   ÚunpackÚparseUString)r&   Ústartr@   ÚwLengthÚwValueLengthrC   r   s          r   r;   r;       sD   € Ø�‰	€AÜ%+§]¢]°4¸ÀA¸Ó%GÑ"€W˜EÜ˜4 A¡KÓ0�G€AØ˜¨TÐ2Ð2Ð2r   c                 óv   • UnX2:  a  XUS-    S:X  a  OUS-  nX2:  a  M  XU R                  S5      nUS-  nX44$ )Nr   rQ   r   )Údecode)r&   rƒ   Úlimitr@   r   s        r   r‚   r‚   §   sU   € Ø€AØ
‹)Ø�!�a‘%ˆ=˜KÓ'ØØ	ˆQ‰ˆð �)ð �aˆ=×Ñ 
Ó+€DØˆ�F€AØˆ7€Nr   c                   óT   • \ rS rSrSr        SS jrS rS rS rSS jr	S r
S	rg
)r<   é²   a¤  
DWORD dwSignature;        //Contains the value 0xFEEFO4BD
DWORD dwStrucVersion;     // binary version number of this structure.
                          // The high-order word of this member contains
                          // the major version number, and the low-order
                          // word contains the minor version number.
DWORD dwFileVersionMS;    // most significant 32 bits of the file's binary
                          // version number
DWORD dwFileVersionLS;    //
DWORD dwProductVersionMS; // most significant 32 bits of the binary version
                          // number of the product with which this file was
                          // distributed
DWORD dwProductVersionLS; //
DWORD dwFileFlagsMask;    // bitmask that specifies the valid bits in
                          // dwFileFlags. A bit is valid only if it was
                          // defined when the file was created.
DWORD dwFileFlags;        // VS_FF_DEBUG, VS_FF_PATCHED etc.
DWORD dwFileOS;           // VOS_NT, VOS_WINDOWS32 etc.
DWORD dwFileType;         // VFT_APP etc.
DWORD dwFileSubtype;      // 0 unless VFT_DRV or VFT_FONT or VFT_VXD
DWORD dwFileDateMS;
DWORD dwFileDateLS;
c	                 ó4  • SU l         SU l        US   S-  US   S-  -  U l        US   S-  US   S-  -  U l        US   S-  US   S-  -  U l        US   S-  US   S-  -  U l        X0l        X@l        XPl        X`l	        Xpl
        US   U l        US   U l        g )	Nl   ½Þ} i   r   é   é   éÿÿ  r   r*   )ÚsigÚstrucVersionÚfileVersionMSÚfileVersionLSÚproductVersionMSÚproductVersionLSÚfileFlagsMaskÚ	fileFlagsÚfileOSÚfileTypeÚfileSubtypeÚ
fileDateMSÚ
fileDateLS)	r5   ÚfileversÚprodversÚmaskÚflagsÚOSr˜   ÚsubtypeÚdates	            r   r6   ÚFixedFileInfo.__init__Ê   sÀ   € ð ˆŒØ#ˆÔØ& q™k¨RÑ/°H¸Q±KÀ&Ñ4HÑIˆÔØ& q™k¨RÑ/°H¸Q±KÀ&Ñ4HÑIˆÔØ!)¨!¡°Ñ!2°xÀ±{ÀVÑ7KÑ LˆÔØ!)¨!¡°Ñ!2°xÀ±{ÀVÑ7KÑ LˆÔØ!ÔØŒØŒØ ŒØ"ÔØ˜q™'ˆŒØ˜q™'ˆ�r   c                 óâ   • [         R                  " SXUS-    5      u  U l        U l        U l        U l        U l        U l        U l        U l	        U l
        U l        U l        U l        U l        US-   $ )NÚ13Lé4   )rU   r�   r�   r�   r‘   r’   r“   r”   r•   r–   r—   r˜   r™   rš   r›   )r5   r&   r@   s      r   r!   ÚFixedFileInfo.fromRawã   sp   € ô �MŠM˜% ¨¨B© Ó0ñ	
ØŒHØÔØÔØÔØÔ!ØÔ!ØÔØŒNØŒKØŒMØÔØŒOØŒOà�2‰vˆr   c                 óL  • [         R                  " SU R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  5      $ )Nr¥   )rU   rV   r�   r�   r‘   r’   r“   r”   r•   r–   r—   r˜   r™   rš   r›   rr   s    r   rS   ÚFixedFileInfo.toRawõ   s   € Ü�{Š{ØØ�H‰HØ×ÑØ×ÑØ×ÑØ×!Ñ!Ø×!Ñ!Ø×ÑØ�N‰NØ�K‰KØ�M‰MØ×ÑØ�O‰OØ�O‰Oó
ð 	
r   c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚFixedFileInfo.__eq__  re   r   c                 ój  • U R                   S-	  U R                   S-  U R                  S-	  U R                  S-  4nU R                  S-	  U R                  S-  U R                  S-	  U R                  S-  4nU R                  U R
                  4nSSSSU< S3SU< S3S	S
[        U R                  5      -  SS[        U R                  5      -  SSS[        U R                  5      -  SSS[        U R                  5      -  SSS[        U R                  5      -  SSU< 3S/nSU S3R                  U5      $ )NrŒ   rŽ   zFixedFileInfo(zN# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)z!# Set not needed items to zero 0.z	filevers=rk   z	prodvers=z;# Contains a bitmask that specifies the valid bits 'flags'rzmask=%s,zG# Contains a bitmask that specifies the Boolean attributes of the file.z	flags=%s,z8# The operating system for which this file was designed.z-# 0x4 - NT and there is no need to change it.zOS=%s,z# The general type of file.z## 0x1 - the file is an application.zfileType=%s,z# The function of the file.z5# 0x0 - the function is not defined for this fileTypezsubtype=%s,z# Creation date and time stamp.zdate=rm   ri   rg   )r‘   r’   r“   r”   rš   r›   Úhexr•   r–   r—   r˜   r™   rT   )r5   ro   ÚfvÚpvÚfdr]   s         r   rn   ÚFixedFileInfo.__str__
  sF  € à×Ñ "Ñ$ d×&8Ñ&8¸6Ñ&AØ×Ñ "Ñ$ d×&8Ñ&8¸6Ñ&Að
ˆð
 ×!Ñ! RÑ'¨×)>Ñ)>ÀÑ)GØ×!Ñ! RÑ'¨×)>Ñ)>ÀÑ)Gð
ˆð �o‰o˜tŸ™Ð/ˆàØ\Ù/Û Ñ"Û Ð"ØIØœ˜T×/Ñ/Ó0Ñ0ØUØœ#˜dŸn™nÓ-Ñ-ØFØ;Ø”s˜4Ÿ;™;Ó'Ñ'Ø)Ø1ØœS §¡Ó/Ñ/Ø)ØCØœC × 0Ñ 0Ó1Ñ1Ù-ÚÐØð+
ˆð. �F�8˜2ˆ×#Ñ# CÓ(Ð(r   c           	      ó–  • U R                   S-	  U R                   S-  U R                  S-	  U R                  S-  4nU R                  S-	  U R                  S-  U R                  S-	  U R                  S-  4nU R                  U R
                  4nSXU R                  U R                  U R                  U R                  U R                  U4-  $ )NrŒ   rŽ   zwversioninfo.FixedFileInfo(filevers=%r, prodvers=%r, mask=0x%x, flags=0x%x, OS=0x%x, fileType=%r, subtype=0x%x, date=%r))r‘   r’   r“   r”   rš   r›   r•   r–   r—   r˜   r™   )r5   r®   r¯   r°   s       r   rs   ÚFixedFileInfo.__repr__-  sÐ   € à×Ñ "Ñ$ d×&8Ñ&8¸6Ñ&AØ×Ñ "Ñ$ d×&8Ñ&8¸6Ñ&Að
ˆð
 ×!Ñ! RÑ'¨×)>Ñ)>ÀÑ)GØ×!Ñ! RÑ'¨×)>Ñ)>ÀÑ)Gð
ˆð �o‰o˜tŸ™Ð/ˆð2ð �T×'Ñ'¨¯©¸¿¹ÀdÇmÁmÐUY×UeÑUeÐgiÐjñkð	
r   )r›   rš   r–   r•   r—   r™   r˜   r’   r‘   r”   r“   r�   r�   N)©r   r   r   r   r´   é?   r   i  r�   r   )r   r   rv   rx   r+   r   r   r<   r<   ²   s@   † ñð2 ØØØØØØØô"ò2ò$
ò$%ô!)õF
r   r<   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)r:   i?  a›  
WORD        wLength;      // length of the version resource
WORD        wValueLength; // length of the Value member in the current
                          // VS_VERSION_INFO structure
WORD        wType;        // 1 means text, 0 means binary
WCHAR       szKey[];      // Contains the Unicode string 'StringFileInfo'.
WORD        Padding[];
StringTable Children[];   // list of zero or more String structures
Nc                 ó2   • SU l         U=(       d    / U l        g r9   ©Únamer4   ©r5   r4   s     r   r6   ÚStringFileInfo.__init__I  s   € Ø$ˆŒ	Ø—J˜Bˆ�	r   c                 óœ   • X0l         XV:  a@  [        5       nUR                  XEU5      nU R                  R	                  U5        UnXV:  a  M@  U$ r1   )r¹   ÚStringTabler!   r4   r>   )	r5   rA   rB   r¹   r&   r@   rˆ   ÚstrE   s	            r   r!   ÚStringFileInfo.fromRawM  sH   € ØŒ	Ø‹iÜ“ˆBØ—
‘
˜4 EÓ*ˆAØ�I‰I×Ñ˜RÔ ØˆAð	 �ið
 ˆr   c                 ój  • [        U R                  5      nSnSnS[        U5      -   S-   nSnUS-  (       a  SnSR                  U R                   Vs/ s H  ofR                  5       PM     sn5      nU[        U5      -   [        U5      -   n[        R                  " SXBU5      U-   S-   U-   U-   $ s  snf )	Nr   r�   rO   r   r   rP   rQ   rR   )r   r¹   r   rT   r4   rS   rU   rV   )r5   rW   rB   rY   rA   rZ   r\   r]   s           r   rS   ÚStringFileInfo.toRawV  s¨   € Ü˜$Ÿ)™)Ó$ˆØˆØˆØ”S˜“]Ñ" QÑ&ˆØˆØ�A�:ØˆCØ�h‰h¨t¯yªyÓ9ªy¨Ÿ	™	ž©yÑ9Ó:ˆØœ#˜c›(Ñ"¤S¨£XÑ-ˆÜ�{Š{˜5 &°#Ó6¸ÑAÀKÑOÐRUÑUÐX[Ñ[Ð[ùò :s   ÁB0c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚStringFileInfo.__eq__b  re   r   c                 ót   ^• US-   mSR                  U4S jU R                   5       5      nU ST SU ST S3$ )Nrg   rh   c              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr1   )rn   )Ú.0r\   Ú
new_indents     €r   Ú	<genexpr>Ú)StringFileInfo.__str__.<locals>.<genexpr>g  s   øé € ÐGºY°cŸ+™+ j×1Ð1ºYùs   ƒ zStringFileInfo(
z[
ri   ú])©rT   r4   )r5   ro   r]   rÇ   s      @r   rn   ÚStringFileInfo.__str__e  sD   ø€ Ø˜d‘]ˆ
Ø�k‰kÔG¸T¿YºYÓGÓGˆØ�Ð*¨:¨,°c¸#¸¸bÀÀÈBÐOÐOr   c                 ó    • SU R                   -  $ )Nzversioninfo.StringFileInfo(%r)©r4   rr   s    r   rs   ÚStringFileInfo.__repr__j  s   € Ø/°$·)±)Ñ;Ð;r   ©r4   r¹   r1   rv   rx   r+   r   r   r:   r:   ?  s'   † ñôòò
\ò%ôPõ
<r   r:   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)r½   in  z…
WORD   wLength;
WORD   wValueLength;
WORD   wType;
WCHAR  szKey[];
String Children[];    // list of zero or more String structures.
Nc                 óD   • U=(       d    SU l         U=(       d    / U l        g ©Nrw   r¸   ©r5   r¹   r4   s      r   r6   ÚStringTable.__init__v  ó   € Ø—J˜BˆŒ	Ø—J˜Bˆ�	r   c                 óê   • [        XU5      u  nu  pEo`l        [        U5      nX#:  aK  [        5       nUR	                  XU5      nUnU R
                  R                  U5        [        U5      nX#:  a  MK  U$ r1   )ÚparseCodePager¹   r-   ÚStringStructr!   r4   r>   )	r5   r&   r@   rˆ   ÚcpsublenÚcpwValueLengthÚcpwTypeÚssrE   s	            r   r!   ÚStringTable.fromRawz  sn   € Ü<IÈ$ÐSXÓ<YÑ9ˆÑ9ˆH g¬yÜ�a‹LˆØ‹iÜ“ˆBØ—
‘
˜4 EÓ*ˆAØˆAØ�I‰I×Ñ˜RÔ Ü˜!“ˆAð �ið ˆr   c                 ór  • [        U R                  5      nSnSnS[        U5      -   S-   n/ nU R                   H<  nUR	                  5       n[        U5      S-  (       a  US-   nUR                  U5        M>     SR                  U5      nU[        U5      -  n[        R                  " SXBU5      U-   S-   U-   $ )	Nr   r�   rO   r   rP   rQ   r   rR   )	r   r¹   r   r4   rS   r>   rT   rU   rV   )r5   rW   rB   rY   rA   r]   r\   Úraws           r   rS   ÚStringTable.toRaw…  s«   € Ü˜$Ÿ)™)Ó$ˆØˆØˆØ”S˜“]Ñ" QÑ&ˆØˆØ—9”9ˆCØ—)‘)“+ˆCÜ�3‹x˜!�|Ø˜KÑ'�Ø�J‰J�sŽOñ	 ð
 �h‰h�s‹mˆØ”#�c“(ÑˆÜ�{Š{˜5 &°#Ó6¸ÑAÀKÑOÐRUÑUÐUr   c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚStringTable.__eq__”  re   r   c           
      óŒ   • US-   nSU-   R                  S U R                   5       5      nU SU SU R                   SU SU S3
$ )	Nrg   z,
c              3   ó8   #   • U  H  n[        U5      v •  M     g 7fr1   ©Ústr©rÆ   r\   s     r   rÈ   Ú&StringTable.__str__.<locals>.<genexpr>™  s   é € Ð'FºI°S¬¨C¯¨ºIùó   ‚zStringTable(
Ú'z',
Ú[rÊ   )rT   r4   r¹   )r5   ro   rÇ   r]   s       r   rn   ÚStringTable.__str__—  sV   € Ø˜d‘]ˆ
Ø�zÑ!×'Ñ'Ñ'F¸D¿IºIÓ'FÓFˆØ�˜¨
 |°1°T·Y±Y°K¸tÀJÀ<ÈqÐQTÐPUÐUWÐXÐXr   c                 ó@   • SU R                   < SU R                  < S3$ )Nzversioninfo.StringTable(ú, rm   r¸   rr   s    r   rs   ÚStringTable.__repr__œ  s   � Ø48·I´I¸t¿y¼yÐIÐIr   rÐ   ru   rv   rx   r+   r   r   r½   r½   n  s(   † ñôò	òVò%ôYõ
Jr   r½   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)rÙ   i   zf
WORD   wLength;
WORD   wValueLength;
WORD   wType;
WCHAR  szKey[];
WORD   Padding[];
String Value[];
Nc                 óD   • U=(       d    SU l         U=(       d    SU l        g rÓ   ©r¹   Úval)r5   r¹   rô   s      r   r6   ÚStringStruct.__init__©  s   € Ø—J˜BˆŒ	Ø—9˜"ˆ�r   c                 óv   • [        X5      u  nu  pEo`l        X$-   n[        U5      n[        XU5      u  o l        U$ r1   )r;   r¹   r-   r‚   rô   )r5   r&   r@   rˆ   rA   rB   rY   s          r   r!   ÚStringStruct.fromRaw­  s=   € Ü.9¸$Ó.BÑ+ˆÑ+ˆF˜C¤Ø‘
ˆÜ�a‹LˆÜ" 4¨EÓ2‰ˆŒ8Øˆr   c                 ó>  • [        U R                  5      n[        U R                  5      n[        U R                  5      S-   nSnS[        U5      -   S-   nSnUS-  (       a  SnU[        U5      -   US-  -   n[        R
                  " SXSU5      U-   S-   U-   U-   S-   $ )Nr�   rO   r   r   rP   rQ   rR   )r   r¹   rô   r   rU   rV   )r5   rW   Úraw_valrB   rY   rA   rZ   s          r   rS   ÚStringStruct.toRaw´  sŸ   € Ü˜$Ÿ)™)Ó$ˆÜ˜Ÿ™Ó"ˆä�T—X‘X“ Ñ"ˆØˆØ”S˜“]Ñ" QÑ&ˆØˆØ�A�:ØˆCØœ#˜c›(Ñ" f¨q¡jÑ1ˆÜ�{Š{˜5 &°#Ó6¸ÑAÀKÑOÐRUÑUÐX_Ñ_ÐbmÑmÐmr   c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚStringStruct.__eq__Á  re   r   c                 ó@   • SU R                   < SU R                  < S3$ )NzStringStruct(rï   rm   ró   ©r5   ro   s     r   rn   ÚStringStruct.__str__Ä  s   � Ø)-¯¬°D·H´HÐ=Ð=r   c                 ó@   • SU R                   < SU R                  < S3$ )Nzversioninfo.StringStruct(rï   rm   ró   rr   s    r   rs   ÚStringStruct.__repr__Ç  s   � Ø59·Y´YÀÇÄÐIÐIr   ró   ru   rv   rx   r+   r   r   rÙ   rÙ      s'   † ñôòònò%ô>õJr   rÙ   c                 ó0   • [        X5      u  nu  p4pVXXEU44$ r1   )r;   )r&   r@   rˆ   rA   r…   rC   rD   s          r   rØ   rØ   Ë  s&   € Ü+6°tÓ+?Ñ(€AÑ(ˆ˜eØ�|¨BÐ/Ð/Ð/r   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)r?   iÐ  aw  
WORD  wLength;        // length of the version resource
WORD  wValueLength;   // length of the Value member in the current
                      // VS_VERSION_INFO structure
WORD  wType;          // 1 means text, 0 means binary
WCHAR szKey[];        // Contains the Unicode string 'VarFileInfo'.
WORD  Padding[];
Var   Children[];     // list of zero or more Var structures
Nc                 ó$   • U=(       d    / U l         g r1   rÎ   rº   s     r   r6   ÚVarFileInfo.__init__Ú  s   € Ø—J˜Bˆ�	r   c                 óÊ   • Xl         X l        X0l        [        U5      nXV:  a@  [	        5       nUR                  XEU5      nU R                  R                  U5        UnXV:  a  M@  U$ r1   )rA   rB   r¹   r-   Ú	VarStructr!   r4   r>   )	r5   rA   rB   r¹   r&   r@   rˆ   ÚvsrE   s	            r   r!   ÚVarFileInfo.fromRawÝ  s[   € ØŒØŒØŒ	Ü�a‹LˆØ‹iÜ“ˆBØ—
‘
˜4 EÓ*ˆAØ�I‰I×Ñ˜RÔ ØˆAð	 �ið
 ˆr   c                 óÔ  • SU l         SU l        SU l        [        U R                  5      nS[	        U5      -   S-   nSnUS-  (       a  SnSR                  U R                   Vs/ s H  oDR                  5       PM     sn5      nU[	        U5      -   [	        U5      -   U l        [        R                  " S	U R                  U R                   U R                  5      U-   S-   U-   U-   $ s  snf )
Nr   r�   r?   rO   r   r   rP   rQ   rR   )rB   rC   r¹   r   r   rT   r4   rS   rA   rU   rV   ©r5   rW   rA   rZ   r\   r]   s         r   rS   ÚVarFileInfo.toRawé  sÄ   € ØˆŒØˆŒ
Ø!ˆŒ	Ü˜$Ÿ)™)Ó$ˆØ”S˜“]Ñ" QÑ&ˆØˆØ�A�:ØˆCØ�h‰h¨t¯yªyÓ9ªy¨Ÿ	™	ž©yÑ9Ó:ˆØœs 3›xÑ'¬#¨c«(Ñ2ˆŒÜ�{Š{˜5 $§+¡+¨t¯{©{¸D¿J¹JÓGÈ(ÑRÐU`Ñ`ÐcfÑfÐilÑlÐlùò :s   Á#C%c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚVarFileInfo.__eq__ö  re   r   c                 óR   • USSR                  S U R                   5       5      -  -   $ )NzVarFileInfo([%s])rï   c              3   ó8   #   • U  H  n[        U5      v •  M     g 7fr1   ræ   rè   s     r   rÈ   Ú&VarFileInfo.__str__.<locals>.<genexpr>ú  s   é € Ð7VÊIÀS¼¸C¿¸ÊIùrê   rË   rþ   s     r   rn   ÚVarFileInfo.__str__ù  s&   € ØÐ+¨d¯i©iÑ7VÈDÏIÊIÓ7VÓ.VÑVÑVÐVr   c                 ó    • SU R                   -  $ )Nzversioninfo.VarFileInfo(%r)rÎ   rr   s    r   rs   ÚVarFileInfo.__repr__ü  s   € Ø,¨t¯y©yÑ8Ð8r   )r4   r¹   rA   rB   rC   r1   rv   rx   r+   r   r   r?   r?   Ð  s'   † ñôò
òmò%ôWõ9r   r?   c                   óD   • \ rS rSrSrSS jrS rS rS rSS jr	S	 r
S
rg)r  i   aö  
WORD  wLength;        // length of the version resource
WORD  wValueLength;   // length of the Value member in the current
                      // VS_VERSION_INFO structure
WORD  wType;          // 1 means text, 0 means binary
WCHAR szKey[];        // Contains the Unicode string 'Translation'
                      // or a user-defined key string value
WORD  Padding[];      //
WORD  Value[];        // list of one or more values that are language
                      // and code-page identifiers
Nc                 óD   • U=(       d    SU l         U=(       d    / U l        g rÓ   r¸   rÔ   s      r   r6   ÚVarStruct.__init__  rÖ   r   c                 ó$  • [        X5      u  nu  U l        U l        U l        U l        [        U5      n[        SU R                  S5       HB  n[        R                  " SXUS-    5      S   nU R                  R                  U5        US-  nMD     U$ )Nr   r   ÚH)r;   rA   r…   rC   r¹   r-   ÚrangerU   r�   r4   r>   )r5   r&   r@   rˆ   rE   r\   s         r   r!   ÚVarStruct.fromRaw  s…   € ÜEPÐQUÓEYÑBˆÑBˆDŒK˜Ô*¨D¬J¸¼	Ü�a‹LˆÜ�q˜$×+Ñ+¨QÖ/ˆAÜ—-’-  T¨A°©E ]Ó3°AÑ6ˆCØ�I‰I×Ñ˜SÔ!Ø�‰FŠAñ 0ð ˆr   c           	      ó  • [        U R                  5      S-  U l        SU l        [	        U R
                  5      nS[        U5      -   S-   nSnUS-  (       a  SnU[        U5      -   U R                  -   U l        SR                  U R                   Vs/ s H  n[        R                  " SU5      PM     sn5      n[        R                  " SU R                  U R                  U R                  5      U-   S-   U-   U-   $ s  snf )	Nr   r   rO   r   rP   rQ   r  rR   )
r   r4   r…   rC   r   r¹   rA   rT   rU   rV   r  s         r   rS   ÚVarStruct.toRaw  sØ   € Ü §	¡	›N¨QÑ.ˆÔØˆŒ
Ü˜$Ÿ)™)Ó$ˆØ”S˜“]Ñ" QÑ&ˆØˆØ�A�:ØˆCØœs 3›xÑ'¨$×*;Ñ*;Ñ;ˆŒØ�h‰h¸¿ºÓCº°#œŸš C¨Ö-¹ÑCÓDˆÜ�{Š{˜5 $§+¡+¨t×/@Ñ/@À$Ç*Á*ÓMÐPXÑXÐ[fÑfÐilÑlÐorÑrÐrùò Ds   Â!C=c                 ó(   • U R                  5       U:H  $ r1   r`   ra   s     r   rc   ÚVarStruct.__eq__%  re   r   c                 ó@   • SU R                   < SU R                  < S3$ )NzVarStruct('z', rm   r¸   rþ   s     r   rn   ÚVarStruct.__str__(  s   � Ø(,¯	¬	°4·9´9Ð=Ð=r   c                 ó@   • SU R                   < SU R                  < S3$ )Nzversioninfo.VarStruct(rï   rm   r¸   rr   s    r   rs   ÚVarStruct.__repr__+  s   � Ø26·)´)¸T¿Y¼YÐGÐGr   )r4   r¹   rA   rC   r…   ru   rv   rx   r+   r   r   r  r     s'   † ñ
ôòò
sò%ô>õHr   r  c                 óH  • SSK Js  Jn  [        U S5       nUR	                  UR                  5       5      nSSS5         [        W5      n[        U[        5      (       d   S[        U5      < 35       eU$ ! , (       d  f       NE= f! [         a  n[        S5      UeSnAff = f)z¥
Load the `VSVersionInfo` structure from its string-based (`VSVersionInfo.__str__`) serialization by reading the
text from the file and running it through `eval()`.
r   NÚrbzCFailed to deserialize VSVersionInfo from text-based representation!zALoaded incompatible structure type! Expected VSVersionInfo, got: )ÚPyInstaller.utils.miscÚutilsÚmiscÚopenr‡   ÚreadÚevalr   Ú
ValueErrorÚ
isinstancer    Útype)r   Ú	miscutilsÚfpr   r'   Úes         r   Ú load_version_info_from_text_filer2  /  sŸ   € ÷ /Ð.Ü	ˆh˜Ô	 Ø×Ñ §¡£	Ó*ˆ÷ 
ðgÜ�D‹zˆô
 �dœM×*Ñ*ð [Ø
KÌDÐQUËJÉ>ÐZó[Ð*ð €K÷ 
Õ	ûô ó gÜÐ^Ó_ÐefÐfûðgús"   – A5¿B Á5
BÂ
B!ÂBÂB!c                 ó`  • [        U[        5      (       d   e[        R                  " U SS9nUR	                  5       nUR                  5         [        R                  " U S5      n[        R                  " U[        R                  S   SUR                  5       5        [        R                  " US5        U(       ad  [        R                  " U SS9nUR	                  5       nUR                  5         U(       d'  [        U S5       nUR                  U5        S S S 5        g g g ! , (       d  f       g = f)NTr   r   r   r�   Úab)r-  r    r   r   Úget_overlayÚcloser   ÚBeginUpdateResourceÚUpdateResourcer   rS   ÚEndUpdateResourcer)  Úwrite)r#   r'   r   Úoverlay_beforeÚhdstÚoverlay_afterÚexefs          r   Ú write_version_info_to_executabler?  G  sã   € Ü�dœM×*Ñ*Ð*Ð*ô 
�Š�<¨4Ñ	0€BØ—^‘^Ó%€NØ‡H�H„Jä×'Ò'¨°aÓ8€DÜ×Ò˜D¤&×"6Ñ"6°|Ñ"DÀaÈÏÉËÔVÜ×Ò˜t QÔ'æä�YŠY�|¨tÑ4ˆØŸ™Ó(ˆØ
�‰Œ
ö Ü�l DÔ)¨TØ—
‘
˜>Ô*÷ *Ð)ð ð ÷ *Õ)ús   ÄDÄ
D-)r   )rU   r   ÚPyInstaller.compatr   r   r   r   r(   r-   r    r;   r‚   r<   r:   r½   rÙ   rØ   r?   r  r2  r?  r+   r   r   Ú<module>rA     sž   ðó ã å 'òð2 Ð ò#òò $÷PTñ PTôf3ò÷J
ñ J
÷Z,<ñ ,<÷^/Jñ /J÷d(Jñ (JòV0÷
-9ñ -9÷`,Hñ ,Hò^ó0+r   