Function at 0x101327c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
mov eax, dword [edx]
mov edi, 0xffff
add eax, 0xc4
mov word [ebp - 6], di
lea ecx, [edx + eax*2]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ecx]
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x101328ae
lea ebx, [eax*2 - 4]
mov eax, ecx
lea edi, [edx + 4]
and eax, 0x400
xor edx, edx
mov esi, edi
add eax, 0xfffffc00
mov eax, dword [ebp - 4]
adc edx, edx
shr ecx, 5
and ecx, 0x1f
call fcn.10451660
mov dword [ebp - 0x1c], edx
mov ecx, ebx
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x1013283d
shr edx, 1
or dl, al
nop dword [eax]
xor byte [edi], dl
lea edi, [edi + 1]
mov dl, byte [edi - 1]
sub ecx, 1
jne 0x10132830
mov eax, dword [ebp - 4]
xor edx, edx
and eax, 0x800
add eax, 0xfffff800
mov eax, dword [ebp - 4]
movzx ecx, al
adc edx, edx
and ecx, 0x1f
call fcn.10451660
mov edi, edx
mov dword [ebp - 0x20], eax
mov edx, ebx
mov dword [ebp - 0x1c], edi
shr edx, 1
mov ecx, esi
je 0x10132883
shr edi, 1
or di, ax
movzx eax, di
xor word [ecx], ax
lea ecx, [ecx + 2]
movzx eax, word [ecx - 2]
sub edx, 1
jne 0x10132874
shr ebx, 2
test ebx, ebx
je 0x1013289d
mov eax, dword [ebp - 4]
nop dword [eax]
xor dword [esi], eax
lea esi, [esi + 4]
mov eax, dword [esi - 4]
sub ebx, 1
jne 0x10132890
mov eax, dword [ebp - 0xc]
mov edi, 0xffff
mov edx, dword [ebp + 8]
mov dword [eax], 0
mov eax, edx
lea ebx, [edx + 8]
mov dword [ebp - 0x14], ebx
mov eax, dword [eax + 4]
mov ecx, dword [edx + eax]
mov edx, ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
xor eax, eax
mov word [ebp + 8], ax
mov ax, word [ebp + 8]
movzx esi, word [edx]
mov word [ebp - 8], ax
mov eax, dword [ebp - 8]
add eax, 0x8000
mov dword [ebp - 8], eax
shr eax, 0x10
cmp si, ax
je 0x10132a17
mov eax, 0xfffe
cmp si, ax
jne 0x10132903
add ecx, dword [edx + 2]
mov eax, 6
jmp 0x101329e7
movzx eax, si
cmp eax, 5
jbe 0x101329cb
mov edx, dword [ecx]
lea ebx, [eax - 4]
mov eax, edx
mov dword [ebp + 8], edx
and eax, 0x400
lea edi, [ecx + 4]
xor edx, edx
mov esi, edi
add eax, 0xfffffc00
mov eax, dword [ebp + 8]
mov ecx, eax
adc edx, edx
shr ecx, 5
and ecx, 0x1f
call fcn.10451660
mov dword [ebp - 0x1c], edx
mov ecx, ebx
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x1013295d
shr edx, 1
or dl, al
nop dword [eax]
xor byte [edi], dl
lea edi, [edi + 1]
mov dl, byte [edi - 1]
sub ecx, 1
jne 0x10132950
mov eax, dword [ebp + 8]
xor edx, edx
and eax, 0x800
add eax, 0xfffff800
mov eax, dword [ebp + 8]
movzx ecx, al
adc edx, edx
and ecx, 0x1f
call fcn.10451660
mov edi, edx
mov dword [ebp - 0x20], eax
mov edx, ebx
mov dword [ebp - 0x1c], edi
shr edx, 1
mov ecx, esi
je 0x101329a3
shr edi, 1
or di, ax
movzx eax, di
xor word [ecx], ax
lea ecx, [ecx + 2]
movzx eax, word [ecx - 2]
sub edx, 1
jne 0x10132994
shr ebx, 2
test ebx, ebx
je 0x101329bd
mov eax, dword [ebp + 8]
nop dword [eax]
xor dword [esi], eax
lea esi, [esi + 4]
mov eax, dword [esi - 4]
sub ebx, 1
jne 0x101329b0
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
xor dword [ecx], 0x4e555244
jmp 0x101329da
test eax, eax
je 0x101329da
nop
xor byte [eax + ecx - 1], 0xaa
dec eax
test eax, eax
jne 0x101329d0
movzx eax, word [edx]
add eax, 4
add ecx, eax
mov eax, 2
add edx, eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
movzx eax, word [edx]
cmp ax, word [ebp - 6]
mov esi, eax
mov eax, 0xfffe
jne 0x101328f1
mov eax, dword [ebp - 0x14]
mov ecx, 0xffff
mov word [eax], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov word [ebx], di
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4