Function at 0x823380
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [esp + 0x2c]
mov edi, ecx
mov ebx, edx
mov ecx, dword [eax + 0x14]
mov ebp, dword [eax + 0x28]
cmp ecx, 1
mov dword [esp + 4], ecx
jne 0x8233ea
movsx eax, word [ebx + 0x28]
test eax, eax
jns 0x8233b7
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], edi
mov dword [esp], 0
jmp 0x82341e
test ebp, ebp
je 0x823551
mov ecx, dword [ebx + 4]
lea eax, [eax + eax*4]
mov edx, ebp
mov ecx, dword [ecx + eax*4]
call fcn.00777e20
xor ecx, ecx
test eax, eax
je 0x823905
mov dword [esp + 0x10], ebp
mov dword [esp], 0
mov dword [esp + 0xc], edi
jmp 0x82341a
mov esi, dword [esp + 0x34]
test esi, esi
je 0x8233a6
lea edx, [ecx*4]
mov ecx, dword [edi]
push 0
call fcn.0078dcd0
add esp, 4
test eax, eax
je 0x823900
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov dword [esi], eax
mov ecx, dword [esp + 4]
mov dword [esp + 0x14], ebx
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x82367b
mov ebp, fcn.00809a50
imul ebp, ebp
and ebp, 3
movzx eax, word [ebx + 0x32]
cmp ecx, eax
jne 0x823670
cmp byte [ebx + 0x36], 0
je 0x823670
cmp dword [ebx + 0x24], 0
jne 0x823670
cmp dword [esp + 0x10], 0
je 0x82351b
xor edx, edx
test ecx, ecx
jle 0x823668
mov eax, dword [ebx + 4]
movsx edi, word [eax + edx*2]
test edi, edi
js 0x823668
xor eax, eax
cmp ebp, 2
mov dword [esp + 8], edx
sete al
movzx edx, byte [0xbac233]
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8235e1
mov al, byte [0xbac233]
xor edx, edx
cmp ebp, 2
sete dl
mov ecx, edx
xor ecx, 1
lea ecx, [edx + ecx*2 + 6]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbac233], dl
jne 0x8234ab
xor ecx, ecx
cmp ebp, 2
movzx eax, al
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 6]
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x823558
xor eax, eax
cmp ebp, 2
movzx edx, byte [0xbac233]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jae 0x8234f4
jmp 0x8235e1
mov eax, dword [ebx + 0x38]
and eax, 3
cmp eax, 2
jne 0x823670
test ecx, ecx
jle 0x82354b
cmp dword [esp], 0
je 0x82354b
mov edx, dword [esp]
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + eax*8 + 0x24]
mov dword [edx + eax*4], ecx
inc eax
cmp eax, dword [esp + 4]
jne 0x823539
mov eax, dword [esp + 0x30]
mov dword [eax], ebx
xor ecx, ecx
jmp 0x823905
xor eax, eax
cmp ebp, 2
movzx edx, byte [0xbac233]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8235c0
xor eax, eax
cmp ebp, 2
mov esi, dword [str.2_p0]
sete al
mov ecx, eax
not ecx
and ecx, 0x211
lea ecx, [eax + ecx*2 + 0x713e5c4e]
mov edx, ecx
xor esi, ecx
shr edx, 0x1f
mov dword [str.2_p0], esi
not esi
or edx, ecx
and cl, 7
imul edx, esi
xor dword [0xbac22c], edx
mov dl, 1
shl dl, cl
or byte [0xbac233], dl
xor eax, eax
cmp ebp, 2
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 6]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbac233], al
mov eax, dword [esp + 0x14]
lea edi, [edi + edi*4]
mov ecx, dword [esp + 8]
mov esi, dword [eax + 4]
mov eax, str.2_p0
mov edx, dword [esi + edi*4 + 8]
test edx, edx
cmove edx, eax
mov eax, dword [ebx + 0x20]
mov ecx, dword [eax + ecx*4]
call fcn.00777e20
test eax, eax
je 0x823616
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
jmp 0x823668
mov esi, dword [esi + edi*4]
xor edi, edi
mov eax, dword [esp + 0x2c]
mov edx, esi
mov ecx, dword [eax + edi*8 + 0x28]
call fcn.00777e20
test eax, eax
jne 0x823646
mov ecx, dword [esp]
test ecx, ecx
je 0x82364d
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 8]
mov eax, dword [eax + edi*8 + 0x24]
mov dword [ecx + edx*4], eax
jmp 0x82364d
inc edi
cmp edi, dword [esp + 4]
jl 0x82361b
mov ecx, dword [esp + 4]
cmp edi, ecx
jne 0x82365b
mov edx, dword [esp + 8]
jmp 0x823668
mov edx, dword [esp + 8]
inc edx
cmp edx, ecx
jl 0x82346d
cmp edx, ecx
je 0x82354b
mov ebx, dword [ebx + 0x14]
test ebx, ebx
jne 0x823438
mov edi, dword [esp + 0xc]
mov ebp, dword [esp]
cmp byte [edi + 0x92], 0
jne 0x8238f7
mov edx, fcn.007c01a0
xor eax, eax
movzx esi, byte [0xbb2b53]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt esi, eax
jb 0x8238dc
mov al, byte [0xbb2b53]
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 [0xbb2b53], ah
jne 0x8236bf
mov ecx, fcn.007c01a0
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 0x82372c
xor eax, eax
cmp ecx, 1
movzx esi, byte [0xbb2b53]
seta al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt esi, eax
jae 0x82370b
jmp 0x8238dc
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb2b53]
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x8238b4
mov eax, fcn.007c01a0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0xd16846db
lea ecx, [eax + ecx*2 + 0x1248]
mov eax, dword [0xbb2b20]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb2b20], eax
not eax
imul edx, eax
mov eax, dword [0xbb2b24]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb2b24], eax
or esi, edx
not eax
mov edx, dword [0xbb2b28]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb2b28], edx
or esi, eax
not edx
mov eax, dword [0xbb2b2c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb2b2c], eax
or esi, edx
not eax
mov edx, dword [0xbb2b30]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb2b30], edx
or eax, esi
not edx
imul edx, eax
mov eax, dword [0xbb2b34]
mov esi, edx
shl esi, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbb2b34], eax
or edx, esi
not eax
imul eax, edx
mov edx, dword [0xbb2b38]
mov esi, eax
shl esi, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbb2b38], edx
or eax, esi
not edx
imul edx, eax
mov eax, dword [0xbb2b3c]
mov esi, edx
shl esi, 7
xor eax, edx
shr edx, 0x18
mov dword [0xbb2b3c], eax
or edx, esi
not eax
imul eax, edx
mov edx, dword [0xbb2b40]
mov esi, eax
shl esi, 8
xor edx, eax
shr eax, 0x17
mov dword [0xbb2b40], edx
or eax, esi
not edx
mov ebx, dword [0xbb2b44]
imul edx, eax
mov esi, edx
shl esi, 9
xor ebx, edx
shr edx, 0x16
mov dword [0xbb2b44], ebx
or edx, esi
not ebx
imul ebx, edx
mov edx, dword [0xbb2b48]
mov esi, ebx
shl esi, 0xa
xor edx, ebx
shr ebx, 0x15
mov dword [0xbb2b48], edx
or ebx, esi
not edx
imul edx, ebx
xor dword [0xbb2b4c], edx
mov dl, 1
shl dl, cl
or byte [0xbb2b53], dl
mov eax, fcn.007c01a0
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 [0xbb2b53], al
mov eax, dword [esp + 0x2c]
mov ecx, eax
mov eax, dword [eax]
push dword [ecx + 8]
push dword [eax]
push 0xbb2b20
push edi
call fcn.00782570
add esp, 0x10
mov ecx, dword [edi]
mov edx, ebp
call fcn.00774f10
mov ecx, 1
mov eax, ecx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret