Function at 0x4ca290
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
lea ebp, [ecx*4 + 4]
mov ebx, ecx
nop dword [eax]
sub ebx, 1
jb 0x4ca32d
mov edi, dword [eax + ecx*4 - 4]
add ebp, 0xfffffffc
mov ecx, ebx
test edi, edi
je 0x4ca2b0
test ebx, ebx
jne 0x4ca2ca
cmp dword [eax], edx
jbe 0x4ca32d
lea eax, [ebx + 1]
mov dword [esp], eax
push eax
push dword [esp + 0x30]
call fcn.004b36f0
add esp, 8
xor esi, esi
test eax, eax
je 0x4ca347
mov eax, edi
shr eax, 1
or eax, edi
mov ecx, eax
shr ecx, 2
or ecx, eax
mov eax, ecx
shr eax, 4
or eax, ecx
mov ecx, eax
shr ecx, 8
or ecx, eax
mov edi, ecx
shr edi, 0x10
or edi, ecx
mov eax, edi
shr eax, 1
test ebx, ebx
jne 0x4ca351
cmp eax, dword [esp + 0x34]
jae 0x4ca351
push 0x137
push str.external_boringssl_src_crypto_fipsmodule_bn_random.c
push 0x6c
push 0
push 3
call sym.fastboot.exe_ERR_put_error
add esp, 0x14
jmp 0x4ca347
push 0xe2
push str.external_boringssl_src_crypto_fipsmodule_bn_random.c
push 0x6c
push 0
push 3
call sym.fastboot.exe_ERR_put_error
add esp, 0x14
xor esi, esi
mov eax, esi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0x10], eax
push 0x56fcd2
push ebp
mov esi, dword [esp + 0x34]
push dword [esi]
call fcn.004cb6b0
add esp, 0xc
mov eax, dword [esi]
and dword [eax + ebx*4], edi
mov edi, dword [esi]
mov esi, dword [esp + 0x34]
test esi, esi
je 0x4ca390
test ebx, ebx
mov eax, dword [esp]
je 0x4ca3a0
cmp ebx, 8
jae 0x4ca3a7
xor edx, edx
mov ecx, 1
jmp 0x4ca4a0
mov dword [esp + 8], 0xffffffff
mov eax, dword [esp]
jmp 0x4ca4d1
xor edx, edx
jmp 0x4ca4aa
mov ecx, ebx
and ecx, 0xfffffff8
lea eax, [ecx - 8]
mov edx, eax
shr edx, 3
add edx, 1
cmp eax, 0x18
mov eax, edx
jae 0x4ca3ca
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
jmp 0x4ca438
mov esi, eax
and esi, 0xfffffffc
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
nop dword [eax]
movdqu xmm2, xmmword [edi + edx*4 + 4]
por xmm2, xmm0
movdqu xmm0, xmmword [edi + edx*4 + 0x14]
por xmm0, xmm1
movdqu xmm1, xmmword [edi + edx*4 + 0x24]
movdqu xmm3, xmmword [edi + edx*4 + 0x34]
movdqu xmm4, xmmword [edi + edx*4 + 0x44]
por xmm4, xmm1
por xmm4, xmm2
movdqu xmm2, xmmword [edi + edx*4 + 0x54]
por xmm2, xmm3
por xmm2, xmm0
movdqu xmm0, xmmword [edi + edx*4 + 0x64]
por xmm0, xmm4
movdqu xmm1, xmmword [edi + edx*4 + 0x74]
por xmm1, xmm2
add edx, 0x20
add esi, 0xfffffffc
jne 0x4ca3e0
test al, 3
je 0x4ca475
mov eax, ebx
and al, 0x18
add al, 0xf8
shr al, 3
add al, 1
movzx esi, al
and esi, 3
nop dword [eax]
lea eax, [edx*4]
or eax, 4
movdqu xmm2, xmmword [edi + eax]
por xmm0, xmm2
movdqu xmm2, xmmword [edi + eax + 0x10]
por xmm1, xmm2
add edx, 8
add esi, 0xffffffff
jne 0x4ca450
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd edx, xmm0
cmp ebx, ecx
mov esi, dword [esp + 0x34]
mov eax, dword [esp]
je 0x4ca4aa
or ecx, 1
nop dword [eax]
or edx, dword [edi + ecx*4]
add ecx, 1
cmp eax, ecx
jne 0x4ca4a0
mov eax, edx
not eax
add edx, 0xffffffff
and edx, eax
mov eax, dword [edi]
mov ecx, eax
xor ecx, esi
mov ebp, eax
sub ebp, esi
xor ebp, eax
or ebp, ecx
xor ebp, eax
mov eax, dword [esp]
and ebp, edx
sar ebp, 0x1f
not ebp
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx]
test ebx, ebx
je 0x4ca5ba
and eax, 0xfffffffe
mov dword [esp + 0x14], eax
xor edx, edx
xor edi, edi
mov dword [esp + 4], ecx
mov esi, dword [esp + 0xc]
nop word cs:[eax + eax]
mov eax, dword [esi + edi*4]
mov ecx, dword [esp + 4]
mov ecx, dword [ecx + edi*4]
mov ebp, eax
sub ebp, ecx
xor ecx, eax
xor ebp, eax
or ebp, ecx
xor ebp, eax
mov eax, dword [esi + edi*4 + 4]
sar ebp, 0x1f
or ebp, 1
test ecx, ecx
mov ecx, dword [esp + 4]
mov ecx, dword [ecx + edi*4 + 4]
cmove ebp, edx
mov edx, eax
sub edx, ecx
xor ecx, eax
xor edx, eax
or edx, ecx
xor edx, eax
sar edx, 0x1f
or edx, 1
test ecx, ecx
mov ecx, dword [esp + 4]
cmove edx, ebp
add edi, 2
cmp dword [esp + 0x14], edi
jne 0x4ca500
test byte [esp], 1
je 0x4ca578
mov eax, dword [esp + 0xc]
mov ebp, dword [eax + edi*4]
mov ecx, dword [ecx + edi*4]
mov eax, ebp
sub eax, ecx
xor ecx, ebp
xor eax, ebp
or eax, ecx
xor eax, ebp
sar eax, 0x1f
or eax, 1
test ecx, ecx
cmovne edx, eax
shr edx, 0x1f
and edx, dword [esp + 8]
mov eax, dword [esp + 0x30]
mov dword [eax], edx
mov eax, edx
add edx, 0xffffffff
and edx, dword [esp + 0x34]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esi]
or dword [ecx], edx
neg eax
mov ecx, dword [esp + 0x10]
or ecx, eax
mov eax, dword [esi]
and dword [eax + ebx*4], ecx
mov dword [esi + 0xc], 0
mov eax, dword [esp]
mov dword [esi + 4], eax
mov esi, 1
jmp 0x4ca347
xor edx, edx
xor edi, edi
test byte [esp], 1
jne 0x4ca557
jmp 0x4ca578