Function at 0x811820
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.007f7590
mov ebx, eax
mov ecx, esi
mov edx, 1
push ebp
call fcn.00800f40
add esp, 4
cmp dword [edi + 0x38], 0
je 0x811874
mov ecx, ebx
mov edx, 0xa2
call fcn.007f75b0
mov ecx, esi
mov edx, edi
mov dword [esp + 8], ebx
mov dword [esp], edi
call fcn.00811e40
test eax, eax
je 0x81189a
mov edi, eax
mov ecx, esi
mov edx, edi
call fcn.00811eb0
mov edi, dword [edi + 0x20]
test edi, edi
jne 0x81188a
mov edi, dword [esp]
mov ebx, dword [esp + 4]
test byte [edi + 0x24], 8
je 0x811b28
mov edx, fcn.00822f20
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 [0xbb9733]
and al, 7
movzx eax, al
bt ecx, eax
jb 0x811b16
mov al, byte [0xbb9733]
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 [0xbb9733], ah
jne 0x8118df
mov ecx, fcn.00822f20
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 0x81195b
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 [0xbb9733]
and al, 7
movzx eax, al
bt edx, eax
jae 0x811936
jmp 0x811b16
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb9733]
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 0x811ae9
mov eax, fcn.00822f20
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 [0xbb9700]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbb9700], eax
not eax
imul edx, eax
mov eax, dword [0xbb9704]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb9704], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb9708]
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbb9708], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb970c]
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbb970c], 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 [0xbb9714]
mov edi, edx
shl edi, 5
xor eax, edx
shr edx, 0x1a
mov dword [0xbb9714], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb9718]
mov edi, eax
shl edi, 6
xor edx, eax
shr eax, 0x19
mov dword [0xbb9718], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb971c]
mov edi, edx
shl edi, 7
xor eax, edx
shr edx, 0x18
mov dword [0xbb971c], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb9720]
mov edi, eax
shl edi, 8
xor edx, eax
shr eax, 0x17
mov dword [0xbb9720], edx
or eax, edi
not edx
imul edx, eax
mov eax, dword [0xbb9724]
mov edi, edx
shl edi, 9
xor eax, edx
shr edx, 0x16
mov dword [0xbb9724], eax
or edx, edi
not eax
imul eax, edx
mov edx, dword [0xbb9728]
mov edi, eax
shl edi, 0xa
xor edx, eax
shr eax, 0x15
mov dword [0xbb9728], edx
or eax, edi
not edx
imul edx, eax
xor dword [0xbb972c], edx
mov dl, 1
shl dl, cl
or byte [0xbb9733], dl
mov eax, fcn.00822f20
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 [0xbb9733], al
mov edi, dword [esp]
push dword [edi]
push dword [ebx]
push 0xbb9700
push esi
call fcn.00802190
add esp, 0x10
mov eax, fcn.007d78f0
mov edx, 3
movzx ecx, byte [0xbb9753]
sub edx, eax
mov eax, edx
xor eax, fcn.007d78f0
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x811c86
mov al, byte [0xbb9753]
mov ecx, edx
mov ah, 1
xor ecx, fcn.007d78f0
setne cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb9753], ah
jne 0x811b58
mov edx, fcn.007d78f0
mov ecx, 3
movzx eax, al
sub ecx, edx
mov edx, ecx
xor edx, fcn.007d78f0
setne dl
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x811bc1
mov eax, ecx
movzx edx, byte [0xbb9753]
xor eax, fcn.007d78f0
setne al
or al, 4
movzx eax, al
bt edx, eax
jae 0x811ba1
jmp 0x811c86
xor ecx, fcn.007d78f0
movzx ecx, byte [0xbb9753]
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x811c61
mov eax, fcn.007d78f0
mov edx, 3
xor ecx, ecx
sub edx, eax
mov eax, dword [0xbb9740]
xor edx, fcn.007d78f0
sete cl
xor ecx, 0x11b8dbc1
add ecx, 0x844
xor eax, ecx
mov dword [0xbb9740], eax
not eax
mov edx, dword [0xbb9744]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb9744], edx
or edi, eax
not edx
mov eax, dword [0xbb9748]
imul edx, edi
lea edi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbb9748], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
mov edi, dword [esp]
shl dl, cl
xor dword [0xbb974c], eax
or byte [0xbb9753], dl
mov eax, fcn.007d78f0
mov ecx, 3
sub ecx, eax
mov al, 0xfe
xor ecx, fcn.007d78f0
setne cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb9753], al
mov edx, fcn.007ab150
movzx ecx, byte [0xbb979f]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x811da2
mov al, byte [0xbb979f]
cmp edx, 2
mov ah, 1
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb979f], ah
jne 0x811cb1
mov ecx, fcn.007ab150
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 0x811d0b
cmp ecx, 2
movzx edx, byte [0xbb979f]
sete al
or al, 4
movzx eax, al
bt edx, eax
jae 0x811cef
jmp 0x811da2
xor edx, edx
cmp ecx, 2
movzx ecx, byte [0xbb979f]
sete dl
or edx, 0xfb1357b4
mov eax, edx
and al, 5
movzx eax, al
bt ecx, eax
jb 0x811d81
mov edi, 0xbb9760
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 0x811d37
mov eax, fcn.007ab150
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 1
sete cl
or cl, 4
shl al, cl
or byte [0xbb979f], al
mov ebp, dword [esp + 0xc]
mov edi, dword [esp]
mov ebx, dword [esp + 4]
mov eax, fcn.007ab150
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 [0xbb979f], al
push dword [edi]
push 0xbb9740
push dword [ebx]
push 0xbb9760
push esi
call fcn.00802190
add esp, 0x14
cmp dword [esp + 0x10], 0
jne 0x811dcf
cmp dword [edi + 0x38], 0
jne 0x811dd9
mov ecx, esi
mov edx, edi
call fcn.00812690
cmp dword [edi + 0x38], 0
mov ecx, dword [esp + 8]
je 0x811dfe
mov ecx, dword [esp + 8]
mov edx, 0xa4
push 0
push dword [edi]
push 0
push 0
push ebp
call fcn.007f75d0
add esp, 0x14
mov ecx, esi
call fcn.007fc3c0
mov ecx, dword [esp + 8]
mov edx, 0x8f
push 0
push dword [edi]
push 0
push 0
push ebp
call fcn.007f75d0
add esp, 0x14
mov ecx, esi
mov edx, ebp
call fcn.00802260
mov ecx, dword [esp + 0x14]
mov edx, ebp
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
jmp 0x812700
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 0x81275d
mov ebp, dword [eax + 0x10]
test ebp, ebp
je 0x812753
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0xc], 0
je 0x812741
mov ecx, edi
mov edx, ebx
call fcn.007d3290
mov dword [ebx + 4], 0
mov word [ebx + 0x2a], 0
mov ebp, dword [ebp]
test ebp, ebp
jne 0x812722
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