Function at 0x100945f8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x48], edi
cmp dword [edi + 0x20], ebx
je 0x10094c07
mov esi, dword [edi + 0x14]
cmp esi, 1
je 0x10094c07
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
shr esi, 2
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
and esi, 1
je 0x1009469f
mov eax, ecx
shr eax, 0x18
mov dword [ebp - 0x10], eax
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov dword [ebp - 0x14], eax
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [ebp - 0x18], eax
movzx eax, cl
mov dword [ebp - 0x1c], eax
mov eax, edx
shr eax, 0x18
mov dword [ebp - 0x20], eax
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebp - 0x24], eax
mov eax, edx
shr eax, 8
movzx eax, al
mov dword [ebp - 0x28], eax
movzx eax, dl
mov dword [ebp - 0x2c], eax
jmp 0x100946d7
movzx eax, cl
mov dword [ebp - 0x34], eax
mov eax, ecx
shr eax, 8
movzx eax, al
mov dword [ebp - 0x30], eax
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov dword [ebp - 8], eax
movzx eax, dl
mov dword [ebp - 0x40], eax
mov eax, edx
shr eax, 8
movzx eax, al
mov dword [ebp - 0x3c], eax
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebp - 0x38], eax
cmp dword [edi + 0x10], 8
jg 0x1009489d
mov eax, 0xff
mov dword [ebp - 0xc], eax
test esi, esi
je 0x10094702
cmp ecx, eax
jne 0x1009470e
test edx, edx
jne 0x1009470e
cmp dword [edi + 0x1c], ebx
jne 0x1009471a
xor eax, eax
inc eax
jmp 0x10094c09
test ecx, ecx
jne 0x1009470e
cmp edx, 0xffffff
jmp 0x100946f3
cmp dword [edi + 0x1c], ebx
jne 0x1009471a
mov ecx, edi
call fcn.10093fb2
mov ecx, dword [edi + 0x10]
xor eax, eax
inc eax
shl eax, cl
mov dword [ebp - 0x44], eax
test esi, esi
je 0x10094800
test eax, eax
jle 0x100946fa
mov eax, dword [ebp - 0x28]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
sub dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x2c]
sub dword [ebp - 0x1c], eax
push 0x64
pop esi
mov eax, dword [edi + 0x1c]
lea edx, [ebp - 1]
push edx
lea edx, [ebp + 0xb]
push edx
mov ecx, dword [eax + ebx*4]
lea edx, [ebp + 0xf]
push edx
movzx eax, cl
push eax
mov eax, ecx
shr eax, 8
push eax
mov eax, ecx
shr ecx, 0x18
shr eax, 0x10
push eax
push ecx
call fcn.1007f87e
movzx eax, byte [ebp + 0xb]
xor edx, edx
movzx ecx, byte [ebp + 0xf]
add esp, 0x1c
imul eax, eax, 0x3b
imul ecx, ecx, 0x1e
push 0x64
add eax, ecx
movzx ecx, byte [ebp - 1]
imul ecx, ecx, 0xb
add eax, ecx
div esi
mov esi, 0xff
mov ecx, esi
sub ecx, eax
mov eax, dword [ebp - 0x10]
imul eax, ecx
cdq
idiv esi
mov esi, eax
mov eax, dword [ebp - 0x14]
imul eax, ecx
add esi, dword [ebp - 0x20]
shl esi, 0x18
cdq
idiv dword [ebp - 0xc]
add eax, dword [ebp - 0x24]
shl eax, 0x10
or esi, eax
mov eax, dword [ebp - 0x18]
imul eax, ecx
cdq
idiv dword [ebp - 0xc]
add eax, dword [ebp - 0x28]
shl eax, 8
or esi, eax
mov eax, dword [ebp - 0x1c]
imul eax, ecx
mov ecx, 0xff
cdq
idiv ecx
add eax, dword [ebp - 0x2c]
or esi, eax
mov eax, dword [edi + 0x1c]
mov dword [eax + ebx*4], esi
inc ebx
pop esi
cmp ebx, dword [ebp - 0x44]
jl 0x1009474c
jmp 0x100946fa
test eax, eax
jle 0x100946fa
mov eax, dword [ebp - 0x3c]
sub dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x40]
sub dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x38]
sub dword [ebp - 8], eax
push 0x64
pop esi
mov edi, dword [edi + 0x1c]
xor edx, edx
push 0x64
mov ecx, dword [edi + ebx*4]
mov eax, ecx
shr eax, 8
movzx eax, al
imul eax, eax, 0x3b
shr ecx, 0x10
movzx ecx, cl
imul ecx, ecx, 0x1e
add eax, ecx
movzx ecx, byte [edi + ebx*4]
imul ecx, ecx, 0xb
add eax, ecx
div esi
mov esi, 0xff
mov ecx, eax
mov eax, dword [ebp - 0x30]
imul eax, ecx
cdq
idiv esi
mov esi, eax
mov eax, dword [ebp - 0x34]
imul eax, ecx
add esi, dword [ebp - 0x3c]
shl esi, 8
cdq
idiv dword [ebp - 0xc]
add eax, dword [ebp - 0x40]
shl eax, 0x10
or esi, eax
mov eax, dword [ebp - 8]
imul eax, ecx
mov ecx, 0xff
cdq
idiv ecx
add eax, dword [ebp - 0x38]
or esi, eax
or esi, 0xff000000
mov dword [edi + ebx*4], esi
inc ebx
mov edi, dword [ebp - 0x48]
pop esi
cmp ebx, dword [ebp - 0x44]
jl 0x1009481d
jmp 0x100946fa
test esi, esi
je 0x10094a85
mov eax, 0xff
mov dword [ebp - 0xc], eax
cmp ecx, eax
jne 0x10094965
test edx, edx
jne 0x10094965
mov eax, ebx
mov dword [ebp - 0x3c], ebx
cmp dword [edi + 0xc], ebx
jle 0x100946fa
mov ecx, dword [edi + 8]
mov esi, dword [edi + 0x18]
imul esi, eax
mov dword [ebp - 0x44], ebx
add esi, dword [edi + 0x20]
mov dword [ebp - 0x40], esi
test ecx, ecx
jle 0x10094953
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 1]
push eax
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp + 0xf]
push eax
movzx eax, byte [ecx + 3]
push eax
movzx eax, byte [ecx + 2]
push eax
movzx eax, byte [esi + 1]
push eax
movzx eax, byte [ecx]
push eax
call fcn.1007f87e
mov eax, dword [ebp - 0x40]
add esp, 0x1c
movzx ecx, byte [ebp + 0xf]
xor edx, edx
imul ecx, ecx, 0x1e
mov byte [eax], bl
movzx eax, byte [ebp + 0xb]
imul eax, eax, 0x3b
push 0x64
mov word [esi + 1], bx
add eax, ecx
movzx ecx, byte [ebp - 1]
imul ecx, ecx, 0xb
add eax, ecx
pop ecx
div ecx
or cl, 0xff
sub cl, al
mov eax, dword [ebp - 0x44]
mov byte [esi + 3], cl
add esi, 4
mov ecx, dword [edi + 8]
inc eax
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x44], eax
cmp eax, ecx
jl 0x100948e1
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x3c], eax
cmp eax, dword [edi + 0xc]
jl 0x100948ce
jmp 0x100946fa
mov eax, ebx
mov dword [ebp - 0x40], ebx
cmp dword [edi + 0xc], ebx
jle 0x100946fa
mov edx, dword [edi + 8]
mov ecx, dword [edi + 0x18]
imul ecx, eax
mov dword [ebp - 0x44], ebx
add ecx, dword [edi + 0x20]
mov dword [ebp - 8], ecx
test edx, edx
jle 0x10094a73
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x2c]
push 0x64
mov dword [ebp - 0x34], eax
pop ebx
lea eax, [ebp - 1]
push eax
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp + 0xf]
push eax
movzx eax, byte [ecx + 3]
lea esi, [ecx + 1]
push eax
movzx eax, byte [ecx + 2]
push eax
movzx eax, byte [esi]
push eax
movzx eax, byte [ecx]
push eax
call fcn.1007f87e
movzx eax, byte [ebp + 0xb]
xor edx, edx
movzx ecx, byte [ebp + 0xf]
add esp, 0x1c
imul eax, eax, 0x3b
imul ecx, ecx, 0x1e
add eax, ecx
movzx ecx, byte [ebp - 1]
imul ecx, ecx, 0xb
add eax, ecx
mov ecx, 0xff
div ebx
sub ecx, eax
mov eax, ecx
imul eax, dword [ebp - 0x48]
cdq
idiv dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add al, byte [ebp - 0x20]
mov dword [ebp - 8], esi
mov esi, 0xff
mov byte [edx], al
mov eax, ecx
imul eax, dword [ebp - 0x3c]
cdq
idiv esi
mov edx, dword [ebp - 8]
add al, byte [ebp - 0x24]
mov byte [edx], al
inc edx
mov eax, ecx
mov dword [ebp - 8], edx
imul eax, dword [ebp - 0x38]
imul ecx, dword [ebp - 0x34]
cdq
idiv esi
mov edx, dword [ebp - 8]
add al, byte [ebp - 0x28]
mov byte [edx], al
inc edx
mov dword [ebp - 8], edx
mov eax, ecx
cdq
mov ecx, esi
idiv ecx
mov ecx, dword [ebp - 8]
add al, byte [ebp - 0x2c]
mov byte [ecx], al
inc ecx
mov eax, dword [ebp - 0x44]
mov edx, dword [edi + 8]
inc eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x44], eax
cmp eax, edx
jl 0x100949b4
mov eax, dword [ebp - 0x40]
xor ebx, ebx
inc eax
mov dword [ebp - 0x40], eax
cmp eax, dword [edi + 0xc]
jl 0x10094976
jmp 0x100946fa
test ecx, ecx
jne 0x10094b1f
cmp edx, 0xffffff
jne 0x10094b1f
mov ecx, ebx
mov dword [ebp + 0xc], ebx
cmp dword [edi + 0xc], ebx
jle 0x100946fa
mov esi, dword [edi + 8]
mov eax, dword [edi + 0x18]
imul eax, ecx
mov dword [ebp + 8], ebx
add eax, dword [edi + 0x20]
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 0x10]
cdq
and edx, 7
add eax, edx
sar eax, 3
sub eax, 2
mov dword [ebp - 0x44], eax
test esi, esi
jle 0x10094b11
mov ebx, dword [ebp - 0x48]
movzx ecx, byte [ebx]
xor edx, edx
movzx eax, byte [ebx + 2]
imul eax, eax, 0x1e
imul ecx, ecx, 0xb
push 0x64
add eax, ecx
movzx ecx, byte [ebx + 1]
imul ecx, ecx, 0x3b
add eax, ecx
pop ecx
div ecx
mov byte [ebx], al
mov byte [ebx + 1], al
add ebx, 2
mov byte [ebx], al
mov eax, dword [ebp + 8]
add ebx, dword [ebp - 0x44]
inc eax
mov esi, dword [edi + 8]
mov dword [ebp + 8], eax
cmp eax, esi
jl 0x10094ad2
mov ecx, dword [ebp + 0xc]
xor ebx, ebx
inc ecx
mov dword [ebp + 0xc], ecx
cmp ecx, dword [edi + 0xc]
jl 0x10094aaa
jmp 0x100946fa
mov eax, ebx
mov dword [ebp - 0x44], ebx
cmp dword [edi + 0xc], ebx
jle 0x100946fa
mov ecx, dword [edi + 8]
mov dword [ebp - 0xc], 0xff
mov esi, dword [edi + 0x18]
imul esi, eax
mov eax, dword [edi + 0x10]
cdq
and edx, 7
mov dword [ebp + 0xc], ebx
add eax, edx
add esi, dword [edi + 0x20]
sar eax, 3
sub eax, 2
mov dword [ebp + 8], esi
mov dword [ebp - 0x24], eax
test ecx, ecx
jle 0x10094bf2
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x40]
push 0x64
mov dword [ebp - 0x28], eax
pop ebx
mov edx, dword [ebp + 8]
inc esi
movzx eax, byte [edx + 2]
movzx ecx, byte [esi]
imul eax, eax, 0x1e
imul ecx, ecx, 0x3b
add eax, ecx
movzx ecx, byte [edx]
imul ecx, ecx, 0xb
xor edx, edx
add eax, ecx
div ebx
mov ecx, eax
imul eax, dword [ebp - 0x48]
cdq
idiv dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add al, byte [ebp - 0x38]
mov dword [ebp + 8], esi
mov esi, 0xff
mov byte [edx], al
mov eax, ecx
imul eax, dword [ebp - 0x2c]
imul ecx, dword [ebp - 0x28]
cdq
idiv esi
mov esi, dword [ebp + 8]
add al, byte [ebp - 0x3c]
mov byte [esi], al
mov eax, ecx
cdq
mov ecx, 0xff
idiv ecx
inc esi
add al, byte [ebp - 0x40]
mov byte [esi], al
add esi, dword [ebp - 0x24]
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 8]
inc eax
mov dword [ebp + 8], esi
mov dword [ebp + 0xc], eax
cmp eax, ecx
jl 0x10094b7e
xor ebx, ebx
mov eax, dword [ebp - 0x44]
inc eax
mov dword [ebp - 0x44], eax
cmp eax, dword [edi + 0xc]
jl 0x10094b37
jmp 0x100946fa
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8