Function at 0x805fc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [esp + 0x30]
mov esi, ecx
mov ecx, dword [ecx]
mov edi, edx
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov eax, ebp
shl eax, 4
add eax, dword [ecx + 0x10]
mov ecx, esi
mov dword [esp + 4], eax
call fcn.007ebd10
mov ebx, eax
mov ecx, esi
mov edx, 1
push ebp
call fcn.007f56e0
add esp, 4
cmp dword [edi + 0x38], 0
je 0x806014
mov ecx, ebx
mov edx, 0xa2
call fcn.007ebd30
mov ecx, esi
mov edx, edi
mov dword [esp + 8], ebx
mov dword [esp], edi
call fcn.008065e0
test eax, eax
je 0x80603a
mov edi, eax
mov ecx, esi
mov edx, edi
call fcn.00806650
mov edi, dword [edi + 0x20]
test edi, edi
jne 0x80602a
mov edi, dword [esp]
mov ebx, dword [esp + 4]
test byte [edi + 0x24], 8
je 0x8062c8
mov edx, fcn.008176e0
xor eax, eax
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
movzx ecx, byte [0xbb1dd3]
and al, 7
movzx eax, al
bt ecx, eax
jb 0x8062b6
mov al, byte [0xbb1dd3]
xor ebx, ebx
cmp edx, 1
mov ah, 1
seta bl
mov ecx, ebx
not ecx
lea ecx, [ecx + ebx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1dd3], ah
jne 0x80607f
mov ecx, fcn.008176e0
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
not ebx
lea edx, [ebx + edx*2]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8060fb
mov edi, dword [esp]
mov ebx, dword [esp + 4]
xor eax, eax
cmp ecx, 1
seta al
mov edx, eax
not edx
lea eax, [edx + eax*2]
movzx edx, byte [0xbb1dd3]
and al, 7
movzx eax, al
bt edx, eax
jae 0x8060d6
jmp 0x8062b6
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb1dd3]
mov ebx, dword [esp + 4]
seta al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x806289
mov eax, fcn.008176e0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0xfd3c2aa7
lea ecx, [eax + ecx*2 + 0x210]
mov eax, dword [0xbb1da0]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb1da0], eax
not eax
imul edx, eax
mov eax, dword [0xbb1da4]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb1da4], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb1da8]
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb1da8], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb1dac]
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb1dac], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [str.___M4]
mov edi, eax
shl edi, 4
xor edx, eax
shr eax, 0x1b
mov dword [str.___M4], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb1db4]
mov edi, edx
shl edi, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbb1db4], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb1db8]
mov edi, eax
shl edi, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbb1db8], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb1dbc]
mov edi, edx
shl edi, 7
xor eax, edx
shr edx, 0x18
mov dword [0xbb1dbc], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb1dc0]
mov edi, eax
shl edi, 8
xor edx, eax
shr eax, 0x17
mov dword [0xbb1dc0], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb1dc4]
mov edi, edx
shl edi, 9
xor eax, edx
shr edx, 0x16
mov dword [0xbb1dc4], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb1dc8]
mov edi, eax
shl edi, 0xa
xor edx, eax
shr eax, 0x15
mov dword [0xbb1dc8], edx
or eax, edi
not edx
imul edx, eax
xor dword [0xbb1dcc], edx
mov dl, 1
shl dl, cl
or byte [0xbb1dd3], dl
mov eax, fcn.008176e0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta 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 [0xbb1dd3], al
mov edi, dword [esp]
push dword [edi]
push dword [ebx]
push 0xbb1da0
push esi
call fcn.007f6930
add esp, 0x10
mov eax, fcn.007cbff0
mov edx, 3
movzx ecx, byte [0xbb1df3]
sub edx, eax
mov eax, edx
xor eax, fcn.007cbff0
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x806426
mov al, byte [0xbb1df3]
mov ecx, edx
mov ah, 1
xor ecx, fcn.007cbff0
setne cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1df3], ah
jne 0x8062f8
mov edx, fcn.007cbff0
mov ecx, 3
movzx eax, al
sub ecx, edx
mov edx, ecx
xor edx, fcn.007cbff0
setne dl
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x806361
mov eax, ecx
movzx edx, byte [0xbb1df3]
xor eax, fcn.007cbff0
setne al
or al, 4
movzx eax, al
bt edx, eax
jae 0x806341
jmp 0x806426
xor ecx, fcn.007cbff0
movzx ecx, byte [0xbb1df3]
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x806401
mov eax, fcn.007cbff0
mov edx, 3
xor ecx, ecx
sub edx, eax
mov eax, dword [0xbb1de0]
xor edx, fcn.007cbff0
sete cl
xor ecx, 0x11b8dbc1
add ecx, 0x844
xor eax, ecx
mov dword [0xbb1de0], eax
not eax
mov edx, dword [0xbb1de4]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb1de4], edx
or edi, eax
not edx
mov eax, dword [0xbb1de8]
imul edx, edi
lea edi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb1de8], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
mov edi, dword [esp]
shl dl, cl
xor dword [0xbb1dec], eax
or byte [0xbb1df3], dl
mov eax, fcn.007cbff0
mov ecx, 3
sub ecx, eax
mov al, 0xfe
xor ecx, fcn.007cbff0
setne cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb1df3], al
mov edx, fcn.0079f850
movzx ecx, byte [0xbb1e3f]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x806542
mov al, byte [0xbb1e3f]
cmp edx, 2
mov ah, 1
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb1e3f], ah
jne 0x806451
mov ecx, fcn.0079f850
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8064ab
cmp ecx, 2
movzx edx, byte [0xbb1e3f]
sete al
or al, 4
movzx eax, al
bt edx, eax
jae 0x80648f
jmp 0x806542
xor edx, edx
cmp ecx, 2
movzx ecx, byte [0xbb1e3f]
sete dl
or edx, 0xfb1357b4
mov eax, edx
and al, 5
movzx eax, al
bt ecx, eax
jb 0x806521
mov edi, 0xbb1e00
xor eax, eax
mov dword [esp + 0xc], ebp
mov ebx, dword [edi]
mov ecx, eax
mov ebp, edx
inc eax
shl ebp, cl
xor cl, 0x1f
xor ebx, edx
shr edx, cl
mov dword [edi], ebx
or edx, ebp
not ebx
add edi, 4
imul edx, ebx
cmp eax, 0xf
jne 0x8064d7
mov eax, fcn.0079f850
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 1
sete cl
or cl, 4
shl al, cl
or byte [0xbb1e3f], al
mov ebp, dword [esp + 0xc]
mov edi, dword [esp]
mov ebx, dword [esp + 4]
mov eax, fcn.0079f850
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb1e3f], al
push dword [edi]
push 0xbb1de0
push dword [ebx]
push 0xbb1e00
push esi
call fcn.007f6930
add esp, 0x14
cmp dword [esp + 0x10], 0
jne 0x80656f
cmp dword [edi + 0x38], 0
jne 0x806579
mov ecx, esi
mov edx, edi
call fcn.00806e30
cmp dword [edi + 0x38], 0
mov ecx, dword [esp + 8]
je 0x80659e
mov ecx, dword [esp + 8]
mov edx, 0xa4
push 0
push dword [edi]
push 0
push 0
push ebp
call fcn.007ebd50
add esp, 0x14
mov ecx, esi
call fcn.007f0b40
mov ecx, dword [esp + 8]
mov edx, 0x8f
push 0
push dword [edi]
push 0
push 0
push ebp
call fcn.007ebd50
add esp, 0x14
mov ecx, esi
mov edx, ebp
call fcn.007f6a00
mov ecx, dword [esp + 0x14]
mov edx, ebp
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
jmp 0x806ea0
push ebp
push ebx
push edi
push esi
mov eax, dword [ecx + 0x10]
mov esi, edx
mov edi, ecx
shl esi, 4
mov eax, dword [eax + esi + 0xc]
movzx ecx, word [eax + 0x4e]
test cl, 2
je 0x806efd
mov ebp, dword [eax + 0x10]
test ebp, ebp
je 0x806ef3
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0xc], 0
je 0x806ee1
mov ecx, edi
mov edx, ebx
call fcn.007c7990
mov dword [ebx + 4], 0
mov word [ebx + 0x2a], 0
mov ebp, dword [ebp]
test ebp, ebp
jne 0x806ec2
mov eax, dword [edi + 0x10]
mov eax, dword [eax + esi + 0xc]
movzx ecx, word [eax + 0x4e]
and ecx, 0xfffd
mov word [eax + 0x4e], cx
pop esi
pop edi
pop ebx
pop ebp
ret