| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896 |
- %ifidn __OUTPUT_FORMAT__,obj
- section code use32 class=code align=256
- %elifidn __OUTPUT_FORMAT__,win32
- [email protected] equ 1
- section .text code align=256
- %else
- section .text code
- %endif
- global _BF_encrypt
- align 16
- _BF_encrypt:
- L$_BF_encrypt_begin:
- ;
- push ebp
- push ebx
- mov ebx,DWORD [12+esp]
- mov ebp,DWORD [16+esp]
- push esi
- push edi
- ; Load the 2 words
- mov edi,DWORD [ebx]
- mov esi,DWORD [4+ebx]
- xor eax,eax
- mov ebx,DWORD [ebp]
- xor ecx,ecx
- xor edi,ebx
- ;
- ; Round 0
- mov edx,DWORD [4+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 1
- mov edx,DWORD [8+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 2
- mov edx,DWORD [12+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 3
- mov edx,DWORD [16+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 4
- mov edx,DWORD [20+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 5
- mov edx,DWORD [24+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 6
- mov edx,DWORD [28+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 7
- mov edx,DWORD [32+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 8
- mov edx,DWORD [36+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 9
- mov edx,DWORD [40+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 10
- mov edx,DWORD [44+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 11
- mov edx,DWORD [48+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 12
- mov edx,DWORD [52+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 13
- mov edx,DWORD [56+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 14
- mov edx,DWORD [60+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 15
- mov edx,DWORD [64+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- ; Load parameter 0 (16) enc=1
- mov eax,DWORD [20+esp]
- xor edi,ebx
- mov edx,DWORD [68+ebp]
- xor esi,edx
- mov DWORD [4+eax],edi
- mov DWORD [eax],esi
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- global _BF_decrypt
- align 16
- _BF_decrypt:
- L$_BF_decrypt_begin:
- ;
- push ebp
- push ebx
- mov ebx,DWORD [12+esp]
- mov ebp,DWORD [16+esp]
- push esi
- push edi
- ; Load the 2 words
- mov edi,DWORD [ebx]
- mov esi,DWORD [4+ebx]
- xor eax,eax
- mov ebx,DWORD [68+ebp]
- xor ecx,ecx
- xor edi,ebx
- ;
- ; Round 16
- mov edx,DWORD [64+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 15
- mov edx,DWORD [60+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 14
- mov edx,DWORD [56+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 13
- mov edx,DWORD [52+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 12
- mov edx,DWORD [48+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 11
- mov edx,DWORD [44+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 10
- mov edx,DWORD [40+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 9
- mov edx,DWORD [36+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 8
- mov edx,DWORD [32+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 7
- mov edx,DWORD [28+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 6
- mov edx,DWORD [24+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 5
- mov edx,DWORD [20+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 4
- mov edx,DWORD [16+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 3
- mov edx,DWORD [12+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor edi,ebx
- ;
- ; Round 2
- mov edx,DWORD [8+ebp]
- mov ebx,edi
- xor esi,edx
- shr ebx,16
- mov edx,edi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- xor eax,eax
- xor esi,ebx
- ;
- ; Round 1
- mov edx,DWORD [4+ebp]
- mov ebx,esi
- xor edi,edx
- shr ebx,16
- mov edx,esi
- mov al,bh
- and ebx,255
- mov cl,dh
- and edx,255
- mov eax,DWORD [72+eax*4+ebp]
- mov ebx,DWORD [1096+ebx*4+ebp]
- add ebx,eax
- mov eax,DWORD [2120+ecx*4+ebp]
- xor ebx,eax
- mov edx,DWORD [3144+edx*4+ebp]
- add ebx,edx
- ; Load parameter 0 (1) enc=0
- mov eax,DWORD [20+esp]
- xor edi,ebx
- mov edx,DWORD [ebp]
- xor esi,edx
- mov DWORD [4+eax],edi
- mov DWORD [eax],esi
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- global _BF_cbc_encrypt
- align 16
- _BF_cbc_encrypt:
- L$_BF_cbc_encrypt_begin:
- ;
- push ebp
- push ebx
- push esi
- push edi
- mov ebp,DWORD [28+esp]
- ; getting iv ptr from parameter 4
- mov ebx,DWORD [36+esp]
- mov esi,DWORD [ebx]
- mov edi,DWORD [4+ebx]
- push edi
- push esi
- push edi
- push esi
- mov ebx,esp
- mov esi,DWORD [36+esp]
- mov edi,DWORD [40+esp]
- ; getting encrypt flag from parameter 5
- mov ecx,DWORD [56+esp]
- ; get and push parameter 3
- mov eax,DWORD [48+esp]
- push eax
- push ebx
- cmp ecx,0
- jz NEAR L$000decrypt
- and ebp,4294967288
- mov eax,DWORD [8+esp]
- mov ebx,DWORD [12+esp]
- jz NEAR L$001encrypt_finish
- L$002encrypt_loop:
- mov ecx,DWORD [esi]
- mov edx,DWORD [4+esi]
- xor eax,ecx
- xor ebx,edx
- bswap eax
- bswap ebx
- mov DWORD [8+esp],eax
- mov DWORD [12+esp],ebx
- call L$_BF_encrypt_begin
- mov eax,DWORD [8+esp]
- mov ebx,DWORD [12+esp]
- bswap eax
- bswap ebx
- mov DWORD [edi],eax
- mov DWORD [4+edi],ebx
- add esi,8
- add edi,8
- sub ebp,8
- jnz NEAR L$002encrypt_loop
- L$001encrypt_finish:
- mov ebp,DWORD [52+esp]
- and ebp,7
- jz NEAR L$003finish
- call L$004PIC_point
- L$004PIC_point:
- pop edx
- lea ecx,[(L$005cbc_enc_jmp_table-L$004PIC_point)+edx]
- mov ebp,DWORD [ebp*4+ecx]
- add ebp,edx
- xor ecx,ecx
- xor edx,edx
- jmp ebp
- L$006ej7:
- mov dh,BYTE [6+esi]
- shl edx,8
- L$007ej6:
- mov dh,BYTE [5+esi]
- L$008ej5:
- mov dl,BYTE [4+esi]
- L$009ej4:
- mov ecx,DWORD [esi]
- jmp NEAR L$010ejend
- L$011ej3:
- mov ch,BYTE [2+esi]
- shl ecx,8
- L$012ej2:
- mov ch,BYTE [1+esi]
- L$013ej1:
- mov cl,BYTE [esi]
- L$010ejend:
- xor eax,ecx
- xor ebx,edx
- bswap eax
- bswap ebx
- mov DWORD [8+esp],eax
- mov DWORD [12+esp],ebx
- call L$_BF_encrypt_begin
- mov eax,DWORD [8+esp]
- mov ebx,DWORD [12+esp]
- bswap eax
- bswap ebx
- mov DWORD [edi],eax
- mov DWORD [4+edi],ebx
- jmp NEAR L$003finish
- L$000decrypt:
- and ebp,4294967288
- mov eax,DWORD [16+esp]
- mov ebx,DWORD [20+esp]
- jz NEAR L$014decrypt_finish
- L$015decrypt_loop:
- mov eax,DWORD [esi]
- mov ebx,DWORD [4+esi]
- bswap eax
- bswap ebx
- mov DWORD [8+esp],eax
- mov DWORD [12+esp],ebx
- call L$_BF_decrypt_begin
- mov eax,DWORD [8+esp]
- mov ebx,DWORD [12+esp]
- bswap eax
- bswap ebx
- mov ecx,DWORD [16+esp]
- mov edx,DWORD [20+esp]
- xor ecx,eax
- xor edx,ebx
- mov eax,DWORD [esi]
- mov ebx,DWORD [4+esi]
- mov DWORD [edi],ecx
- mov DWORD [4+edi],edx
- mov DWORD [16+esp],eax
- mov DWORD [20+esp],ebx
- add esi,8
- add edi,8
- sub ebp,8
- jnz NEAR L$015decrypt_loop
- L$014decrypt_finish:
- mov ebp,DWORD [52+esp]
- and ebp,7
- jz NEAR L$003finish
- mov eax,DWORD [esi]
- mov ebx,DWORD [4+esi]
- bswap eax
- bswap ebx
- mov DWORD [8+esp],eax
- mov DWORD [12+esp],ebx
- call L$_BF_decrypt_begin
- mov eax,DWORD [8+esp]
- mov ebx,DWORD [12+esp]
- bswap eax
- bswap ebx
- mov ecx,DWORD [16+esp]
- mov edx,DWORD [20+esp]
- xor ecx,eax
- xor edx,ebx
- mov eax,DWORD [esi]
- mov ebx,DWORD [4+esi]
- L$016dj7:
- ror edx,16
- mov BYTE [6+edi],dl
- shr edx,16
- L$017dj6:
- mov BYTE [5+edi],dh
- L$018dj5:
- mov BYTE [4+edi],dl
- L$019dj4:
- mov DWORD [edi],ecx
- jmp NEAR L$020djend
- L$021dj3:
- ror ecx,16
- mov BYTE [2+edi],cl
- shl ecx,16
- L$022dj2:
- mov BYTE [1+esi],ch
- L$023dj1:
- mov BYTE [esi],cl
- L$020djend:
- jmp NEAR L$003finish
- L$003finish:
- mov ecx,DWORD [60+esp]
- add esp,24
- mov DWORD [ecx],eax
- mov DWORD [4+ecx],ebx
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- align 64
- L$005cbc_enc_jmp_table:
- dd 0
- dd L$013ej1-L$004PIC_point
- dd L$012ej2-L$004PIC_point
- dd L$011ej3-L$004PIC_point
- dd L$009ej4-L$004PIC_point
- dd L$008ej5-L$004PIC_point
- dd L$007ej6-L$004PIC_point
- dd L$006ej7-L$004PIC_point
- align 64
|