Function at 0x70e46ece
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.70d34fb4
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 0x70e46f21
xor ecx, ecx
cmp dword [ebp + 0xc], esi
mov dword [ebp - 8], esi
jbe 0x70e46f1a
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 0x70e46f00
cmp dword [ebp - 8], esi
jne 0x70e46f21
xor al, al
jmp 0x70e4700b
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 0xc], eax
jbe 0x70e46f9c
test bl, 0x10
jne 0x70e46f3a
test bl, bl
jns 0x70e46f9c
cmp edi, esi
jne 0x70e47012
xor ecx, ecx
test eax, eax
jbe 0x70e46f59
cmp ecx, dword [ebp + 0xc]
jae 0x70e46f85
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 0x70e46f40
cmp ecx, dword [ebp + 0xc]
jae 0x70e46f85
mov ebx, dword [ebp + 8]
mov edi, ecx
sub edi, dword [ebp + 0x10]
add edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e46f9f
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 0x70e46f68
jmp 0x70e46f88
mov ebx, dword [ebp + 8]
cmp esi, dword [ebp - 8]
jae 0x70e46f9f
xor eax, eax
inc eax
test esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], eax
jne 0x70e46f9f
jmp 0x70e4700b
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
xor esi, esi
cmp edi, esi
jne 0x70e47015
mov edi, dword [ebp + 0xc]
cmp edi, dword [ebp + 0x10]
jbe 0x70e47008
test byte [ebp - 4], 0x40
je 0x70e47008
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
jbe 0x70e46fd2
cmp ecx, edi
jae 0x70e46ffc
movsx eax, byte [ecx + ebx]
cdq
xor eax, edx
sub eax, edx
add esi, eax
inc ecx
cmp ecx, dword [ebp + 0x10]
jb 0x70e46fbd
cmp ecx, edi
jae 0x70e46ffc
mov edi, ecx
sub edi, dword [ebp + 0x10]
add edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e47008
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 0x70e46fdd
cmp esi, dword [ebp - 8]
jae 0x70e47008
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 0x70e47029
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
ja 0x70e47069
test byte [ebp - 4], 0x80
je 0x70e47069
and dword [ebp + 8], 0
cmp dword [ebp + 0xc], 0
jbe 0x70e47057
mov ecx, ebx
sub edi, ebx
cmp esi, dword [ebp - 8]
jae 0x70e47069
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 0x70e47037
cmp esi, dword [ebp - 8]
jae 0x70e47069
test esi, esi
push 2
pop eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], eax
je 0x70e4700b
test byte [ebp - 4], 0x40
je 0x70e47105
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp + 8], edi
jbe 0x70e470a4
mov esi, dword [ebp - 0xc]
sub esi, ebx
cmp edi, dword [ebp + 0xc]
jae 0x70e470e8
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 0x70e47082
cmp edi, dword [ebp + 0xc]
jae 0x70e470e8
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 0x70e47105
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 0x70e470bb
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x70e47105
test eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], 3
jne 0x70e47105
mov al, 3
jmp 0x70e4700b
mov ecx, dword [ebp + 0x10]
cmp dword [ebp + 0xc], ecx
jbe 0x70e47008
test byte [ebp - 4], 0x80
je 0x70e47008
mov eax, dword [ebp + 0xc]
shl eax, 4
cmp dword [ebp - 8], eax
jbe 0x70e47008
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.70e46dd9
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 0x70e47180
movsx eax, byte [ebp + ecx - 0x1018]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x10], eax
inc ecx
cmp ecx, esi
jb 0x70e4716b
cmp dword [ebp + 0xc], 0
jbe 0x70e47212
mov dword [ebp - 0x18], 0x1000
sub dword [ebp - 0x18], esi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
cmp ebx, eax
jbe 0x70e471a0
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.70e46e3e
xor ecx, ecx
test ebx, ebx
jbe 0x70e471f9
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jae 0x70e471f9
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 0x70e471d6
sub dword [ebp + 0xc], ebx
je 0x70e47212
mov eax, dword [ebp - 8]
cmp dword [ebp - 0x10], eax
jae 0x70e47008
add dword [ebp + 8], ebx
add dword [ebp - 0xc], ebx
jmp 0x70e47194
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jae 0x70e47008
mov dword [ebp - 0x14], 4
jmp 0x70e47008