Function at 0x506670
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov ebp, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov edi, dword [esp + 0x74]
test eax, eax
jne 0x5066a4
push 0x4ef8a0
push 0x5b2da4
call sym.fastboot.exe_CRYPTO_once
add esp, 8
mov eax, 0x5b2da8
test ebp, ebp
cmove ebp, eax
mov ebx, dword [eax + 4]
lea ecx, [ebx + ebx]
add ecx, 2
cmp ecx, edi
jbe 0x5066bd
push 0x147
jmp 0x5066e9
lea ecx, [ebx + ebx]
mov esi, ecx
not esi
lea edx, [edi + esi]
dec edx
cmp edx, dword [esp + 0x7c]
jae 0x5066dc
push 0x14d
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x72
jmp 0x5066f0
dec edi
or ecx, 1
cmp edi, ecx
jae 0x506708
push 0x152
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x7e
push 0
push 4
call sym.fastboot.exe_ERR_put_error
add esp, 0x14
xor esi, esi
mov eax, esi
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x70]
mov byte [ecx], 0
add ecx, ebx
inc ecx
sub esp, 4
push eax
push 0
mov dword [esp + 0xc], ecx
push ecx
push edx
push dword [esp + 0x94]
call sym.fastboot.exe_EVP_Digest
add esp, 0x18
test eax, eax
je 0x5068dd
mov edx, ebx
mov ebx, edi
sub ebx, dword [esp + 0x7c]
add esi, ebx
je 0x50675d
mov eax, dword [esp]
add eax, edx
push esi
push 0
push eax
mov esi, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov edx, esi
add esp, 0xc
mov eax, dword [esp + 0x70]
lea esi, [eax + 1]
mov eax, edx
not eax
add ebx, eax
mov eax, dword [esp]
mov byte [eax + ebx], 1
mov ebx, edx
mov edx, dword [esp + 0x7c]
test edx, edx
je 0x506792
mov eax, dword [esp]
add eax, edi
sub eax, edx
sub eax, ebx
push edx
push dword [esp + 0x7c]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp + 0x10], esi
push 0x596773
push ebx
push esi
call fcn.004e8610
add esp, 0xc
mov eax, ebx
mov ebx, edi
mov dword [esp + 4], eax
sub ebx, eax
push ebx
call sym.fastboot.exe_OPENSSL_malloc
add esp, 4
xor esi, esi
test eax, eax
je 0x5068e6
mov dword [esp + 8], eax
mov ecx, eax
mov dword [esp + 0xc], ebx
mov edx, ebx
push ebp
mov ebx, dword [esp + 8]
push ebx
push dword [esp + 0x18]
call fcn.00506a20
add esp, 0xc
test eax, eax
je 0x5068ed
cmp edi, ebx
mov edi, dword [esp + 8]
je 0x506949
mov eax, dword [esp + 0xc]
cmp eax, 2
mov ecx, 1
cmovae ecx, eax
mov eax, ecx
xor ecx, ecx
cmp eax, 8
jb 0x5068ae
lea edx, [edi + eax]
cmp dword [esp], edx
jae 0x50682d
mov edx, dword [esp + 4]
add edx, eax
mov ebx, dword [esp + 0x70]
add edx, ebx
inc edx
cmp edi, edx
jb 0x5068ae
xor ecx, ecx
cmp eax, 0x20
jb 0x506880
mov ecx, eax
and ecx, 0xffffffe0
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x70]
add edx, ebx
add edx, 0x11
mov ebx, edi
xor edi, edi
movups xmm0, xmmword [ebx + edi]
movups xmm1, xmmword [ebx + edi + 0x10]
movups xmm2, xmmword [edx + edi - 0x10]
xorps xmm2, xmm0
movups xmm0, xmmword [edx + edi]
xorps xmm0, xmm1
movups xmmword [edx + edi - 0x10], xmm2
movups xmmword [edx + edi], xmm0
add edi, 0x20
cmp ecx, edi
jne 0x50684a
cmp eax, ecx
mov edi, ebx
je 0x506949
test al, 0x18
je 0x5068ae
mov edx, ecx
mov ebx, eax
mov ecx, eax
and ecx, 0xfffffff8
mov eax, dword [esp]
movsd xmm0, qword [edi + edx]
movsd xmm1, qword [eax + edx]
xorps xmm1, xmm0
movlps qword [eax + edx], xmm1
add edx, 8
cmp ecx, edx
jne 0x50688c
mov eax, ebx
cmp ebx, ecx
je 0x506949
mov edx, ecx
not edx
add edx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
mov edi, eax
and edi, 3
je 0x5068f6
mov edx, dword [esp + 8]
mov eax, dword [esp]
nop word [eax + eax]
movzx ebx, byte [edx + ecx]
xor byte [eax + ecx], bl
inc ecx
dec edi
jne 0x5068d0
jmp 0x5068fa
xor edi, edi
xor esi, esi
jmp 0x506a10
xor edi, edi
jmp 0x506a10
mov edi, dword [esp + 8]
jmp 0x506a10
mov edx, dword [esp + 8]
cmp dword [esp + 0x14], 3
mov edi, edx
mov eax, dword [esp + 0x18]
jb 0x506949
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x70]
add edx, ebx
add edx, 4
nop word cs:[eax + eax]
movzx ebx, byte [edi + ecx]
xor byte [edx + ecx - 3], bl
movzx ebx, byte [edi + ecx + 1]
xor byte [edx + ecx - 2], bl
movzx ebx, byte [edi + ecx + 2]
xor byte [edx + ecx - 1], bl
movzx ebx, byte [edi + ecx + 3]
xor byte [edx + ecx], bl
add ecx, 4
cmp eax, ecx
jne 0x506920
xorps xmm0, xmm0
movups xmmword [esp + 0x4c], xmm0
movups xmmword [esp + 0x3c], xmm0
movups xmmword [esp + 0x2c], xmm0
movups xmmword [esp + 0x1c], xmm0
lea ecx, [esp + 0x1c]
mov ebx, dword [esp + 4]
mov edx, ebx
push ebp
push dword [esp + 0x10]
push dword [esp + 8]
call fcn.00506a20
add esp, 0xc
test eax, eax
je 0x506a10
mov esi, 1
test ebx, ebx
je 0x506a10
xor eax, eax
cmp ebx, 8
mov edx, dword [esp + 0x10]
jb 0x506a03
xor eax, eax
cmp ebx, 0x20
jb 0x5069e1
mov eax, ebx
and eax, 0xffffffe0
xor ecx, ecx
mov ebp, dword [esp + 0x70]
movups xmm0, xmmword [esp + ecx + 0x1c]
movups xmm1, xmmword [esp + ecx + 0x2c]
movups xmm2, xmmword [ebp + ecx + 1]
xorps xmm2, xmm0
movups xmm0, xmmword [ebp + ecx + 0x11]
xorps xmm0, xmm1
movups xmmword [ebp + ecx + 1], xmm2
movups xmmword [ebp + ecx + 0x11], xmm0
add ecx, 0x20
cmp eax, ecx
jne 0x5069ad
cmp ebx, eax
je 0x506a10
test bl, 0x18
je 0x506a03
mov ecx, eax
mov eax, ebx
and eax, 0xfffffff8
movsd xmm0, qword [esp + ecx + 0x1c]
movsd xmm1, qword [edx + ecx]
xorps xmm1, xmm0
movlps qword [edx + ecx], xmm1
add ecx, 8
cmp eax, ecx
jne 0x5069e8
jmp 0x506a0c
movzx ecx, byte [esp + eax + 0x1c]
xor byte [edx + eax], cl
inc eax
cmp ebx, eax
jne 0x506a03
push edi
call sym.fastboot.exe_OPENSSL_free
add esp, 4
jmp 0x5066fe