Function at 0x1005ddd7
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
add eax, esi
mov dword [ebp - 0x34], esi
cmp dword [ebx], 0
mov dword [ebp - 0x2c], eax
lea eax, [edx + ecx]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], eax
jne 0x1005de2e
push edi
sub esp, 0x10
lea esi, [ebp - 0x34]
mov edi, esp
mov ecx, ebx
sub esp, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, esp
lea esi, [ebx + 4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.1005df75
jmp 0x1005df6e
cmp dword [ebx], 1
jne 0x1005df6e
lea esi, [ebx + 4]
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.10029d7f
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jle 0x1005df57
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jle 0x1005df57
lea eax, [ebp - 8]
push eax
call fcn.10025ae5
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x20]
mov esi, dword [ebp - 8]
mov ecx, esi
mov dword [esp], 0x108
push eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x24]
push eax
call fcn.10043ed2
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x18]
jge 0x1005df40
sub eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebx + 0x14]
mov eax, dword [ecx]
mov edi, dword [ecx + 0x14]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
sub ecx, dword [ebx + 8]
imul ecx, edi
add eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov edi, dword [ecx + 0x14]
call dword [edx + 4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi]
imul ecx, edi
mov edi, dword [esi + 0x14]
add eax, ecx
mov ecx, esi
mov dword [ebp - 0xc], eax
call dword [edx + 4]
mov edx, eax
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [ebp - 0x20]
imul ecx, edi
mov edi, dword [ebp - 0x24]
add edx, ecx
mov dword [ebp - 0x14], edx
cmp edi, dword [ebp - 0x1c]
jge 0x1005df30
mov esi, dword [ebp - 0xc]
sub esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov eax, edi
sub eax, dword [ebx + 4]
xor edx, edx
movzx eax, byte [eax + ecx]
movzx ecx, byte [esi + edi]
imul eax, ecx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x14]
mov ecx, edi
sub ecx, dword [ebp - 0x24]
inc edi
mov byte [ecx + edx], al
cmp edi, dword [ebp - 0x1c]
jl 0x1005defd
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 4]
inc eax
inc dword [ebp + 0xc]
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x18]
jl 0x1005dea2
push dword [ebp - 8]
lea esi, [ebp - 0x24]
lea edi, [ebx + 4]
movsd dword es:[edi], dword [esi]
lea ecx, [ebx + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.10026226
jmp 0x1005df6e
and dword [ebx], 0
lea ecx, [ebx + 0x14]
push 0
call fcn.10026226
lea esi, [ebp - 0x24]
lea edi, [ebx + 4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
leave
ret 0xc