• <cite id="uwv89"></cite>
      1. 亚洲综合小综合中文字幕,国产久爱免费精品视频,精品国产品香蕉在线,国产午夜精品在人线播放,精品一二三四区在线观看,国产成人无码免费看视频软件 ,色欲久久人妻内射,午夜在线观看成人av
        softtest
        級別: 正式會員
        精華主題: 0
        發帖數量: 20 個
        工控威望: 94 點
        下載積分: 474 分
        在線時間: 4(小時)
        注冊時間: 2018-04-18
        最后登錄: 2018-05-30
        查看softtest的 主題 / 回貼
        樓主  發表于: 2018-04-18 11:04
        近日在學習昆侖通態資料,寫了一個反編譯工具 ,但發現一遍反編譯的話,while 指令還原不了。哪位有什么好建議沒?
        '———————————————————————                                                                                                                                                                                                      
        '自定義子函數:DoStrCrc16。                                                                                                                                                                                                                          
        '函數原型為: FUNCTION DoStrCrc16(strProtocol AS STRING) AS INTEGER                                                                                                                                                                                  
        '這部分注釋請勿修改,請在下面編輯內容:                                                                                                                                                                                                              
        '———————————————————————                                                                                   DoStrCrc16(strProtocol as string) as integer                                                                      
        dim iLen as integer                                                                                            |dim Ta as integer                                                                                                                    
        dim iSum as byte                                                                                               |dim Tb as byte                                                                                                                      
        dim pData(1) as byte                                                                                           |dim Va(1) as byte                                                                                                                    
        dim ulSeed as integer                                                                                          |dim Tc as integer                                                                                                                    
        dim i    as integer                                                                                            |dim Td as integer                                                                                                                    
        dim sel  as integer                                                                                            |dim Te as integer                                                                                                                    
        dim wCRC16a(16) as integer                                                                                     |dim Vb(16) as integer                                                                                                                
        dim wCRC16b(16) as integer                                                                                     |dim Vc(16) as integer                                                                                                                
        wCRC16a[1]=0                                                                                                   |   Vb[1]= 0                                                                                                                          
        wCRC16a[2]=49345                                                                                               |   Vb[2]= 49345                                                                                                                      
        wCRC16a[3]=49537                                                                                               |   Vb[3]= 49537                                                                                                                      
        wCRC16a[4]=320                                                                                                 |   Vb[4]= 320                                                                                                                        
        wCRC16a[5]=49921                                                                                               |   Vb[5]= 49921                                                                                                                      
        wCRC16a[6]=960                                                                                                 |   Vb[6]= 960                                                                                                                        
        wCRC16a[7]=640                                                                                                 |   Vb[7]= 640                                                                                                                        
        wCRC16a[8]=49729                                                                                               |   Vb[8]= 49729                                                                                                                      
        wCRC16a[9]=50689                                                                                               |   Vb[9]= 50689                                                                                                                      
        wCRC16a[10]=1728                                                                                               |   Vb[10]= 1728                                                                                                                      
        wCRC16a[11]=1920                                                                                               |   Vb[11]= 1920                                                                                                                      
        wCRC16a[12]=51009                                                                                              |   Vb[12]= 51009                                                                                                                    
        wCRC16a[13]=1280                                                                                               |   Vb[13]= 1280                                                                                                                      
        wCRC16a[14]=50625                                                                                              |   Vb[14]= 50625                                                                                                                    
        wCRC16a[15]=50305                                                                                              |   Vb[15]= 50305                                                                                                                    
        wCRC16a[16]=1088                                                                                               |   Vb[16]= 1088                                                                                                                      
        wCRC16b[1]=0                                                                                                   |   Vc[1]= 0                                                                                                                          
        wCRC16b[2]=52225                                                                                               |   Vc[2]= 52225                                                                                                                      
        wCRC16b[3]=55297                                                                                               |   Vc[3]= 55297                                                                                                                      
        wCRC16b[4]=5120                                                                                                |   Vc[4]= 5120                                                                                                                      
        wCRC16b[5]=61441                                                                                               |   Vc[5]= 61441                                                                                                                      
        wCRC16b[6]=15360                                                                                               |   Vc[6]= 15360                                                                                                                      
        wCRC16b[7]=10240                                                                                               |   Vc[7]= 10240                                                                                                                      
        wCRC16b[8]=58369                                                                                               |   Vc[8]= 58369                                                                                                                      
        wCRC16b[9]=40961                                                                                               |   Vc[9]= 40961                                                                                                                      
        wCRC16b[10]=27648                                                                                              |   Vc[10]= 27648                                                                                                                    
        wCRC16b[11]=30720                                                                                              |   Vc[11]= 30720                                                                                                                    
        wCRC16b[12]=46081                                                                                              |   Vc[12]= 46081                                                                                                                    
        wCRC16b[13]=20480                                                                                              |   Vc[13]= 20480                                                                                                                    
        wCRC16b[14]=39937                                                                                              |   Vc[14]= 39937                                                                                                                    
        wCRC16b[15]=34817                                                                                              |   Vc[15]= 34817                                                                                                                    
        wCRC16b[16]=17920                                                                                              |   Vc[16]= 17920                                                                                                                    
          iSum = 0                                                                                                     |   Tb= 0                                                                                                                            
          ulSeed=0                                                                                                     |   Tc= 0                                                                                                                            
          i=1                                                                                                          |   Td= 1                                                                                                                            
          iLen=!len(strProtocol)                                                                                       |   Ta= !len( strProtocol)                                                                                                            
          if iLen>0 then                                                                                               |   IF   Ta > 0 THEN                                                                                                                  
             iLen=!arrayResize(pData,iLen)                                                                             |      Ta= !ArrayResize( Va , Ta)                                                                                                    
             if !Str2ByteArr(strProtocol,pData)<>0 then                                                                |      IF   !Str2ByteArr( strProtocol , Va) <> 0 THEN                                                                                
              iSum=-1                                                                                                  |         Tb= -1                                                                                                                      
              exit                                                                                                     |         EXIT                                                                                                                        
           endif                                                                                                       |      ENDIF                                                                                                                          
           while iLen                                                                                                  |      IF   Ta THEN                                                                                                                  
             iSum=!BitXor(pData,uLseed)                                                                             |         Tb= !BitXor( Va[Td] , Tc)                                                                                                  
             ulSeed=!BitXor(!BitXor(!BitRShift(ulSeed,8),wCRC16a[!BitAnd(iSum,&H0F)+1]),wCRC16b[!BitRShift(iSum,4)+1]) |         Tc= !BitXor( !BitXor( !BitRShift( Tc , 8) , Vb[!BitAnd( Tb , 15) + 1]) , Vc[!BitRShift( Tb , 4) + 1])                      
             iLen=iLen-1                                                                                               |         Ta= Ta - 1                                                                                                                  
             i=i+1                                                                                                     |         Td= Td + 1                                                                                                                  
           endwhile                                                                                                    |      EndWhile      ENDIF                                                                                                            
          endif                                                                                                        |   ENDIF                                                                                                                            
          DoStrCrc16=!BitAnd(ulSeed,&Hffff)                                                                            |   DoStrCrc16= !BitAnd( Tc , 65535)                                                                                                  
                                                                                                                       |   EXIT                                                                                                                              
        左邊為設備原代碼,后面為反編譯還原后的。
        softtest
        級別: 正式會員
        精華主題: 0
        發帖數量: 20 個
        工控威望: 94 點
        下載積分: 474 分
        在線時間: 4(小時)
        注冊時間: 2018-04-18
        最后登錄: 2018-05-30
        查看softtest的 主題 / 回貼
        1樓  發表于: 2018-04-18 11:21
        CollectData設備采集函數() as Void
        dim Ta as integer
        dim Tb as integer
        dim Tc as string
        dim Td as string
        dim Te as string
        dim Tf as string
        dim Va(0) as byte
        dim Vb(0) as byte
        dim Vc(0) as byte
        dim Tg as integer
        dim Th as integer
        dim Ti as single
        dim Tj as integer
           Ta= 0
           Tb= 0
           !ArrayResize( Va , 12)
           Va[1]= 0
           Va[2]= 1
           Va[3]= 2
           Va[4]= 3
           Va[5]= 4
           Va[6]= 5
           Va[7]= 6
           Va[8]= 7
           Va[9]= 8
           Va[10]= 9
           Va[11]= 0
           Va[12]= 0
           !SvrGetIntFromByteArr( Va , 2 , Ta , 1)
           !ArrayResize( Va , 8)
           Va[1]= 設備屬性00
           Va[2]= 3
           Va[3]= 0
           Va[4]= 0
           Va[5]= 0
           Va[6]= 8
           Tg= !SvrByteArrayModbusCRC( Va , 1 , 6)
           Va[7]= !BitAnd( Tg , 255)
           Th= !BitAnd( Tg , 65280)
           Va[8]= !BitRShift( Th , 8)
           !ArrayResize( Vb , 21)
           Tg= !DevWriteAndReadByteArr( Va , 8 , Vb , 21 , 設備屬性01)
           IF   Tg <> 21 THEN
              !SetSingleChannelValueByName( "通訊狀態" , 2)
              EXIT
           ENDIF
           Ta= 0
           !ArrayResize( Vc , 2)
           IF   Ta < 8 THEN
              Vc[1]= Vb[Ta * 2 + 5]
              Vc[2]= Vb[Ta * 2 + 4]
              Tg= !SvrGetShortFromByteArr( Vc , 1 , Tj , 0)
              Ti= Tj
              !SetSingleChannelValueByNum( Ta + Tb + 2 , Ti)
              Ta= Ta + 1
           EndWhile   ENDIF
           Tb= Tb + Ta
           !SetSingleChannelValueByName( "通訊狀態" , 0)
           EXIT

        主站蜘蛛池模板: 中文字幕第一页国产精品| 国产精品国产精品一区精品| 色综合久久人妻精品日韩| a4yy私人毛片| 欧美人与动zozo在线播放| 久久国产乱子伦免费精品无码 | 蜜臀av无码一区二区三区| 亚洲一区二区三区激情视频| 日韩精品一区二区蜜臀av| 激情啪啪啪一区二区三区| 亚洲精品码中文在线观看| 亚洲中文字幕一区二区| 精品亚洲国产成人痴汉av| 视频一区视频二区视频三| 中文字幕无码免费久久9一区9| 久久亚洲色WWW成人男男| 99精品热在线在线观看视| 国产中文字幕精品在线| 国产精品福利一区二区久久| 国产精品一区二区久久毛片| 国产粉嫩区一区二区三区| 国产美女在线观看大长腿| 国产精品疯狂输出jk草莓视频| 免费观看日本污污ww网站69| 国产精品久久久久久久专区| 久久天天躁夜夜躁狠狠85| 亚洲少妇人妻无码视频| 亚洲国产精品高清久久久| 久久亚洲精品人成综合网| 日韩毛片在线视频x| 四虎亚洲国产成人久久精品| 蜜桃久久精品成人无码av | 日本午夜精品一区二区三区电影 | 丰满少妇高潮无套内谢| 中文字幕日韩精品有码| 国产偷窥熟女高潮精品视频| 国产成人精品视频不卡| 午夜福利在线观看6080| 国产午夜精品福利91| 亚洲一区二区精品偷拍| 精品国产免费一区二区三区香蕉|