Function at 0x105064a0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x34
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x44]
xorps xmm0, xmm0
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x18], eax
cmp byte [ebx + 3], 0x20
push esi
setb byte [esp + 0x14]
mov dword [esp + 0x10], ebp
xor edx, edx
mov dword [esp + 0x28], ebx
lea eax, [ebp + 8]
mov dword [esp + 0x20], 0
push edi
mov dword [esp + 0x28], eax
movups xmmword [esp + 0x30], xmm0
mov dword [esp + 0x1c], edx
cmp byte [ebx + 2], dl
jbe 0x10506592
nop dword [eax]
xor ebp, ebp
cmp byte [ebx + 1], 0
jbe 0x1050657d
mov cl, byte [ebx]
nop word [eax + eax]
xor esi, esi
test cl, cl
je 0x10506574
push dword [esp + 0x18]
push dword [esp + 0x50]
push edx
push ebp
push esi
push dword [esp + 0x64]
call fcn.105067d0
mov ecx, dword [esp + 0x3c]
lea edi, [esp + 0x48]
mov edx, dword [esp + 0x2c]
mov bl, cl
inc ecx
inc esi
mov dword [esp + 0x3c], ecx
add esp, 0x18
movzx ecx, al
lea edi, [edi + ecx*4]
imul ecx, ecx, 0xd8
add ecx, dword [edi]
inc dword [edi]
mov byte [ecx + edx + 0xe0], bl
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov byte [edx], al
inc edx
mov cl, byte [ebx]
movzx eax, cl
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x1c]
cmp esi, eax
jb 0x10506516
movzx eax, byte [ebx + 1]
inc ebp
cmp ebp, eax
jb 0x10506510
movzx eax, byte [ebx + 2]
inc edx
mov dword [esp + 0x1c], edx
cmp edx, eax
jb 0x10506500
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
xor edi, edi
test ecx, ecx
je 0x105065e9
mov dword [esp + 0x18], ebp
mov ebx, ecx
mov esi, dword [esp + edi*4 + 0x30]
lea ecx, [esi + 3]
and ecx, 0xfffffffc
cmp esi, ecx
jge 0x105065d2
lea edx, [ebp + 0xe0]
add edx, esi
sub ecx, esi
nop word [eax + eax]
mov al, byte [esi + ebp + 0xdf]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ecx, 1
jne 0x105065c0
inc edi
add ebp, 0xd8
cmp edi, ebx
jb 0x105065a2
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x105065f9
xor edx, edx
mov word [ebp], dx
jmp 0x1050662a
cmp dword [esp + 0x34], 0
jne 0x10506607
mov edx, 1
jmp 0x10506626
cmp dword [esp + 0x38], 0
jne 0x10506615
mov edx, 2
jmp 0x10506626
cmp dword [esp + 0x3c], 0
mov edx, 3
je 0x10506626
mov edx, 4
mov word [ebp], dx
mov esi, dword [esp + 0x50]
mov word [ebp + 2], si
xor ebp, ebp
cmp ecx, 2
jne 0x10506648
mov ebp, dword [esp + 0x20]
add ebp, 0xdfcc7
shl ebp, 4
jmp 0x10506675
cmp ecx, 3
jne 0x10506663
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*2]
lea eax, [eax + 0x1c018e]
lea ebp, [ebx + eax*8]
mov eax, dword [esp + 0x30]
jmp 0x10506677
cmp ecx, 4
jne 0x10506677
mov ebp, dword [esp + 0x20]
shl ebp, 5
add ebp, 0xe06c70
add ebp, ebx
mov esi, dword [esp + 0x14]
cmp edx, ecx
mov byte [esi + 4], al
mov eax, dword [esp + 0x34]
mov byte [esi + 5], al
mov eax, dword [esp + 0x38]
mov byte [esi + 6], al
mov eax, dword [esp + 0x3c]
mov byte [esi + 7], al
sete al
mov byte [esp + 0x13], al
test ebp, ebp
je 0x1050671e
test ecx, ecx
je 0x105066c7
lea ecx, [ecx*8 - 8]
mov dword [ebp], 0
shr ecx, 2
lea edi, [ebp + 8]
mov esi, ebp
mov dword [ebp + 4], 0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
movzx eax, byte [ebx + 3]
mov edx, 0x40
cmp byte [ebx + 3], dl
cmovb edx, eax
xor edi, edi
movzx eax, dl
mov dword [esp + 0x18], eax
test dl, dl
je 0x1050671a
movzx eax, byte [ebx + edi + 0xdfcc30]
xor edx, edx
mov ecx, edi
bts edx, ecx
movzx eax, byte [eax + esi + 8]
xor esi, esi
cmp ecx, 0x20
cmovae esi, edx
xor edx, esi
cmp ecx, 0x40
cmovae esi, edx
or dword [ebp + eax*8], edx
or dword [ebp + eax*8 + 4], esi
inc edi
mov esi, dword [esp + 0x14]
cmp edi, dword [esp + 0x18]
jb 0x105066e3
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x34
ret