Function at 0x819c60
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 0x819f43
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 0x819ef3
mov edx, fcn.0080f730
xor eax, eax
movzx edi, byte [0xbb9a2b]
and edx, 1
inc edx
mov ecx, edx
xor ecx, fcn.0080f730
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jb 0x819ed9
mov al, byte [0xbb9a2b]
mov edi, edx
xor ecx, ecx
mov ah, 1
xor edi, fcn.0080f730
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 [0xbb9a2b], ah
jne 0x819cd4
mov ecx, fcn.0080f730
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov edi, ecx
xor edi, fcn.0080f730
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 0x819d56
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbb9a2b]
xor edx, fcn.0080f730
sete al
mov edx, eax
not edx
lea eax, [edx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jae 0x819d2c
jmp 0x819ed9
xor eax, eax
xor ecx, fcn.0080f730
movzx edx, byte [0xbb9a2b]
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x819eaf
mov eax, fcn.0080f730
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.0080f730
sete cl
mov eax, ecx
xor eax, 0xfbd94aff
lea ecx, [eax + ecx*2 + 0xa00]
mov eax, dword [0xbb9a00]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb9a00], eax
not eax
imul edx, eax
mov eax, dword [0xbb9a04]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb9a04], eax
or edi, edx
not eax
mov edx, dword [0xbb9a08]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb9a08], edx
or edi, eax
not edx
mov eax, dword [0xbb9a0c]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb9a0c], eax
or edi, edx
not eax
mov edx, dword [0xbb9a10]
imul eax, edi
mov edi, eax
shl edi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb9a10], edx
or eax, edi
not edx
mov ebp, dword [0xbb9a14]
imul edx, eax
mov edi, edx
shl edi, 5
xor ebp, edx
shr edx, 0x1a
mov dword [0xbb9a14], ebp
or edx, edi
not ebp
imul ebp, edx
mov edx, dword [0xbb9a18]
mov edi, ebp
shl edi, 6
xor edx, ebp
shr ebp, 0x19
mov dword [0xbb9a18], edx
or ebp, edi
not edx
mov ebx, dword [0xbb9a1c]
imul edx, ebp
mov edi, edx
shl edi, 7
xor ebx, edx
shr edx, 0x18
mov dword [0xbb9a1c], ebx
or edx, edi
not ebx
imul ebx, edx
mov edx, dword [0xbb9a20]
mov edi, ebx
shl edi, 8
xor edx, ebx
shr ebx, 0x17
mov dword [0xbb9a20], edx
or ebx, edi
not edx
imul edx, ebx
xor dword [0xbb9a24], edx
mov dl, 1
shl dl, cl
or byte [0xbb9a2b], dl
mov eax, fcn.0080f730
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.0080f730
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 [0xbb9a2b], al
push 0xc8
push 0xbb9a00
push esi
call fcn.0078de60
add esp, 0xc
xor ebx, ebx
jmp 0x819fb1
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.00799570
add esp, 8
test eax, eax
mov ebx, 0
je 0x819fb1
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 0x819f78
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 0x819f4e
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.0098a5f0
add esp, 0xc
test edi, edi
jle 0x819fb1
add edi, ebp
lea eax, [ebp + ebp*8]
inc ebp
cmp ebp, edi
mov dword [ebx + eax*8 + 0x34], 0xffffffff
jl 0x819fa0
mov eax, ebx
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret