Function at 0x70e46e56
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.70d34f8c
or dword [ebp - 8], 0xffffffff
push ebx
push esi
mov bl, cl
push edi
xor esi, esi
test bl, 8
mov edi, edx
mov dword [ebp - 0xc], edi
mov byte [ebp - 4], bl
mov dword [ebp - 0x14], esi
je 0x70e46ea9
xor ecx, ecx
cmp dword [ebp + 0xc], esi
mov dword [ebp - 8], esi
jbe 0x70e46ea2
mov eax, dword [ebp + 8]
movsx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 8], eax
inc ecx
cmp ecx, dword [ebp + 0xc]
jb 0x70e46e88
cmp dword [ebp - 8], esi
jne 0x70e46ea9
xor al, al
jmp 0x70e46f93
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 0xc], eax
jbe 0x70e46f24
test bl, 0x10
jne 0x70e46ec2
test bl, bl
jns 0x70e46f24
cmp edi, esi
jne 0x70e46f9a
xor ecx, ecx
test eax, eax
jbe 0x70e46ee1
cmp ecx, dword [ebp + 0xc]
jae 0x70e46f0d
mov eax, dword [ebp + 8]
movsx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc ecx
cmp ecx, dword [ebp + 0x10]
jb 0x70e46ec8
cmp ecx, dword [ebp + 0xc]
jae 0x70e46f0d
mov ebx, dword [ebp + 8]
mov edi, ecx
sub edi, dword [ebp + 0x10]
add edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e46f27
mov al, byte [ebx + ecx]
sub al, byte [edi]
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc ecx
inc edi
cmp ecx, dword [ebp + 0xc]
jb 0x70e46ef0
jmp 0x70e46f10
mov ebx, dword [ebp + 8]
cmp esi, dword [ebp - 8]
jae 0x70e46f27
xor eax, eax
inc eax
test esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], eax
jne 0x70e46f27
jmp 0x70e46f93
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
xor esi, esi
cmp edi, esi
jne 0x70e46f9d
mov edi, dword [ebp + 0xc]
cmp edi, dword [ebp + 0x10]
jbe 0x70e46f90
test byte [ebp - 4], 0x40
je 0x70e46f90
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
jbe 0x70e46f5a
cmp ecx, edi
jae 0x70e46f84
movsx eax, byte [ecx + ebx]
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc ecx
cmp ecx, dword [ebp + 0x10]
jb 0x70e46f45
cmp ecx, edi
jae 0x70e46f84
mov edi, ecx
sub edi, dword [ebp + 0x10]
add edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e46f90
mov al, byte [edi]
mov dl, byte [ecx + ebx]
shr al, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc ecx
inc edi
cmp ecx, dword [ebp + 0xc]
jb 0x70e46f65
cmp esi, dword [ebp - 8]
jae 0x70e46f90
mov dword [ebp - 0x14], 3
mov al, byte [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 0xc
mov ebx, dword [ebp + 8]
test byte [ebp - 4], 0x20
jne 0x70e46fb1
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
ja 0x70e46ff1
test byte [ebp - 4], 0x80
je 0x70e46ff1
and dword [ebp + 8], 0
cmp dword [ebp + 0xc], 0
jbe 0x70e46fdf
mov ecx, ebx
sub edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e46ff1
mov al, byte [ecx]
sub al, byte [edi + ecx]
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
inc ecx
cmp eax, dword [ebp + 0xc]
jb 0x70e46fbf
cmp esi, dword [ebp - 8]
jae 0x70e46ff1
test esi, esi
push 2
pop eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], eax
je 0x70e46f93
test byte [ebp - 4], 0x40
je 0x70e4708d
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp + 8], edi
jbe 0x70e4702c
mov esi, dword [ebp - 0xc]
sub esi, ebx
cmp edi, dword [ebp + 0xc]
jae 0x70e47070
lea eax, [ebx + edi]
mov cl, byte [esi + eax]
mov al, byte [eax]
shr cl, 1
sub al, cl
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp + 0x10]
jb 0x70e4700a
cmp edi, dword [ebp + 0xc]
jae 0x70e47070
mov eax, dword [ebp - 0xc]
mov esi, edi
sub esi, dword [ebp + 0x10]
lea ecx, [ebx + edi]
add esi, ebx
sub eax, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x70e4708d
movzx edx, byte [esi]
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + ecx]
add eax, edx
mov dl, byte [ecx]
sar eax, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add dword [ebp + 8], eax
inc edi
inc esi
inc ecx
cmp edi, dword [ebp + 0xc]
jb 0x70e47043
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x70e4708d
test eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], 3
jne 0x70e4708d
mov al, 3
jmp 0x70e46f93
mov ecx, dword [ebp + 0x10]
cmp dword [ebp + 0xc], ecx
jbe 0x70e46f90
test byte [ebp - 4], 0x80
je 0x70e46f90
mov eax, dword [ebp + 0xc]
shl eax, 4
cmp dword [ebp - 8], eax
jbe 0x70e46f90
mov edx, dword [ebp - 0xc]
mov eax, ecx
shr ecx, 2
mov esi, ebx
lea edi, [ebp - 0x1018]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, eax
push esi
lea ecx, [ebp - 0x1018]
call fcn.70e46d61
sub dword [ebp + 0xc], esi
mov eax, dword [ebp + 0xc]
add dword [ebp - 0xc], esi
add ebx, esi
shl eax, 2
xor ecx, ecx
test esi, esi
mov dword [ebp + 8], ebx
mov dword [ebp - 0x10], eax
jbe 0x70e47108
movsx eax, byte [ebp + ecx - 0x1018]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x10], eax
inc ecx
cmp ecx, esi
jb 0x70e470f3
cmp dword [ebp + 0xc], 0
jbe 0x70e4719a
mov dword [ebp - 0x18], 0x1000
sub dword [ebp - 0x18], esi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
cmp ebx, eax
jbe 0x70e47128
mov ebx, eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
lea ecx, [ebx + eax]
mov edx, ecx
shr ecx, 2
sub esi, eax
lea edi, [ebp - 0x1018]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [ebp + eax - 0x1018]
call fcn.70e46dc6
xor ecx, ecx
test ebx, ebx
jbe 0x70e47181
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jae 0x70e47181
mov eax, dword [ebp + 0x10]
lea eax, [ebp + eax - 0x1018]
movsx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x10], eax
inc ecx
cmp ecx, ebx
jb 0x70e4715e
sub dword [ebp + 0xc], ebx
je 0x70e4719a
mov eax, dword [ebp - 8]
cmp dword [ebp - 0x10], eax
jae 0x70e46f90
add dword [ebp + 8], ebx
add dword [ebp - 0xc], ebx
jmp 0x70e4711c
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jae 0x70e46f90
mov dword [ebp - 0x14], 4
jmp 0x70e46f90