Function at 0x805a70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [0xbcbae0]
mov edi, fcn.007c7b20
mov esi, ecx
and edi, 1
inc edi
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, edi
xor eax, fcn.007c7b20
movzx ecx, byte [0xbb1d63]
sete al
not al
add al, 0x80
and al, 7
movzx eax, al
bt ecx, eax
jb 0x805be8
mov al, byte [0xbb1d63]
mov ecx, edi
mov ah, 1
xor ecx, fcn.007c7b20
sete cl
not cl
add cl, 0x80
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1d63], ah
jne 0x805ab5
mov ecx, fcn.007c7b20
and ecx, 1
inc ecx
mov edi, ecx
xor edi, fcn.007c7b20
movzx edi, al
sete ah
not ah
add ah, 0x80
and ah, 7
xor ah, 7
movzx eax, ah
bt edi, eax
jae 0x805b29
mov eax, ecx
movzx edi, byte [0xbb1d63]
xor eax, fcn.007c7b20
sete al
not al
add al, 0x80
and al, 7
movzx eax, al
bt edi, eax
jae 0x805b05
jmp 0x805be8
xor ecx, fcn.007c7b20
movzx ecx, byte [0xbb1d63]
sete al
not al
add al, 0x80
and al, 7
movzx eax, al
bt ecx, eax
jb 0x805bc2
mov eax, fcn.007c7b20
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.007c7b20
mov eax, dword [0xbb1d50]
sete cl
xor ecx, 0x23e13e2f
add ecx, 0x280
xor eax, ecx
mov dword [0xbb1d50], eax
not eax
mov edi, dword [0xbb1d54]
imul eax, ecx
and cl, 7
lea ebx, [eax + eax]
xor edi, eax
shr eax, 0x1e
mov dword [0xbb1d54], edi
or ebx, eax
not edi
mov eax, dword [0xbb1d58]
imul edi, ebx
lea ebx, [edi*4]
xor eax, edi
shr edi, 0x1d
mov dword [0xbb1d58], eax
or ebx, edi
not eax
imul eax, ebx
xor dword [0xbb1d5c], eax
mov ah, 1
shl ah, cl
or byte [0xbb1d63], ah
mov eax, fcn.007c7b20
and eax, 1
inc eax
xor eax, fcn.007c7b20
mov al, 0xfe
sete cl
not cl
add cl, 0x80
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb1d63], al
mov eax, fcn.00553ca0
mov edi, 3
movzx ecx, byte [0xbb1d93]
sub edi, eax
mov eax, edi
xor eax, fcn.00553ca0
sete al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x805db5
mov al, byte [0xbb1d93]
mov ecx, edi
mov ah, 1
xor ecx, fcn.00553ca0
sete cl
or cl, 2
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1d93], ah
jne 0x805c18
mov edi, fcn.00553ca0
mov ecx, 3
sub ecx, edi
mov edi, ecx
xor edi, fcn.00553ca0
sete ah
or ah, 2
xor ah, 7
movzx edi, ah
movzx eax, al
bt eax, edi
jae 0x805c81
mov eax, ecx
movzx edi, byte [0xbb1d93]
xor eax, fcn.00553ca0
sete al
or al, 2
movzx eax, al
bt edi, eax
jae 0x805c61
jmp 0x805db5
xor ecx, fcn.00553ca0
movzx ecx, byte [0xbb1d93]
sete al
or al, 2
movzx eax, al
bt ecx, eax
jb 0x805d90
mov eax, fcn.00553ca0
mov edi, 3
xor ecx, ecx
sub edi, eax
mov eax, dword [0xbb1d70]
xor edi, fcn.00553ca0
sete cl
or ecx, 0x268fa3ca
add ecx, 0x860
xor eax, ecx
mov dword [0xbb1d70], eax
not eax
mov edi, dword [0xbb1d74]
imul eax, ecx
and cl, 7
lea ebx, [eax + eax]
xor edi, eax
shr eax, 0x1e
mov dword [0xbb1d74], edi
or ebx, eax
not edi
mov eax, dword [0xbb1d78]
imul edi, ebx
lea ebx, [edi*4]
xor eax, edi
shr edi, 0x1d
mov dword [0xbb1d78], eax
or ebx, edi
not eax
mov edi, dword [0xbb1d7c]
imul eax, ebx
lea ebx, [eax*8]
xor edi, eax
shr eax, 0x1c
mov dword [0xbb1d7c], edi
or ebx, eax
not edi
mov eax, dword [0xbb1d80]
imul edi, ebx
mov ebx, edi
shl ebx, 4
xor eax, edi
shr edi, 0x1b
mov dword [0xbb1d80], eax
or edi, ebx
not eax
mov ebp, dword [0xbb1d84]
imul eax, edi
mov ebx, eax
shl ebx, 5
xor ebp, eax
shr eax, 0x1a
mov dword [0xbb1d84], ebp
or eax, ebx
not ebp
imul ebp, eax
mov eax, dword [0xbb1d88]
mov ebx, ebp
shl ebx, 6
xor eax, ebp
shr ebp, 0x19
mov dword [0xbb1d88], eax
or ebp, ebx
not eax
imul eax, ebp
xor dword [0xbb1d8c], eax
mov ah, 1
shl ah, cl
or byte [0xbb1d93], ah
mov eax, fcn.00553ca0
mov ecx, 3
sub ecx, eax
mov al, 0xfe
xor ecx, fcn.00553ca0
sete cl
or cl, 2
xor cl, 7
rol al, cl
and byte [0xbb1d93], al
mov eax, dword [esi]
shl edx, 4
mov ebx, dword [esp + 0x30]
mov edi, esp
mov eax, dword [eax + 0x10]
mov ebp, dword [eax + edx]
push 1
push 0xbb1d50
push edi
push 0x18
call fcn.00777b20
add esp, 0x10
mov ecx, dword [esi]
mov edx, edi
push ebp
call fcn.0078bd40
add esp, 4
test eax, eax
je 0x805dfe
push dword [esp + 0x34]
push ebx
push edi
push ebp
push 0xbb1d70
push esi
call fcn.007f6930
add esp, 0x18
push 2
push 0xbb1d50
push edi
push 0x18
call fcn.00777b20
add esp, 0x10
mov ecx, dword [esi]
mov edx, edi
push ebp
call fcn.0078bd40
add esp, 4
test eax, eax
je 0x805e36
push dword [esp + 0x34]
push ebx
push edi
push ebp
push 0xbb1d70
push esi
call fcn.007f6930
add esp, 0x18
push 3
push 0xbb1d50
push edi
push 0x18
call fcn.00777b20
add esp, 0x10
mov ecx, dword [esi]
mov edx, edi
push ebp
call fcn.0078bd40
add esp, 4
test eax, eax
je 0x805e6e
push dword [esp + 0x34]
push ebx
push edi
push ebp
push 0xbb1d70
push esi
call fcn.007f6930
add esp, 0x18
push 4
push 0xbb1d50
push edi
push 0x18
call fcn.00777b20
add esp, 0x10
mov ecx, dword [esi]
mov edx, edi
push ebp
call fcn.0078bd40
add esp, 4
test eax, eax
je 0x805ea6
push dword [esp + 0x34]
push ebx
push edi
push ebp
push 0xbb1d70
push esi
call fcn.007f6930
add esp, 0x18
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00980459
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret