Function at 0x805620
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov edi, edx
mov edx, fcn.0098216c
mov esi, ecx
movzx ecx, byte [0xbb1d33]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x80574a
mov al, byte [0xbb1d33]
cmp edx, 2
mov ah, 1
sete cl
or cl, 2
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1d33], ah
jne 0x805653
mov ecx, fcn.0098216c
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
or dl, 2
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8056ad
cmp ecx, 2
movzx edx, byte [0xbb1d33]
sete al
or al, 2
movzx eax, al
bt edx, eax
jae 0x805691
jmp 0x80574a
cmp ecx, 2
movzx edx, byte [0xbb1d33]
sete al
or al, 2
movzx eax, al
bt edx, eax
jb 0x805729
mov eax, fcn.0098216c
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
mov eax, dword [0xbb1d24]
sete cl
or ecx, 0x75147f4a
add ecx, 0x100
xor eax, ecx
mov edx, ecx
mov dword [0xbb1d24], eax
shr edx, 0x1f
not eax
mov ebp, dword [0xbb1d28]
or edx, ecx
and cl, 7
imul edx, eax
lea ebx, [edx + edx]
xor ebp, edx
shr edx, 0x1e
mov dword [0xbb1d28], ebp
or edx, ebx
not ebp
imul ebp, edx
mov dl, 1
xor dword [0xbb1d2c], ebp
shl dl, cl
or byte [0xbb1d33], dl
mov eax, fcn.0098216c
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 0xfe
sete cl
or cl, 2
xor cl, 7
rol al, cl
and byte [0xbb1d33], al
mov ebp, dword [edi]
push 7
push 0xbb1d24
push ebp
call fcn.00777e50
add esp, 0xc
test eax, eax
jne 0x805a45
mov edx, 0x77d180
xor eax, eax
movzx esi, byte [0xbb1d3f]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jb 0x8058ae
mov al, byte [0xbb1d3f]
xor ebx, ebx
cmp edx, 2
mov ah, 1
sete bl
mov ecx, ebx
not ecx
lea ecx, [ebx + ecx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1d3f], ah
jne 0x805799
mov ecx, 0x77d180
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
mov ebx, edx
not ebx
lea edx, [edx + ebx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x805811
xor eax, eax
cmp ecx, 2
movzx esi, byte [0xbb1d3f]
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2 + 4]
and al, 7
movzx eax, al
bt esi, eax
jae 0x8057eb
jmp 0x8058ae
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbb1d3f]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x805883
mov ecx, 0x77d180
xor eax, eax
mov esi, dword [0xbb1d34]
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete al
mov ecx, eax
not ecx
and ecx, 0xb3
lea ecx, [eax + ecx*2 - 0x4f7920b4]
mov edx, ecx
xor esi, ecx
shr edx, 0x1f
mov dword [0xbb1d34], esi
not esi
or edx, ecx
and cl, 7
imul edx, esi
xor dword [0xbb1d38], edx
mov dl, 1
shl dl, cl
or byte [0xbb1d3f], dl
mov eax, 0x77d180
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb1d3f], al
add ebp, 7
push 4
push 0xbb1d34
push ebp
call fcn.00777e50
add esp, 0xc
test eax, eax
je 0x805a5d
mov edx, fcn.00818840
xor eax, eax
movzx esi, byte [0xbb1d4f]
and edx, 1
inc edx
mov ecx, edx
xor ecx, fcn.00818840
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt esi, eax
jb 0x805a2a
mov al, byte [0xbb1d4f]
mov esi, edx
xor ecx, ecx
mov ah, 1
xor esi, fcn.00818840
sete cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1d4f], ah
jne 0x8058fc
mov ecx, fcn.00818840
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov esi, ecx
xor esi, fcn.00818840
sete dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x805976
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbb1d4f]
xor edx, fcn.00818840
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2]
bt esi, eax
jae 0x805950
jmp 0x805a2a
xor eax, eax
xor ecx, fcn.00818840
movzx edx, byte [0xbb1d4f]
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x805a02
mov ecx, fcn.00818840
xor eax, eax
mov esi, dword [0xbb1d40]
and ecx, 1
inc ecx
xor ecx, fcn.00818840
sete al
mov ecx, eax
xor ecx, 0x8d2b640d
lea edx, [ecx + eax*2]
lea ecx, [ecx + eax*2 + 0x10c0]
xor esi, ecx
or edx, 0x10c1
and cl, 7
mov dword [0xbb1d40], esi
not esi
mov edi, dword [0xbb1d44]
imul edx, esi
lea esi, [edx + edx]
xor edi, edx
shr edx, 0x1e
mov dword [0xbb1d44], edi
or esi, edx
not edi
mov dl, 1
imul edi, esi
shl dl, cl
xor dword [0xbb1d48], edi
or byte [0xbb1d4f], dl
mov eax, fcn.00818840
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.00818840
sete cl
mov eax, ecx
xor eax, 5
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb1d4f], al
push 0xa
push 0xbb1d40
push ebp
call fcn.00777e50
add esp, 0xc
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
jmp 0x805a5f
test byte [edi + 0x25], 0x10
je 0x805a5d
mov ecx, esi
call fcn.007f5910
mov ecx, eax
mov eax, 1
test ecx, ecx
jne 0x805a5f
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret