Function at 0x4fd9e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
test edi, edi
cmove edi, eax
mov ecx, dword [esp + 0x40]
mov ebp, ecx
mov ecx, dword [ecx + 4]
mov ebx, dword [ecx + 4]
test ebx, ebx
je 0x4fda9f
mov ecx, dword [ecx]
xor esi, esi
mov edx, 0
cmp ebx, 8
jb 0x4fda66
mov esi, ebx
and esi, 0xfffffff8
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
nop word cs:[eax + eax]
movdqu xmm2, xmmword [ecx + edx*4]
por xmm0, xmm2
movdqu xmm2, xmmword [ecx + edx*4 + 0x10]
por xmm1, xmm2
add edx, 8
cmp esi, edx
jne 0x4fda30
por xmm1, xmm0
pshufd xmm0, xmm1, 0xee
por xmm0, xmm1
pshufd xmm1, xmm0, 0x55
por xmm1, xmm0
movd edx, xmm1
jmp 0x4fda6a
or edx, dword [ecx + esi*4]
inc esi
cmp ebx, esi
jne 0x4fda66
test edx, edx
je 0x4fda9f
mov dword [esp + 0x28], edi
mov edx, dword [eax + 4]
mov dword [esp + 0x10], edx
mov eax, ebx
sar eax, 0x1f
and eax, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 4], ebx
mov eax, ebp
nop
test ebx, ebx
jle 0x4fdab0
mov edi, dword [ecx + ebx*4 - 4]
dec ebx
test edi, edi
je 0x4fda90
jmp 0x4fdacc
push 0x149
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push pe_nt_image_headers32
jmp 0x4fdc6a
xor ebx, ebx
cmp dword [esp + 4], 0
mov ebp, dword [esp + 0x44]
jns 0x4fdb50
mov eax, dword [esp + 0x14]
lea ebx, [eax - 1]
mov edi, dword [ecx + eax*4 - 4]
shl ebx, 5
xor edx, edx
test edi, edi
setne dl
mov ebp, edi
shr ebp, 0x10
xor eax, eax
cmp edi, 0x10000
setae al
cmovb ebp, edi
shl eax, 4
mov dword [esp], eax
mov edi, ebp
shr edi, 8
xor eax, eax
cmp ebp, 0x100
setae al
mov dword [esp + 0xc], eax
cmovb edi, ebp
mov ebp, edi
shr ebp, 4
xor eax, eax
cmp edi, 0x10
cmovb ebp, edi
setae al
mov dword [esp + 8], eax
mov edi, ebp
shr edi, 2
xor eax, eax
cmp ebp, 4
cmovb edi, ebp
mov ebp, dword [esp + 0x44]
setae al
mov esi, eax
or edx, ebx
add edx, dword [esp]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0xc]
lea edx, [edx + ebx*8]
mov ebx, dword [esp + 8]
lea edx, [edx + ebx*4]
cmp edi, 2
lea ebx, [edx + esi*2]
sbb ebx, 0xffffffff
dec ebx
and ebx, 7
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
test edx, edx
je 0x4fdb68
push eax
call edx
add esp, 4
jmp 0x4fdc14
mov edx, dword [esp + 4]
nop dword [eax]
test edx, edx
jle 0x4fdb7f
mov edi, dword [ecx + edx*4 - 4]
dec edx
test edi, edi
je 0x4fdb70
jmp 0x4fdb99
xor eax, eax
cmp dword [esp + 4], 0
mov ebp, dword [esp + 0x44]
jns 0x4fdc14
mov edx, dword [esp + 0x14]
mov edi, dword [ecx + edx*4 - 4]
dec edx
shl edx, 5
mov esi, edi
shr esi, 0x10
xor ecx, ecx
cmp edi, 0x10000
setae cl
cmovb esi, edi
shl ecx, 4
mov ebp, esi
shr ebp, 8
xor eax, eax
cmp esi, 0x100
setae al
mov dword [esp], eax
cmovb ebp, esi
mov esi, ebp
shr esi, 4
mov dword [esp + 4], ebx
xor ebx, ebx
cmp ebp, 0x10
cmovb esi, ebp
setae bl
mov ebp, esi
shr ebp, 2
xor eax, eax
cmp esi, 4
cmovb ebp, esi
setae al
cmp edi, 1
sbb edx, 0
add edx, 8
or edx, ecx
cmp ebp, 2
mov ecx, dword [esp]
lea ecx, [edx + ecx*8]
lea ecx, [ecx + ebx*4]
mov ebx, dword [esp + 4]
lea eax, [ecx + eax*2]
sbb eax, 0xffffffff
shr eax, 3
mov ebp, dword [esp + 0x44]
test ebx, ebx
jne 0x4fdc1e
mov byte [ebp], 0
inc ebp
dec eax
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x54]
lea edx, [ecx + 2]
cmp eax, edx
jae 0x4fdc34
push 0x156
jmp 0x4fdc63
mov edx, ecx
cmp esi, 0xffffffff
je 0x4fdc53
cmp esi, 0xfffffffe
jne 0x4fdc49
mov edx, eax
sub edx, ecx
add edx, 0xfffffffe
jmp 0x4fdc53
mov edx, esi
test esi, esi
js 0x4fdde9
mov esi, eax
sub esi, ecx
lea ecx, [esi - 2]
cmp ecx, edx
jae 0x4fdc8d
push 0x16b
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x72
push 0
push 4
call sym.fastboot.exe_ERR_put_error
add esp, 0x14
xor esi, esi
xor edi, edi
push edi
call sym.fastboot.exe_OPENSSL_free
add esp, 4
mov eax, esi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0xc], eax
test edx, edx
mov dword [esp], edx
je 0x4fdcbb
push edx
call sym.fastboot.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x4fdc76
mov edi, eax
push 0x58e9ed
push dword [esp + 4]
push eax
call fcn.004dee40
add esp, 0xc
jmp 0x4fdcbd
xor edi, edi
pxor xmm0, xmm0
movdqu xmmword [esp + 0x18], xmm0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4fdd00
push dword [eax + 0x1c]
call sym.fastboot.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x4fddfd
push 0
mov dword [esp + 8], eax
call sym.fastboot.exe_OPENSSL_free
add esp, 4
mov eax, dword [esp + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov dword [esp + 4], ebx
lea ebx, [esi + ebp]
dec ebx
dec esi
lea ecx, [esp + 0x18]
push ecx
call dword [eax + 0xc]
add esp, 4
mov eax, dword [esp + 0x18]
push 8
push 0x58ea44
lea ecx, [esp + 0x20]
push ecx
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x18]
push dword [esp + 0x10]
push dword [esp + 0x4c]
lea ecx, [esp + 0x20]
push ecx
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x18]
push dword [esp]
push edi
lea ecx, [esp + 0x20]
push ecx
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x18]
mov dword [esp + 8], ebx
push ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 0x18]
push dword [eax + 0x1c]
push dword [esp + 0x20]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
push dword [esp + 0x1c]
call sym.fastboot.exe_OPENSSL_free
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4fdd98
push dword [esp + 0x20]
call dword [eax]
add esp, 4
pxor xmm0, xmm0
movdqu xmmword [esp + 0x18], xmm0
push dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
push ebx
push dword [esp + 0x10]
push esi
push ebp
call fcn.004fd210
add esp, 0x14
test eax, eax
je 0x4fde11
mov esi, dword [esp]
add ebx, esi
mov ecx, dword [esp + 0xc]
sub ecx, ebx
xor byte [ecx + ebp - 2], 1
test esi, esi
je 0x4fdf3a
lea edx, [ecx + ebp]
add edx, 0xfffffffe
xor eax, eax
cmp esi, 8
jae 0x4fde18
mov ecx, edx
jmp 0x4fded7
push 0x164
push str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
push 0x8a
jmp 0x4fdc6a
push 0
call sym.fastboot.exe_OPENSSL_free
add esp, 4
pxor xmm0, xmm0
movdqu xmmword [esp + 0x18], xmm0
xor esi, esi
jmp 0x4fdc7a
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0xc]
dec ebx
mov dword [esp + 8], ebp
mov ebp, ebx
sub ebp, dword [esp + 0x14]
add ebp, dword [esp + 8]
add esi, edi
cmp ebp, esi
mov ebp, dword [esp + 8]
jae 0x4fde4d
sub ebx, dword [esp + 0x10]
add ebx, ebp
cmp edi, ebx
jae 0x4fde4d
mov ecx, edx
mov esi, dword [esp]
jmp 0x4fded7
xor eax, eax
mov ebx, dword [esp]
cmp ebx, 0x20
jb 0x4fdeaa
mov eax, ebx
and eax, 0xffffffe0
add ecx, ebp
add ecx, 0xf
xor esi, esi
movdqu xmm0, xmmword [edi + esi]
movdqu xmm1, xmmword [edi + esi + 0x10]
movdqu xmm2, xmmword [ecx + esi - 0x10]
pxor xmm2, xmm0
movdqu xmm0, xmmword [ecx + esi]
pxor xmm0, xmm1
movdqu xmmword [ecx + esi - 0x10], xmm2
movdqu xmmword [ecx + esi], xmm0
add esi, 0x20
cmp eax, esi
jne 0x4fde63
mov ecx, dword [esp]
cmp ecx, eax
je 0x4fdf3a
test cl, 0x18
je 0x4fdf63
mov ebx, dword [esp]
mov esi, eax
mov eax, ebx
and eax, 0xfffffff8
lea ecx, [edx + eax]
movq xmm0, qword [edi + esi]
movq xmm1, qword [edx + esi + 1]
pxor xmm1, xmm0
movq qword [edx + esi + 1], xmm1
add esi, 8
cmp eax, esi
jne 0x4fdeb4
mov esi, dword [esp]
cmp esi, eax
je 0x4fdf3a
mov edx, eax
not edx
add edx, esi
and esi, 3
je 0x4fdefc
nop word cs:[eax + eax]
movzx ebx, byte [edi + eax]
xor byte [ecx + 1], bl
inc ecx
inc eax
dec esi
jne 0x4fdef0
cmp edx, 3
mov esi, dword [esp]
jb 0x4fdf3a
sub esi, eax
add eax, edi
add eax, 3
xor edx, edx
nop dword [eax]
movzx ebx, byte [eax + edx - 3]
xor byte [ecx + edx + 1], bl
movzx ebx, byte [eax + edx - 2]
xor byte [ecx + edx + 2], bl
movzx ebx, byte [eax + edx - 1]
xor byte [ecx + edx + 3], bl
movzx ebx, byte [eax + edx]
xor byte [ecx + edx + 4], bl
add edx, 4
cmp esi, edx
jne 0x4fdf10
mov eax, dword [esp + 4]
test eax, eax
je 0x4fdf50
mov cl, 8
sub cl, al
mov eax, 0xff
shr eax, cl
and byte [ebp], al
mov eax, dword [esp + 0xc]
mov byte [eax + ebp - 1], 0xbc
mov esi, 1
jmp 0x4fdc7a
add edx, eax
jmp 0x4fde43