Function at 0x100f56d0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x28]
mov eax, edx
push esi
mov esi, dword [esp + 0x28]
mov ebx, ecx
push edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
cmp edi, eax
jne 0x100f56ff
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x14
ret 0xc
test edi, edi
js 0x100f5a65
test esi, esi
js 0x100f5a65
je 0x100f5722
xor edx, edx
mov eax, 0x7fffffff
div esi
cmp edi, eax
jg 0x100f5a65
mov ecx, edi
imul ecx, esi
mov dword [esp + 0x20], ecx
test ecx, ecx
js 0x100f5a65
test ebp, ebp
js 0x100f5a65
je 0x100f574e
xor edx, edx
mov eax, 0x7fffffff
div ebp
cmp ecx, eax
jg 0x100f5a65
mov eax, ecx
imul eax, ebp
push eax
call fcn.1018b4f6
mov edx, eax
add esp, 4
mov dword [esp + 0x2c], edx
test edx, edx
je 0x100f5a65
mov dword [esp + 0x28], 0
test ebp, ebp
jle 0x100f5a2d
mov eax, dword [esp + 0x10]
lea ebx, [esi - 1]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x18], ecx
lea ebp, [eax*8 - 0xa]
imul eax, esi
add ebp, edi
mov dword [esp + 0x10], eax
mov eax, edx
mov dword [esp + 0x1c], eax
xor edx, edx
mov esi, ecx
cmp ebp, 0x19
ja case.0x100f57b7.3
movzx ecx, byte [ebp + 0x100f5ab0]
jmp dword [ecx*4 + 0x100f5a7c]
mov edx, ebx
test edx, edx
js 0x100f59fe
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 1]
mov byte [eax + 1], 0xff
lea eax, [eax + 2]
jns 0x100f57c8
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
nop word [eax + eax]
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x100f57f0
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 1], 0xff
jns 0x100f5815
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x100f5840
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x100f5860
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x100f5885
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
lea eax, [eax + 4]
mov byte [eax - 3], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 2], cl
mov byte [eax - 1], 0xff
jns 0x100f58b1
jmp 0x100f59fe
mov edi, ebx
test edi, edi
js 0x100f5a02
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x100f58e2
jmp 0x100f59fe
mov edi, ebx
test edi, edi
js 0x100f5a02
nop
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
mov byte [eax - 1], 0xff
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
jns 0x100f5920
jmp 0x100f59fe
mov edi, ebx
test edi, edi
js 0x100f5a02
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x100f5960
jmp 0x100f59fe
mov edi, ebx
test edi, edi
js 0x100f5a02
nop dword [eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
mov cl, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x100f59a0
jmp 0x100f59fe
mov edx, ebx
test edx, edx
js 0x100f59fe
nop dword [eax + eax]
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 4]
movzx ecx, byte [esi - 3]
lea eax, [eax + 3]
mov byte [eax - 2], cl
movzx ecx, byte [esi - 2]
mov byte [eax - 1], cl
jns 0x100f59e0
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
inc edx
mov eax, dword [esp + 0x1c]
add ecx, dword [esp + 0x10]
add eax, dword [esp + 0x20]
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
cmp edx, dword [esp + 0x30]
jl 0x100f57a5
mov ebx, dword [esp + 0x14]
push ebx
call fcn.10186d6f
mov eax, dword [esp + 0x30]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
push dword [esp + 0x14]
call fcn.10186d6f
push dword [esp + 0x30]
call fcn.10186d6f
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
push ebx
call fcn.10186d6f
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc