Function at 0x1004bdc0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x1019d128]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xd4], eax
push esi
push edi
mov dword [ebp - 0xd0], edx
mov eax, dword [ebx]
mov dword [ebp - 0xcc], ebx
mov dword [eax + 8], 0
call fcn.1004b0a0
mov edx, dword [ebx]
mov esi, dword [edx + 8]
mov dword [ebp - 0x90], esi
test eax, eax
jne 0x1004be19
push eax
mov edx, esi
mov ecx, ebx
call fcn.1004a720
jmp 0x1004c466
cmp esi, 3
jne 0x1004be56
cmp dword [ebx + 0x47ec], esi
je 0x1004be38
cmp dword [ebx + 0x47e8], 0
jne 0x1004be56
cmp dword [ebx + 0x47e4], 0
jne 0x1004be56
xorps xmm0, xmm0
mov dword [ebp - 0xa4], 1
xor eax, eax
movups xmmword [ebp - 0xbc], xmm0
mov dword [ebp - 0x94], eax
jmp 0x1004be7c
xor eax, eax
mov dword [ebp - 0x90], esi
mov dword [ebp - 0x94], eax
xorps xmm0, xmm0
mov dword [ebp - 0xa4], eax
movups xmmword [ebp - 0xbc], xmm0
test esi, esi
jle 0x1004bf73
lea esi, [ebx + 0x46a0]
lea edi, [ebp - 0x80]
mov dword [ebp - 0x98], esi
nop dword [eax + eax]
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.100d9e2b
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x1004bfb5
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov dword [edi + 0x10], 0
mov dword [ebp - 0xa0], eax
mov dword [edi], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [esi + 4]
xor edx, edx
mov esi, eax
mov eax, dword [ebp - 0xa0]
mov ecx, esi
mov dword [edi + 4], esi
sar ecx, 1
dec eax
mov dword [edi + 0xc], ecx
mov ecx, dword [ebx]
add eax, dword [ecx]
mov ecx, dword [ebp - 0xa0]
div ecx
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 0x28]
mov dword [edi - 4], eax
mov dword [edi - 8], eax
cmp ecx, 1
jne 0x1004bf1c
cmp esi, ecx
jne 0x1004bf10
mov eax, fcn.10019b40
jmp 0x1004bf3f
cmp esi, 2
jne 0x1004bf3a
mov eax, 0x1004b480
jmp 0x1004bf3f
cmp ecx, 2
jne 0x1004bf3a
cmp esi, 1
jne 0x1004bf2d
mov eax, 0x1004b690
jmp 0x1004bf3f
cmp esi, 2
jne 0x1004bf3a
mov eax, dword [ebx + 0x4814]
jmp 0x1004bf3f
mov eax, 0x1004b9b0
mov esi, dword [ebp - 0x98]
mov dword [edi - 0xc], eax
add esi, 0x48
mov eax, dword [ebp - 0x94]
add edi, 0x20
inc eax
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x94], eax
cmp eax, dword [ebp - 0x90]
jl 0x1004be90
mov esi, dword [ebp - 0x90]
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edi, dword [eax + 4]
test ecx, ecx
js 0x1004c43f
je 0x1004bfa4
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x1004c43f
lea eax, [ecx*4]
test eax, eax
js 0x1004c43f
test edi, edi
js 0x1004c43f
jne 0x1004bfe1
mov eax, edi
imul eax, ecx
jmp 0x1004bffd
mov edx, dword [ebx]
mov ecx, ebx
push 0
mov edx, dword [edx + 8]
call fcn.1004a720
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x10148cac
jmp 0x1004c466
mov eax, 0x7fffffff
cdq
idiv edi
lea edx, [ecx*4]
cmp edx, eax
jg 0x1004c43f
mov eax, ecx
imul eax, edi
lea eax, [eax*4 + 1]
push eax
call fcn.100d9e2b
mov edx, dword [ebx]
mov edi, eax
add esp, 4
test edi, edi
je 0x1004c441
cmp dword [edx + 4], 0
mov dword [ebp - 0xa0], 0
jbe 0x1004c404
mov ecx, edx
mov dword [ebp - 0x94], edi
mov eax, dword [ecx]
imul eax, dword [ebp - 0xa0]
mov dword [ebp - 0xa8], 0
lea edi, [edi + eax*4]
mov dword [ebp - 0x98], edi
test esi, esi
jle 0x1004c171
lea edi, [ebx + 0x46bc]
mov ebx, dword [ebp - 0x90]
lea esi, [ebp - 0x74]
nop dword [eax + eax]
mov eax, dword [ebp - 0x94]
lea edx, [esi - 0x14]
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0x94], eax
mov eax, dword [esi - 8]
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0xa4], ecx
lea ecx, [esi - 0x10]
sar eax, 1
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xc4], edx
cmp dword [esi], eax
jl 0x1004c0d9
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0x90], ecx
mov ecx, dword [ebp - 0xc0]
mov dword [ebp - 0x94], ecx
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0xa4], ecx
jmp 0x1004c0ef
mov eax, ecx
mov dword [ebp - 0xc4], edx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0xc8], eax
mov eax, dword [ecx]
push dword [esi - 0xc]
push dword [esi - 4]
push eax
mov eax, dword [edx]
push eax
push dword [edi + 0x18]
call dword [esi - 0x18]
mov ecx, dword [ebp - 0xa8]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xbc], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x1004c146
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 0xc4]
inc dword [esi + 4]
mov dword [esi], 0
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [esi + 4]
cmp eax, dword [edi]
jge 0x1004c146
mov eax, dword [edi + 4]
add eax, edx
mov edx, dword [ebp - 0xc8]
mov dword [edx], eax
inc ecx
add esi, 0x20
add edi, 0x48
mov dword [ebp - 0xa8], ecx
cmp ecx, ebx
jl 0x1004c070
mov edi, dword [ebp - 0x98]
mov dword [ebp - 0x90], ebx
mov ebx, dword [ebp - 0xcc]
mov edx, dword [ebx]
mov ecx, edx
mov eax, dword [ecx + 8]
cmp eax, 3
jne 0x1004c221
cmp dword [ebp - 0xa4], 0
je 0x1004c1f8
xor edi, edi
cmp dword [ecx], edi
jbe 0x1004c3e0
mov ecx, dword [ebp - 0x98]
mov esi, dword [ebp - 0xb8]
add ecx, 2
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xb4]
sub eax, esi
sub edx, esi
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x9c], edx
jmp 0x1004c1c6
mov edx, dword [ebp - 0x9c]
movzx eax, byte [eax + esi]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea esi, [esi + 1]
movzx eax, byte [esi - 1]
inc edi
mov byte [ecx - 5], al
movzx eax, byte [edx + esi - 1]
mov byte [ecx - 4], al
mov eax, dword [ebp - 0xac]
mov byte [ecx - 3], 0xff
mov edx, dword [ebx]
cmp edi, dword [edx]
jb 0x1004c1c0
jmp 0x1004c3e0
mov eax, dword [ebx + 0x4810]
push 4
push dword [ecx]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push dword [ebp - 0xbc]
push edi
call eax
mov edx, dword [ebx]
add esp, 0x18
jmp 0x1004c3e0
cmp eax, 4
jne 0x1004c3b3
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x1004c2fe
mov dword [ebp - 0xa8], eax
cmp dword [ecx], eax
jbe 0x1004c3e0
mov esi, dword [ebp - 0xb0]
add edi, 2
mov ecx, dword [ebp - 0xb8]
mov eax, dword [ebp - 0xbc]
sub ecx, esi
mov dword [ebp - 0x9c], ecx
sub eax, esi
mov ecx, dword [ebp - 0xb4]
sub ecx, esi
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xac], ecx
nop dword [eax]
movzx ecx, byte [eax + esi]
lea edi, [edi + 4]
movzx edx, byte [esi]
lea esi, [esi + 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 6], al
mov eax, dword [ebp - 0x9c]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 5], al
mov eax, dword [ebp - 0xac]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
mov byte [edi - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 4], al
mov eax, dword [ebp - 0xa8]
mov edx, dword [ebx]
inc eax
mov dword [ebp - 0xa8], eax
cmp eax, dword [edx]
mov eax, dword [ebp - 0xc0]
jb 0x1004c280
jmp 0x1004c3e0
mov ecx, dword [ecx]
mov edx, dword [ebx + 0x4810]
push 4
push ecx
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push dword [ebp - 0xbc]
push edi
cmp eax, 2
jne 0x1004c3aa
call edx
mov edx, dword [ebx]
xor edi, edi
add esp, 0x18
cmp dword [edx], edi
jbe 0x1004c3e0
mov esi, dword [ebp - 0x98]
add esi, 2
nop
mov eax, dword [ebp - 0xb0]
lea esi, [esi + 4]
movzx edx, byte [edi + eax]
inc edi
movzx eax, byte [esi - 6]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
movzx eax, byte [esi - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
movzx eax, byte [esi - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 4], al
mov edx, dword [ebx]
cmp edi, dword [edx]
jb 0x1004c340
jmp 0x1004c3e0
call edx
mov edx, dword [ebx]
add esp, 0x18
jmp 0x1004c3e0
xor esi, esi
cmp dword [ecx], esi
jbe 0x1004c3e0
lea ecx, [edi + 1]
nop dword [eax]
mov eax, dword [ebp - 0xbc]
lea ecx, [ecx + 4]
mov al, byte [esi + eax]
inc esi
mov byte [ecx - 3], al
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov edx, dword [ebx]
cmp esi, dword [edx]
jb 0x1004c3c0
mov eax, dword [ebp - 0xa0]
mov ecx, edx
mov esi, dword [ebp - 0x90]
inc eax
mov edi, dword [ebp - 0x94]
mov dword [ebp - 0xa0], eax
cmp eax, dword [edx + 4]
jb 0x1004c035
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.1004a720
mov ecx, dword [ebx]
add esp, 4
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov ecx, dword [ebx]
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100cd51f
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx]
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.1004a720
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x10148cf8
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.100cd51f
mov esp, ebp
pop ebp
ret