Function at 0x811070
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
test byte [edx + 0x28], 4
mov dword [esp + 4], ecx
je 0x8113b2
mov eax, dword [edx + 0x40]
mov edi, edx
test eax, eax
je 0x8113b2
cmp dword [eax], 0
jle 0x8113b2
mov ebx, dword [edi + 0x10]
xor esi, esi
mov dword [esp], 0
mov dword [esp + 8], eax
movsx eax, word [ebx + 0x2a]
cmp esi, eax
jge 0x8110c9
mov ecx, dword [ebx + 4]
lea edx, [esi + esi*4]
test byte [ecx + edx*4 + 0x10], 2
jne 0x811301
inc esi
cmp esi, eax
jl 0x8110b6
mov edx, 0x788f60
xor eax, eax
movzx esi, byte [0xbb237b]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt esi, eax
jb 0x8112e6
mov al, byte [0xbb237b]
mov esi, ebx
xor ecx, ecx
cmp edx, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb237b], ah
jne 0x8110fb
mov ecx, 0x788f60
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x81116a
mov ebx, esi
xor eax, eax
cmp ecx, 1
movzx esi, byte [0xbb237b]
seta al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2]
bt esi, eax
jae 0x811149
jmp 0x8112e6
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb237b]
mov ebx, esi
seta al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x8112be
mov eax, 0x788f60
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0xe11dc695
lea ecx, [eax + ecx*2 + 0x1050]
mov eax, dword [0xbb2350]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb2350], eax
not eax
imul edx, eax
mov eax, dword [0xbb2354]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb2354], eax
or esi, edx
not eax
mov edx, dword [0xbb2358]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb2358], edx
or esi, eax
not edx
mov eax, dword [0xbb235c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb235c], eax
or esi, edx
not eax
mov edx, dword [0xbb2360]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb2360], edx
or eax, esi
not edx
mov ebp, dword [0xbb2364]
imul edx, eax
mov esi, edx
shl esi, 5
xor ebp, edx
shr edx, 0x1a
mov dword [0xbb2364], ebp
or edx, esi
not ebp
imul ebp, edx
mov edx, dword [0xbb2368]
mov esi, ebp
shl esi, 6
xor edx, ebp
shr ebp, 0x19
mov dword [0xbb2368], edx
or ebp, esi
not edx
mov edi, dword [0xbb236c]
imul edx, ebp
mov esi, edx
shl esi, 7
xor edi, edx
shr edx, 0x18
mov dword [0xbb236c], edi
or edx, esi
not edi
imul edi, edx
mov edx, dword [0xbb2370]
mov esi, edi
shl esi, 8
xor edx, edi
shr edi, 0x17
mov dword [0xbb2370], edx
or edi, esi
not edx
imul edx, edi
xor dword [0xbb2374], edx
mov dl, 1
shl dl, cl
or byte [0xbb237b], dl
mov eax, 0x788f60
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 5
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb237b], al
push dword [esp]
push dword [ebx]
push 0xbb2350
push dword [esp + 0x10]
call fcn.00782570
add esp, 0x20
jmp 0x8113b5
mov eax, dword [esp + 4]
mov edx, 0xa4
mov ecx, dword [eax]
push 0
push 0
call fcn.007d8c70
add esp, 8
mov ecx, dword [esp + 8]
test eax, eax
je 0x8113b2
mov ebp, eax
mov eax, dword [edi + 0x2c]
mov dword [esp + 0xc], ebx
mov dword [ebp + 0x1c], eax
mov eax, dword [esp]
mov word [ebp + 0x20], si
mov dword [ebp + 0x2c], ebx
mov ebx, dword [esp + 4]
lea eax, [eax + eax*4]
mov edx, dword [ecx + eax*4 + 4]
mov ecx, dword [ebx]
push 0
call fcn.007f0780
add esp, 4
mov ecx, ebx
mov edx, 0xab
push 0
push eax
call fcn.007cff00
add esp, 8
mov ecx, ebx
mov edx, 0x35
push eax
push ebp
call fcn.007cff00
add esp, 8
test byte [edi + 0x24], 8
mov ebp, eax
je 0x811386
mov edx, dword [edi + 0x2c]
mov ecx, ebp
call fcn.00802a60
mov ecx, dword [esp + 0x24]
inc esi
mov edx, ebp
push 1
call fcn.00816190
add esp, 4
mov eax, dword [esp]
mov ebx, dword [esp + 0xc]
mov ecx, eax
inc ecx
mov eax, ecx
mov eax, dword [esp + 8]
mov dword [esp], ecx
cmp ecx, dword [eax]
jl 0x8110ab
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret