Function at 0x1001a430
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esi
push edi
mov edi, ecx
xor esi, esi
cmp dword [edi + 0xd8], 1
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], esi
jne 0x1001a461
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.10019500
mov esi, dword [ebp - 0x1c]
add esp, 8
cmp dword [edi + 0xdc], 2
mov ecx, dword [edi + 0x94]
sete al
mov byte [ebp - 1], al
mov dword [ebp - 0x2c], ecx
test ecx, ecx
jne 0x1001a4a8
movzx edx, al
mov eax, dword [ebp + 8]
neg edx
sbb edx, edx
and edx, 0x100
add edx, 0x100
add edx, edx
add edx, edx
push edx
push ecx
push eax
call fcn.10230cc0
add esp, 0xc
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov edx, dword [edi + 0xc]
mov eax, dword [edx + 4]
cmp eax, 0xff
jle 0x1001a4ba
mov eax, 0xff
xor edx, edx
push ebx
test eax, eax
js 0x1001a4d4
mov ecx, dword [edi + 0xc]
mov ecx, dword [ecx]
mov ebx, dword [ebp + 8]
mov dword [ebx + edx*4], ecx
inc edx
cmp edx, eax
jle 0x1001a4c1
mov ecx, dword [ebp - 0x2c]
xor eax, eax
lea ebx, [ecx - 1]
mov dword [ebp - 0x18], eax
test ebx, ebx
jle 0x1001a709
jmp 0x1001a4e9
mov eax, dword [ebp - 0x18]
mov ecx, dword [edi + 0xc]
mov ebx, dword [ecx + eax*8]
lea ecx, [ecx + eax*8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [edi + 0xc]
lea ecx, [ecx + eax*8]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 0xc]
mov dword [ebp - 0x10], ecx
sub ecx, eax
mov dword [ebp - 0x14], ebx
test ecx, ecx
jle 0x1001a6f3
test eax, eax
jns 0x1001a517
xor eax, eax
mov edx, 0x100
cmp dword [ebp - 0x10], edx
jle 0x1001a524
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x34]
movzx edx, byte [edx + 0xb]
mov edi, ebx
shr edi, 0x18
sub edx, edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0xc]
mov dword [ebp - 8], eax
test esi, esi
je 0x1001a64a
lea edi, [edx + edi*8]
mov dword [ebp - 0x28], edi
movzx edi, byte [edi + 0xa]
mov edx, ebx
shr edx, 0x10
movzx edx, dl
mov dword [ebp - 0x24], edx
mov edx, dword [esi + edi*4]
mov edi, dword [ebp - 0x24]
sub edx, dword [esi + edi*4]
mov dword [ebp - 0x44], edx
mov edx, ebx
shr edx, 8
movzx edi, dl
mov edx, dword [ebp - 0x28]
movzx edx, byte [edx + 9]
mov edx, dword [esi + edx*4]
sub edx, dword [esi + edi*4]
mov dword [ebp - 0x48], edx
movzx edx, bl
lea edi, [esi + edx*4]
mov edx, dword [ebp - 0x28]
movzx edx, byte [edx + 8]
mov edx, dword [esi + edx*4]
sub edx, dword [edi]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x10]
cmp eax, edx
jge 0x1001a6ed
movzx edi, byte [ebp - 0x12]
lea edi, [esi + edi*4]
mov dword [ebp - 0x24], edi
movzx edi, bh
mov ebx, dword [ebp - 0x30]
lea edi, [esi + edi*4]
mov dword [ebp - 0x38], edi
movzx edi, byte [ebp - 0x11]
lea esi, [esi + edi*4]
xor edi, edi
sub edx, eax
mov dword [ebp - 0x40], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x28], edx
add edx, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
lea esi, [esi + eax*4 + 1]
mov dword [ebp - 8], edx
mov eax, edi
cdq
idiv ecx
mov edx, dword [ebp - 0x24]
add edi, dword [ebp - 0x44]
add esi, 4
add eax, dword [edx]
movzx eax, byte [ebx + eax*4]
mov byte [esi - 3], al
mov eax, dword [ebp - 0x14]
cdq
idiv ecx
mov edx, dword [ebp - 0x38]
add eax, dword [edx]
movzx eax, byte [ebx + eax*4]
mov byte [esi - 4], al
mov eax, dword [ebp - 0x10]
cdq
idiv ecx
mov edx, dword [ebp - 0x3c]
add eax, dword [edx]
movzx eax, byte [ebx + eax*4]
mov byte [esi - 5], al
mov eax, dword [ebp - 0x20]
cdq
idiv ecx
mov edx, dword [ebp - 0x40]
add eax, dword [edx]
mov edx, dword [ebp - 0x48]
movzx eax, byte [ebx + eax*4]
add dword [ebp - 0x14], edx
mov edx, dword [ebp - 0x34]
add dword [ebp - 0x20], edx
mov byte [esi - 2], al
mov eax, dword [ebp - 0x4c]
add dword [ebp - 0x10], eax
dec dword [ebp - 0x28]
jne 0x1001a5e1
jmp 0x1001a6ea
lea edx, [edx + edi*8]
movzx edi, byte [edx + 0xa]
mov dword [ebp - 0x28], edx
movzx edx, byte [ebp - 0x12]
sub edi, edx
mov edx, dword [ebp - 0x28]
movzx edx, byte [edx + 9]
mov dword [ebp - 0x4c], edi
movzx edi, bh
sub edx, edi
mov dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x28]
movzx edx, byte [edx + 8]
movzx edi, bl
sub edx, edi
mov dword [ebp - 0x44], edx
cmp eax, dword [ebp - 0x10]
jge 0x1001a6ed
mov edx, dword [ebp + 8]
lea esi, [edx + eax*4 + 1]
mov edx, dword [ebp - 0x10]
xor edi, edi
sub edx, eax
mov dword [ebp - 0x10], edx
add edx, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 8], edx
nop
mov eax, edi
cdq
idiv ecx
add edi, dword [ebp - 0x4c]
add esi, 4
add al, byte [ebp - 0x12]
mov byte [esi - 3], al
mov eax, dword [ebp - 0x20]
cdq
idiv ecx
add al, bh
mov byte [esi - 4], al
mov eax, dword [ebp - 0x24]
cdq
idiv ecx
add al, bl
mov byte [esi - 5], al
mov eax, dword [ebp - 0x28]
cdq
idiv ecx
mov edx, dword [ebp - 0x44]
add dword [ebp - 0x24], edx
add al, byte [ebp - 0x11]
mov byte [esi - 2], al
mov eax, dword [ebp - 0x48]
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
add dword [ebp - 0x28], eax
dec dword [ebp - 0x10]
jne 0x1001a6a0
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
inc ecx
dec eax
mov dword [ebp - 0x18], ecx
cmp ecx, eax
jl 0x1001a4e6
mov ecx, dword [ebp - 0x2c]
pop ebx
cmp edx, 0x100
jge 0x1001a728
mov eax, dword [edi + 0xc]
mov eax, dword [eax + ecx*8 - 8]
mov esi, dword [ebp + 8]
mov dword [esi + edx*4], eax
inc edx
cmp edx, 0x100
jl 0x1001a712
cmp byte [ebp - 1], 0
je 0x1001a754
cmp edx, 0x200
jge 0x1001a754
mov ecx, dword [ebp + 8]
mov eax, 0x1ff
sub eax, edx
lea eax, [ecx + eax*4]
mov esi, dword [eax]
mov dword [ecx + edx*4], esi
inc edx
sub eax, 4
cmp edx, 0x200
jl 0x1001a743
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4