Function at 0x10061310
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp edi, edx
je 0x100616b5
test edi, edi
js 0x1006168e
test esi, esi
js 0x1006168e
je 0x10061355
xor edx, edx
mov eax, 0x7fffffff
div esi
cmp edi, eax
jg 0x1006168e
mov ecx, edi
imul ecx, esi
mov dword [ebp - 0x18], ecx
test ecx, ecx
js 0x1006168e
test ebx, ebx
js 0x1006168e
je 0x10061380
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp ecx, eax
jg 0x1006168e
mov eax, ecx
imul eax, ebx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1006168e
mov dword [ebp + 8], 0
test ebx, ebx
jle 0x10061643
mov edx, dword [ebp - 8]
lea ebx, [esi - 1]
mov dword [ebp - 0x10], eax
lea ecx, [edx*8 - 0xa]
add ecx, edi
imul edx, esi
mov esi, dword [ebp - 4]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], edx
nop word [eax + eax]
cmp ecx, 0x19
ja case.0x100613e0.3
movzx ecx, byte [ecx + 0x100616f0]
jmp dword [ecx*4 + 0x100616bc]
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x100613f1
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x10061413
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x10061438
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x10061461
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x10061480
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x100614a5
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x100614d1
jmp 0x1006161e
mov edi, ebx
test edi, edi
js 0x1006161e
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 0x10061502
jmp 0x1006161e
mov edi, ebx
test edi, edi
js 0x1006161e
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 0x10061540
jmp 0x1006161e
mov edi, ebx
test edi, edi
js 0x1006161e
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 0x10061580
jmp 0x1006161e
mov edi, ebx
test edi, edi
js 0x1006161e
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 0x100615c0
jmp 0x1006161e
mov edx, ebx
test edx, edx
js 0x1006161e
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 0x10061600
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
inc ecx
mov eax, dword [ebp - 0x10]
add esi, dword [ebp - 8]
add eax, dword [ebp - 0x18]
cmp ecx, dword [ebp + 0x10]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], eax
jl 0x100613d0
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x14]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push dword [ebp - 0x14]
call esi
mov ecx, dword [0x10099d0c]
add esp, 8
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop esi
pop ebx
mov dword [eax + 0xc], str.unsupported
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [0x10099d0c]
add esp, 4
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret