Function at 0x8051f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, fcn.007fd7e0
mov dword [esp], ecx
xor eax, eax
mov ebp, edx
imul edi, edi
movzx edx, byte [0xbb84c3]
and edi, 3
cmp edi, 3
sete al
mov ecx, eax
xor ecx, 3
lea eax, [eax + ecx*2]
bt edx, eax
jb 0x8053de
mov al, byte [0xbb84c3]
xor ecx, ecx
cmp edi, 3
mov ah, 1
sete cl
mov ebx, ecx
not ebx
and ebx, 3
lea ecx, [ecx + ebx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb84c3], ah
jne 0x80522a
mov ecx, fcn.007fd7e0
xor ebx, ebx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete bl
mov edi, ebx
not edi
and edi, 3
lea ebx, [ebx + edi*2]
xor bl, 7
movzx edi, bl
bt eax, edi
jae 0x80529b
xor eax, eax
cmp ecx, 3
movzx edi, byte [0xbb84c3]
sete al
mov ebx, eax
xor ebx, 3
lea eax, [eax + ebx*2]
bt edi, eax
jae 0x80527a
jmp 0x8053de
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbb84c3]
sete al
mov ecx, eax
xor ecx, 3
lea eax, [eax + ecx*2]
bt edx, eax
jb 0x8053b4
mov ecx, fcn.007fd7e0
xor eax, eax
mov dl, 1
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x823
lea ecx, [eax + ecx*2 + 0x60b0d158]
mov eax, dword [0xbb84a0]
mov edi, ecx
shr edi, 0x1f
or edi, ecx
xor eax, ecx
and cl, 7
shl dl, cl
mov dword [0xbb84a0], eax
not eax
imul edi, eax
mov eax, dword [0xbb84a4]
lea ebx, [edi + edi]
xor eax, edi
shr edi, 0x1e
mov dword [0xbb84a4], eax
or edi, ebx
not eax
imul eax, edi
mov edi, dword [0xbb84a8]
lea ebx, [eax*4]
xor edi, eax
shr eax, 0x1d
mov dword [0xbb84a8], edi
or eax, ebx
not edi
imul edi, eax
mov eax, dword [0xbb84ac]
lea ebx, [edi*8]
xor eax, edi
shr edi, 0x1c
mov dword [0xbb84ac], eax
or edi, ebx
not eax
imul eax, edi
mov edi, dword [0xbb84b0]
mov ebx, eax
shl ebx, 4
xor edi, eax
shr eax, 0x1b
mov dword [0xbb84b0], edi
or eax, ebx
not edi
imul edi, eax
mov eax, dword [0xbb84b4]
mov ebx, edi
shl ebx, 5
xor eax, edi
shr edi, 0x1a
mov dword [0xbb84b4], eax
or edi, ebx
not eax
mov esi, dword [0xbb84b8]
imul eax, edi
mov ebx, eax
shl ebx, 6
xor esi, eax
shr eax, 0x19
mov dword [0xbb84b8], esi
or eax, ebx
not esi
imul esi, eax
xor dword [0xbb84bc], esi
or byte [0xbb84c3], dl
mov ecx, fcn.007fd7e0
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 3
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb84c3], al
mov edi, 0x784110
mov eax, 0x784110
movzx edx, byte [0xbb8527]
and edi, 1
xor edi, eax
xor eax, eax
cmp edi, 0xffffffff
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x805578
mov al, byte [0xbb8527]
xor ecx, ecx
cmp edi, 0xffffffff
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb8527], ah
jne 0x805413
mov ecx, 0x784110
mov edi, 0x784110
xor edx, edx
movzx eax, al
and ecx, 1
xor ecx, edi
cmp ecx, 0xffffffff
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x805487
xor eax, eax
cmp ecx, 0xffffffff
movzx esi, byte [0xbb8527]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 2]
bt esi, eax
jae 0x805465
jmp 0x805578
xor eax, eax
cmp ecx, 0xffffffff
movzx edx, byte [0xbb8527]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x80554b
mov ecx, 0x784110
mov eax, 0x784110
and ecx, 1
xor ecx, eax
xor eax, eax
cmp ecx, 0xffffffff
sete al
mov ecx, eax
not ecx
and ecx, 0x829
lea ecx, [eax + ecx*2 + 0x129a7052]
mov eax, dword [0xbb8510]
xor eax, ecx
mov dword [0xbb8510], eax
not eax
mov edx, dword [0xbb8514]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb8514], edx
or edi, eax
not edx
mov eax, dword [0xbb8518]
imul edx, edi
lea edi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb8518], eax
or edi, edx
not eax
mov edx, dword [0xbb851c]
imul eax, edi
lea edi, [eax*8]
xor edx, eax
shr eax, 0x1c
mov dword [0xbb851c], edx
or edi, eax
not edx
mov al, 1
imul edx, edi
shl al, cl
xor dword [0xbb8520], edx
or byte [0xbb8527], al
mov ecx, 0x784110
mov eax, 0x784110
and ecx, 1
xor ecx, eax
xor eax, eax
cmp ecx, 0xffffffff
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb8527], al
mov eax, dword [ebp + 0x18]
mov esi, 0xbb84d0
test al, 0x20
jne 0x80559c
mov esi, 0xbb84f0
test al, 4
jne 0x80559c
test al, 8
mov eax, 0xbb84a0
mov esi, 0xbb8510
cmove esi, eax
mov edi, fcn.007abe50
xor eax, eax
movzx edx, byte [0xbb84e7]
imul edi, edi
and edi, 3
cmp edi, 1
seta al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x80571d
mov al, byte [0xbb84e7]
xor ecx, ecx
cmp edi, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb84e7], ah
jne 0x8055cc
mov ecx, fcn.007abe50
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
xor ebx, 1
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x805639
xor eax, eax
cmp ecx, 1
movzx edi, byte [0xbb84e7]
seta al
mov edx, eax
xor edx, 1
lea eax, [edx + eax*2]
bt edi, eax
jae 0x805618
jmp 0x80571d
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb84e7]
seta al
mov ecx, eax
xor ecx, 1
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x8056f5
mov eax, fcn.007abe50
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0x6580a9
lea ecx, [eax + ecx*2 + 0xa28]
mov eax, dword [0xbb84d0]
xor eax, ecx
mov dword [0xbb84d0], eax
not eax
mov edx, dword [0xbb84d4]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb84d4], edx
or edi, eax
not edx
mov eax, dword [0xbb84d8]
imul edx, edi
lea edi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb84d8], eax
or edi, edx
not eax
mov edx, dword [str.0_X]
imul eax, edi
lea edi, [eax*8]
xor edx, eax
shr eax, 0x1c
mov dword [str.0_X], edx
or edi, eax
not edx
mov al, 1
imul edx, edi
shl al, cl
xor dword [0xbb84e0], edx
or byte [0xbb84e7], al
mov eax, fcn.007abe50
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 1
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb84e7], al
mov edi, fcn.007881b0
mov ebx, fcn.007881b0
movzx ecx, byte [0xbb8507]
or edi, 2
xor ebx, 2
mov eax, edi
add eax, ebx
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x80589e
mov al, byte [0xbb8507]
mov ecx, edi
mov dl, 1
add ecx, ebx
sete cl
not cl
and cl, 3
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb8507], dl
jne 0x805750
mov ecx, fcn.007881b0
mov edi, fcn.007881b0
movzx eax, al
or ecx, 2
xor edi, 2
mov edx, ecx
add edx, edi
sete dl
not dl
and dl, 3
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8057b8
mov eax, ecx
movzx edx, byte [0xbb8507]
add eax, edi
sete al
not al
and al, 3
movzx eax, al
bt edx, eax
jae 0x805799
jmp 0x80589e
add ecx, edi
movzx ecx, byte [0xbb8507]
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x805877
mov eax, fcn.007881b0
mov edx, fcn.007881b0
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov eax, dword [0xbb84f0]
sete cl
xor ecx, 0x6d63abb3
add ecx, 0x98
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbb84f0], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbb84f4]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb84f4], eax
or edi, edx
not eax
mov edx, dword [0xbb84f8]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb84f8], edx
or edi, eax
not edx
mov eax, dword [0xbb84fc]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb84fc], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
shl dl, cl
xor dword [0xbb8500], eax
or byte [0xbb8507], dl
mov eax, fcn.007881b0
mov ecx, fcn.007881b0
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
not cl
and cl, 3
xor cl, 7
rol al, cl
and byte [0xbb8507], al
mov ebp, fcn.007bd380
xor eax, eax
movzx edx, byte [0xbb854b]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
imul ebp, ebp
and ebp, 3
cmp ebp, 3
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x805a73
mov al, byte [0xbb854b]
xor ecx, ecx
cmp ebp, 3
sete cl
mov edx, ecx
xor edx, 5
lea ecx, [edx + ecx*2 + 4]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb854b], dl
jne 0x8058dc
mov ecx, fcn.007bd380
xor ebx, ebx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete bl
mov edx, ebx
xor edx, 5
lea edx, [edx + ebx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x80595b
mov ebx, dword [esp + 0x18]
xor eax, eax
cmp ecx, 3
movzx ebp, byte [0xbb854b]
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2 + 4]
and al, 7
movzx eax, al
bt ebp, eax
jae 0x805934
jmp 0x805a73
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbb854b]
mov ebx, dword [esp + 0x18]
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x805a47
mov eax, fcn.007bd380
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 0x6934a835
lea ecx, [eax + ecx*2 + 0x284]
mov eax, dword [0xbb8530]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb8530], eax
not eax
imul edx, eax
mov eax, dword [0xbb8534]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb8534], eax
or ebx, edx
not eax
mov edx, dword [0xbb8538]
imul eax, ebx
lea ebx, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb8538], edx
or ebx, eax
not edx
mov eax, dword [0xbb853c]
imul edx, ebx
lea ebx, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb853c], eax
or ebx, edx
not eax
mov edx, dword [0xbb8540]
imul eax, ebx
mov ebx, eax
shl ebx, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb8540], edx
or eax, ebx
not edx
mov ebx, dword [esp + 0x18]
imul edx, eax
xor dword [0xbb8544], edx
mov dl, 1
shl dl, cl
or byte [0xbb854b], dl
mov eax, fcn.007bd380
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
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 [0xbb854b], al
push esi
push ebx
push 0xbb8530
push dword [esp + 0xc]
call fcn.0078de60
add esp, 0x10
test edi, edi
je 0x805a8d
mov byte [edi], 0x77
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret