Function at 0x470680
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
mov ecx, dword [ecx + 4]
test eax, eax
cmove eax, esi
mov dword [esp + 0x10], eax
mov edx, dword [ecx + 4]
test edx, edx
je 0x47073f
mov eax, dword [esi + 4]
mov edi, dword [ecx]
xor esi, esi
cmp edx, 8
mov dword [esp + 0x38], eax
mov eax, 0
jb 0x470717
mov esi, edx
lea eax, [edi + 0x10]
pxor xmm0, xmm0
pxor xmm1, xmm1
and esi, 0xfffffff8
mov ebx, esi
nop word cs:[eax + eax]
nop dword [eax]
movdqu xmm2, xmmword [eax - 0x10]
movdqu xmm3, xmmword [eax]
add eax, 0x20
add ebx, 0xfffffff8
por xmm0, xmm2
por xmm1, xmm3
jne 0x4706e0
por xmm1, xmm0
cmp edx, esi
pshufd xmm0, xmm1, 0x4e
por xmm0, xmm1
pshufd xmm1, xmm0, 0xe5
por xmm1, xmm0
movd eax, xmm1
je 0x470728
mov ebx, edx
sub ebx, esi
lea esi, [edi + esi*4]
nop
or eax, dword [esi]
add esi, 4
dec ebx
jne 0x470720
test eax, eax
je 0x47073f
mov ebx, dword [ebp + 0xc]
nop
test edx, edx
jle 0x470750
mov eax, dword [edi + edx*4 - 4]
dec edx
test eax, eax
je 0x470730
jmp 0x47075a
push 0x256
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x78
jmp 0x47084b
je 0x470823
mov eax, dword [edi + edx*4 - 4]
xor edx, edx
test eax, eax
mov esi, eax
setne dl
shr esi, 0x10
mov edi, esi
xor esi, eax
neg edi
sar edi, 0x1f
and esi, edi
and edi, 0x10
xor esi, eax
or edi, edx
mov eax, esi
shr eax, 8
mov edx, eax
xor eax, esi
neg edx
sar edx, 0x1f
and eax, edx
and edx, 8
xor eax, esi
or edx, edi
mov esi, eax
shr esi, 4
mov edi, esi
xor esi, eax
neg edi
sar edi, 0x1f
and esi, edi
and edi, 4
xor esi, eax
or edi, edx
mov eax, esi
shr eax, 2
mov edx, eax
xor eax, esi
neg edx
sar edx, 0x1f
and eax, edx
and edx, 2
xor eax, esi
or edx, edi
shr eax, 1
neg eax
shr eax, 0x1f
lea eax, [eax + edx - 1]
and eax, 7
mov edx, dword [ebp + 8]
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x38]
mov eax, dword [edx]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4707e4
push edx
call eax
jmp 0x4707ea
push ecx
call sym.adb.exe_BN_num_bytes
add esp, 4
cmp dword [esp + 0x34], 0
mov esi, ebx
jne 0x4707fb
mov byte [esi], 0
inc esi
dec eax
lea ecx, [edi + 2]
cmp eax, ecx
jae 0x470809
push 0x263
jmp 0x470844
mov ecx, dword [ebp + 0x1c]
mov ebx, edi
cmp ecx, 0xffffffff
je 0x470834
cmp ecx, 0xfffffffe
jne 0x47082a
mov ebx, 0xfffffffe
sub ebx, edi
add ebx, eax
jmp 0x470834
mov eax, 7
jmp 0x4707cb
test ecx, ecx
mov ebx, ecx
js 0x4709df
mov edx, eax
sub edx, edi
lea ecx, [edx - 2]
cmp ecx, ebx
jae 0x47086e
push 0x278
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x72
push 0
push 4
call sym.adb.exe_ERR_put_error
add esp, 0x14
xor esi, esi
xor ebx, ebx
push ebx
call sym.adb.exe_OPENSSL_free
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test ebx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
je 0x4708a8
push ebx
call sym.adb.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x4709f3
mov ecx, ebx
mov ebx, eax
push 0x58e277
mov dword [esp + 0xc], ecx
push ecx
push eax
call fcn.00458f00
add esp, 0xc
mov edx, dword [esp + 0x1c]
jmp 0x4708ae
mov dword [esp + 8], ebx
xor ebx, ebx
mov eax, dword [ebp + 0x14]
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
mov ecx, eax
test eax, eax
je 0x4708f5
push dword [ecx + 0x1c]
call sym.adb.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x470a04
push 0
mov dword [esp + 0x18], eax
call sym.adb.exe_OPENSSL_free
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x14]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
lea eax, [esi + edx - 1]
mov dword [esp + 0xc], esi
dec edx
lea esi, [esp + 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
push esi
call dword [ecx + 0xc]
add esp, 4
mov eax, dword [esp + 0x20]
push 8
push 0x58e306
push esi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x20]
push edi
push dword [ebp + 0x10]
push esi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x20]
push dword [esp + 8]
push ebx
push esi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x20]
push dword [esp + 0x14]
push esi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 0x20]
push dword [eax + 0x1c]
push dword [esp + 0x28]
call sym.adb.exe_OPENSSL_cleanse
add esp, 8
push dword [esp + 0x24]
call sym.adb.exe_OPENSSL_free
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x470981
push dword [esp + 0x28]
call dword [eax]
add esp, 4
mov esi, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
mov ecx, esi
push dword [esp + 0x10]
push edi
push dword [esp + 0x1c]
call fcn.0046fd30
add esp, 0xc
test eax, eax
je 0x470a30
mov eax, 0xfffffffe
mov ecx, esi
mov esi, dword [esp + 8]
sub eax, edi
add eax, dword [esp + 0x18]
sub eax, esi
xor byte [ecx + eax], 1
test esi, esi
je 0x470af1
add eax, dword [esp + 0xc]
xor ecx, ecx
cmp esi, 0x20
jae 0x470a37
xor edx, edx
jmp 0x470acd
push 0x271
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x8a
jmp 0x47084b
push 0x27f
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x41
jmp 0x47084b
push 0xb4
push str.external_boringssl_src_crypto_fipsmodule_digest_digest.c
push 0x41
push 0
push 0x1d
call sym.adb.exe_ERR_put_error
add esp, 0x14
push 0
call sym.adb.exe_OPENSSL_free
add esp, 4
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
xor esi, esi
jmp 0x47085b
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], esi
lea edx, [eax - 1]
mov eax, edx
sub eax, esi
sub eax, edi
lea edi, [ebx + esi]
mov esi, dword [esp + 0xc]
add eax, dword [esp + 0xc]
cmp eax, edi
mov eax, dword [esp + 0x38]
jae 0x470a73
sub edx, eax
add edx, esi
cmp ebx, edx
jae 0x470a73
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x10]
xor edx, edx
jmp 0x470acd
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 8]
lea esi, [esi + 0xf]
mov edx, edi
sub esi, edi
and edx, 0xffffffe0
xor edi, edi
sub esi, eax
add dword [esp + 0x10], edx
add esi, dword [esp + 0xc]
movdqu xmm0, xmmword [ebx + edi]
movdqu xmm2, xmmword [esi + edi - 0x10]
movdqu xmm1, xmmword [ebx + edi + 0x10]
movdqu xmm3, xmmword [esi + edi]
pxor xmm2, xmm0
pxor xmm3, xmm1
movdqu xmmword [esi + edi - 0x10], xmm2
movdqu xmmword [esi + edi], xmm3
add edi, 0x20
cmp edx, edi
jne 0x470a91
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x10]
cmp esi, edx
je 0x470af1
sub esi, edx
add edx, ebx
nop word cs:[eax + eax]
nop dword [eax + eax]
mov edi, eax
movzx eax, byte [edx + ecx]
xor byte [edi + ecx + 1], al
inc ecx
mov eax, edi
cmp esi, ecx
jne 0x470ae0
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0xc]
test eax, eax
je 0x470b0a
mov cl, 8
sub cl, al
mov eax, 0xff
shr eax, cl
and byte [edx], al
mov eax, dword [esp + 0x18]
mov esi, 1
mov byte [edx + eax - 1], 0xbc
jmp 0x47085b