Function at 0x49b580
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov ebx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x10]
xor eax, eax
cmp ebx, 0x10
mov dword [edi], 0
jb 0x49b862
lea edx, [ebx - 8]
cmp edx, dword [ebp + 0x14]
ja 0x49b862
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
cmp ebx, 0x10
jne 0x49b5ee
mov dword [esp + 4], edx
lea eax, [esp + 0x10]
push dword [ebp + 8]
push eax
push ecx
call fcn.0049adf0
add esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
movsd xmm0, qword [esp + 0x18]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
movsd qword [esi], xmm0
jmp 0x49b6d1
xor eax, eax
cmp ebx, 0x18
jb 0x49b862
mov edi, ebx
mov dword [esp + 4], edx
and edi, 0x80000007
jne 0x49b862
movsd xmm0, qword [ecx]
add ecx, 8
movsd qword [esp + 0x10], xmm0
push dword [esp + 4]
push ecx
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
add esp, 0xc
mov eax, ebx
mov edx, 1
lea esi, [esp + 0x10]
shr eax, 3
lea ecx, [eax + eax*2]
sub edx, eax
dec eax
mov dword [esp + 0x28], eax
lea ebx, [ecx + ecx - 6]
mov eax, 5
mov dword [esp + 8], edx
jmp 0x49b661
mov ebx, dword [esp]
mov eax, dword [esp + 0xc]
add ebx, dword [esp + 8]
dec eax
cmp eax, 6
jae 0x49b6bb
mov edi, dword [esp + 0x28]
mov dword [esp + 0xc], eax
mov dword [esp], ebx
test edi, edi
je 0x49b650
mov eax, ebx
mov ecx, dword [ebp + 0xc]
xor byte [esp + 0x17], bl
xor byte [esp + 0x16], bh
shr eax, 0x10
xor byte [esp + 0x15], al
mov eax, ebx
shr eax, 0x18
xor byte [esp + 0x14], al
movsd xmm0, qword [ecx + edi*8 - 8]
movsd qword [esp + 0x18], xmm0
push dword [ebp + 8]
push esi
push esi
call fcn.0049adf0
add esp, 0xc
movsd xmm0, qword [esp + 0x18]
mov eax, dword [ebp + 0xc]
dec ebx
movsd qword [eax + edi*8 - 8], xmm0
dec edi
jne 0x49b670
jmp 0x49b650
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push 4
push 0x51fbd0
push eax
call sym.fastboot.exe_CRYPTO_memcmp
add esp, 0xc
mov ecx, eax
not eax
lea edx, [ebx - 9]
dec ecx
mov dword [esp + 0xc], edx
and ecx, eax
mov eax, dword [esp + 0x24]
sar ecx, 0x1f
bswap eax
mov esi, eax
mov dword [esp], eax
dec eax
not esi
and esi, eax
xor eax, edx
shr eax, 3
sar esi, 0x1f
dec eax
not esi
sar eax, 0x1f
and eax, esi
lea esi, [ebx - 0xf]
and eax, ecx
cmp esi, dword [esp + 4]
jae 0x49b858
mov edx, dword [esp]
mov ecx, esi
mov edi, esi
sub ecx, edx
xor edi, edx
xor ecx, esi
or ecx, edi
xor ecx, esi
sar ecx, 0x1f
not cl
movzx esi, cl
mov ecx, dword [ebp + 0xc]
movzx ecx, byte [ecx + ebx - 0xf]
and esi, ecx
lea ecx, [ebx - 0xe]
dec esi
mov edi, ecx
sar esi, 0x1f
xor edi, edx
and esi, eax
mov eax, ecx
sub eax, edx
xor eax, ecx
or eax, edi
lea edi, [ebx - 0xd]
xor eax, ecx
sar eax, 0x1f
not al
movzx ecx, al
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + ebx - 0xe]
and ecx, eax
mov eax, edi
sub eax, edx
mov dword [esp + 8], ecx
mov ecx, ebx
mov ebx, edi
xor ebx, edx
xor eax, edi
or eax, ebx
xor eax, edi
mov edi, dword [ebp + 0xc]
sar eax, 0x1f
not al
movzx eax, al
movzx edi, byte [edi + ecx - 0xd]
and eax, edi
dec eax
sar eax, 0x1f
and eax, esi
lea esi, [ecx - 0xc]
mov ebx, esi
mov edi, esi
sub ebx, edx
xor edi, edx
xor ebx, esi
or ebx, edi
mov edi, dword [ebp + 0xc]
xor ebx, esi
sar ebx, 0x1f
not bl
movzx edi, byte [edi + ecx - 0xc]
movzx esi, bl
and esi, edi
lea edi, [ecx - 0xb]
dec esi
mov ebx, edi
sar esi, 0x1f
xor ebx, edx
and esi, eax
mov eax, edi
sub eax, edx
xor eax, edi
or eax, ebx
xor eax, edi
mov edi, dword [ebp + 0xc]
sar eax, 0x1f
not al
movzx eax, al
movzx edi, byte [edi + ecx - 0xb]
and eax, edi
dec eax
sar eax, 0x1f
and eax, esi
lea esi, [ecx - 0xa]
mov ebx, esi
mov edi, esi
sub ebx, edx
xor edi, edx
xor ebx, esi
or ebx, edi
xor ebx, esi
sar ebx, 0x1f
not bl
movzx esi, bl
mov ebx, dword [ebp + 0xc]
mov edi, ebx
movzx edi, byte [ebx + ecx - 0xa]
mov ebx, dword [esp + 0xc]
and esi, edi
mov edi, ebx
dec esi
xor edi, edx
sar esi, 0x1f
and esi, eax
mov eax, ebx
sub eax, edx
xor eax, ebx
or eax, edi
mov edi, dword [ebp + 0xc]
xor eax, ebx
sar eax, 0x1f
not al
movzx edi, byte [edi + ecx - 9]
mov ecx, dword [esp + 8]
movzx eax, al
and eax, edi
mov edi, dword [ebp + 0x10]
dec ecx
dec eax
sar ecx, 0x1f
sar eax, 0x1f
and eax, esi
and eax, ecx
mov ecx, edx
jmp 0x49b85b
mov ecx, dword [esp]
and ecx, eax
and eax, 1
mov dword [edi], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret