Function at 0x827a30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x9c
mov eax, dword [0xbcbae0]
mov esi, dword [esp + 0xb0]
mov edi, edx
xor eax, esp
mov dword [esp + 0x98], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 8], ecx
lea ecx, [esp + 0x10]
mov edx, dword [esi]
call fcn.007f6d20
test eax, eax
jne 0x827d46
mov edx, dword [esi + 4]
lea ecx, [esp + 0x10]
call fcn.007f6c60
test eax, eax
jne 0x827d46
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x34]
mov ecx, dword [esi]
cmp byte [edx + 0x24], 0
mov dword [esp + 4], eax
js 0x827ade
cmp dword [ecx], 1
jne 0x827ade
mov eax, dword [ecx + 4]
cmp byte [eax], 0xa4
jne 0x827ade
cmp word [eax + 0x20], 0xffff
je 0x827d46
mov dword [esp], ecx
lea edi, [esp + 0x30]
xor eax, eax
mov ecx, 0x1a
rep stosd dword es:[edi], eax
lea edi, [esp + 0x64]
mov byte [esp + 0x30], 0x6f
mov esi, dword [esp + 4]
mov dword [esp + 0x3c], edi
mov byte [esp + 0x64], 0xa4
mov ecx, dword [esp]
mov dword [esp + 0x80], esi
mov edi, dword [edx + 8]
test edi, edi
je 0x827c22
cmp byte [edi + 0x36], 0
je 0x827c1a
mov esi, dword [ecx]
movzx eax, word [edi + 0x32]
cmp esi, eax
jne 0x827c1a
mov ebx, dword [edi + 0x24]
test ebx, ebx
je 0x827b6e
mov eax, dword [esp + 0xb0]
mov edx, dword [eax + 4]
test edx, edx
je 0x827c1a
mov ecx, dword [esp + 8]
push dword [esp + 4]
push ebx
call fcn.007f1c20
mov ecx, dword [esp + 8]
add esp, 8
test eax, eax
jne 0x827c1a
movzx eax, word [edi + 0x32]
movzx esi, ax
test ax, ax
je 0x827c0b
xor edx, edx
mov eax, dword [edi + 0x20]
mov dword [esp + 0xc], edx
mov eax, dword [eax + edx*4]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 4]
cmp word [eax + edx*2], 0xfffe
jne 0x827bb6
mov eax, dword [edi + 0x28]
lea ecx, [edx + edx*4]
mov ebx, dword [eax + ecx*4 + 4]
cmp byte [ebx], 0x6f
jne 0x827ba7
mov ecx, dword [esp]
xor ebp, ebp
jmp 0x827bdd
mov ecx, dword [esp]
mov dword [esp + 0x3c], ebx
lea ebx, [esp + 0x30]
xor ebp, ebp
jmp 0x827bdd
lea eax, [esp + 0x64]
lea ebx, [esp + 0x30]
xor ebp, ebp
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 4]
movzx eax, word [eax + edx*2]
mov word [esp + 0x84], ax
jmp 0x827bdd
mov ecx, dword [esp]
inc ebp
cmp ebp, esi
jae 0x827c1a
lea eax, [ebp + ebp*4]
mov edx, dword [ecx + eax*4 + 4]
mov ecx, dword [esp + 8]
push dword [esp + 4]
push ebx
call fcn.007f1c20
add esp, 8
cmp eax, 1
jg 0x827bd5
mov edx, dword [esp + 0xc]
mov ecx, dword [esp]
inc edx
cmp edx, esi
jb 0x827b79
mov eax, dword [esp + 0xb0]
mov dword [eax + 0x10], edi
jmp 0x827d46
mov edi, dword [edi + 0x14]
jmp 0x827b11
mov edx, fcn.0077e040
movzx ecx, byte [0xbb2e6b]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x827d35
mov al, byte [0xbb2e6b]
cmp edx, 3
mov ah, 1
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb2e6b], ah
jne 0x827c4d
mov ecx, fcn.0077e040
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x827ca7
cmp ecx, 3
movzx edx, byte [0xbb2e6b]
sete al
or al, 4
movzx eax, al
bt edx, eax
jae 0x827c8b
jmp 0x827d35
xor edx, edx
cmp ecx, 3
movzx ecx, byte [0xbb2e6b]
sete dl
or edx, 0x876196fc
add edx, 0x1200
mov eax, edx
and al, 7
movzx eax, al
bt ecx, eax
jb 0x827d14
mov esi, 0xbb2e20
xor eax, eax
mov edi, dword [esi]
mov ecx, eax
mov ebx, edx
inc eax
shl ebx, cl
xor cl, 0x1f
xor edi, edx
shr edx, cl
mov dword [esi], edi
or edx, ebx
not edi
add esi, 4
imul edx, edi
cmp eax, 0x12
jne 0x827cd5
mov eax, fcn.0077e040
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 1
sete cl
or cl, 4
shl al, cl
or byte [0xbb2e6b], al
mov eax, fcn.0077e040
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbb2e6b], al
push 0xbb2e20
push dword [esp + 0xc]
call fcn.00782570
add esp, 8
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.00980459
add esp, 0x9c
pop esi
pop edi
pop ebx
pop ebp
ret