12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224 |
- IF @Version LT 800
- ECHO MASM version 8.00 or later is strongly recommended.
- ENDIF
- .686
- .XMM
- IF @Version LT 800
- XMMWORD STRUCT 16
- DQ 2 dup (?)
- XMMWORD ENDS
- ENDIF
- .MODEL FLAT
- OPTION DOTNAME
- IF @Version LT 800
- .text$ SEGMENT PAGE 'CODE'
- ELSE
- .text$ SEGMENT ALIGN(64) 'CODE'
- ENDIF
- ;EXTERN _OPENSSL_ia32cap_P:NEAR
- ALIGN 16
- _aesni_encrypt PROC PUBLIC
- $L_aesni_encrypt_begin::
- mov eax,DWORD PTR 4[esp]
- mov edx,DWORD PTR 12[esp]
- movups xmm2,XMMWORD PTR [eax]
- mov ecx,DWORD PTR 240[edx]
- mov eax,DWORD PTR 8[esp]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L000enc1_loop_1:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L000enc1_loop_1
- DB 102,15,56,221,209
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- movups XMMWORD PTR [eax],xmm2
- pxor xmm2,xmm2
- ret
- _aesni_encrypt ENDP
- ALIGN 16
- _aesni_decrypt PROC PUBLIC
- $L_aesni_decrypt_begin::
- mov eax,DWORD PTR 4[esp]
- mov edx,DWORD PTR 12[esp]
- movups xmm2,XMMWORD PTR [eax]
- mov ecx,DWORD PTR 240[edx]
- mov eax,DWORD PTR 8[esp]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L001dec1_loop_2:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L001dec1_loop_2
- DB 102,15,56,223,209
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- movups XMMWORD PTR [eax],xmm2
- pxor xmm2,xmm2
- ret
- _aesni_decrypt ENDP
- ALIGN 16
- __aesni_encrypt2 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- add ecx,16
- $L002enc2_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L002enc2_loop
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- ret
- __aesni_encrypt2 ENDP
- ALIGN 16
- __aesni_decrypt2 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- add ecx,16
- $L003dec2_loop:
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,222,208
- DB 102,15,56,222,216
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L003dec2_loop
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,223,208
- DB 102,15,56,223,216
- ret
- __aesni_decrypt2 ENDP
- ALIGN 16
- __aesni_encrypt3 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- add ecx,16
- $L004enc3_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- DB 102,15,56,220,224
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L004enc3_loop
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- DB 102,15,56,221,224
- ret
- __aesni_encrypt3 ENDP
- ALIGN 16
- __aesni_decrypt3 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- add ecx,16
- $L005dec3_loop:
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,222,208
- DB 102,15,56,222,216
- DB 102,15,56,222,224
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L005dec3_loop
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,223,208
- DB 102,15,56,223,216
- DB 102,15,56,223,224
- ret
- __aesni_decrypt3 ENDP
- ALIGN 16
- __aesni_encrypt4 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- shl ecx,4
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- pxor xmm5,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- DB 15,31,64,0
- add ecx,16
- $L006enc4_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- DB 102,15,56,220,224
- DB 102,15,56,220,232
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L006enc4_loop
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- DB 102,15,56,221,224
- DB 102,15,56,221,232
- ret
- __aesni_encrypt4 ENDP
- ALIGN 16
- __aesni_decrypt4 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- shl ecx,4
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- pxor xmm5,xmm0
- movups xmm0,XMMWORD PTR 32[edx]
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- DB 15,31,64,0
- add ecx,16
- $L007dec4_loop:
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,222,208
- DB 102,15,56,222,216
- DB 102,15,56,222,224
- DB 102,15,56,222,232
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L007dec4_loop
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- DB 102,15,56,223,208
- DB 102,15,56,223,216
- DB 102,15,56,223,224
- DB 102,15,56,223,232
- ret
- __aesni_decrypt4 ENDP
- ALIGN 16
- __aesni_encrypt6 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- DB 102,15,56,220,209
- pxor xmm5,xmm0
- pxor xmm6,xmm0
- DB 102,15,56,220,217
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- DB 102,15,56,220,225
- pxor xmm7,xmm0
- movups xmm0,XMMWORD PTR [ecx*1+edx]
- add ecx,16
- jmp $L008_aesni_encrypt6_inner
- ALIGN 16
- $L009enc6_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- $L008_aesni_encrypt6_inner:
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- $L_aesni_encrypt6_enter::
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- DB 102,15,56,220,224
- DB 102,15,56,220,232
- DB 102,15,56,220,240
- DB 102,15,56,220,248
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L009enc6_loop
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- DB 102,15,56,221,224
- DB 102,15,56,221,232
- DB 102,15,56,221,240
- DB 102,15,56,221,248
- ret
- __aesni_encrypt6 ENDP
- ALIGN 16
- __aesni_decrypt6 PROC PRIVATE
- movups xmm0,XMMWORD PTR [edx]
- shl ecx,4
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- DB 102,15,56,222,209
- pxor xmm5,xmm0
- pxor xmm6,xmm0
- DB 102,15,56,222,217
- lea edx,DWORD PTR 32[ecx*1+edx]
- neg ecx
- DB 102,15,56,222,225
- pxor xmm7,xmm0
- movups xmm0,XMMWORD PTR [ecx*1+edx]
- add ecx,16
- jmp $L010_aesni_decrypt6_inner
- ALIGN 16
- $L011dec6_loop:
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- $L010_aesni_decrypt6_inner:
- DB 102,15,56,222,233
- DB 102,15,56,222,241
- DB 102,15,56,222,249
- $L_aesni_decrypt6_enter::
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,222,208
- DB 102,15,56,222,216
- DB 102,15,56,222,224
- DB 102,15,56,222,232
- DB 102,15,56,222,240
- DB 102,15,56,222,248
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L011dec6_loop
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- DB 102,15,56,222,241
- DB 102,15,56,222,249
- DB 102,15,56,223,208
- DB 102,15,56,223,216
- DB 102,15,56,223,224
- DB 102,15,56,223,232
- DB 102,15,56,223,240
- DB 102,15,56,223,248
- ret
- __aesni_decrypt6 ENDP
- ALIGN 16
- _aesni_ecb_encrypt PROC PUBLIC
- $L_aesni_ecb_encrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebx,DWORD PTR 36[esp]
- and eax,-16
- jz $L012ecb_ret
- mov ecx,DWORD PTR 240[edx]
- test ebx,ebx
- jz $L013ecb_decrypt
- mov ebp,edx
- mov ebx,ecx
- cmp eax,96
- jb $L014ecb_enc_tail
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- sub eax,96
- jmp $L015ecb_enc_loop6_enter
- ALIGN 16
- $L016ecb_enc_loop6:
- movups XMMWORD PTR [edi],xmm2
- movdqu xmm2,XMMWORD PTR [esi]
- movups XMMWORD PTR 16[edi],xmm3
- movdqu xmm3,XMMWORD PTR 16[esi]
- movups XMMWORD PTR 32[edi],xmm4
- movdqu xmm4,XMMWORD PTR 32[esi]
- movups XMMWORD PTR 48[edi],xmm5
- movdqu xmm5,XMMWORD PTR 48[esi]
- movups XMMWORD PTR 64[edi],xmm6
- movdqu xmm6,XMMWORD PTR 64[esi]
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- $L015ecb_enc_loop6_enter:
- call __aesni_encrypt6
- mov edx,ebp
- mov ecx,ebx
- sub eax,96
- jnc $L016ecb_enc_loop6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- add eax,96
- jz $L012ecb_ret
- $L014ecb_enc_tail:
- movups xmm2,XMMWORD PTR [esi]
- cmp eax,32
- jb $L017ecb_enc_one
- movups xmm3,XMMWORD PTR 16[esi]
- je $L018ecb_enc_two
- movups xmm4,XMMWORD PTR 32[esi]
- cmp eax,64
- jb $L019ecb_enc_three
- movups xmm5,XMMWORD PTR 48[esi]
- je $L020ecb_enc_four
- movups xmm6,XMMWORD PTR 64[esi]
- xorps xmm7,xmm7
- call __aesni_encrypt6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- jmp $L012ecb_ret
- ALIGN 16
- $L017ecb_enc_one:
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L021enc1_loop_3:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L021enc1_loop_3
- DB 102,15,56,221,209
- movups XMMWORD PTR [edi],xmm2
- jmp $L012ecb_ret
- ALIGN 16
- $L018ecb_enc_two:
- call __aesni_encrypt2
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- jmp $L012ecb_ret
- ALIGN 16
- $L019ecb_enc_three:
- call __aesni_encrypt3
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- jmp $L012ecb_ret
- ALIGN 16
- $L020ecb_enc_four:
- call __aesni_encrypt4
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- jmp $L012ecb_ret
- ALIGN 16
- $L013ecb_decrypt:
- mov ebp,edx
- mov ebx,ecx
- cmp eax,96
- jb $L022ecb_dec_tail
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- sub eax,96
- jmp $L023ecb_dec_loop6_enter
- ALIGN 16
- $L024ecb_dec_loop6:
- movups XMMWORD PTR [edi],xmm2
- movdqu xmm2,XMMWORD PTR [esi]
- movups XMMWORD PTR 16[edi],xmm3
- movdqu xmm3,XMMWORD PTR 16[esi]
- movups XMMWORD PTR 32[edi],xmm4
- movdqu xmm4,XMMWORD PTR 32[esi]
- movups XMMWORD PTR 48[edi],xmm5
- movdqu xmm5,XMMWORD PTR 48[esi]
- movups XMMWORD PTR 64[edi],xmm6
- movdqu xmm6,XMMWORD PTR 64[esi]
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- $L023ecb_dec_loop6_enter:
- call __aesni_decrypt6
- mov edx,ebp
- mov ecx,ebx
- sub eax,96
- jnc $L024ecb_dec_loop6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- add eax,96
- jz $L012ecb_ret
- $L022ecb_dec_tail:
- movups xmm2,XMMWORD PTR [esi]
- cmp eax,32
- jb $L025ecb_dec_one
- movups xmm3,XMMWORD PTR 16[esi]
- je $L026ecb_dec_two
- movups xmm4,XMMWORD PTR 32[esi]
- cmp eax,64
- jb $L027ecb_dec_three
- movups xmm5,XMMWORD PTR 48[esi]
- je $L028ecb_dec_four
- movups xmm6,XMMWORD PTR 64[esi]
- xorps xmm7,xmm7
- call __aesni_decrypt6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- jmp $L012ecb_ret
- ALIGN 16
- $L025ecb_dec_one:
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L029dec1_loop_4:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L029dec1_loop_4
- DB 102,15,56,223,209
- movups XMMWORD PTR [edi],xmm2
- jmp $L012ecb_ret
- ALIGN 16
- $L026ecb_dec_two:
- call __aesni_decrypt2
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- jmp $L012ecb_ret
- ALIGN 16
- $L027ecb_dec_three:
- call __aesni_decrypt3
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- jmp $L012ecb_ret
- ALIGN 16
- $L028ecb_dec_four:
- call __aesni_decrypt4
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- $L012ecb_ret:
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- pxor xmm5,xmm5
- pxor xmm6,xmm6
- pxor xmm7,xmm7
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ecb_encrypt ENDP
- ALIGN 16
- _aesni_ccm64_encrypt_blocks PROC PUBLIC
- $L_aesni_ccm64_encrypt_blocks_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebx,DWORD PTR 36[esp]
- mov ecx,DWORD PTR 40[esp]
- mov ebp,esp
- sub esp,60
- and esp,-16
- mov DWORD PTR 48[esp],ebp
- movdqu xmm7,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx]
- mov ecx,DWORD PTR 240[edx]
- mov DWORD PTR [esp],202182159
- mov DWORD PTR 4[esp],134810123
- mov DWORD PTR 8[esp],67438087
- mov DWORD PTR 12[esp],66051
- mov ebx,1
- xor ebp,ebp
- mov DWORD PTR 16[esp],ebx
- mov DWORD PTR 20[esp],ebp
- mov DWORD PTR 24[esp],ebp
- mov DWORD PTR 28[esp],ebp
- shl ecx,4
- mov ebx,16
- lea ebp,DWORD PTR [edx]
- movdqa xmm5,XMMWORD PTR [esp]
- movdqa xmm2,xmm7
- lea edx,DWORD PTR 32[ecx*1+edx]
- sub ebx,ecx
- DB 102,15,56,0,253
- $L030ccm64_enc_outer:
- movups xmm0,XMMWORD PTR [ebp]
- mov ecx,ebx
- movups xmm6,XMMWORD PTR [esi]
- xorps xmm2,xmm0
- movups xmm1,XMMWORD PTR 16[ebp]
- xorps xmm0,xmm6
- xorps xmm3,xmm0
- movups xmm0,XMMWORD PTR 32[ebp]
- $L031ccm64_enc2_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L031ccm64_enc2_loop
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- paddq xmm7,XMMWORD PTR 16[esp]
- dec eax
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- lea esi,DWORD PTR 16[esi]
- xorps xmm6,xmm2
- movdqa xmm2,xmm7
- movups XMMWORD PTR [edi],xmm6
- DB 102,15,56,0,213
- lea edi,DWORD PTR 16[edi]
- jnz $L030ccm64_enc_outer
- mov esp,DWORD PTR 48[esp]
- mov edi,DWORD PTR 40[esp]
- movups XMMWORD PTR [edi],xmm3
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- pxor xmm5,xmm5
- pxor xmm6,xmm6
- pxor xmm7,xmm7
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ccm64_encrypt_blocks ENDP
- ALIGN 16
- _aesni_ccm64_decrypt_blocks PROC PUBLIC
- $L_aesni_ccm64_decrypt_blocks_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebx,DWORD PTR 36[esp]
- mov ecx,DWORD PTR 40[esp]
- mov ebp,esp
- sub esp,60
- and esp,-16
- mov DWORD PTR 48[esp],ebp
- movdqu xmm7,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx]
- mov ecx,DWORD PTR 240[edx]
- mov DWORD PTR [esp],202182159
- mov DWORD PTR 4[esp],134810123
- mov DWORD PTR 8[esp],67438087
- mov DWORD PTR 12[esp],66051
- mov ebx,1
- xor ebp,ebp
- mov DWORD PTR 16[esp],ebx
- mov DWORD PTR 20[esp],ebp
- mov DWORD PTR 24[esp],ebp
- mov DWORD PTR 28[esp],ebp
- movdqa xmm5,XMMWORD PTR [esp]
- movdqa xmm2,xmm7
- mov ebp,edx
- mov ebx,ecx
- DB 102,15,56,0,253
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L032enc1_loop_5:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L032enc1_loop_5
- DB 102,15,56,221,209
- shl ebx,4
- mov ecx,16
- movups xmm6,XMMWORD PTR [esi]
- paddq xmm7,XMMWORD PTR 16[esp]
- lea esi,QWORD PTR 16[esi]
- sub ecx,ebx
- lea edx,DWORD PTR 32[ebx*1+ebp]
- mov ebx,ecx
- jmp $L033ccm64_dec_outer
- ALIGN 16
- $L033ccm64_dec_outer:
- xorps xmm6,xmm2
- movdqa xmm2,xmm7
- movups XMMWORD PTR [edi],xmm6
- lea edi,DWORD PTR 16[edi]
- DB 102,15,56,0,213
- sub eax,1
- jz $L034ccm64_dec_break
- movups xmm0,XMMWORD PTR [ebp]
- mov ecx,ebx
- movups xmm1,XMMWORD PTR 16[ebp]
- xorps xmm6,xmm0
- xorps xmm2,xmm0
- xorps xmm3,xmm6
- movups xmm0,XMMWORD PTR 32[ebp]
- $L035ccm64_dec2_loop:
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- movups xmm1,XMMWORD PTR [ecx*1+edx]
- add ecx,32
- DB 102,15,56,220,208
- DB 102,15,56,220,216
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- jnz $L035ccm64_dec2_loop
- movups xmm6,XMMWORD PTR [esi]
- paddq xmm7,XMMWORD PTR 16[esp]
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,221,208
- DB 102,15,56,221,216
- lea esi,QWORD PTR 16[esi]
- jmp $L033ccm64_dec_outer
- ALIGN 16
- $L034ccm64_dec_break:
- mov ecx,DWORD PTR 240[ebp]
- mov edx,ebp
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm6,xmm0
- lea edx,DWORD PTR 32[edx]
- xorps xmm3,xmm6
- $L036enc1_loop_6:
- DB 102,15,56,220,217
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L036enc1_loop_6
- DB 102,15,56,221,217
- mov esp,DWORD PTR 48[esp]
- mov edi,DWORD PTR 40[esp]
- movups XMMWORD PTR [edi],xmm3
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- pxor xmm5,xmm5
- pxor xmm6,xmm6
- pxor xmm7,xmm7
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ccm64_decrypt_blocks ENDP
- ALIGN 16
- _aesni_ctr32_encrypt_blocks PROC PUBLIC
- $L_aesni_ctr32_encrypt_blocks_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebx,DWORD PTR 36[esp]
- mov ebp,esp
- sub esp,88
- and esp,-16
- mov DWORD PTR 80[esp],ebp
- cmp eax,1
- je $L037ctr32_one_shortcut
- movdqu xmm7,XMMWORD PTR [ebx]
- mov DWORD PTR [esp],202182159
- mov DWORD PTR 4[esp],134810123
- mov DWORD PTR 8[esp],67438087
- mov DWORD PTR 12[esp],66051
- mov ecx,6
- xor ebp,ebp
- mov DWORD PTR 16[esp],ecx
- mov DWORD PTR 20[esp],ecx
- mov DWORD PTR 24[esp],ecx
- mov DWORD PTR 28[esp],ebp
- DB 102,15,58,22,251,3
- DB 102,15,58,34,253,3
- mov ecx,DWORD PTR 240[edx]
- bswap ebx
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- movdqa xmm2,XMMWORD PTR [esp]
- DB 102,15,58,34,195,0
- lea ebp,DWORD PTR 3[ebx]
- DB 102,15,58,34,205,0
- inc ebx
- DB 102,15,58,34,195,1
- inc ebp
- DB 102,15,58,34,205,1
- inc ebx
- DB 102,15,58,34,195,2
- inc ebp
- DB 102,15,58,34,205,2
- movdqa XMMWORD PTR 48[esp],xmm0
- DB 102,15,56,0,194
- movdqu xmm6,XMMWORD PTR [edx]
- movdqa XMMWORD PTR 64[esp],xmm1
- DB 102,15,56,0,202
- pshufd xmm2,xmm0,192
- pshufd xmm3,xmm0,128
- cmp eax,6
- jb $L038ctr32_tail
- pxor xmm7,xmm6
- shl ecx,4
- mov ebx,16
- movdqa XMMWORD PTR 32[esp],xmm7
- mov ebp,edx
- sub ebx,ecx
- lea edx,DWORD PTR 32[ecx*1+edx]
- sub eax,6
- jmp $L039ctr32_loop6
- ALIGN 16
- $L039ctr32_loop6:
- pshufd xmm4,xmm0,64
- movdqa xmm0,XMMWORD PTR 32[esp]
- pshufd xmm5,xmm1,192
- pxor xmm2,xmm0
- pshufd xmm6,xmm1,128
- pxor xmm3,xmm0
- pshufd xmm7,xmm1,64
- movups xmm1,XMMWORD PTR 16[ebp]
- pxor xmm4,xmm0
- pxor xmm5,xmm0
- DB 102,15,56,220,209
- pxor xmm6,xmm0
- pxor xmm7,xmm0
- DB 102,15,56,220,217
- movups xmm0,XMMWORD PTR 32[ebp]
- mov ecx,ebx
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- call $L_aesni_encrypt6_enter
- movups xmm1,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR 16[esi]
- xorps xmm2,xmm1
- movups xmm1,XMMWORD PTR 32[esi]
- xorps xmm3,xmm0
- movups XMMWORD PTR [edi],xmm2
- movdqa xmm0,XMMWORD PTR 16[esp]
- xorps xmm4,xmm1
- movdqa xmm1,XMMWORD PTR 64[esp]
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- paddd xmm1,xmm0
- paddd xmm0,XMMWORD PTR 48[esp]
- movdqa xmm2,XMMWORD PTR [esp]
- movups xmm3,XMMWORD PTR 48[esi]
- movups xmm4,XMMWORD PTR 64[esi]
- xorps xmm5,xmm3
- movups xmm3,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- movdqa XMMWORD PTR 48[esp],xmm0
- DB 102,15,56,0,194
- xorps xmm6,xmm4
- movups XMMWORD PTR 48[edi],xmm5
- xorps xmm7,xmm3
- movdqa XMMWORD PTR 64[esp],xmm1
- DB 102,15,56,0,202
- movups XMMWORD PTR 64[edi],xmm6
- pshufd xmm2,xmm0,192
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- pshufd xmm3,xmm0,128
- sub eax,6
- jnc $L039ctr32_loop6
- add eax,6
- jz $L040ctr32_ret
- movdqu xmm7,XMMWORD PTR [ebp]
- mov edx,ebp
- pxor xmm7,XMMWORD PTR 32[esp]
- mov ecx,DWORD PTR 240[ebp]
- $L038ctr32_tail:
- por xmm2,xmm7
- cmp eax,2
- jb $L041ctr32_one
- pshufd xmm4,xmm0,64
- por xmm3,xmm7
- je $L042ctr32_two
- pshufd xmm5,xmm1,192
- por xmm4,xmm7
- cmp eax,4
- jb $L043ctr32_three
- pshufd xmm6,xmm1,128
- por xmm5,xmm7
- je $L044ctr32_four
- por xmm6,xmm7
- call __aesni_encrypt6
- movups xmm1,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR 16[esi]
- xorps xmm2,xmm1
- movups xmm1,XMMWORD PTR 32[esi]
- xorps xmm3,xmm0
- movups xmm0,XMMWORD PTR 48[esi]
- xorps xmm4,xmm1
- movups xmm1,XMMWORD PTR 64[esi]
- xorps xmm5,xmm0
- movups XMMWORD PTR [edi],xmm2
- xorps xmm6,xmm1
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- jmp $L040ctr32_ret
- ALIGN 16
- $L037ctr32_one_shortcut:
- movups xmm2,XMMWORD PTR [ebx]
- mov ecx,DWORD PTR 240[edx]
- $L041ctr32_one:
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L045enc1_loop_7:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L045enc1_loop_7
- DB 102,15,56,221,209
- movups xmm6,XMMWORD PTR [esi]
- xorps xmm6,xmm2
- movups XMMWORD PTR [edi],xmm6
- jmp $L040ctr32_ret
- ALIGN 16
- $L042ctr32_two:
- call __aesni_encrypt2
- movups xmm5,XMMWORD PTR [esi]
- movups xmm6,XMMWORD PTR 16[esi]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- jmp $L040ctr32_ret
- ALIGN 16
- $L043ctr32_three:
- call __aesni_encrypt3
- movups xmm5,XMMWORD PTR [esi]
- movups xmm6,XMMWORD PTR 16[esi]
- xorps xmm2,xmm5
- movups xmm7,XMMWORD PTR 32[esi]
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- xorps xmm4,xmm7
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- jmp $L040ctr32_ret
- ALIGN 16
- $L044ctr32_four:
- call __aesni_encrypt4
- movups xmm6,XMMWORD PTR [esi]
- movups xmm7,XMMWORD PTR 16[esi]
- movups xmm1,XMMWORD PTR 32[esi]
- xorps xmm2,xmm6
- movups xmm0,XMMWORD PTR 48[esi]
- xorps xmm3,xmm7
- movups XMMWORD PTR [edi],xmm2
- xorps xmm4,xmm1
- movups XMMWORD PTR 16[edi],xmm3
- xorps xmm5,xmm0
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- $L040ctr32_ret:
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- movdqa XMMWORD PTR 32[esp],xmm0
- pxor xmm5,xmm5
- movdqa XMMWORD PTR 48[esp],xmm0
- pxor xmm6,xmm6
- movdqa XMMWORD PTR 64[esp],xmm0
- pxor xmm7,xmm7
- mov esp,DWORD PTR 80[esp]
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ctr32_encrypt_blocks ENDP
- ALIGN 16
- _aesni_xts_encrypt PROC PUBLIC
- $L_aesni_xts_encrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov edx,DWORD PTR 36[esp]
- mov esi,DWORD PTR 40[esp]
- mov ecx,DWORD PTR 240[edx]
- movups xmm2,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L046enc1_loop_8:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L046enc1_loop_8
- DB 102,15,56,221,209
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebp,esp
- sub esp,120
- mov ecx,DWORD PTR 240[edx]
- and esp,-16
- mov DWORD PTR 96[esp],135
- mov DWORD PTR 100[esp],0
- mov DWORD PTR 104[esp],1
- mov DWORD PTR 108[esp],0
- mov DWORD PTR 112[esp],eax
- mov DWORD PTR 116[esp],ebp
- movdqa xmm1,xmm2
- pxor xmm0,xmm0
- movdqa xmm3,XMMWORD PTR 96[esp]
- pcmpgtd xmm0,xmm1
- and eax,-16
- mov ebp,edx
- mov ebx,ecx
- sub eax,96
- jc $L047xts_enc_short
- shl ecx,4
- mov ebx,16
- sub ebx,ecx
- lea edx,DWORD PTR 32[ecx*1+edx]
- jmp $L048xts_enc_loop6
- ALIGN 16
- $L048xts_enc_loop6:
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR [esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 16[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 32[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 48[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm7,xmm0,19
- movdqa XMMWORD PTR 64[esp],xmm1
- paddq xmm1,xmm1
- movups xmm0,XMMWORD PTR [ebp]
- pand xmm7,xmm3
- movups xmm2,XMMWORD PTR [esi]
- pxor xmm7,xmm1
- mov ecx,ebx
- movdqu xmm3,XMMWORD PTR 16[esi]
- xorps xmm2,xmm0
- movdqu xmm4,XMMWORD PTR 32[esi]
- pxor xmm3,xmm0
- movdqu xmm5,XMMWORD PTR 48[esi]
- pxor xmm4,xmm0
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm5,xmm0
- movdqu xmm1,XMMWORD PTR 80[esi]
- pxor xmm6,xmm0
- lea esi,DWORD PTR 96[esi]
- pxor xmm2,XMMWORD PTR [esp]
- movdqa XMMWORD PTR 80[esp],xmm7
- pxor xmm7,xmm1
- movups xmm1,XMMWORD PTR 16[ebp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- DB 102,15,56,220,209
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- DB 102,15,56,220,217
- pxor xmm7,xmm0
- movups xmm0,XMMWORD PTR 32[ebp]
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- call $L_aesni_encrypt6_enter
- movdqa xmm1,XMMWORD PTR 80[esp]
- pxor xmm0,xmm0
- xorps xmm2,XMMWORD PTR [esp]
- pcmpgtd xmm0,xmm1
- xorps xmm3,XMMWORD PTR 16[esp]
- movups XMMWORD PTR [edi],xmm2
- xorps xmm4,XMMWORD PTR 32[esp]
- movups XMMWORD PTR 16[edi],xmm3
- xorps xmm5,XMMWORD PTR 48[esp]
- movups XMMWORD PTR 32[edi],xmm4
- xorps xmm6,XMMWORD PTR 64[esp]
- movups XMMWORD PTR 48[edi],xmm5
- xorps xmm7,xmm1
- movups XMMWORD PTR 64[edi],xmm6
- pshufd xmm2,xmm0,19
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- movdqa xmm3,XMMWORD PTR 96[esp]
- pxor xmm0,xmm0
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- sub eax,96
- jnc $L048xts_enc_loop6
- mov ecx,DWORD PTR 240[ebp]
- mov edx,ebp
- mov ebx,ecx
- $L047xts_enc_short:
- add eax,96
- jz $L049xts_enc_done6x
- movdqa xmm5,xmm1
- cmp eax,32
- jb $L050xts_enc_one
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- je $L051xts_enc_two
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa xmm6,xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- cmp eax,64
- jb $L052xts_enc_three
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa xmm7,xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- movdqa XMMWORD PTR [esp],xmm5
- movdqa XMMWORD PTR 16[esp],xmm6
- je $L053xts_enc_four
- movdqa XMMWORD PTR 32[esp],xmm7
- pshufd xmm7,xmm0,19
- movdqa XMMWORD PTR 48[esp],xmm1
- paddq xmm1,xmm1
- pand xmm7,xmm3
- pxor xmm7,xmm1
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- pxor xmm2,XMMWORD PTR [esp]
- movdqu xmm5,XMMWORD PTR 48[esi]
- pxor xmm3,XMMWORD PTR 16[esp]
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm4,XMMWORD PTR 32[esp]
- lea esi,DWORD PTR 80[esi]
- pxor xmm5,XMMWORD PTR 48[esp]
- movdqa XMMWORD PTR 64[esp],xmm7
- pxor xmm6,xmm7
- call __aesni_encrypt6
- movaps xmm1,XMMWORD PTR 64[esp]
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,XMMWORD PTR 32[esp]
- movups XMMWORD PTR [edi],xmm2
- xorps xmm5,XMMWORD PTR 48[esp]
- movups XMMWORD PTR 16[edi],xmm3
- xorps xmm6,xmm1
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- lea edi,DWORD PTR 80[edi]
- jmp $L054xts_enc_done
- ALIGN 16
- $L050xts_enc_one:
- movups xmm2,XMMWORD PTR [esi]
- lea esi,DWORD PTR 16[esi]
- xorps xmm2,xmm5
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L055enc1_loop_9:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L055enc1_loop_9
- DB 102,15,56,221,209
- xorps xmm2,xmm5
- movups XMMWORD PTR [edi],xmm2
- lea edi,DWORD PTR 16[edi]
- movdqa xmm1,xmm5
- jmp $L054xts_enc_done
- ALIGN 16
- $L051xts_enc_two:
- movaps xmm6,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- lea esi,DWORD PTR 32[esi]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- call __aesni_encrypt2
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- lea edi,DWORD PTR 32[edi]
- movdqa xmm1,xmm6
- jmp $L054xts_enc_done
- ALIGN 16
- $L052xts_enc_three:
- movaps xmm7,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- movups xmm4,XMMWORD PTR 32[esi]
- lea esi,DWORD PTR 48[esi]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- call __aesni_encrypt3
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- lea edi,DWORD PTR 48[edi]
- movdqa xmm1,xmm7
- jmp $L054xts_enc_done
- ALIGN 16
- $L053xts_enc_four:
- movaps xmm6,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- movups xmm4,XMMWORD PTR 32[esi]
- xorps xmm2,XMMWORD PTR [esp]
- movups xmm5,XMMWORD PTR 48[esi]
- lea esi,DWORD PTR 64[esi]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm7
- xorps xmm5,xmm6
- call __aesni_encrypt4
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm7
- movups XMMWORD PTR [edi],xmm2
- xorps xmm5,xmm6
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- lea edi,DWORD PTR 64[edi]
- movdqa xmm1,xmm6
- jmp $L054xts_enc_done
- ALIGN 16
- $L049xts_enc_done6x:
- mov eax,DWORD PTR 112[esp]
- and eax,15
- jz $L056xts_enc_ret
- movdqa xmm5,xmm1
- mov DWORD PTR 112[esp],eax
- jmp $L057xts_enc_steal
- ALIGN 16
- $L054xts_enc_done:
- mov eax,DWORD PTR 112[esp]
- pxor xmm0,xmm0
- and eax,15
- jz $L056xts_enc_ret
- pcmpgtd xmm0,xmm1
- mov DWORD PTR 112[esp],eax
- pshufd xmm5,xmm0,19
- paddq xmm1,xmm1
- pand xmm5,XMMWORD PTR 96[esp]
- pxor xmm5,xmm1
- $L057xts_enc_steal:
- movzx ecx,BYTE PTR [esi]
- movzx edx,BYTE PTR [edi-16]
- lea esi,DWORD PTR 1[esi]
- mov BYTE PTR [edi-16],cl
- mov BYTE PTR [edi],dl
- lea edi,DWORD PTR 1[edi]
- sub eax,1
- jnz $L057xts_enc_steal
- sub edi,DWORD PTR 112[esp]
- mov edx,ebp
- mov ecx,ebx
- movups xmm2,XMMWORD PTR [edi-16]
- xorps xmm2,xmm5
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L058enc1_loop_10:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L058enc1_loop_10
- DB 102,15,56,221,209
- xorps xmm2,xmm5
- movups XMMWORD PTR [edi-16],xmm2
- $L056xts_enc_ret:
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- movdqa XMMWORD PTR [esp],xmm0
- pxor xmm3,xmm3
- movdqa XMMWORD PTR 16[esp],xmm0
- pxor xmm4,xmm4
- movdqa XMMWORD PTR 32[esp],xmm0
- pxor xmm5,xmm5
- movdqa XMMWORD PTR 48[esp],xmm0
- pxor xmm6,xmm6
- movdqa XMMWORD PTR 64[esp],xmm0
- pxor xmm7,xmm7
- movdqa XMMWORD PTR 80[esp],xmm0
- mov esp,DWORD PTR 116[esp]
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_xts_encrypt ENDP
- ALIGN 16
- _aesni_xts_decrypt PROC PUBLIC
- $L_aesni_xts_decrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov edx,DWORD PTR 36[esp]
- mov esi,DWORD PTR 40[esp]
- mov ecx,DWORD PTR 240[edx]
- movups xmm2,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L059enc1_loop_11:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L059enc1_loop_11
- DB 102,15,56,221,209
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- mov ebp,esp
- sub esp,120
- and esp,-16
- xor ebx,ebx
- test eax,15
- setnz bl
- shl ebx,4
- sub eax,ebx
- mov DWORD PTR 96[esp],135
- mov DWORD PTR 100[esp],0
- mov DWORD PTR 104[esp],1
- mov DWORD PTR 108[esp],0
- mov DWORD PTR 112[esp],eax
- mov DWORD PTR 116[esp],ebp
- mov ecx,DWORD PTR 240[edx]
- mov ebp,edx
- mov ebx,ecx
- movdqa xmm1,xmm2
- pxor xmm0,xmm0
- movdqa xmm3,XMMWORD PTR 96[esp]
- pcmpgtd xmm0,xmm1
- and eax,-16
- sub eax,96
- jc $L060xts_dec_short
- shl ecx,4
- mov ebx,16
- sub ebx,ecx
- lea edx,DWORD PTR 32[ecx*1+edx]
- jmp $L061xts_dec_loop6
- ALIGN 16
- $L061xts_dec_loop6:
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR [esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 16[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 32[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa XMMWORD PTR 48[esp],xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- pshufd xmm7,xmm0,19
- movdqa XMMWORD PTR 64[esp],xmm1
- paddq xmm1,xmm1
- movups xmm0,XMMWORD PTR [ebp]
- pand xmm7,xmm3
- movups xmm2,XMMWORD PTR [esi]
- pxor xmm7,xmm1
- mov ecx,ebx
- movdqu xmm3,XMMWORD PTR 16[esi]
- xorps xmm2,xmm0
- movdqu xmm4,XMMWORD PTR 32[esi]
- pxor xmm3,xmm0
- movdqu xmm5,XMMWORD PTR 48[esi]
- pxor xmm4,xmm0
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm5,xmm0
- movdqu xmm1,XMMWORD PTR 80[esi]
- pxor xmm6,xmm0
- lea esi,DWORD PTR 96[esi]
- pxor xmm2,XMMWORD PTR [esp]
- movdqa XMMWORD PTR 80[esp],xmm7
- pxor xmm7,xmm1
- movups xmm1,XMMWORD PTR 16[ebp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- DB 102,15,56,222,209
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- DB 102,15,56,222,217
- pxor xmm7,xmm0
- movups xmm0,XMMWORD PTR 32[ebp]
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- DB 102,15,56,222,241
- DB 102,15,56,222,249
- call $L_aesni_decrypt6_enter
- movdqa xmm1,XMMWORD PTR 80[esp]
- pxor xmm0,xmm0
- xorps xmm2,XMMWORD PTR [esp]
- pcmpgtd xmm0,xmm1
- xorps xmm3,XMMWORD PTR 16[esp]
- movups XMMWORD PTR [edi],xmm2
- xorps xmm4,XMMWORD PTR 32[esp]
- movups XMMWORD PTR 16[edi],xmm3
- xorps xmm5,XMMWORD PTR 48[esp]
- movups XMMWORD PTR 32[edi],xmm4
- xorps xmm6,XMMWORD PTR 64[esp]
- movups XMMWORD PTR 48[edi],xmm5
- xorps xmm7,xmm1
- movups XMMWORD PTR 64[edi],xmm6
- pshufd xmm2,xmm0,19
- movups XMMWORD PTR 80[edi],xmm7
- lea edi,DWORD PTR 96[edi]
- movdqa xmm3,XMMWORD PTR 96[esp]
- pxor xmm0,xmm0
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- sub eax,96
- jnc $L061xts_dec_loop6
- mov ecx,DWORD PTR 240[ebp]
- mov edx,ebp
- mov ebx,ecx
- $L060xts_dec_short:
- add eax,96
- jz $L062xts_dec_done6x
- movdqa xmm5,xmm1
- cmp eax,32
- jb $L063xts_dec_one
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- je $L064xts_dec_two
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa xmm6,xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- cmp eax,64
- jb $L065xts_dec_three
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa xmm7,xmm1
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- movdqa XMMWORD PTR [esp],xmm5
- movdqa XMMWORD PTR 16[esp],xmm6
- je $L066xts_dec_four
- movdqa XMMWORD PTR 32[esp],xmm7
- pshufd xmm7,xmm0,19
- movdqa XMMWORD PTR 48[esp],xmm1
- paddq xmm1,xmm1
- pand xmm7,xmm3
- pxor xmm7,xmm1
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- pxor xmm2,XMMWORD PTR [esp]
- movdqu xmm5,XMMWORD PTR 48[esi]
- pxor xmm3,XMMWORD PTR 16[esp]
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm4,XMMWORD PTR 32[esp]
- lea esi,DWORD PTR 80[esi]
- pxor xmm5,XMMWORD PTR 48[esp]
- movdqa XMMWORD PTR 64[esp],xmm7
- pxor xmm6,xmm7
- call __aesni_decrypt6
- movaps xmm1,XMMWORD PTR 64[esp]
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,XMMWORD PTR 32[esp]
- movups XMMWORD PTR [edi],xmm2
- xorps xmm5,XMMWORD PTR 48[esp]
- movups XMMWORD PTR 16[edi],xmm3
- xorps xmm6,xmm1
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- movups XMMWORD PTR 64[edi],xmm6
- lea edi,DWORD PTR 80[edi]
- jmp $L067xts_dec_done
- ALIGN 16
- $L063xts_dec_one:
- movups xmm2,XMMWORD PTR [esi]
- lea esi,DWORD PTR 16[esi]
- xorps xmm2,xmm5
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L068dec1_loop_12:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L068dec1_loop_12
- DB 102,15,56,223,209
- xorps xmm2,xmm5
- movups XMMWORD PTR [edi],xmm2
- lea edi,DWORD PTR 16[edi]
- movdqa xmm1,xmm5
- jmp $L067xts_dec_done
- ALIGN 16
- $L064xts_dec_two:
- movaps xmm6,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- lea esi,DWORD PTR 32[esi]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- call __aesni_decrypt2
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- lea edi,DWORD PTR 32[edi]
- movdqa xmm1,xmm6
- jmp $L067xts_dec_done
- ALIGN 16
- $L065xts_dec_three:
- movaps xmm7,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- movups xmm4,XMMWORD PTR 32[esi]
- lea esi,DWORD PTR 48[esi]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- call __aesni_decrypt3
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- lea edi,DWORD PTR 48[edi]
- movdqa xmm1,xmm7
- jmp $L067xts_dec_done
- ALIGN 16
- $L066xts_dec_four:
- movaps xmm6,xmm1
- movups xmm2,XMMWORD PTR [esi]
- movups xmm3,XMMWORD PTR 16[esi]
- movups xmm4,XMMWORD PTR 32[esi]
- xorps xmm2,XMMWORD PTR [esp]
- movups xmm5,XMMWORD PTR 48[esi]
- lea esi,DWORD PTR 64[esi]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm7
- xorps xmm5,xmm6
- call __aesni_decrypt4
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm7
- movups XMMWORD PTR [edi],xmm2
- xorps xmm5,xmm6
- movups XMMWORD PTR 16[edi],xmm3
- movups XMMWORD PTR 32[edi],xmm4
- movups XMMWORD PTR 48[edi],xmm5
- lea edi,DWORD PTR 64[edi]
- movdqa xmm1,xmm6
- jmp $L067xts_dec_done
- ALIGN 16
- $L062xts_dec_done6x:
- mov eax,DWORD PTR 112[esp]
- and eax,15
- jz $L069xts_dec_ret
- mov DWORD PTR 112[esp],eax
- jmp $L070xts_dec_only_one_more
- ALIGN 16
- $L067xts_dec_done:
- mov eax,DWORD PTR 112[esp]
- pxor xmm0,xmm0
- and eax,15
- jz $L069xts_dec_ret
- pcmpgtd xmm0,xmm1
- mov DWORD PTR 112[esp],eax
- pshufd xmm2,xmm0,19
- pxor xmm0,xmm0
- movdqa xmm3,XMMWORD PTR 96[esp]
- paddq xmm1,xmm1
- pand xmm2,xmm3
- pcmpgtd xmm0,xmm1
- pxor xmm1,xmm2
- $L070xts_dec_only_one_more:
- pshufd xmm5,xmm0,19
- movdqa xmm6,xmm1
- paddq xmm1,xmm1
- pand xmm5,xmm3
- pxor xmm5,xmm1
- mov edx,ebp
- mov ecx,ebx
- movups xmm2,XMMWORD PTR [esi]
- xorps xmm2,xmm5
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L071dec1_loop_13:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L071dec1_loop_13
- DB 102,15,56,223,209
- xorps xmm2,xmm5
- movups XMMWORD PTR [edi],xmm2
- $L072xts_dec_steal:
- movzx ecx,BYTE PTR 16[esi]
- movzx edx,BYTE PTR [edi]
- lea esi,DWORD PTR 1[esi]
- mov BYTE PTR [edi],cl
- mov BYTE PTR 16[edi],dl
- lea edi,DWORD PTR 1[edi]
- sub eax,1
- jnz $L072xts_dec_steal
- sub edi,DWORD PTR 112[esp]
- mov edx,ebp
- mov ecx,ebx
- movups xmm2,XMMWORD PTR [edi]
- xorps xmm2,xmm6
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L073dec1_loop_14:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L073dec1_loop_14
- DB 102,15,56,223,209
- xorps xmm2,xmm6
- movups XMMWORD PTR [edi],xmm2
- $L069xts_dec_ret:
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- movdqa XMMWORD PTR [esp],xmm0
- pxor xmm3,xmm3
- movdqa XMMWORD PTR 16[esp],xmm0
- pxor xmm4,xmm4
- movdqa XMMWORD PTR 32[esp],xmm0
- pxor xmm5,xmm5
- movdqa XMMWORD PTR 48[esp],xmm0
- pxor xmm6,xmm6
- movdqa XMMWORD PTR 64[esp],xmm0
- pxor xmm7,xmm7
- movdqa XMMWORD PTR 80[esp],xmm0
- mov esp,DWORD PTR 116[esp]
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_xts_decrypt ENDP
- ALIGN 16
- _aesni_ocb_encrypt PROC PUBLIC
- $L_aesni_ocb_encrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov ecx,DWORD PTR 40[esp]
- mov ebx,DWORD PTR 48[esp]
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- movdqu xmm0,XMMWORD PTR [ecx]
- mov ebp,DWORD PTR 36[esp]
- movdqu xmm1,XMMWORD PTR [ebx]
- mov ebx,DWORD PTR 44[esp]
- mov ecx,esp
- sub esp,132
- and esp,-16
- sub edi,esi
- shl eax,4
- lea eax,DWORD PTR [eax*1+esi-96]
- mov DWORD PTR 120[esp],edi
- mov DWORD PTR 124[esp],eax
- mov DWORD PTR 128[esp],ecx
- mov ecx,DWORD PTR 240[edx]
- test ebp,1
- jnz $L074odd
- bsf eax,ebp
- add ebp,1
- shl eax,4
- movdqu xmm7,XMMWORD PTR [eax*1+ebx]
- mov eax,edx
- movdqu xmm2,XMMWORD PTR [esi]
- lea esi,DWORD PTR 16[esi]
- pxor xmm7,xmm0
- pxor xmm1,xmm2
- pxor xmm2,xmm7
- movdqa xmm6,xmm1
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L075enc1_loop_15:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L075enc1_loop_15
- DB 102,15,56,221,209
- xorps xmm2,xmm7
- movdqa xmm0,xmm7
- movdqa xmm1,xmm6
- movups XMMWORD PTR [esi*1+edi-16],xmm2
- mov ecx,DWORD PTR 240[eax]
- mov edx,eax
- mov eax,DWORD PTR 124[esp]
- $L074odd:
- shl ecx,4
- mov edi,16
- sub edi,ecx
- mov DWORD PTR 112[esp],edx
- lea edx,DWORD PTR 32[ecx*1+edx]
- mov DWORD PTR 116[esp],edi
- cmp esi,eax
- ja $L076short
- jmp $L077grandloop
- ALIGN 32
- $L077grandloop:
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- lea edi,DWORD PTR 5[ebp]
- add ebp,6
- bsf ecx,ecx
- bsf eax,eax
- bsf edi,edi
- shl ecx,4
- shl eax,4
- shl edi,4
- movdqu xmm2,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx*1+ebx]
- mov ecx,DWORD PTR 116[esp]
- movdqa xmm4,xmm2
- movdqu xmm5,XMMWORD PTR [eax*1+ebx]
- movdqa xmm6,xmm2
- movdqu xmm7,XMMWORD PTR [edi*1+ebx]
- pxor xmm2,xmm0
- pxor xmm3,xmm2
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm3
- movdqa XMMWORD PTR 16[esp],xmm3
- pxor xmm5,xmm4
- movdqa XMMWORD PTR 32[esp],xmm4
- pxor xmm6,xmm5
- movdqa XMMWORD PTR 48[esp],xmm5
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 64[esp],xmm6
- movdqa XMMWORD PTR 80[esp],xmm7
- movups xmm0,XMMWORD PTR [ecx*1+edx-48]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- pxor xmm1,xmm2
- pxor xmm2,xmm0
- pxor xmm1,xmm3
- pxor xmm3,xmm0
- pxor xmm1,xmm4
- pxor xmm4,xmm0
- pxor xmm1,xmm5
- pxor xmm5,xmm0
- pxor xmm1,xmm6
- pxor xmm6,xmm0
- pxor xmm1,xmm7
- pxor xmm7,xmm0
- movdqa XMMWORD PTR 96[esp],xmm1
- movups xmm1,XMMWORD PTR [ecx*1+edx-32]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- pxor xmm7,XMMWORD PTR 80[esp]
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- mov edi,DWORD PTR 120[esp]
- mov eax,DWORD PTR 124[esp]
- call $L_aesni_encrypt6_enter
- movdqa xmm0,XMMWORD PTR 80[esp]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- pxor xmm7,xmm0
- movdqa xmm1,XMMWORD PTR 96[esp]
- movdqu XMMWORD PTR [esi*1+edi-96],xmm2
- movdqu XMMWORD PTR [esi*1+edi-80],xmm3
- movdqu XMMWORD PTR [esi*1+edi-64],xmm4
- movdqu XMMWORD PTR [esi*1+edi-48],xmm5
- movdqu XMMWORD PTR [esi*1+edi-32],xmm6
- movdqu XMMWORD PTR [esi*1+edi-16],xmm7
- cmp esi,eax
- jb $L077grandloop
- $L076short:
- add eax,96
- sub eax,esi
- jz $L078done
- cmp eax,32
- jb $L079one
- je $L080two
- cmp eax,64
- jb $L081three
- je $L082four
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- bsf ecx,ecx
- bsf eax,eax
- shl ecx,4
- shl eax,4
- movdqu xmm2,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx*1+ebx]
- mov ecx,DWORD PTR 116[esp]
- movdqa xmm4,xmm2
- movdqu xmm5,XMMWORD PTR [eax*1+ebx]
- movdqa xmm6,xmm2
- pxor xmm2,xmm0
- pxor xmm3,xmm2
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm3
- movdqa XMMWORD PTR 16[esp],xmm3
- pxor xmm5,xmm4
- movdqa XMMWORD PTR 32[esp],xmm4
- pxor xmm6,xmm5
- movdqa XMMWORD PTR 48[esp],xmm5
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 64[esp],xmm6
- movups xmm0,XMMWORD PTR [ecx*1+edx-48]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm7,xmm7
- pxor xmm1,xmm2
- pxor xmm2,xmm0
- pxor xmm1,xmm3
- pxor xmm3,xmm0
- pxor xmm1,xmm4
- pxor xmm4,xmm0
- pxor xmm1,xmm5
- pxor xmm5,xmm0
- pxor xmm1,xmm6
- pxor xmm6,xmm0
- movdqa XMMWORD PTR 96[esp],xmm1
- movups xmm1,XMMWORD PTR [ecx*1+edx-32]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- DB 102,15,56,220,209
- DB 102,15,56,220,217
- DB 102,15,56,220,225
- DB 102,15,56,220,233
- DB 102,15,56,220,241
- DB 102,15,56,220,249
- mov edi,DWORD PTR 120[esp]
- call $L_aesni_encrypt6_enter
- movdqa xmm0,XMMWORD PTR 64[esp]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,xmm0
- movdqa xmm1,XMMWORD PTR 96[esp]
- movdqu XMMWORD PTR [esi*1+edi],xmm2
- movdqu XMMWORD PTR 16[esi*1+edi],xmm3
- movdqu XMMWORD PTR 32[esi*1+edi],xmm4
- movdqu XMMWORD PTR 48[esi*1+edi],xmm5
- movdqu XMMWORD PTR 64[esi*1+edi],xmm6
- jmp $L078done
- ALIGN 16
- $L079one:
- movdqu xmm7,XMMWORD PTR [ebx]
- mov edx,DWORD PTR 112[esp]
- movdqu xmm2,XMMWORD PTR [esi]
- mov ecx,DWORD PTR 240[edx]
- pxor xmm7,xmm0
- pxor xmm1,xmm2
- pxor xmm2,xmm7
- movdqa xmm6,xmm1
- mov edi,DWORD PTR 120[esp]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L083enc1_loop_16:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L083enc1_loop_16
- DB 102,15,56,221,209
- xorps xmm2,xmm7
- movdqa xmm0,xmm7
- movdqa xmm1,xmm6
- movups XMMWORD PTR [esi*1+edi],xmm2
- jmp $L078done
- ALIGN 16
- $L080two:
- lea ecx,DWORD PTR 1[ebp]
- mov edx,DWORD PTR 112[esp]
- bsf ecx,ecx
- shl ecx,4
- movdqu xmm6,XMMWORD PTR [ebx]
- movdqu xmm7,XMMWORD PTR [ecx*1+ebx]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- mov ecx,DWORD PTR 240[edx]
- pxor xmm6,xmm0
- pxor xmm7,xmm6
- pxor xmm1,xmm2
- pxor xmm2,xmm6
- pxor xmm1,xmm3
- pxor xmm3,xmm7
- movdqa xmm5,xmm1
- mov edi,DWORD PTR 120[esp]
- call __aesni_encrypt2
- xorps xmm2,xmm6
- xorps xmm3,xmm7
- movdqa xmm0,xmm7
- movdqa xmm1,xmm5
- movups XMMWORD PTR [esi*1+edi],xmm2
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- jmp $L078done
- ALIGN 16
- $L081three:
- lea ecx,DWORD PTR 1[ebp]
- mov edx,DWORD PTR 112[esp]
- bsf ecx,ecx
- shl ecx,4
- movdqu xmm5,XMMWORD PTR [ebx]
- movdqu xmm6,XMMWORD PTR [ecx*1+ebx]
- movdqa xmm7,xmm5
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- mov ecx,DWORD PTR 240[edx]
- pxor xmm5,xmm0
- pxor xmm6,xmm5
- pxor xmm7,xmm6
- pxor xmm1,xmm2
- pxor xmm2,xmm5
- pxor xmm1,xmm3
- pxor xmm3,xmm6
- pxor xmm1,xmm4
- pxor xmm4,xmm7
- movdqa XMMWORD PTR 96[esp],xmm1
- mov edi,DWORD PTR 120[esp]
- call __aesni_encrypt3
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- movdqa xmm0,xmm7
- movdqa xmm1,XMMWORD PTR 96[esp]
- movups XMMWORD PTR [esi*1+edi],xmm2
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- movups XMMWORD PTR 32[esi*1+edi],xmm4
- jmp $L078done
- ALIGN 16
- $L082four:
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- bsf ecx,ecx
- bsf eax,eax
- mov edx,DWORD PTR 112[esp]
- shl ecx,4
- shl eax,4
- movdqu xmm4,XMMWORD PTR [ebx]
- movdqu xmm5,XMMWORD PTR [ecx*1+ebx]
- movdqa xmm6,xmm4
- movdqu xmm7,XMMWORD PTR [eax*1+ebx]
- pxor xmm4,xmm0
- movdqu xmm2,XMMWORD PTR [esi]
- pxor xmm5,xmm4
- movdqu xmm3,XMMWORD PTR 16[esi]
- pxor xmm6,xmm5
- movdqa XMMWORD PTR [esp],xmm4
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 16[esp],xmm5
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- mov ecx,DWORD PTR 240[edx]
- pxor xmm1,xmm2
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm1,xmm3
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm1,xmm4
- pxor xmm4,xmm6
- pxor xmm1,xmm5
- pxor xmm5,xmm7
- movdqa XMMWORD PTR 96[esp],xmm1
- mov edi,DWORD PTR 120[esp]
- call __aesni_encrypt4
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm6
- movups XMMWORD PTR [esi*1+edi],xmm2
- xorps xmm5,xmm7
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- movdqa xmm0,xmm7
- movups XMMWORD PTR 32[esi*1+edi],xmm4
- movdqa xmm1,XMMWORD PTR 96[esp]
- movups XMMWORD PTR 48[esi*1+edi],xmm5
- $L078done:
- mov edx,DWORD PTR 128[esp]
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm4
- movdqa XMMWORD PTR 16[esp],xmm2
- pxor xmm5,xmm5
- movdqa XMMWORD PTR 32[esp],xmm2
- pxor xmm6,xmm6
- movdqa XMMWORD PTR 48[esp],xmm2
- pxor xmm7,xmm7
- movdqa XMMWORD PTR 64[esp],xmm2
- movdqa XMMWORD PTR 80[esp],xmm2
- movdqa XMMWORD PTR 96[esp],xmm2
- lea esp,DWORD PTR [edx]
- mov ecx,DWORD PTR 40[esp]
- mov ebx,DWORD PTR 48[esp]
- movdqu XMMWORD PTR [ecx],xmm0
- pxor xmm0,xmm0
- movdqu XMMWORD PTR [ebx],xmm1
- pxor xmm1,xmm1
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ocb_encrypt ENDP
- ALIGN 16
- _aesni_ocb_decrypt PROC PUBLIC
- $L_aesni_ocb_decrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov ecx,DWORD PTR 40[esp]
- mov ebx,DWORD PTR 48[esp]
- mov esi,DWORD PTR 20[esp]
- mov edi,DWORD PTR 24[esp]
- mov eax,DWORD PTR 28[esp]
- mov edx,DWORD PTR 32[esp]
- movdqu xmm0,XMMWORD PTR [ecx]
- mov ebp,DWORD PTR 36[esp]
- movdqu xmm1,XMMWORD PTR [ebx]
- mov ebx,DWORD PTR 44[esp]
- mov ecx,esp
- sub esp,132
- and esp,-16
- sub edi,esi
- shl eax,4
- lea eax,DWORD PTR [eax*1+esi-96]
- mov DWORD PTR 120[esp],edi
- mov DWORD PTR 124[esp],eax
- mov DWORD PTR 128[esp],ecx
- mov ecx,DWORD PTR 240[edx]
- test ebp,1
- jnz $L084odd
- bsf eax,ebp
- add ebp,1
- shl eax,4
- movdqu xmm7,XMMWORD PTR [eax*1+ebx]
- mov eax,edx
- movdqu xmm2,XMMWORD PTR [esi]
- lea esi,DWORD PTR 16[esi]
- pxor xmm7,xmm0
- pxor xmm2,xmm7
- movdqa xmm6,xmm1
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L085dec1_loop_17:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L085dec1_loop_17
- DB 102,15,56,223,209
- xorps xmm2,xmm7
- movaps xmm1,xmm6
- movdqa xmm0,xmm7
- xorps xmm1,xmm2
- movups XMMWORD PTR [esi*1+edi-16],xmm2
- mov ecx,DWORD PTR 240[eax]
- mov edx,eax
- mov eax,DWORD PTR 124[esp]
- $L084odd:
- shl ecx,4
- mov edi,16
- sub edi,ecx
- mov DWORD PTR 112[esp],edx
- lea edx,DWORD PTR 32[ecx*1+edx]
- mov DWORD PTR 116[esp],edi
- cmp esi,eax
- ja $L086short
- jmp $L087grandloop
- ALIGN 32
- $L087grandloop:
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- lea edi,DWORD PTR 5[ebp]
- add ebp,6
- bsf ecx,ecx
- bsf eax,eax
- bsf edi,edi
- shl ecx,4
- shl eax,4
- shl edi,4
- movdqu xmm2,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx*1+ebx]
- mov ecx,DWORD PTR 116[esp]
- movdqa xmm4,xmm2
- movdqu xmm5,XMMWORD PTR [eax*1+ebx]
- movdqa xmm6,xmm2
- movdqu xmm7,XMMWORD PTR [edi*1+ebx]
- pxor xmm2,xmm0
- pxor xmm3,xmm2
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm3
- movdqa XMMWORD PTR 16[esp],xmm3
- pxor xmm5,xmm4
- movdqa XMMWORD PTR 32[esp],xmm4
- pxor xmm6,xmm5
- movdqa XMMWORD PTR 48[esp],xmm5
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 64[esp],xmm6
- movdqa XMMWORD PTR 80[esp],xmm7
- movups xmm0,XMMWORD PTR [ecx*1+edx-48]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- lea esi,DWORD PTR 96[esi]
- movdqa XMMWORD PTR 96[esp],xmm1
- pxor xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- pxor xmm5,xmm0
- pxor xmm6,xmm0
- pxor xmm7,xmm0
- movups xmm1,XMMWORD PTR [ecx*1+edx-32]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- pxor xmm7,XMMWORD PTR 80[esp]
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- DB 102,15,56,222,241
- DB 102,15,56,222,249
- mov edi,DWORD PTR 120[esp]
- mov eax,DWORD PTR 124[esp]
- call $L_aesni_decrypt6_enter
- movdqa xmm0,XMMWORD PTR 80[esp]
- pxor xmm2,XMMWORD PTR [esp]
- movdqa xmm1,XMMWORD PTR 96[esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- pxor xmm7,xmm0
- pxor xmm1,xmm2
- movdqu XMMWORD PTR [esi*1+edi-96],xmm2
- pxor xmm1,xmm3
- movdqu XMMWORD PTR [esi*1+edi-80],xmm3
- pxor xmm1,xmm4
- movdqu XMMWORD PTR [esi*1+edi-64],xmm4
- pxor xmm1,xmm5
- movdqu XMMWORD PTR [esi*1+edi-48],xmm5
- pxor xmm1,xmm6
- movdqu XMMWORD PTR [esi*1+edi-32],xmm6
- pxor xmm1,xmm7
- movdqu XMMWORD PTR [esi*1+edi-16],xmm7
- cmp esi,eax
- jb $L087grandloop
- $L086short:
- add eax,96
- sub eax,esi
- jz $L088done
- cmp eax,32
- jb $L089one
- je $L090two
- cmp eax,64
- jb $L091three
- je $L092four
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- bsf ecx,ecx
- bsf eax,eax
- shl ecx,4
- shl eax,4
- movdqu xmm2,XMMWORD PTR [ebx]
- movdqu xmm3,XMMWORD PTR [ecx*1+ebx]
- mov ecx,DWORD PTR 116[esp]
- movdqa xmm4,xmm2
- movdqu xmm5,XMMWORD PTR [eax*1+ebx]
- movdqa xmm6,xmm2
- pxor xmm2,xmm0
- pxor xmm3,xmm2
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm3
- movdqa XMMWORD PTR 16[esp],xmm3
- pxor xmm5,xmm4
- movdqa XMMWORD PTR 32[esp],xmm4
- pxor xmm6,xmm5
- movdqa XMMWORD PTR 48[esp],xmm5
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 64[esp],xmm6
- movups xmm0,XMMWORD PTR [ecx*1+edx-48]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- pxor xmm7,xmm7
- movdqa XMMWORD PTR 96[esp],xmm1
- pxor xmm2,xmm0
- pxor xmm3,xmm0
- pxor xmm4,xmm0
- pxor xmm5,xmm0
- pxor xmm6,xmm0
- movups xmm1,XMMWORD PTR [ecx*1+edx-32]
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,XMMWORD PTR 64[esp]
- movups xmm0,XMMWORD PTR [ecx*1+edx-16]
- DB 102,15,56,222,209
- DB 102,15,56,222,217
- DB 102,15,56,222,225
- DB 102,15,56,222,233
- DB 102,15,56,222,241
- DB 102,15,56,222,249
- mov edi,DWORD PTR 120[esp]
- call $L_aesni_decrypt6_enter
- movdqa xmm0,XMMWORD PTR 64[esp]
- pxor xmm2,XMMWORD PTR [esp]
- movdqa xmm1,XMMWORD PTR 96[esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,XMMWORD PTR 32[esp]
- pxor xmm5,XMMWORD PTR 48[esp]
- pxor xmm6,xmm0
- pxor xmm1,xmm2
- movdqu XMMWORD PTR [esi*1+edi],xmm2
- pxor xmm1,xmm3
- movdqu XMMWORD PTR 16[esi*1+edi],xmm3
- pxor xmm1,xmm4
- movdqu XMMWORD PTR 32[esi*1+edi],xmm4
- pxor xmm1,xmm5
- movdqu XMMWORD PTR 48[esi*1+edi],xmm5
- pxor xmm1,xmm6
- movdqu XMMWORD PTR 64[esi*1+edi],xmm6
- jmp $L088done
- ALIGN 16
- $L089one:
- movdqu xmm7,XMMWORD PTR [ebx]
- mov edx,DWORD PTR 112[esp]
- movdqu xmm2,XMMWORD PTR [esi]
- mov ecx,DWORD PTR 240[edx]
- pxor xmm7,xmm0
- pxor xmm2,xmm7
- movdqa xmm6,xmm1
- mov edi,DWORD PTR 120[esp]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L093dec1_loop_18:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L093dec1_loop_18
- DB 102,15,56,223,209
- xorps xmm2,xmm7
- movaps xmm1,xmm6
- movdqa xmm0,xmm7
- xorps xmm1,xmm2
- movups XMMWORD PTR [esi*1+edi],xmm2
- jmp $L088done
- ALIGN 16
- $L090two:
- lea ecx,DWORD PTR 1[ebp]
- mov edx,DWORD PTR 112[esp]
- bsf ecx,ecx
- shl ecx,4
- movdqu xmm6,XMMWORD PTR [ebx]
- movdqu xmm7,XMMWORD PTR [ecx*1+ebx]
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- mov ecx,DWORD PTR 240[edx]
- movdqa xmm5,xmm1
- pxor xmm6,xmm0
- pxor xmm7,xmm6
- pxor xmm2,xmm6
- pxor xmm3,xmm7
- mov edi,DWORD PTR 120[esp]
- call __aesni_decrypt2
- xorps xmm2,xmm6
- xorps xmm3,xmm7
- movdqa xmm0,xmm7
- xorps xmm5,xmm2
- movups XMMWORD PTR [esi*1+edi],xmm2
- xorps xmm5,xmm3
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- movaps xmm1,xmm5
- jmp $L088done
- ALIGN 16
- $L091three:
- lea ecx,DWORD PTR 1[ebp]
- mov edx,DWORD PTR 112[esp]
- bsf ecx,ecx
- shl ecx,4
- movdqu xmm5,XMMWORD PTR [ebx]
- movdqu xmm6,XMMWORD PTR [ecx*1+ebx]
- movdqa xmm7,xmm5
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- mov ecx,DWORD PTR 240[edx]
- movdqa XMMWORD PTR 96[esp],xmm1
- pxor xmm5,xmm0
- pxor xmm6,xmm5
- pxor xmm7,xmm6
- pxor xmm2,xmm5
- pxor xmm3,xmm6
- pxor xmm4,xmm7
- mov edi,DWORD PTR 120[esp]
- call __aesni_decrypt3
- movdqa xmm1,XMMWORD PTR 96[esp]
- xorps xmm2,xmm5
- xorps xmm3,xmm6
- xorps xmm4,xmm7
- movups XMMWORD PTR [esi*1+edi],xmm2
- pxor xmm1,xmm2
- movdqa xmm0,xmm7
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- pxor xmm1,xmm3
- movups XMMWORD PTR 32[esi*1+edi],xmm4
- pxor xmm1,xmm4
- jmp $L088done
- ALIGN 16
- $L092four:
- lea ecx,DWORD PTR 1[ebp]
- lea eax,DWORD PTR 3[ebp]
- bsf ecx,ecx
- bsf eax,eax
- mov edx,DWORD PTR 112[esp]
- shl ecx,4
- shl eax,4
- movdqu xmm4,XMMWORD PTR [ebx]
- movdqu xmm5,XMMWORD PTR [ecx*1+ebx]
- movdqa xmm6,xmm4
- movdqu xmm7,XMMWORD PTR [eax*1+ebx]
- pxor xmm4,xmm0
- movdqu xmm2,XMMWORD PTR [esi]
- pxor xmm5,xmm4
- movdqu xmm3,XMMWORD PTR 16[esi]
- pxor xmm6,xmm5
- movdqa XMMWORD PTR [esp],xmm4
- pxor xmm7,xmm6
- movdqa XMMWORD PTR 16[esp],xmm5
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- mov ecx,DWORD PTR 240[edx]
- movdqa XMMWORD PTR 96[esp],xmm1
- pxor xmm2,XMMWORD PTR [esp]
- pxor xmm3,XMMWORD PTR 16[esp]
- pxor xmm4,xmm6
- pxor xmm5,xmm7
- mov edi,DWORD PTR 120[esp]
- call __aesni_decrypt4
- movdqa xmm1,XMMWORD PTR 96[esp]
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,XMMWORD PTR 16[esp]
- xorps xmm4,xmm6
- movups XMMWORD PTR [esi*1+edi],xmm2
- pxor xmm1,xmm2
- xorps xmm5,xmm7
- movups XMMWORD PTR 16[esi*1+edi],xmm3
- pxor xmm1,xmm3
- movdqa xmm0,xmm7
- movups XMMWORD PTR 32[esi*1+edi],xmm4
- pxor xmm1,xmm4
- movups XMMWORD PTR 48[esi*1+edi],xmm5
- pxor xmm1,xmm5
- $L088done:
- mov edx,DWORD PTR 128[esp]
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- movdqa XMMWORD PTR [esp],xmm2
- pxor xmm4,xmm4
- movdqa XMMWORD PTR 16[esp],xmm2
- pxor xmm5,xmm5
- movdqa XMMWORD PTR 32[esp],xmm2
- pxor xmm6,xmm6
- movdqa XMMWORD PTR 48[esp],xmm2
- pxor xmm7,xmm7
- movdqa XMMWORD PTR 64[esp],xmm2
- movdqa XMMWORD PTR 80[esp],xmm2
- movdqa XMMWORD PTR 96[esp],xmm2
- lea esp,DWORD PTR [edx]
- mov ecx,DWORD PTR 40[esp]
- mov ebx,DWORD PTR 48[esp]
- movdqu XMMWORD PTR [ecx],xmm0
- pxor xmm0,xmm0
- movdqu XMMWORD PTR [ebx],xmm1
- pxor xmm1,xmm1
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_ocb_decrypt ENDP
- ALIGN 16
- _aesni_cbc_encrypt PROC PUBLIC
- $L_aesni_cbc_encrypt_begin::
- push ebp
- push ebx
- push esi
- push edi
- mov esi,DWORD PTR 20[esp]
- mov ebx,esp
- mov edi,DWORD PTR 24[esp]
- sub ebx,24
- mov eax,DWORD PTR 28[esp]
- and ebx,-16
- mov edx,DWORD PTR 32[esp]
- mov ebp,DWORD PTR 36[esp]
- test eax,eax
- jz $L094cbc_abort
- cmp DWORD PTR 40[esp],0
- xchg ebx,esp
- movups xmm7,XMMWORD PTR [ebp]
- mov ecx,DWORD PTR 240[edx]
- mov ebp,edx
- mov DWORD PTR 16[esp],ebx
- mov ebx,ecx
- je $L095cbc_decrypt
- movaps xmm2,xmm7
- cmp eax,16
- jb $L096cbc_enc_tail
- sub eax,16
- jmp $L097cbc_enc_loop
- ALIGN 16
- $L097cbc_enc_loop:
- movups xmm7,XMMWORD PTR [esi]
- lea esi,DWORD PTR 16[esi]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- xorps xmm7,xmm0
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm7
- $L098enc1_loop_19:
- DB 102,15,56,220,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L098enc1_loop_19
- DB 102,15,56,221,209
- mov ecx,ebx
- mov edx,ebp
- movups XMMWORD PTR [edi],xmm2
- lea edi,DWORD PTR 16[edi]
- sub eax,16
- jnc $L097cbc_enc_loop
- add eax,16
- jnz $L096cbc_enc_tail
- movaps xmm7,xmm2
- pxor xmm2,xmm2
- jmp $L099cbc_ret
- $L096cbc_enc_tail:
- mov ecx,eax
- DD 2767451785
- mov ecx,16
- sub ecx,eax
- xor eax,eax
- DD 2868115081
- lea edi,DWORD PTR [edi-16]
- mov ecx,ebx
- mov esi,edi
- mov edx,ebp
- jmp $L097cbc_enc_loop
- ALIGN 16
- $L095cbc_decrypt:
- cmp eax,80
- jbe $L100cbc_dec_tail
- movaps XMMWORD PTR [esp],xmm7
- sub eax,80
- jmp $L101cbc_dec_loop6_enter
- ALIGN 16
- $L102cbc_dec_loop6:
- movaps XMMWORD PTR [esp],xmm0
- movups XMMWORD PTR [edi],xmm7
- lea edi,DWORD PTR 16[edi]
- $L101cbc_dec_loop6_enter:
- movdqu xmm2,XMMWORD PTR [esi]
- movdqu xmm3,XMMWORD PTR 16[esi]
- movdqu xmm4,XMMWORD PTR 32[esi]
- movdqu xmm5,XMMWORD PTR 48[esi]
- movdqu xmm6,XMMWORD PTR 64[esi]
- movdqu xmm7,XMMWORD PTR 80[esi]
- call __aesni_decrypt6
- movups xmm1,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR 16[esi]
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,xmm1
- movups xmm1,XMMWORD PTR 32[esi]
- xorps xmm4,xmm0
- movups xmm0,XMMWORD PTR 48[esi]
- xorps xmm5,xmm1
- movups xmm1,XMMWORD PTR 64[esi]
- xorps xmm6,xmm0
- movups xmm0,XMMWORD PTR 80[esi]
- xorps xmm7,xmm1
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- lea esi,DWORD PTR 96[esi]
- movups XMMWORD PTR 32[edi],xmm4
- mov ecx,ebx
- movups XMMWORD PTR 48[edi],xmm5
- mov edx,ebp
- movups XMMWORD PTR 64[edi],xmm6
- lea edi,DWORD PTR 80[edi]
- sub eax,96
- ja $L102cbc_dec_loop6
- movaps xmm2,xmm7
- movaps xmm7,xmm0
- add eax,80
- jle $L103cbc_dec_clear_tail_collected
- movups XMMWORD PTR [edi],xmm2
- lea edi,DWORD PTR 16[edi]
- $L100cbc_dec_tail:
- movups xmm2,XMMWORD PTR [esi]
- movaps xmm6,xmm2
- cmp eax,16
- jbe $L104cbc_dec_one
- movups xmm3,XMMWORD PTR 16[esi]
- movaps xmm5,xmm3
- cmp eax,32
- jbe $L105cbc_dec_two
- movups xmm4,XMMWORD PTR 32[esi]
- cmp eax,48
- jbe $L106cbc_dec_three
- movups xmm5,XMMWORD PTR 48[esi]
- cmp eax,64
- jbe $L107cbc_dec_four
- movups xmm6,XMMWORD PTR 64[esi]
- movaps XMMWORD PTR [esp],xmm7
- movups xmm2,XMMWORD PTR [esi]
- xorps xmm7,xmm7
- call __aesni_decrypt6
- movups xmm1,XMMWORD PTR [esi]
- movups xmm0,XMMWORD PTR 16[esi]
- xorps xmm2,XMMWORD PTR [esp]
- xorps xmm3,xmm1
- movups xmm1,XMMWORD PTR 32[esi]
- xorps xmm4,xmm0
- movups xmm0,XMMWORD PTR 48[esi]
- xorps xmm5,xmm1
- movups xmm7,XMMWORD PTR 64[esi]
- xorps xmm6,xmm0
- movups XMMWORD PTR [edi],xmm2
- movups XMMWORD PTR 16[edi],xmm3
- pxor xmm3,xmm3
- movups XMMWORD PTR 32[edi],xmm4
- pxor xmm4,xmm4
- movups XMMWORD PTR 48[edi],xmm5
- pxor xmm5,xmm5
- lea edi,DWORD PTR 64[edi]
- movaps xmm2,xmm6
- pxor xmm6,xmm6
- sub eax,80
- jmp $L108cbc_dec_tail_collected
- ALIGN 16
- $L104cbc_dec_one:
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR 16[edx]
- lea edx,DWORD PTR 32[edx]
- xorps xmm2,xmm0
- $L109dec1_loop_20:
- DB 102,15,56,222,209
- dec ecx
- movups xmm1,XMMWORD PTR [edx]
- lea edx,DWORD PTR 16[edx]
- jnz $L109dec1_loop_20
- DB 102,15,56,223,209
- xorps xmm2,xmm7
- movaps xmm7,xmm6
- sub eax,16
- jmp $L108cbc_dec_tail_collected
- ALIGN 16
- $L105cbc_dec_two:
- call __aesni_decrypt2
- xorps xmm2,xmm7
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- movaps xmm2,xmm3
- pxor xmm3,xmm3
- lea edi,DWORD PTR 16[edi]
- movaps xmm7,xmm5
- sub eax,32
- jmp $L108cbc_dec_tail_collected
- ALIGN 16
- $L106cbc_dec_three:
- call __aesni_decrypt3
- xorps xmm2,xmm7
- xorps xmm3,xmm6
- xorps xmm4,xmm5
- movups XMMWORD PTR [edi],xmm2
- movaps xmm2,xmm4
- pxor xmm4,xmm4
- movups XMMWORD PTR 16[edi],xmm3
- pxor xmm3,xmm3
- lea edi,DWORD PTR 32[edi]
- movups xmm7,XMMWORD PTR 32[esi]
- sub eax,48
- jmp $L108cbc_dec_tail_collected
- ALIGN 16
- $L107cbc_dec_four:
- call __aesni_decrypt4
- movups xmm1,XMMWORD PTR 16[esi]
- movups xmm0,XMMWORD PTR 32[esi]
- xorps xmm2,xmm7
- movups xmm7,XMMWORD PTR 48[esi]
- xorps xmm3,xmm6
- movups XMMWORD PTR [edi],xmm2
- xorps xmm4,xmm1
- movups XMMWORD PTR 16[edi],xmm3
- pxor xmm3,xmm3
- xorps xmm5,xmm0
- movups XMMWORD PTR 32[edi],xmm4
- pxor xmm4,xmm4
- lea edi,DWORD PTR 48[edi]
- movaps xmm2,xmm5
- pxor xmm5,xmm5
- sub eax,64
- jmp $L108cbc_dec_tail_collected
- ALIGN 16
- $L103cbc_dec_clear_tail_collected:
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- pxor xmm5,xmm5
- pxor xmm6,xmm6
- $L108cbc_dec_tail_collected:
- and eax,15
- jnz $L110cbc_dec_tail_partial
- movups XMMWORD PTR [edi],xmm2
- pxor xmm0,xmm0
- jmp $L099cbc_ret
- ALIGN 16
- $L110cbc_dec_tail_partial:
- movaps XMMWORD PTR [esp],xmm2
- pxor xmm0,xmm0
- mov ecx,16
- mov esi,esp
- sub ecx,eax
- DD 2767451785
- movdqa XMMWORD PTR [esp],xmm2
- $L099cbc_ret:
- mov esp,DWORD PTR 16[esp]
- mov ebp,DWORD PTR 36[esp]
- pxor xmm2,xmm2
- pxor xmm1,xmm1
- movups XMMWORD PTR [ebp],xmm7
- pxor xmm7,xmm7
- $L094cbc_abort:
- pop edi
- pop esi
- pop ebx
- pop ebp
- ret
- _aesni_cbc_encrypt ENDP
- ALIGN 16
- __aesni_set_encrypt_key PROC PRIVATE
- push ebp
- push ebx
- test eax,eax
- jz $L111bad_pointer
- test edx,edx
- jz $L111bad_pointer
- call $L112pic
- $L112pic:
- pop ebx
- lea ebx,DWORD PTR ($Lkey_const-$L112pic)[ebx]
- lea ebp,DWORD PTR _OPENSSL_ia32cap_P
- movups xmm0,XMMWORD PTR [eax]
- xorps xmm4,xmm4
- mov ebp,DWORD PTR 4[ebp]
- lea edx,DWORD PTR 16[edx]
- and ebp,268437504
- cmp ecx,256
- je $L11314rounds
- cmp ecx,192
- je $L11412rounds
- cmp ecx,128
- jne $L115bad_keybits
- ALIGN 16
- $L11610rounds:
- cmp ebp,268435456
- je $L11710rounds_alt
- mov ecx,9
- movups XMMWORD PTR [edx-16],xmm0
- DB 102,15,58,223,200,1
- call $L118key_128_cold
- DB 102,15,58,223,200,2
- call $L119key_128
- DB 102,15,58,223,200,4
- call $L119key_128
- DB 102,15,58,223,200,8
- call $L119key_128
- DB 102,15,58,223,200,16
- call $L119key_128
- DB 102,15,58,223,200,32
- call $L119key_128
- DB 102,15,58,223,200,64
- call $L119key_128
- DB 102,15,58,223,200,128
- call $L119key_128
- DB 102,15,58,223,200,27
- call $L119key_128
- DB 102,15,58,223,200,54
- call $L119key_128
- movups XMMWORD PTR [edx],xmm0
- mov DWORD PTR 80[edx],ecx
- jmp $L120good_key
- ALIGN 16
- $L119key_128:
- movups XMMWORD PTR [edx],xmm0
- lea edx,DWORD PTR 16[edx]
- $L118key_128_cold:
- shufps xmm4,xmm0,16
- xorps xmm0,xmm4
- shufps xmm4,xmm0,140
- xorps xmm0,xmm4
- shufps xmm1,xmm1,255
- xorps xmm0,xmm1
- ret
- ALIGN 16
- $L11710rounds_alt:
- movdqa xmm5,XMMWORD PTR [ebx]
- mov ecx,8
- movdqa xmm4,XMMWORD PTR 32[ebx]
- movdqa xmm2,xmm0
- movdqu XMMWORD PTR [edx-16],xmm0
- $L121loop_key128:
- DB 102,15,56,0,197
- DB 102,15,56,221,196
- pslld xmm4,1
- lea edx,DWORD PTR 16[edx]
- movdqa xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm2,xmm3
- pxor xmm0,xmm2
- movdqu XMMWORD PTR [edx-16],xmm0
- movdqa xmm2,xmm0
- dec ecx
- jnz $L121loop_key128
- movdqa xmm4,XMMWORD PTR 48[ebx]
- DB 102,15,56,0,197
- DB 102,15,56,221,196
- pslld xmm4,1
- movdqa xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm2,xmm3
- pxor xmm0,xmm2
- movdqu XMMWORD PTR [edx],xmm0
- movdqa xmm2,xmm0
- DB 102,15,56,0,197
- DB 102,15,56,221,196
- movdqa xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm3,xmm2
- pslldq xmm2,4
- pxor xmm2,xmm3
- pxor xmm0,xmm2
- movdqu XMMWORD PTR 16[edx],xmm0
- mov ecx,9
- mov DWORD PTR 96[edx],ecx
- jmp $L120good_key
- ALIGN 16
- $L11412rounds:
- movq xmm2,QWORD PTR 16[eax]
- cmp ebp,268435456
- je $L12212rounds_alt
- mov ecx,11
- movups XMMWORD PTR [edx-16],xmm0
- DB 102,15,58,223,202,1
- call $L123key_192a_cold
- DB 102,15,58,223,202,2
- call $L124key_192b
- DB 102,15,58,223,202,4
- call $L125key_192a
- DB 102,15,58,223,202,8
- call $L124key_192b
- DB 102,15,58,223,202,16
- call $L125key_192a
- DB 102,15,58,223,202,32
- call $L124key_192b
- DB 102,15,58,223,202,64
- call $L125key_192a
- DB 102,15,58,223,202,128
- call $L124key_192b
- movups XMMWORD PTR [edx],xmm0
- mov DWORD PTR 48[edx],ecx
- jmp $L120good_key
- ALIGN 16
- $L125key_192a:
- movups XMMWORD PTR [edx],xmm0
- lea edx,DWORD PTR 16[edx]
- ALIGN 16
- $L123key_192a_cold:
- movaps xmm5,xmm2
- $L126key_192b_warm:
- shufps xmm4,xmm0,16
- movdqa xmm3,xmm2
- xorps xmm0,xmm4
- shufps xmm4,xmm0,140
- pslldq xmm3,4
- xorps xmm0,xmm4
- pshufd xmm1,xmm1,85
- pxor xmm2,xmm3
- pxor xmm0,xmm1
- pshufd xmm3,xmm0,255
- pxor xmm2,xmm3
- ret
- ALIGN 16
- $L124key_192b:
- movaps xmm3,xmm0
- shufps xmm5,xmm0,68
- movups XMMWORD PTR [edx],xmm5
- shufps xmm3,xmm2,78
- movups XMMWORD PTR 16[edx],xmm3
- lea edx,DWORD PTR 32[edx]
- jmp $L126key_192b_warm
- ALIGN 16
- $L12212rounds_alt:
- movdqa xmm5,XMMWORD PTR 16[ebx]
- movdqa xmm4,XMMWORD PTR 32[ebx]
- mov ecx,8
- movdqu XMMWORD PTR [edx-16],xmm0
- $L127loop_key192:
- movq QWORD PTR [edx],xmm2
- movdqa xmm1,xmm2
- DB 102,15,56,0,213
- DB 102,15,56,221,212
- pslld xmm4,1
- lea edx,DWORD PTR 24[edx]
- movdqa xmm3,xmm0
- pslldq xmm0,4
- pxor xmm3,xmm0
- pslldq xmm0,4
- pxor xmm3,xmm0
- pslldq xmm0,4
- pxor xmm0,xmm3
- pshufd xmm3,xmm0,255
- pxor xmm3,xmm1
- pslldq xmm1,4
- pxor xmm3,xmm1
- pxor xmm0,xmm2
- pxor xmm2,xmm3
- movdqu XMMWORD PTR [edx-16],xmm0
- dec ecx
- jnz $L127loop_key192
- mov ecx,11
- mov DWORD PTR 32[edx],ecx
- jmp $L120good_key
- ALIGN 16
- $L11314rounds:
- movups xmm2,XMMWORD PTR 16[eax]
- lea edx,DWORD PTR 16[edx]
- cmp ebp,268435456
- je $L12814rounds_alt
- mov ecx,13
- movups XMMWORD PTR [edx-32],xmm0
- movups XMMWORD PTR [edx-16],xmm2
- DB 102,15,58,223,202,1
- call $L129key_256a_cold
- DB 102,15,58,223,200,1
- call $L130key_256b
- DB 102,15,58,223,202,2
- call $L131key_256a
- DB 102,15,58,223,200,2
- call $L130key_256b
- DB 102,15,58,223,202,4
- call $L131key_256a
- DB 102,15,58,223,200,4
- call $L130key_256b
- DB 102,15,58,223,202,8
- call $L131key_256a
- DB 102,15,58,223,200,8
- call $L130key_256b
- DB 102,15,58,223,202,16
- call $L131key_256a
- DB 102,15,58,223,200,16
- call $L130key_256b
- DB 102,15,58,223,202,32
- call $L131key_256a
- DB 102,15,58,223,200,32
- call $L130key_256b
- DB 102,15,58,223,202,64
- call $L131key_256a
- movups XMMWORD PTR [edx],xmm0
- mov DWORD PTR 16[edx],ecx
- xor eax,eax
- jmp $L120good_key
- ALIGN 16
- $L131key_256a:
- movups XMMWORD PTR [edx],xmm2
- lea edx,DWORD PTR 16[edx]
- $L129key_256a_cold:
- shufps xmm4,xmm0,16
- xorps xmm0,xmm4
- shufps xmm4,xmm0,140
- xorps xmm0,xmm4
- shufps xmm1,xmm1,255
- xorps xmm0,xmm1
- ret
- ALIGN 16
- $L130key_256b:
- movups XMMWORD PTR [edx],xmm0
- lea edx,DWORD PTR 16[edx]
- shufps xmm4,xmm2,16
- xorps xmm2,xmm4
- shufps xmm4,xmm2,140
- xorps xmm2,xmm4
- shufps xmm1,xmm1,170
- xorps xmm2,xmm1
- ret
- ALIGN 16
- $L12814rounds_alt:
- movdqa xmm5,XMMWORD PTR [ebx]
- movdqa xmm4,XMMWORD PTR 32[ebx]
- mov ecx,7
- movdqu XMMWORD PTR [edx-32],xmm0
- movdqa xmm1,xmm2
- movdqu XMMWORD PTR [edx-16],xmm2
- $L132loop_key256:
- DB 102,15,56,0,213
- DB 102,15,56,221,212
- movdqa xmm3,xmm0
- pslldq xmm0,4
- pxor xmm3,xmm0
- pslldq xmm0,4
- pxor xmm3,xmm0
- pslldq xmm0,4
- pxor xmm0,xmm3
- pslld xmm4,1
- pxor xmm0,xmm2
- movdqu XMMWORD PTR [edx],xmm0
- dec ecx
- jz $L133done_key256
- pshufd xmm2,xmm0,255
- pxor xmm3,xmm3
- DB 102,15,56,221,211
- movdqa xmm3,xmm1
- pslldq xmm1,4
- pxor xmm3,xmm1
- pslldq xmm1,4
- pxor xmm3,xmm1
- pslldq xmm1,4
- pxor xmm1,xmm3
- pxor xmm2,xmm1
- movdqu XMMWORD PTR 16[edx],xmm2
- lea edx,DWORD PTR 32[edx]
- movdqa xmm1,xmm2
- jmp $L132loop_key256
- $L133done_key256:
- mov ecx,13
- mov DWORD PTR 16[edx],ecx
- $L120good_key:
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- pxor xmm5,xmm5
- xor eax,eax
- pop ebx
- pop ebp
- ret
- ALIGN 4
- $L111bad_pointer:
- mov eax,-1
- pop ebx
- pop ebp
- ret
- ALIGN 4
- $L115bad_keybits:
- pxor xmm0,xmm0
- mov eax,-2
- pop ebx
- pop ebp
- ret
- __aesni_set_encrypt_key ENDP
- ALIGN 16
- _aesni_set_encrypt_key PROC PUBLIC
- $L_aesni_set_encrypt_key_begin::
- mov eax,DWORD PTR 4[esp]
- mov ecx,DWORD PTR 8[esp]
- mov edx,DWORD PTR 12[esp]
- call __aesni_set_encrypt_key
- ret
- _aesni_set_encrypt_key ENDP
- ALIGN 16
- _aesni_set_decrypt_key PROC PUBLIC
- $L_aesni_set_decrypt_key_begin::
- mov eax,DWORD PTR 4[esp]
- mov ecx,DWORD PTR 8[esp]
- mov edx,DWORD PTR 12[esp]
- call __aesni_set_encrypt_key
- mov edx,DWORD PTR 12[esp]
- shl ecx,4
- test eax,eax
- jnz $L134dec_key_ret
- lea eax,DWORD PTR 16[ecx*1+edx]
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR [eax]
- movups XMMWORD PTR [eax],xmm0
- movups XMMWORD PTR [edx],xmm1
- lea edx,DWORD PTR 16[edx]
- lea eax,DWORD PTR [eax-16]
- $L135dec_key_inverse:
- movups xmm0,XMMWORD PTR [edx]
- movups xmm1,XMMWORD PTR [eax]
- DB 102,15,56,219,192
- DB 102,15,56,219,201
- lea edx,DWORD PTR 16[edx]
- lea eax,DWORD PTR [eax-16]
- movups XMMWORD PTR 16[eax],xmm0
- movups XMMWORD PTR [edx-16],xmm1
- cmp eax,edx
- ja $L135dec_key_inverse
- movups xmm0,XMMWORD PTR [edx]
- DB 102,15,56,219,192
- movups XMMWORD PTR [edx],xmm0
- pxor xmm0,xmm0
- pxor xmm1,xmm1
- xor eax,eax
- $L134dec_key_ret:
- ret
- _aesni_set_decrypt_key ENDP
- ALIGN 64
- $Lkey_const::
- DD 202313229,202313229,202313229,202313229
- DD 67569157,67569157,67569157,67569157
- DD 1,1,1,1
- DD 27,27,27,27
- DB 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
- DB 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
- DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
- DB 115,108,46,111,114,103,62,0
- .text$ ENDS
- .bss SEGMENT 'BSS'
- COMM _OPENSSL_ia32cap_P:DWORD:4
- .bss ENDS
- END
|