Function at 0x800a50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov ebx, dword [ecx]
mov esi, edx
mov edi, ecx
inc dword [ebx + 0x38]
call fcn.00802220
dec dword [ebx + 0x38]
mov ebp, 1
test eax, eax
jne 0x800e0b
xor ebp, ebp
cmp dword [esi + 0x38], 0
jne 0x800e0b
movzx eax, word [esi + 0x2a]
lea ecx, [esi + 0x2a]
test ax, ax
jg 0x800e0b
jns 0x800c84
mov edx, fcn.007de470
xor eax, eax
movzx ebx, byte [0xbb11f3]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt ebx, eax
jb 0x800c6a
mov al, byte [0xbb11f3]
xor ecx, ecx
cmp edx, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 3
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb11f3], ah
jne 0x800ac7
mov ecx, fcn.007de470
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
xor ebx, 3
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x800b34
xor eax, eax
cmp ecx, 1
movzx ebx, byte [0xbb11f3]
seta al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt ebx, eax
jae 0x800b13
jmp 0x800c6a
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb11f3]
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x800c42
mov eax, fcn.007de470
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0x2d389dcb
lea ecx, [eax + ecx*2 + 0x40]
mov eax, dword [0xbb11d0]
xor eax, ecx
mov dword [0xbb11d0], eax
not eax
mov edx, dword [0xbb11d4]
imul eax, ecx
and cl, 7
lea ebx, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb11d4], edx
or ebx, eax
not edx
mov eax, dword [0xbb11d8]
imul edx, ebx
lea ebx, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb11d8], eax
or ebx, edx
not eax
mov edx, dword [0xbb11dc]
imul eax, ebx
lea ebx, [eax*8]
xor edx, eax
shr eax, 0x1c
mov dword [0xbb11dc], edx
or ebx, eax
not edx
mov eax, dword [0xbb11e0]
imul edx, ebx
mov ebx, edx
shl ebx, 4
xor eax, edx
shr edx, 0x1b
mov dword [0xbb11e0], eax
or edx, ebx
not eax
imul eax, edx
mov edx, dword [0xbb11e4]
mov ebx, eax
shl ebx, 5
xor edx, eax
shr eax, 0x1a
mov dword [0xbb11e4], edx
or eax, ebx
not edx
mov ebp, dword [0xbb11e8]
imul edx, eax
mov ebx, edx
shl ebx, 6
xor ebp, edx
shr edx, 0x19
mov dword [0xbb11e8], ebp
or edx, ebx
not ebp
imul ebp, edx
mov dl, 1
xor dword [0xbb11ec], ebp
shl dl, cl
or byte [0xbb11f3], dl
mov eax, fcn.007de470
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 3
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb11f3], al
push dword [esi]
push 0xbb11d0
push edi
call fcn.00782570
add esp, 0xc
mov ebp, 1
jmp 0x800e0b
mov edx, dword [esi + 0xc]
mov dword [esp + 8], ecx
mov ecx, ebx
push 0
call fcn.007f3ec0
add esp, 4
test eax, eax
jne 0x800ca5
mov ebp, 1
jmp 0x800de7
mov dl, byte [edi + 0xc8]
mov byte [edi + 0xc8], 0
mov ebp, eax
mov ecx, dword [edi + 0x28]
mov byte [esp + 7], dl
mov edx, dword [ebp + 0x20]
mov dword [esp], ecx
mov ecx, edi
call fcn.007ff8d0
mov eax, dword [esp + 8]
mov edx, ebp
mov ecx, edi
mov word [eax], 0xffff
inc dword [ebx + 0x118]
mov word [ebx + 0x11c], 0
mov dword [esp + 0xc], ebp
mov eax, dword [ebx + 0x150]
mov dword [ebx + 0x150], 0
mov dword [esp + 0x10], eax
push 0x40
call fcn.007f6070
add esp, 4
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp]
mov edx, eax
test edx, edx
mov dword [ebx + 0x150], ebp
mov dword [edi + 0x28], ecx
jne 0x800d2c
mov eax, dword [esp + 8]
mov ebp, 1
mov word [eax], 0
jmp 0x800da9
mov dword [esp], edx
mov edx, dword [esi + 0x18]
test edx, edx
je 0x800d89
lea eax, [esi + 4]
mov ecx, edi
push eax
push dword [esp + 0xc]
call fcn.00801990
add esp, 8
xor ebp, ebp
cmp byte [ebx + 0x51], 0
je 0x800d55
mov edx, dword [esp]
jmp 0x800da9
cmp dword [edi + 0x24], 0
mov edx, dword [esp]
jne 0x800da9
mov eax, dword [esp + 8]
movsx edx, word [eax]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x1c]
cmp dword [ecx], edx
je 0x800d75
mov edx, dword [esp]
jmp 0x800da9
mov edx, esi
mov ecx, edi
push 0x40
push eax
call fcn.008025c0
add esp, 8
mov edx, dword [esp]
jmp 0x800da9
mov edx, dword [esp]
xor ebp, ebp
movzx eax, word [edx + 0x2a]
mov word [esi + 0x2a], ax
mov eax, dword [edx + 4]
mov dword [esi + 4], eax
mov word [edx + 0x2a], 0
mov dword [edx + 4], 0
movzx eax, word [esi + 0x2a]
mov ecx, ebx
mov word [esi + 0x2c], ax
call fcn.00774e50
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.007c0190
dec dword [ebx + 0x118]
je 0x800dcf
xor eax, eax
jmp 0x800dd6
movzx eax, word [ebx + 0x11e]
mov cl, byte [esp + 7]
mov word [ebx + 0x11c], ax
mov byte [edi + 0xc8], cl
mov eax, dword [esi + 0x48]
or word [eax + 0x4e], 2
cmp byte [ebx + 0x51], 0
je 0x800e0b
mov ecx, ebx
mov edx, esi
call fcn.007c7990
mov dword [esi + 4], 0
mov word [esi + 0x2a], 0
mov eax, ebp
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret