Function at 0x7969a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
movzx esi, byte [esp + 0x1c]
mov eax, 2
cmp esi, 8
mov ebx, esi
cmove ebx, eax
cmp esi, 4
cmove ebx, eax
lea eax, [ebx - 1]
cmp eax, 3
jb 0x7969db
mov ecx, 0xa72
call fcn.00780040
mov edi, 0x15
jmp 0x796c41
mov edi, edx
mov dword [esp + 4], ecx
mov edx, ebx
push 0
push edi
call fcn.007d3a60
add esp, 8
test eax, eax
je 0x796bfa
cmp dword [eax + 0xc], 0
mov ebp, eax
je 0x796bfa
mov ecx, dword [esp + 4]
cmp dword [ecx + 0xb0], 0
je 0x796b83
mov edx, fcn.0098b4c0
xor eax, eax
mov ebp, ecx
movzx esi, byte [0xbbe00b]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jb 0x796b69
mov al, byte [0xbbe00b]
xor ecx, ecx
cmp edx, 3
mov ah, 1
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbbe00b], ah
jne 0x796a4a
mov ecx, fcn.0098b4c0
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
not ebx
lea edx, [edx + ebx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x796ac2
xor eax, eax
cmp ecx, 3
movzx esi, byte [0xbbe00b]
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jae 0x796a9c
jmp 0x796b69
xor eax, eax
cmp ecx, 3
movzx esi, byte [0xbbe00b]
sete al
mov ecx, eax
not ecx
and ecx, 0x603
lea edx, [eax + ecx*2 - 0x3b3baf44]
mov eax, edx
and al, 7
movzx eax, al
bt esi, eax
jb 0x796b3e
mov esi, 0xbbdfc0
xor eax, eax
mov edi, dword [esi]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor edi, edx
shr edx, cl
mov dword [esi], edi
or edx, ebx
not edi
add esi, 4
imul edx, edi
cmp eax, 0x12
jne 0x796af5
mov eax, fcn.0098b4c0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 1
and cl, 7
shl al, cl
or byte [0xbbe00b], al
mov eax, fcn.0098b4c0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbbe00b], al
push 0xbbdfc0
push 5
push ebp
call fcn.00787000
add esp, 0xc
mov edi, 5
jmp 0x796c41
xor edx, edx
call fcn.0078f410
movzx eax, byte [ebp + 4]
and eax, 0xfffffff7
cmp ebx, eax
jne 0x796bfa
mov eax, dword [esp + 4]
mov edx, edi
lea ecx, [eax + 0x194]
call fcn.007cb020
mov cl, byte [ebp + 4]
cmp byte [eax + 4], cl
jne 0x796bcf
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x796bc5
push dword [eax + 8]
mov dword [esp + 4], eax
call ecx
mov eax, dword [esp + 4]
add esp, 4
mov dword [eax + 0xc], 0
mov cl, byte [ebp + 4]
cmp byte [eax + 0x18], cl
jne 0x796bf5
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x796beb
push dword [eax + 0x1c]
mov dword [esp + 4], eax
call ecx
mov eax, dword [esp + 4]
add esp, 4
mov dword [eax + 0x20], 0
mov cl, byte [ebp + 4]
cmp byte [eax + 0x2c], cl
je 0x796c4b
mov ebp, dword [esp + 4]
movzx edx, bl
mov ecx, ebp
push 1
push edi
call fcn.007d3a60
add esp, 8
test eax, eax
jne 0x796c19
mov edi, 7
jmp 0x796c41
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
and esi, 8
or ebx, esi
mov dword [eax + 0xc], edx
mov dword [eax + 8], edi
mov dword [eax + 0x10], ecx
mov ecx, ebp
xor edx, edx
mov byte [eax + 4], bl
xor edi, edi
call fcn.007870c0
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [eax + 0x38]
test ecx, ecx
je 0x796c5e
push dword [eax + 0x30]
mov ebp, eax
call ecx
mov eax, ebp
add esp, 4
mov dword [eax + 0x34], 0
jmp 0x796bfa