Function at 0x800700
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov eax, dword [esp + 0x10]
mov edi, edx
mov esi, ecx
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx]
cmp dword [eax + 4], 0
je 0x800abc
cmp byte [ecx + 0xa5], 0
je 0x8008c9
mov edx, fcn.007a9d00
xor eax, eax
movzx edi, byte [0xbb8007]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
bt edi, eax
jb 0x8008b1
mov al, byte [0xbb8007]
xor ecx, ecx
cmp edx, 2
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb8007], ah
jne 0x800758
mov ecx, fcn.007a9d00
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8007c5
xor eax, eax
cmp ecx, 2
movzx edi, byte [0xbb8007]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2]
bt edi, eax
jae 0x8007a4
jmp 0x8008b1
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbb8007]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
bt edx, eax
jb 0x800889
mov ecx, fcn.007a9d00
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete al
mov ecx, eax
not ecx
and ecx, 0x8b1
lea ecx, [eax + ecx*2 + 0x5f68b308]
mov eax, dword [0xbb7ff0]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb7ff0], eax
not eax
imul edx, eax
mov eax, dword [0xbb7ff4]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb7ff4], eax
or edi, edx
not eax
mov edx, dword [0xbb7ff8]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb7ff8], edx
or edi, eax
not edx
mov eax, dword [0xbb7ffc]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb7ffc], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
shl dl, cl
xor dword [0xbb8000], eax
or byte [0xbb8007], dl
mov eax, fcn.007a9d00
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb8007], al
push 0xbb7ff0
push esi
call fcn.0078de60
add esp, 8
mov eax, 0xffffffff
jmp 0x800ac5
mov dword [edx], eax
mov edx, edi
call fcn.00801140
test eax, eax
jns 0x800ac5
mov edx, fcn.00807650
xor eax, eax
movzx ebx, byte [0xbb802b]
not edx
and edx, 1
mov ecx, edx
add ecx, fcn.00807650
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt ebx, eax
jb 0x800aa6
mov al, byte [0xbb802b]
mov ebx, edx
xor ecx, ecx
mov ah, 1
add ebx, fcn.00807650
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 [0xbb802b], ah
jne 0x800912
mov ecx, fcn.00807650
xor edx, edx
movzx eax, al
not ecx
and ecx, 1
mov ebx, ecx
add ebx, fcn.00807650
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 0x800995
mov edx, ecx
xor eax, eax
movzx ebx, byte [0xbb802b]
add edx, fcn.00807650
sete al
mov edx, eax
not edx
lea eax, [edx + eax*2]
and al, 7
movzx eax, al
bt ebx, eax
jae 0x80096b
jmp 0x800aa6
xor eax, eax
add ecx, fcn.00807650
movzx edx, byte [0xbb802b]
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x800a7b
mov eax, fcn.00807650
xor ecx, ecx
not eax
and eax, 1
add eax, fcn.00807650
sete cl
mov eax, ecx
xor eax, 0x5557d6e7
lea ecx, [eax + ecx*2 + 0x1210]
mov eax, dword [0xbb8010]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb8010], eax
not eax
imul edx, eax
mov eax, dword [0xbb8014]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb8014], eax
or ebx, edx
not eax
mov edx, dword [0xbb8018]
imul eax, ebx
lea ebx, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb8018], edx
or ebx, eax
not edx
mov eax, dword [0xbb801c]
imul edx, ebx
lea ebx, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb801c], eax
or ebx, edx
not eax
mov edx, dword [0xbb8020]
imul eax, ebx
mov ebx, eax
shl ebx, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb8020], edx
or eax, ebx
not edx
imul edx, eax
xor dword [0xbb8024], edx
mov dl, 1
shl dl, cl
or byte [0xbb802b], dl
mov eax, fcn.00807650
xor ecx, ecx
not eax
and eax, 1
add eax, fcn.00807650
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 [0xbb802b], al
push edi
push 0xbb8010
push esi
call fcn.0078de60
add esp, 0xc
mov eax, 0xffffffff
jmp 0x800ac5
movzx eax, byte [ecx + 0xa4]
mov dword [edx], edi
pop esi
pop edi
pop ebx
ret