Function at 0x1003f256
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x24]
mov edx, ecx
mov ecx, dword [ebp + 0x1c]
push ebx
push esi
mov esi, dword [ebp + 0x28]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x18]
sub eax, edi
cmp edi, dword [ebp + 0x24]
mov dword [ebp - 4], edx
cmovl ebx, eax
sub esi, edi
lea eax, [edi + ecx]
mov dword [ebp - 8], ebx
cmp eax, dword [ebp + 0x28]
mov eax, dword [ebp + 0x10]
cmovl esi, ecx
mov dword [ebp - 0xc], esi
test eax, eax
je 0x1003f299
mov edi, ebx
imul edi, eax
jmp 0x1003f2ab
mov eax, ebx
cdq
and edx, 7
lea edi, [edx + eax]
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
sar edi, 3
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 0x24], edi
add edi, dword [ebp + 8]
add dword [ebp + 0x24], ecx
cmp byte [edx + 0x19], 0
mov dword [ebp + 0x28], edi
je 0x1003f58a
cmp eax, 4
jne 0x1003f46c
cmp byte [ebp + 0x14], 0
je 0x1003f475
cmp ebx, esi
jge 0x1003f8b1
mov ecx, dword [ebp + 0x2c]
mov esi, 0xff
mov eax, dword [ebp + 0x20]
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x18], eax
push ebx
push ecx
mov ecx, edx
call fcn.100407bf
mov ecx, eax
mov eax, dword [ebp + 0x24]
mov bl, byte [eax + 3]
movzx eax, bl
imul eax, ecx
cdq
idiv esi
sub bl, al
imul eax, ecx, 0xff
add bl, cl
movzx ecx, bl
mov byte [edi + 3], bl
mov ebx, 0xff
cdq
idiv ecx
mov ecx, ebx
mov edx, eax
mov eax, dword [ebp + 0x24]
sub ecx, edx
mov dword [ebp + 0x20], edx
mov dword [ebp + 0x2c], ecx
lea esi, [eax + 1]
movzx eax, byte [eax]
mov dword [ebp + 0x14], esi
lea esi, [edi + 1]
mov dword [ebp + 0x10], esi
mov esi, dword [ebp - 4]
imul eax, ecx
mov ecx, dword [esi + 4]
imul ecx, edx
add eax, ecx
cdq
idiv ebx
cmp byte [esi + 0x18], 0
mov dword [ebp + 0x24], eax
je 0x1003f39b
mov ecx, dword [ebp + 0x14]
mov byte [edi], al
movzx eax, byte [ecx]
imul eax, dword [ebp + 0x2c]
mov ecx, dword [esi + 8]
imul ecx, dword [ebp + 0x20]
add eax, ecx
mov ecx, dword [ebp + 0x10]
cdq
idiv ebx
mov byte [ecx], al
mov eax, dword [ebp + 0x14]
mov ecx, dword [esi + 0xc]
mov esi, 0xff
imul ecx, dword [ebp + 0x20]
movzx eax, byte [eax + 1]
imul eax, dword [ebp + 0x2c]
add eax, ecx
cdq
idiv ebx
mov ebx, dword [ebp - 8]
jmp 0x1003f43e
mov eax, dword [ebp + 0x14]
mov ecx, dword [esi + 8]
imul ecx, dword [ebp + 0x20]
movzx eax, byte [eax]
imul eax, dword [ebp + 0x2c]
add eax, ecx
mov ecx, dword [ebp - 4]
cdq
idiv ebx
mov ecx, dword [ecx + 0xc]
imul ecx, dword [ebp + 0x20]
mov esi, eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 1]
imul eax, dword [ebp + 0x2c]
add eax, ecx
mov ecx, dword [ebp + 0x18]
cdq
idiv ebx
mov edi, eax
mov eax, dword [ebp - 8]
movzx edx, byte [eax + ecx]
mov eax, ebx
mov ebx, dword [ebp + 0x28]
sub eax, edx
movzx ecx, byte [ebx]
imul eax, ecx
mov ecx, dword [ebp + 0x24]
imul ecx, edx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [ebx], al
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 0x18]
movzx edx, byte [ebx + eax]
mov eax, ecx
mov ecx, dword [ebp + 0x10]
sub eax, edx
imul edx, esi
mov esi, 0xff
movzx ecx, byte [ecx]
imul eax, ecx
mov ecx, dword [ebp + 0x10]
add eax, edx
cdq
idiv esi
mov byte [ecx], al
mov eax, dword [ebp + 0x18]
movzx ecx, byte [ecx + 1]
movzx edx, byte [ebx + eax]
mov eax, esi
sub eax, edx
imul edx, edi
mov edi, dword [ebp + 0x28]
imul eax, ecx
add eax, edx
cdq
idiv esi
mov ecx, dword [ebp + 0x14]
mov edx, eax
add ecx, 3
lea eax, [edi + 2]
inc ebx
mov dword [ebp + 0x24], ecx
lea edi, [eax + 2]
mov ecx, dword [ebp + 0x1c]
mov byte [eax], dl
mov edx, dword [ebp - 4]
mov dword [ebp + 0x28], edi
mov dword [ebp - 8], ebx
cmp ebx, dword [ebp - 0xc]
jl 0x1003f2f0
jmp 0x1003f8b1
cmp eax, 3
jne 0x1003f8b1
cmp ebx, esi
jge 0x1003f8b1
add eax, 0xfffffffe
mov esi, 0xff
mov dword [ebp + 0x14], eax
push ebx
push dword [ebp + 0x2c]
mov ecx, edx
call fcn.100407bf
mov edi, eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0x24]
sub esi, edi
mov ecx, dword [ecx + 4]
movzx eax, byte [eax]
imul eax, esi
imul ecx, edi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 4]
mov ebx, eax
mov eax, dword [ebp + 0x24]
inc eax
mov dword [ebp + 0x24], eax
mov ecx, dword [ecx + 8]
imul ecx, edi
movzx eax, byte [eax]
imul eax, esi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x24]
inc eax
mov ecx, dword [ecx + 0xc]
mov dword [ebp + 0x24], eax
imul ecx, edi
movzx eax, byte [eax]
imul eax, esi
mov edi, dword [ebp + 0x28]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov edx, dword [ebp + 0x20]
mov esi, eax
mov eax, dword [ebp + 0x14]
add dword [ebp + 0x24], eax
mov eax, dword [ebp - 8]
movzx edx, byte [eax + edx]
mov eax, ecx
movzx ecx, byte [edi]
sub eax, edx
imul eax, ecx
mov ecx, 0xff
imul edx, ebx
mov ebx, dword [ebp - 8]
add eax, edx
cdq
idiv ecx
mov byte [edi], al
mov eax, dword [ebp + 0x20]
movzx edx, byte [ebx + eax]
mov eax, ecx
movzx ecx, byte [edi + 1]
sub eax, edx
imul edx, dword [ebp + 0x10]
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [edi + 1], al
add edi, 2
mov eax, dword [ebp + 0x20]
movzx edx, byte [ebx + eax]
mov eax, ecx
movzx ecx, byte [edi]
sub eax, edx
imul eax, ecx
imul edx, esi
add eax, edx
cdq
mov esi, 0xff
idiv esi
mov edx, dword [ebp - 4]
mov byte [edi], al
add edi, dword [ebp + 0x14]
inc ebx
mov dword [ebp + 0x28], edi
mov dword [ebp - 8], ebx
cmp ebx, dword [ebp - 0xc]
jl 0x1003f488
jmp 0x1003f8b1
cmp eax, 4
jne 0x1003f71d
cmp byte [ebp + 0x14], 0
jne 0x1003f710
cmp ebx, esi
jge 0x1003f8b1
mov eax, dword [ebp + 0x2c]
mov esi, 0xff
push ebx
push eax
mov ecx, edx
call fcn.100407bf
mov dword [ebp + 0x1c], eax
mov edx, esi
sub edx, eax
mov eax, dword [ebp + 0x24]
mov dword [ebp + 8], edx
lea ecx, [eax + 1]
movzx eax, byte [eax]
mov dword [ebp + 0x14], ecx
lea ecx, [edi + 1]
mov dword [ebp + 0x18], ecx
mov ecx, dword [ebp - 4]
imul eax, edx
mov ecx, dword [ecx + 0xc]
imul ecx, dword [ebp + 0x1c]
add eax, ecx
mov ecx, dword [ebp - 4]
cdq
idiv esi
cmp byte [ecx + 0x18], 0
mov dword [ebp + 0x24], eax
je 0x1003f7d4
mov edx, dword [ebp + 0x14]
mov byte [edi], al
mov ecx, dword [ecx + 8]
imul ecx, dword [ebp + 0x1c]
movzx eax, byte [edx]
imul eax, dword [ebp + 8]
mov edi, dword [ebp + 0x18]
add eax, ecx
mov ecx, dword [ebp - 4]
cdq
idiv esi
mov byte [edi], al
inc edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [ecx + 4]
inc eax
imul ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], edi
movzx eax, byte [eax]
imul eax, dword [ebp + 8]
add eax, ecx
jmp 0x1003f87a
mov eax, dword [ebp + 0x20]
mov ecx, edx
push ebx
push dword [ebp + 0x2c]
mov al, byte [ebx + eax]
mov byte [ebp + 0x17], al
movzx eax, al
mov dword [ebp + 0x10], eax
call fcn.100407bf
imul eax, dword [ebp + 0x10]
mov ecx, 0xff
mov dword [ebp + 0x28], eax
cdq
idiv ecx
test eax, eax
jne 0x1003f669
add edi, 4
jmp 0x1003f70c
lea edx, [edi + 1]
mov dword [ebp + 0x24], edx
cmp byte [ebp + 0x17], cl
jne 0x1003f692
mov edx, dword [ebp - 4]
mov byte [edi + 3], al
mov al, byte [edx + 0xc]
mov byte [edi], al
mov edi, dword [ebp + 0x24]
mov al, byte [edx + 8]
mov byte [edi], al
mov al, byte [edx + 4]
mov byte [edi + 1], al
add edi, 3
jmp 0x1003f70f
mov dl, byte [edi + 3]
test dl, dl
je 0x1003f674
mov esi, ecx
movzx eax, dl
sub esi, dword [ebp + 0x10]
imul eax, esi
add eax, dword [ebp + 0x28]
cdq
idiv ecx
mov ecx, dword [ebp - 4]
mov byte [edi + 3], al
movzx eax, byte [edi]
imul eax, esi
mov ecx, dword [ecx + 0xc]
imul ecx, dword [ebp + 0x10]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 4]
mov byte [edi], al
mov edi, dword [ebp + 0x24]
mov ecx, dword [ecx + 8]
imul ecx, dword [ebp + 0x10]
movzx eax, byte [edi]
imul eax, esi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [ebp - 4]
mov byte [edi], al
movzx eax, byte [edi + 1]
imul eax, esi
mov ecx, dword [ecx + 4]
imul ecx, dword [ebp + 0x10]
mov esi, dword [ebp - 0xc]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [edi + 1], al
add edi, 3
mov edx, dword [ebp - 4]
inc ebx
cmp ebx, esi
jl 0x1003f634
jmp 0x1003f8b1
cmp eax, 3
je 0x1003f59d
cmp eax, 1
jne 0x1003f7bc
cmp ebx, esi
jge 0x1003f8b1
mov ecx, dword [ebp + 0x2c]
mov esi, 0xff
mov eax, dword [ebp + 0x20]
mov dword [ebp + 0x28], ecx
mov dword [ebp + 0x14], eax
push ebx
push ecx
mov ecx, edx
mov dword [ebp + 0x2c], edi
call fcn.100407bf
mov ecx, dword [ebp + 0x24]
mov edx, eax
lea eax, [ecx + 1]
movzx ecx, byte [ecx]
mov dword [ebp + 0x10], eax
mov eax, esi
sub eax, edx
imul eax, ecx
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x10]
imul ecx, edx
add eax, ecx
cdq
idiv esi
mov edx, dword [ebp - 4]
mov dword [ebp + 0x20], eax
cmp byte [edx + 0x18], 0
jne 0x1003f7a3
mov eax, dword [ebp + 0x14]
mov cl, byte [edi]
inc edi
movzx ecx, cl
movzx edx, byte [ebx + eax]
mov eax, esi
sub eax, edx
imul edx, dword [ebp + 0x20]
imul eax, ecx
add eax, edx
cdq
idiv esi
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 0x2c]
inc ebx
mov byte [ecx], al
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x28]
mov dword [ebp + 0x24], eax
cmp ebx, dword [ebp - 0xc]
jl 0x1003f748
jmp 0x1003f8b1
push dword [ebp + 0x18]
mov ecx, edx
push dword [ebp + 0x2c]
push dword [ebp + 0x20]
push esi
push ebx
push edi
call fcn.1003f18c
jmp 0x1003f8b1
mov ecx, dword [ecx + 8]
imul ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
movzx eax, byte [edi]
imul eax, dword [ebp + 8]
add eax, ecx
mov ecx, dword [ebp - 4]
cdq
idiv esi
mov ecx, dword [ecx + 4]
inc edi
imul ecx, dword [ebp + 0x1c]
mov esi, eax
mov dword [ebp + 0x14], edi
movzx eax, byte [edi]
imul eax, dword [ebp + 8]
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov edi, eax
mov eax, dword [ebp + 0x20]
movzx edx, byte [ebx + eax]
mov eax, ecx
mov ebx, dword [ebp + 0x28]
sub eax, edx
imul edx, dword [ebp + 0x24]
movzx ecx, byte [ebx]
imul eax, ecx
mov ecx, 0xff
add eax, edx
cdq
idiv ecx
mov byte [ebx], al
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 0x20]
movzx edx, byte [ebx + eax]
mov eax, ecx
mov ecx, dword [ebp + 0x18]
sub eax, edx
imul edx, esi
mov esi, 0xff
movzx ecx, byte [ecx]
imul eax, ecx
mov ecx, dword [ebp + 0x18]
add eax, edx
cdq
idiv esi
mov byte [ecx], al
inc ecx
mov eax, dword [ebp + 0x20]
mov dword [ebp + 0x24], ecx
mov dword [ebp + 0x18], ecx
movzx ecx, byte [ecx]
movzx edx, byte [ebx + eax]
mov eax, esi
sub eax, edx
imul edx, edi
mov edi, dword [ebp + 0x24]
imul eax, ecx
add eax, edx
cdq
add edi, 0xfffffffe
idiv esi
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
add edx, 0xfffffffe
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x10]
add edi, eax
add eax, edx
mov dword [ebp + 0x28], edi
mov edx, dword [ebp - 4]
inc ebx
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov byte [ecx], al
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 8], ebx
cmp ebx, dword [ebp - 0xc]
jl 0x1003f5ad
pop edi
pop esi
pop ebx
leave
ret 0x28