Function at 0x9722b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov edx, fcn.0096ce40
xor eax, eax
movzx esi, byte [0xbd0ec7]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt esi, eax
jb 0x972410
mov al, byte [0xbd0ec7]
xor ecx, ecx
cmp edx, 2
mov ah, 1
sete cl
mov ebx, ecx
not ebx
lea ecx, [ebx + ecx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbd0ec7], ah
jne 0x9722e8
mov ecx, fcn.0096ce40
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
mov ebx, edx
not ebx
lea edx, [ebx + edx*2]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x97235d
xor eax, eax
cmp ecx, 2
movzx esi, byte [0xbd0ec7]
sete al
mov edx, eax
not edx
lea eax, [edx + eax*2]
and al, 7
movzx eax, al
bt esi, eax
jae 0x972338
jmp 0x972410
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbd0ec7]
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x9723e6
mov eax, fcn.0096ce40
xor ecx, ecx
mov esi, dword [0xbd0eb8]
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 0xb7accf77
lea ecx, [eax + ecx*2 + 0x110]
xor esi, ecx
mov edx, ecx
mov dword [0xbd0eb8], esi
shr edx, 0x1f
not esi
mov edi, dword [0xbd0ebc]
or edx, ecx
and cl, 7
imul edx, esi
lea esi, [edx + edx]
xor edi, edx
shr edx, 0x1e
mov dword [0xbd0ebc], edi
or esi, edx
not edi
mov dl, 1
imul edi, esi
shl dl, cl
xor dword [0xbd0ec0], edi
or byte [0xbd0ec7], dl
mov eax, fcn.0096ce40
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
not eax
lea ecx, [eax + ecx*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbd0ec7], al
mov esi, fcn.00972c20
mov edi, fcn.00972c20
xor eax, eax
movzx edx, byte [0xbd0ed7]
movzx ebp, word [esp + 0x14]
or esi, 2
xor edi, 2
mov ecx, esi
add ecx, edi
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x972574
mov al, byte [0xbd0ed7]
mov ebx, esi
xor ecx, ecx
mov ah, 1
add ebx, edi
sete cl
mov ebx, ecx
xor ebx, 3
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbd0ed7], ah
jne 0x97244b
mov ecx, fcn.00972c20
mov esi, fcn.00972c20
xor edx, edx
movzx eax, al
or ecx, 2
xor esi, 2
mov edi, ecx
add edi, esi
sete dl
mov ebx, edx
xor ebx, 3
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x9724c0
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbd0ed7]
add edx, esi
sete al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt edi, eax
jae 0x97249e
jmp 0x972574
xor eax, eax
add ecx, esi
movzx edx, byte [0xbd0ed7]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x972548
mov eax, fcn.00972c20
mov ecx, fcn.00972c20
xor edx, edx
mov esi, dword [0xbd0ec8]
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 0x7e878b4b
lea ecx, [eax + edx*2 + 0x948]
xor esi, ecx
mov edx, ecx
mov dword [0xbd0ec8], esi
shr edx, 0x1f
not esi
mov edi, dword [0xbd0ecc]
or edx, ecx
and cl, 7
imul edx, esi
lea esi, [edx + edx]
xor edi, edx
shr edx, 0x1e
mov dword [0xbd0ecc], edi
or esi, edx
not edi
mov dl, 1
imul edi, esi
shl dl, cl
xor dword [0xbd0ed0], edi
or byte [0xbd0ed7], dl
mov eax, fcn.00972c20
mov ecx, fcn.00972c20
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 3
lea ecx, [eax + edx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbd0ed7], al
xor eax, eax
cmp bp, 0x17
mov ecx, 0xb6b424
cmovne ecx, eax
mov eax, 0xb6b418
cmp bp, 0x18
cmovne eax, ecx
pop esi
pop edi
pop ebx
pop ebp
ret