Function at 0x80e430
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebx, edx
mov edi, dword [esp + 0x18]
mov edx, dword [edx]
mov esi, ecx
lea ecx, [edx + edi]
cmp ecx, dword [ebx + 4]
jbe 0x80e713
mov ebp, edi
mov edi, edx
sar edi, 0x1f
mov eax, ebp
shld edi, edx, 1
add edx, edx
sar eax, 0x1f
add edx, ebp
adc eax, edi
cmp ecx, 0xc8
jl 0x80e6c3
mov edx, fcn.00803ed0
xor eax, eax
movzx edi, byte [0xbb20cb]
and edx, 1
inc edx
mov ecx, edx
xor ecx, fcn.00803ed0
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jb 0x80e6a9
mov al, byte [0xbb20cb]
mov edi, edx
xor ecx, ecx
mov ah, 1
xor edi, fcn.00803ed0
sete cl
mov ebx, ecx
not ebx
lea ecx, [ebx + ecx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb20cb], ah
jne 0x80e4a4
mov ecx, fcn.00803ed0
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov edi, ecx
xor edi, fcn.00803ed0
sete dl
mov ebx, edx
not ebx
lea edx, [ebx + edx*2]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x80e526
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbb20cb]
xor edx, fcn.00803ed0
sete al
mov edx, eax
not edx
lea eax, [edx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jae 0x80e4fc
jmp 0x80e6a9
xor eax, eax
xor ecx, fcn.00803ed0
movzx edx, byte [0xbb20cb]
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x80e67f
mov eax, fcn.00803ed0
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.00803ed0
sete cl
mov eax, ecx
xor eax, 0xfbd94aff
lea ecx, [eax + ecx*2 + 0xa00]
mov eax, dword [0xbb20a0]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb20a0], eax
not eax
imul edx, eax
mov eax, dword [0xbb20a4]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb20a4], eax
or edi, edx
not eax
mov edx, dword [0xbb20a8]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb20a8], edx
or edi, eax
not edx
mov eax, dword [0xbb20ac]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb20ac], eax
or edi, edx
not eax
mov edx, dword [0xbb20b0]
imul eax, edi
mov edi, eax
shl edi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb20b0], edx
or eax, edi
not edx
mov ebp, dword [0xbb20b4]
imul edx, eax
mov edi, edx
shl edi, 5
xor ebp, edx
shr edx, 0x1a
mov dword [0xbb20b4], ebp
or edx, edi
not ebp
imul ebp, edx
mov edx, dword [0xbb20b8]
mov edi, ebp
shl edi, 6
xor edx, ebp
shr ebp, 0x19
mov dword [0xbb20b8], edx
or ebp, edi
not edx
mov ebx, dword [0xbb20bc]
imul edx, ebp
mov edi, edx
shl edi, 7
xor ebx, edx
shr edx, 0x18
mov dword [0xbb20bc], ebx
or edx, edi
not ebx
imul ebx, edx
mov edx, dword [0xbb20c0]
mov edi, ebx
shl edi, 8
xor edx, ebx
shr ebx, 0x17
mov dword [0xbb20c0], edx
or ebx, edi
not edx
imul edx, ebx
xor dword [0xbb20c4], edx
mov dl, 1
shl dl, cl
or byte [0xbb20cb], dl
mov eax, fcn.00803ed0
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.00803ed0
sete cl
mov eax, ecx
not eax
lea ecx, [eax + ecx*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb20cb], al
push 0xc8
push 0xbb20a0
push esi
call fcn.00782570
add esp, 0xc
xor ebx, ebx
jmp 0x80e781
mov ecx, dword [esi]
xor edi, edi
cmp edx, 0xc9
mov esi, eax
sbb esi, 0
mov esi, 0xc8
cmovge eax, edi
cmovl esi, edx
mov edx, 0x48
shl eax, 3
lea ebp, [eax + eax*8]
mov eax, esi
mul edx
mov edi, edx
add eax, 8
mov edx, ebx
adc edi, ebp
push edi
push eax
call fcn.0078dc70
add esp, 8
test eax, eax
mov ebx, 0
je 0x80e781
mov dword [eax + 4], esi
mov edi, dword [esp + 0x18]
mov ebx, eax
mov edx, dword [eax]
mov ebp, dword [esp + 0x1c]
cmp edx, ebp
jle 0x80e748
mov dword [esp], ebx
mov ecx, dword [esp]
lea eax, [edx + edi - 1]
dec edx
mov ebx, edi
lea eax, [eax + eax*8]
cmp edx, ebp
lea edi, [ecx + eax*8 + 8]
lea eax, [edx + edx*8]
lea esi, [ecx + eax*8 + 8]
mov ecx, 0x12
rep movsd dword es:[edi], dword [esi]
mov edi, ebx
jg 0x80e71e
mov ebx, dword [esp]
mov edx, dword [ebx]
lea ecx, [edi*8]
lea eax, [ebp + ebp*8]
add edx, edi
lea ecx, [ecx + ecx*8]
mov dword [ebx], edx
lea eax, [ebx + eax*8 + 8]
push ecx
push 0
push eax
call fcn.00980a60
add esp, 0xc
test edi, edi
jle 0x80e781
add edi, ebp
lea eax, [ebp + ebp*8]
inc ebp
cmp ebp, edi
mov dword [ebx + eax*8 + 0x34], 0xffffffff
jl 0x80e770
mov eax, ebx
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret