Function at 0x802f00
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebp, dword [esp + 0x18]
xor eax, eax
test ebp, ebp
je 0x8031af
mov esi, dword [ecx]
mov edi, ecx
cmp byte [esi + 0x51], 0
jne 0x8031af
cmp byte [edi + 0xc8], 1
ja 0x8031af
mov ecx, dword [ebp]
mov dword [esp], edi
cmp ecx, dword [esi + 0x74]
jle 0x803156
mov edx, fcn.007a3650
xor eax, eax
movzx esi, byte [0xbb1383]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt esi, eax
jb 0x80313d
mov al, byte [0xbb1383]
xor ecx, ecx
cmp edx, 2
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 1
lea ebx, [ecx + ebx*2]
mov cl, 7
or bl, 4
sub cl, bl
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1383], ah
jne 0x802f72
mov ecx, fcn.007a3650
xor edx, edx
mov ah, 7
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2]
or dl, 4
sub ah, dl
movzx edx, ah
movzx eax, al
bt eax, edx
jae 0x802fef
mov edi, dword [esp]
xor eax, eax
cmp ecx, 2
movzx esi, byte [0xbb1383]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2]
or al, 4
movzx eax, al
bt esi, eax
jae 0x802fc9
jmp 0x80313d
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbb1383]
mov edi, dword [esp]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x803112
mov ecx, fcn.007a3650
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete al
mov ecx, eax
not ecx
and ecx, 0x901
lea ecx, [eax + ecx*2 + 0x7e6962dc]
mov eax, dword [0xbb1360]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb1360], eax
not eax
imul edx, eax
mov eax, dword [0xbb1364]
lea esi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb1364], eax
or esi, edx
not eax
mov edx, dword [0xbb1368]
imul eax, esi
lea esi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb1368], edx
or esi, eax
not edx
mov eax, dword [0xbb136c]
imul edx, esi
lea esi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb136c], eax
or esi, edx
not eax
mov edx, dword [0xbb1370]
imul eax, esi
mov esi, eax
shl esi, 4
xor edx, eax
shr eax, 0x1b
mov dword [0xbb1370], edx
or eax, esi
not edx
mov ebx, dword [0xbb1374]
imul edx, eax
mov esi, edx
shl esi, 5
xor ebx, edx
shr edx, 0x1a
mov dword [0xbb1374], ebx
or edx, esi
not ebx
imul ebx, edx
mov edx, dword [0xbb1378]
mov esi, ebx
shl esi, 6
xor edx, ebx
shr ebx, 0x19
mov dword [0xbb1378], edx
or ebx, esi
not edx
imul edx, ebx
xor dword [0xbb137c], edx
mov dl, 1
shl dl, cl
or byte [0xbb1383], dl
mov eax, fcn.007a3650
xor ecx, ecx
mov dl, 0xfe
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 1
lea eax, [ecx + eax*2]
mov cl, 7
or al, 4
sub cl, al
rol dl, cl
and byte [0xbb1383], dl
push dword [esp + 0x1c]
push 0xbb1360
push edi
call fcn.00782570
add esp, 0xc
mov eax, 1
jmp 0x8031af
test ecx, ecx
jle 0x8031af
mov edx, dword [edx + 0x1c]
lea esi, [ebp + 4]
xor edi, edi
movzx eax, word [esi + 0x10]
test eax, eax
je 0x8031a5
mov ebx, dword [edx]
cmp ebx, eax
jge 0x803189
mov ecx, dword [esp]
mov edx, dword [esp + 0x1c]
inc edi
push ebx
push edi
call fcn.00802d20
add esp, 8
mov eax, 1
jmp 0x8031af
mov ecx, dword [esp]
dec eax
mov ebx, edx
push 0
push dword [esp + 0x20]
push dword [esi]
push eax
call fcn.007fc730
mov edx, ebx
add esp, 0x10
mov ecx, dword [ebp]
inc edi
add esi, 0x14
xor eax, eax
cmp edi, ecx
jl 0x803162
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret