Function at 0x80da80
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, dword [0xbd33e0]
xor ebp, ebp
xor eax, esp
mov dword [esp + 0xc], eax
cmp dword [edx + 0x38], 0
je 0x80de0a
mov esi, dword [ecx]
mov ebx, ecx
mov edi, edx
mov ecx, esi
call fcn.007d0920
test eax, eax
jne 0x80de0a
mov eax, dword [edi + 0x3c]
lea ecx, [esi + 0x168]
mov edx, dword [eax]
call fcn.007cb020
test eax, eax
jne 0x80dc8e
mov edx, fcn.007d4250
xor eax, eax
movzx esi, byte [0xbb8b77]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt esi, eax
jb 0x80dc71
mov al, byte [0xbb8b77]
mov esi, ebx
xor ecx, ecx
cmp edx, 2
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ebx + ecx*2]
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb8b77], ah
jne 0x80db02
mov ecx, fcn.007d4250
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, [ebx + edx*2]
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x80db7c
mov ebx, esi
xor eax, eax
cmp ecx, 2
movzx esi, byte [0xbb8b77]
sete al
mov edx, eax
xor edx, 1
lea eax, [edx + eax*2]
or al, 4
movzx eax, al
bt esi, eax
jae 0x80db56
jmp 0x80dc71
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbb8b77]
mov ebx, esi
sete al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x80dc46
mov eax, fcn.007d4250
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 0xa45d9b51
lea ecx, [eax + ecx*2 + 0x904]
mov eax, dword [0xbb8b60]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb8b60], eax
not eax
imul edx, eax
mov eax, dword [0xbb8b64]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb8b64], eax
or ebx, edx
not eax
mov edx, dword [0xbb8b68]
imul eax, ebx
lea ebx, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb8b68], edx
or ebx, eax
not edx
mov eax, dword [0xbb8b6c]
imul edx, ebx
lea ebx, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb8b6c], eax
or ebx, edx
not eax
mov dl, 1
imul eax, ebx
shl dl, cl
mov ebx, esi
xor dword [0xbb8b70], eax
or byte [0xbb8b77], dl
mov eax, fcn.007d4250
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [eax + ecx*2]
mov al, 0xfe
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb8b77], al
mov eax, dword [edi + 0x3c]
push dword [eax]
push 0xbb8b60
push ebx
call fcn.0078de60
add esp, 0xc
mov ebp, 1
jmp 0x80de0a
mov dword [esp + 8], 0
mov ecx, esi
lea esi, [esp + 8]
mov edx, edi
mov ebp, dword [eax]
mov dword [esp + 4], ecx
push esi
push dword [ebp + 8]
push eax
call fcn.007cfdd0
add esp, 0xc
mov edi, dword [esp + 8]
mov ebp, eax
test eax, eax
je 0x80ddff
mov edx, fcn.00819c60
xor eax, eax
movzx esi, byte [0xbb8b7f]
and edx, 1
inc edx
mov ecx, edx
xor ecx, fcn.00819c60
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt esi, eax
jb 0x80dded
mov al, byte [0xbb8b7f]
mov dword [esp], ebx
mov esi, edx
xor ebx, ebx
mov ah, 1
xor esi, fcn.00819c60
sete bl
mov ecx, ebx
xor ecx, 3
lea ecx, [ecx + ebx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb8b7f], ah
jne 0x80dcf5
mov ecx, fcn.00819c60
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov esi, ecx
xor esi, fcn.00819c60
sete dl
mov ebx, edx
xor ebx, 3
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x80dd6f
mov ebx, dword [esp]
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbb8b7f]
xor edx, fcn.00819c60
sete al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt esi, eax
jae 0x80dd4c
jmp 0x80dded
xor eax, eax
xor ecx, fcn.00819c60
movzx edx, byte [0xbb8b7f]
mov ebx, dword [esp]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x80ddc5
mov eax, fcn.00819c60
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.00819c60
sete cl
mov eax, ecx
xor eax, 0x826f7f23
lea ecx, [eax + ecx*2 + 0x130]
mov al, 1
xor dword [0xbb8b78], ecx
and cl, 7
shl al, cl
or byte [0xbb8b7f], al
mov eax, fcn.00819c60
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.00819c60
sete cl
mov eax, ecx
xor eax, 3
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb8b7f], al
push edi
push 0xbb8b78
push ebx
call fcn.0078de60
add esp, 0xc
mov dword [ebx + 0xc], ebp
mov ecx, dword [esp + 4]
mov edx, edi
call fcn.00780810
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00989fe9
mov eax, ebp
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret