Function at 0x80c2b0
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.0080da80
dec dword [ebx + 0x38]
mov ebp, 1
test eax, eax
jne 0x80c66b
xor ebp, ebp
cmp dword [esi + 0x38], 0
jne 0x80c66b
movzx eax, word [esi + 0x2a]
lea ecx, [esi + 0x2a]
test ax, ax
jg 0x80c66b
jns 0x80c4e4
mov edx, fcn.007e9d00
xor eax, eax
movzx ebx, byte [0xbb8b53]
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 0x80c4ca
mov al, byte [0xbb8b53]
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 [0xbb8b53], ah
jne 0x80c327
mov ecx, fcn.007e9d00
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 0x80c394
xor eax, eax
cmp ecx, 1
movzx ebx, byte [0xbb8b53]
seta al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt ebx, eax
jae 0x80c373
jmp 0x80c4ca
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb8b53]
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x80c4a2
mov eax, fcn.007e9d00
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 [0xbb8b30]
xor eax, ecx
mov dword [0xbb8b30], eax
not eax
mov edx, dword [0xbb8b34]
imul eax, ecx
and cl, 7
lea ebx, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb8b34], edx
or ebx, eax
not edx
mov eax, dword [0xbb8b38]
imul edx, ebx
lea ebx, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb8b38], eax
or ebx, edx
not eax
mov edx, dword [0xbb8b3c]
imul eax, ebx
lea ebx, [eax*8]
xor edx, eax
shr eax, 0x1c
mov dword [0xbb8b3c], edx
or ebx, eax
not edx
mov eax, dword [0xbb8b40]
imul edx, ebx
mov ebx, edx
shl ebx, 4
xor eax, edx
shr edx, 0x1b
mov dword [0xbb8b40], eax
or edx, ebx
not eax
imul eax, edx
mov edx, dword [0xbb8b44]
mov ebx, eax
shl ebx, 5
xor edx, eax
shr eax, 0x1a
mov dword [0xbb8b44], edx
or eax, ebx
not edx
mov ebp, dword [0xbb8b48]
imul edx, eax
mov ebx, edx
shl ebx, 6
xor ebp, edx
shr edx, 0x19
mov dword [0xbb8b48], ebp
or edx, ebx
not ebp
imul ebp, edx
mov dl, 1
xor dword [0xbb8b4c], ebp
shl dl, cl
or byte [0xbb8b53], dl
mov eax, fcn.007e9d00
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 [0xbb8b53], al
push dword [esi]
push 0xbb8b30
push edi
call fcn.0078de60
add esp, 0xc
mov ebp, 1
jmp 0x80c66b
mov edx, dword [esi + 0xc]
mov dword [esp + 8], ecx
mov ecx, ebx
push 0
call fcn.007ff740
add esp, 4
test eax, eax
jne 0x80c505
mov ebp, 1
jmp 0x80c647
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.0080b130
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.008018d0
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 0x80c58c
mov eax, dword [esp + 8]
mov ebp, 1
mov word [eax], 0
jmp 0x80c609
mov dword [esp], edx
mov edx, dword [esi + 0x18]
test edx, edx
je 0x80c5e9
lea eax, [esi + 4]
mov ecx, edi
push eax
push dword [esp + 0xc]
call fcn.0080d1f0
add esp, 8
xor ebp, ebp
cmp byte [ebx + 0x51], 0
je 0x80c5b5
mov edx, dword [esp]
jmp 0x80c609
cmp dword [edi + 0x24], 0
mov edx, dword [esp]
jne 0x80c609
mov eax, dword [esp + 8]
movsx edx, word [eax]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x1c]
cmp dword [ecx], edx
je 0x80c5d5
mov edx, dword [esp]
jmp 0x80c609
mov edx, esi
mov ecx, edi
push 0x40
push eax
call fcn.0080de20
add esp, 8
mov edx, dword [esp]
jmp 0x80c609
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.00780750
mov edx, dword [esp + 0xc]
mov ecx, ebx
call fcn.007cba90
dec dword [ebx + 0x118]
je 0x80c62f
xor eax, eax
jmp 0x80c636
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 0x80c66b
mov ecx, ebx
mov edx, esi
call fcn.007d3290
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