Function at 0x82cd80
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov edi, edx
mov esi, ecx
call fcn.0082db10
test eax, eax
je 0x82cfb0
mov edx, 0x7cfb90
xor eax, eax
movzx ebx, byte [0xbba403]
not edx
and edx, 1
mov ecx, edx
add ecx, 0x7cfb90
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt ebx, eax
jb 0x82cfa4
mov al, byte [0xbba403]
mov ebx, edx
xor ecx, ecx
mov ah, 1
add ebx, 0x7cfb90
sete cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba403], ah
jne 0x82cdce
mov ecx, 0x7cfb90
xor edx, edx
movzx eax, al
not ecx
and ecx, 1
mov ebx, ecx
add ebx, 0x7cfb90
sete dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x82ce57
mov edx, ecx
xor eax, eax
movzx ebx, byte [0xbba403]
add edx, 0x7cfb90
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2 + 4]
and al, 7
movzx eax, al
bt ebx, eax
jae 0x82ce2b
jmp 0x82cfa4
xor eax, eax
add ecx, 0x7cfb90
movzx edx, byte [0xbba403]
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x82cf77
mov eax, 0x7cfb90
xor ecx, ecx
not eax
and eax, 1
add eax, 0x7cfb90
sete cl
mov eax, ecx
xor eax, 0x4576db45
lea ecx, [eax + ecx*2 + 0x854]
mov eax, dword [0xbba3e0]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbba3e0], eax
not eax
imul edx, eax
mov eax, dword [0xbba3e4]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbba3e4], eax
or ebx, edx
not eax
mov edx, dword [0xbba3e8]
imul eax, ebx
lea ebx, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbba3e8], edx
or ebx, eax
not edx
mov eax, dword [0xbba3ec]
imul edx, ebx
lea ebx, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbba3ec], eax
or ebx, edx
not eax
mov edx, dword [0xbba3f0]
imul eax, ebx
mov ebx, eax
shl ebx, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbba3f0], edx
or eax, ebx
not edx
imul edx, eax
mov eax, dword [0xbba3f4]
mov ebx, edx
shl ebx, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbba3f4], eax
or edx, ebx
not eax
imul eax, edx
mov edx, dword [0xbba3f8]
mov ebx, eax
shl ebx, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbba3f8], edx
or eax, ebx
not edx
imul edx, eax
xor dword [0xbba3fc], edx
mov dl, 1
shl dl, cl
or byte [0xbba403], dl
mov eax, 0x7cfb90
xor ecx, ecx
not eax
and eax, 1
add eax, 0x7cfb90
sete cl
mov eax, ecx
xor eax, 5
lea ecx, [eax + ecx*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba403], al
push dword [edi]
push 0xbba3e0
jmp 0x82d1c8
mov ecx, dword [esp + 0x10]
xor eax, eax
test ecx, ecx
jne 0x82d1d6
cmp dword [edi + 0xc], 0
je 0x82d1d6
mov edx, fcn.007a7a50
movzx ecx, byte [0xbba43b]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x82d1c1
mov al, byte [0xbba43b]
cmp edx, 1
mov ah, 1
seta cl
not cl
and cl, 3
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba43b], ah
jne 0x82cff5
mov ecx, fcn.007a7a50
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
not dl
and dl, 3
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x82d055
cmp ecx, 1
movzx edx, byte [0xbba43b]
seta al
not al
and al, 3
movzx eax, al
bt edx, eax
jae 0x82d037
jmp 0x82d1c1
cmp ecx, 1
movzx ecx, byte [0xbba43b]
seta al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x82d19e
mov eax, fcn.007a7a50
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
mov eax, dword [0xbba410]
seta cl
xor ecx, 0xcff38ebb
add ecx, 0x208
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbba410], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbba414]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbba414], eax
or ebx, edx
not eax
mov edx, dword [0xbba418]
imul eax, ebx
lea ebx, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbba418], edx
or ebx, eax
not edx
mov eax, dword [0xbba41c]
imul edx, ebx
lea ebx, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbba41c], eax
or ebx, edx
not eax
mov edx, dword [0xbba420]
imul eax, ebx
mov ebx, eax
shl ebx, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbba420], edx
or eax, ebx
not edx
imul edx, eax
mov eax, dword [0xbba424]
mov ebx, edx
shl ebx, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbba424], eax
or edx, ebx
not eax
imul eax, edx
mov edx, dword [0xbba428]
mov ebx, eax
shl ebx, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbba428], edx
or eax, ebx
not edx
imul edx, eax
mov eax, dword [0xbba42c]
mov ebx, edx
shl ebx, 7
xor eax, edx
shr edx, 0x18
mov dword [0xbba42c], eax
or edx, ebx
not eax
imul eax, edx
mov edx, dword [0xbba430]
mov ebx, eax
shl ebx, 8
xor edx, eax
shr eax, 0x17
mov dword [0xbba430], edx
or eax, ebx
not edx
imul edx, eax
xor dword [0xbba434], edx
mov dl, 1
shl dl, cl
or byte [0xbba43b], dl
mov eax, fcn.007a7a50
imul eax, eax
and eax, 3
cmp eax, 1
mov al, 0xfe
seta cl
not cl
and cl, 3
xor cl, 7
rol al, cl
and byte [0xbba43b], al
push dword [edi]
push 0xbba410
push esi
call fcn.0078de60
add esp, 0xc
mov eax, 1
pop esi
pop edi
pop ebx
ret