Function at 0x80a970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
push 0x3f4f
call sym.adb.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x80aa28
mov edx, dword [ebp + 0xc]
mov ecx, edx
neg ecx
and ecx, 0xf
mov esi, eax
neg esi
and esi, 0x1f
lea ebx, [eax + esi]
mov dword [esp + 0x1c], eax
mov eax, edx
add edx, ecx
mov edi, ebx
sub edi, edx
mov edx, eax
and edi, 0xfffffff0
add eax, ecx
cmp edi, 0xfffff120
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], eax
jne 0x80aa3c
lea eax, [ecx + edx]
add eax, 0x6e3
lea ecx, [esi + edi]
add ecx, 0x15c3
xor edx, edx
nop word cs:[eax + eax]
movzx ebx, byte [eax + edx - 3]
xor bl, 0x36
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 2]
xor bl, 0x36
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 1]
xor bl, 0x36
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx]
xor bl, 0x36
mov byte [ecx + edx], bl
add edx, 4
cmp edx, 0x20
jne 0x80a9f0
jmp 0x80aa65
push 0x20
push dword [ebp + 8]
call sym.adb.exe_RAND_bytes
add esp, 8
xor eax, eax
jmp 0x80b462
movups xmm0, xmmword [eax + 0x6e0]
movaps xmm1, xmmword [str.6666666666666666jjjjjjjjjjjjjjjj_]
xorps xmm0, xmm1
movups xmmword [ebx + 0x15c0], xmm0
movups xmm0, xmmword [eax + 0x6f0]
xorps xmm0, xmm1
movups xmmword [ebx + 0x15d0], xmm0
mov esi, dword [esp + 0x10]
lea ebx, [esi + 0x15c0]
mov dword [esp + 0xc], ebx
movaps xmm0, xmmword [str.6666666666666666jjjjjjjjjjjjjjjj_]
movups xmmword [esi + 0x15f0], xmm0
movups xmmword [esi + 0x15e0], xmm0
lea edi, [esi + 0x1600]
push edi
call sym.adb.exe_SHA256_Init
add esp, 4
push 0x40
push ebx
push edi
call sym.adb.exe_SHA256_Update
add esp, 0xc
mov eax, dword [ebp + 0x14]
push eax
mov ebx, dword [ebp + 0x10]
push ebx
push edi
call sym.adb.exe_SHA256_Update
add esp, 0xc
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
lea eax, [esp + 0x30]
push edi
push eax
call sym.adb.exe_SHA256_Final
add esp, 8
movdqa xmm0, xmmword [0x93f5e0]
movdqu xmm1, xmmword [esi + 0x15c0]
movdqu xmm2, xmmword [esi + 0x15d0]
pxor xmm1, xmm0
movdqu xmmword [esi + 0x15c0], xmm1
pxor xmm2, xmm0
movdqu xmmword [esi + 0x15d0], xmm2
movdqa xmm0, xmmword [0x93f5f0]
movdqu xmmword [esi + 0x15e0], xmm0
movdqu xmmword [esi + 0x15f0], xmm0
push edi
call sym.adb.exe_SHA256_Init
add esp, 4
push 0x40
push dword [esp + 0x10]
push edi
call sym.adb.exe_SHA256_Update
add esp, 0xc
push 0x20
lea eax, [esp + 0x34]
push eax
push edi
call sym.adb.exe_SHA256_Update
add esp, 0xc
mov dword [esp + 0x2c], edi
push edi
push dword [ebp + 8]
call sym.adb.exe_SHA256_Final
add esp, 8
cmp dword [ebp + 0x14], 0x472
jne 0x80b451
lea ecx, [esi + 0x1670]
mov dword [esp + 0x28], ecx
mov edx, ebx
call fcn.0080b470
test eax, eax
je 0x80b451
lea eax, [esi + 0x1bf0]
mov dword [esp + 8], eax
mov edx, dword [esp + 0x18]
lea eax, [edx + 0x58]
mov dword [esp + 0xc], eax
mov ecx, dword [edx]
mov ebx, dword [edx + 0x58]
not ecx
xor esi, esi
xor eax, eax
mov dword [esp + 4], edx
jmp 0x80abc9
mov eax, dword [esp + 4]
mov ecx, dword [eax + 4]
add eax, 4
mov dword [esp + 4], eax
not ecx
mov eax, dword [esp + 0xc]
mov ebx, dword [eax + 4]
add eax, 4
mov dword [esp + 0xc], eax
xor eax, eax
inc esi
cmp esi, 0x2bd
je 0x80abea
mov edx, ecx
and edx, 1
dec edx
mov edi, ebx
and edi, 1
or edi, edx
mov edx, dword [esp + 8]
mov word [edx + esi*2], di
inc eax
cmp eax, 0x20
je 0x80aba0
shr ecx, 1
shr ebx, 1
jmp 0x80abc0
mov edi, dword [esp + 8]
mov word [edi + 0x57e], 0
mov dword [edi + 0x57a], 0
mov esi, dword [esp + 0x10]
lea eax, [esi + 0x2170]
mov dword [esp + 0xc], eax
lea edx, [esi + 0xb00]
mov ecx, esi
mov dword [esp + 0x24], edx
push 0x58
push edi
push dword [esp + 0x30]
call fcn.0080bc70
add esp, 0xc
movdqa xmm0, xmmword [esi + 0x570]
xor eax, eax
nop word cs:[eax + eax]
movdqa xmm1, xmmword [esi + eax + 0x580]
movdqa xmm2, xmm1
pslldq xmm2, 6
psrldq xmm0, 0xa
por xmm0, xmm2
paddw xmm0, xmmword [esi + eax]
movdqa xmmword [esi + eax + 0x2170], xmm0
add eax, 0x10
movdqa xmm0, xmm1
cmp eax, 0x580
jne 0x80ac40
mov eax, dword [esp + 0xc]
mov word [eax + 0x57e], 0
mov dword [eax + 0x57a], 0
lea eax, [esi + 0x26f0]
lea ecx, [esi + 0x2748]
mov dword [esp + 8], ecx
xor esi, esi
mov dword [esp + 0x14], eax
mov dword [esp + 4], eax
xor ecx, ecx
xor eax, eax
xor edx, edx
jmp 0x80acb9
inc esi
cmp esi, 0x2bd
je 0x80ad1f
mov edi, dword [esp + 0xc]
movzx edi, word [edi + esi*2]
shl edi, 3
movsx ebx, di
mov edi, ebx
shr edi, 3
sar ebx, 3
imul ebx, ebx, 0x5555
shr ebx, 0x10
lea ebx, [ebx + ebx*2]
sub edi, ebx
movsx ebx, di
sar ebx, 1
and ebx, edi
dec ebx
and ebx, edi
shrd eax, ebx, 1
shr edx, 1
and ebx, 0xfffffffe
shl ebx, 0x1e
or edx, ebx
or eax, ebx
inc ecx
cmp ecx, 0x20
jne 0x80acb0
mov ecx, dword [esp + 4]
mov dword [ecx], edx
add ecx, 4
mov dword [esp + 4], ecx
mov ecx, dword [esp + 8]
mov dword [ecx], eax
add ecx, 4
mov dword [esp + 8], ecx
xor edx, edx
xor eax, eax
xor ecx, ecx
jmp 0x80acb0
neg cl
shr edx, cl
shr eax, cl
mov ecx, dword [esp + 4]
mov dword [ecx], edx
mov ecx, dword [esp + 8]
mov dword [ecx], eax
mov esi, dword [esp + 0x10]
lea ecx, [esi + 0x27a0]
mov eax, dword [esp + 0x18]
add eax, 0xb0
push eax
push dword [esp + 0x18]
mov dword [esp + 0xc], ecx
push ecx
call sym.adb.exe_HRSS_poly3_mul
add esp, 0xc
lea edx, [esi + 0x2850]
lea eax, [esi + 0x27f8]
mov dword [esp + 0x14], eax
mov ecx, dword [esi + 0x27a0]
mov edi, dword [esi + 0x27f8]
not ecx
xor eax, eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], edx
jmp 0x80adbe
mov esi, dword [esp + 4]
mov ecx, dword [esi + 4]
add esi, 4
mov dword [esp + 4], esi
not ecx
mov esi, dword [esp + 0x14]
mov edi, dword [esi + 4]
add esi, 4
mov dword [esp + 0x14], esi
mov dword [esp + 8], 0
inc eax
cmp eax, 0x2bd
je 0x80adf1
mov esi, ecx
mov ebx, ecx
and ebx, 1
dec ebx
mov ecx, edi
and edi, 1
or edi, ebx
mov edx, dword [esp + 0xc]
mov word [edx + eax*2], di
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 8]
inc edi
cmp edi, 0x20
je 0x80ad90
mov dword [esp + 8], edi
shr esi, 1
shr ecx, 1
mov edi, ecx
mov ecx, esi
jmp 0x80adb6
mov word [edx + 0x57e], 0
mov dword [edx + 0x57a], 0
mov esi, dword [esp + 0x10]
lea ecx, [esi + 0x2dd0]
call fcn.0080a190
lea ebx, [esi + 0x3350]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add eax, ecx
add eax, 0x3370
mov ecx, 0xfffffa90
nop dword [eax]
movdqu xmm0, xmmword [eax + ecx - 0x30]
movdqu xmm1, xmmword [eax + ecx - 0x1790]
psubw xmm1, xmm0
movdqu xmm0, xmmword [eax + ecx - 0x1780]
movdqu xmmword [eax + ecx + 0x550], xmm1
movdqu xmm1, xmmword [eax + ecx - 0x20]
psubw xmm0, xmm1
movdqu xmmword [eax + ecx + 0x560], xmm0
movdqu xmm0, xmmword [eax + ecx - 0x1770]
movdqu xmm1, xmmword [eax + ecx - 0x10]
psubw xmm0, xmm1
movdqu xmmword [eax + ecx + 0x570], xmm0
add ecx, 0x30
jne 0x80ae30
mov esi, dword [esp + 0x10]
movzx eax, word [esi + 0x1be0]
movzx ecx, word [esi + 0x1be2]
sub ax, word [esi + 0x3340]
mov word [esi + 0x38c0], ax
sub cx, word [esi + 0x3342]
mov word [esi + 0x38c2], cx
movzx eax, word [esi + 0x1be4]
sub ax, word [esi + 0x3344]
mov word [esi + 0x38c4], ax
movzx eax, word [esi + 0x1be6]
sub ax, word [esi + 0x3346]
mov word [esi + 0x38c6], ax
movzx eax, word [esi + 0x1be8]
sub ax, word [esi + 0x3348]
mov word [esi + 0x38c8], ax
lea edi, [ebx + 0x57a]
mov word [ebx + 0x57e], 0
mov dword [ebx + 0x57a], 0
mov eax, dword [esp + 0x18]
add eax, 0x160
mov ecx, esi
mov edx, dword [esp + 0x24]
push 0x58
push eax
push ebx
call fcn.0080bc70
add esp, 0xc
movdqa xmm0, xmmword [esi + 0x570]
xor eax, eax
nop word cs:[eax + eax]
movdqa xmm1, xmmword [esi + eax + 0x580]
movdqa xmm2, xmm1
pslldq xmm2, 6
psrldq xmm0, 0xa
por xmm0, xmm2
paddw xmm0, xmmword [esi + eax]
movdqa xmmword [esi + eax + 0x3350], xmm0
add eax, 0x10
movdqa xmm0, xmm1
cmp eax, 0x580
jne 0x80af40
mov word [edi + 4], 0
mov dword [edi], 0
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov ecx, dword [eax + esi + 0x38c8]
movd xmm0, ecx
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
add eax, esi
add eax, 0x3380
xor edx, edx
nop dword [eax]
movdqu xmm1, xmmword [eax + edx*2 - 0x30]
movdqu xmm2, xmmword [eax + edx*2 - 0x20]
psubw xmm1, xmm0
psubw xmm2, xmm0
movdqu xmmword [eax + edx*2 - 0x30], xmm1
movdqu xmmword [eax + edx*2 - 0x20], xmm2
cmp edx, 0x2a0
je 0x80affb
movdqu xmm1, xmmword [eax + edx*2 - 0x10]
movdqu xmm2, xmmword [eax + edx*2]
psubw xmm1, xmm0
psubw xmm2, xmm0
movdqu xmmword [eax + edx*2 - 0x10], xmm1
movdqu xmmword [eax + edx*2], xmm2
add edx, 0x20
jmp 0x80afb0
mov edx, dword [esp + 0x1c]
sub word [edx + esi + 0x38b0], cx
sub word [edx + esi + 0x38b2], cx
sub word [edx + esi + 0x38b4], cx
sub word [edx + esi + 0x38b6], cx
sub word [edx + esi + 0x38b8], cx
sub word [edx + esi + 0x38ba], cx
sub word [edx + esi + 0x38bc], cx
sub word [edx + esi + 0x38be], cx
sub word [edx + esi + 0x38c0], cx
sub word [edx + esi + 0x38c2], cx
sub word [edx + esi + 0x38c4], cx
sub word [edx + esi + 0x38c6], cx
sub word [edx + esi + 0x38c8], cx
xor ecx, ecx
movdqa xmm0, xmmword [0x93f600]
nop word cs:[eax + eax]
movdqu xmm1, xmmword [eax + ecx*2 - 0x30]
movdqu xmm2, xmmword [eax + ecx*2 - 0x20]
pand xmm1, xmm0
pand xmm2, xmm0
movdqu xmmword [eax + ecx*2 - 0x30], xmm1
movdqu xmmword [eax + ecx*2 - 0x20], xmm2
cmp ecx, 0x2a0
je 0x80b0cb
movdqu xmm1, xmmword [eax + ecx*2 - 0x10]
movdqu xmm2, xmmword [eax + ecx*2]
pand xmm1, xmm0
pand xmm2, xmm0
movdqu xmmword [eax + ecx*2 - 0x10], xmm1
movdqu xmmword [eax + ecx*2], xmm2
add ecx, 0x20
jmp 0x80b080
mov eax, dword [esp + 0x10]
and byte [eax + 0x38b1], 0x1f
and byte [eax + 0x38b3], 0x1f
and byte [eax + 0x38b5], 0x1f
and byte [eax + 0x38b7], 0x1f
and byte [eax + 0x38b9], 0x1f
and byte [eax + 0x38bb], 0x1f
and byte [eax + 0x38bd], 0x1f
and byte [eax + 0x38bf], 0x1f
and byte [eax + 0x38c1], 0x1f
and byte [eax + 0x38c3], 0x1f
and byte [eax + 0x38c5], 0x1f
and byte [eax + 0x38c7], 0x1f
and byte [eax + 0x38c9], 0x1f
lea ecx, [eax + 0x38d0]
mov dword [esp + 0x18], ecx
add eax, 0x3928
mov dword [esp + 0x24], eax
mov dword [esp + 8], 0xffffffff
xor edx, edx
mov dword [esp + 4], 0
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x14], ebx
jmp 0x80b193
mov eax, dword [esp + 0x18]
mov dword [eax], edx
add eax, 4
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
mov dword [eax], ebx
add eax, 4
mov dword [esp + 0x24], eax
xor ecx, ecx
mov dword [esp + 4], 0
xor edx, edx
mov ebx, dword [esp + 0x14]
inc edi
cmp edi, 0x2bd
je 0x80b1df
movzx eax, word [ebx + edi*2]
mov esi, eax
and esi, 3
mov ebx, esi
shr ebx, 1
xor esi, ebx
neg ebx
and ebx, 0x1fff
or ebx, esi
cmp bx, ax
mov eax, dword [esp + 8]
mov ebx, 0
cmovne eax, ebx
mov ebx, dword [esp + 4]
shrd ebx, esi, 1
shr edx, 1
and esi, 0xfffffffe
shl esi, 0x1e
or edx, esi
or ebx, esi
inc ecx
cmp ecx, 0x20
mov dword [esp + 8], eax
je 0x80b160
mov dword [esp + 4], ebx
jmp 0x80b186
neg cl
shr edx, cl
mov esi, dword [esp + 4]
shr esi, cl
mov eax, dword [esp + 0x18]
mov dword [eax], edx
mov eax, dword [esp + 0x24]
mov dword [eax], esi
mov esi, dword [esp + 0x10]
lea ecx, [esi + 0x3980]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x28]
call fcn.0080a800
lea edi, [esi + 0x3df2]
mov eax, 0xffffff74
movdqa xmm0, xmmword [0x93f610]
movdqa xmm1, xmmword [0x93f620]
movdqa xmm2, xmmword [0x93f630]
pxor xmm3, xmm3
mov esi, dword [esp + 0xc]
nop word [eax + eax]
movzx edx, word [esi]
and edx, 3
mov ecx, edx
shr ecx, 1
xor ecx, edx
movq xmm4, qword [esi + 2]
pand xmm4, xmm0
movdqa xmm5, xmm4
psrlw xmm5, 1
pxor xmm5, xmm4
pmullw xmm5, xmm1
pand xmm5, xmm2
packuswb xmm5, xmm5
punpckldq xmm5, xmm3
psadbw xmm5, xmm3
movd edx, xmm5
add dl, cl
mov byte [edi + eax + 0x8c], dl
add esi, 0xa
inc eax
jne 0x80b240
mov dword [esp + 0xc], edi
mov eax, dword [esp + 0x10]
lea edi, [eax + 0x3e7e]
mov eax, 0xffffff74
pxor xmm3, xmm3
movzx edx, word [ebx]
and edx, 3
mov ecx, edx
shr ecx, 1
xor ecx, edx
movq xmm4, qword [ebx + 2]
pand xmm4, xmm0
movdqa xmm5, xmm4
psrlw xmm5, 1
pxor xmm5, xmm4
pmullw xmm5, xmm1
pand xmm5, xmm2
packuswb xmm5, xmm5
punpckldq xmm5, xmm3
psadbw xmm5, xmm3
movd edx, xmm5
add dl, cl
mov byte [edi + eax + 0x8c], dl
add ebx, 0xa
inc eax
jne 0x80b2a0
push 0x472
mov ebx, dword [esp + 8]
push ebx
push dword [ebp + 0x10]
call sym.adb.exe_CRYPTO_memcmp
add esp, 0xc
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x2c]
push esi
call sym.adb.exe_SHA256_Init
add esp, 4
push 0xb
push 0x93f670
push esi
call sym.adb.exe_SHA256_Update
add esp, 0xc
push 0x8c
push dword [esp + 0x10]
push esi
call sym.adb.exe_SHA256_Update
add esp, 0xc
push 0x8c
push edi
push esi
call sym.adb.exe_SHA256_Update
add esp, 0xc
push 0x472
push ebx
push esi
call sym.adb.exe_SHA256_Update
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, 0x3f0a
push esi
push eax
call sym.adb.exe_SHA256_Final
add esp, 8
xor eax, eax
cmp dword [esp + 0x14], 0
cmove eax, dword [esp + 8]
mov ecx, eax
not cl
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add edx, ebx
add edx, 0x3f2a
mov edi, dword [ebp + 8]
cmp edx, edi
jbe 0x80b3e9
lea edx, [edi + 0x20]
mov esi, dword [esp + 0x20]
add esi, ebx
add esi, 0x3f0a
cmp esi, edx
mov edx, dword [esp + 0x20]
jae 0x80b3e9
add edx, ebx
add edx, 0x3f0b
xor esi, esi
nop word [eax + eax]
mov ch, byte [edx + esi - 1]
and ch, al
mov edi, dword [ebp + 8]
movzx ebx, byte [edi + esi]
and bl, cl
or bl, ch
mov edi, dword [ebp + 8]
mov byte [edi + esi], bl
mov ch, byte [edx + esi]
and ch, al
mov edi, dword [ebp + 8]
movzx ebx, byte [edi + esi + 1]
and bl, cl
or bl, ch
mov edi, dword [ebp + 8]
mov byte [edi + esi + 1], bl
add esi, 2
cmp esi, 0x20
jne 0x80b3b0
jmp 0x80b451
movzx ecx, cl
movd xmm0, ecx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
movzx eax, al
movd xmm1, eax
punpcklbw xmm1, xmm1
pshuflw xmm1, xmm1, 0
pshufd xmm1, xmm1, 0
mov eax, dword [esp + 0x10]
movdqu xmm2, xmmword [eax + 0x3f0a]
pand xmm2, xmm1
movdqu xmm3, xmmword [edi]
movdqu xmm4, xmmword [edi + 0x10]
pand xmm3, xmm0
por xmm3, xmm2
movdqu xmmword [edi], xmm3
movdqu xmm2, xmmword [eax + 0x3f1a]
pand xmm2, xmm1
pand xmm4, xmm0
por xmm4, xmm2
movdqu xmmword [edi + 0x10], xmm4
push dword [esp + 0x1c]
call sym.adb.exe_OPENSSL_free
add esp, 4
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret