Function at 0x415e90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
mov eax, ecx
mov dword [eax], edi
movzx edx, word [ebx]
xor ecx, ecx
mov byte [esp + 0x10], 1
test dx, dx
je 0x415ed4
movzx edx, dx
mov esi, 0xff
cmp dx, si
ja 0x415ecc
movzx edx, word [ebx + ecx*2 + 2]
inc ecx
test dx, dx
jne 0x415eb5
jmp 0x415ed4
mov cl, byte [ebx + ecx*2 + 1]
mov byte [esp + 0x10], cl
mov edx, dword [eax + 0x10]
mov cl, byte [esp + 0x10]
mov byte [edi + edx], cl
mov ecx, dword [eax + 0x10]
inc ecx
xor ebp, ebp
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x14], ebp
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x415ef6
sub ecx, esi
mov dword [esp + 0x18], ecx
cmp word [ebx], bp
je 0x416161
jmp 0x415f12
mov ebx, edx
mov dl, byte [ebx + ebp*2]
lea esi, [ebx + ebp*2]
mov bl, byte [esi + 1]
mov byte [esp + 0x13], bl
mov byte [esp + 0x12], dl
cmp ebp, dword [esp + 0x18]
jae 0x41607b
mov edx, dword [esp + 0x24]
xor ecx, ecx
add ebp, edx
mov dword [esp + 0x1c], ebp
mov edx, esi
jmp 0x415f40
movzx edi, word [edx]
test di, di
je 0x415f60
movsx ebx, byte [ebp]
movzx edi, di
cmp edi, ebx
jne 0x415f60
inc ecx
add edx, 2
inc ebp
cmp ecx, 0x81
jl 0x415f40
cmp ecx, 2
jl 0x415fb7
mov ebp, dword [esp + 0x14]
add ebp, ecx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x415f91
mov edx, dword [eax]
mov esi, dword [eax + 0xc]
mov bl, byte [eax + 4]
mov byte [edx + esi], bl
mov edx, dword [eax + 0x10]
mov dword [eax + 0xc], edx
inc edx
mov dword [eax + 0x10], edx
mov dword [eax + 8], 0
mov dl, byte [eax + 4]
add dword [eax + 8], 2
mov edi, dword [esp + 0x2c]
add dl, dl
add dl, dl
or dl, 3
mov byte [eax + 4], dl
mov edx, dword [eax + 0x10]
sub cl, 2
mov byte [edi + edx], cl
inc dword [eax + 0x10]
jmp 0x416152
mov cl, byte [esp + 0x12]
mov edi, dword [esp + 0x1c]
sub cl, byte [edi]
mov ebp, esi
mov byte [esp + 0x11], cl
xor ecx, ecx
lea esp, [esp]
movzx esi, word [ebp]
test si, si
je 0x416001
mov edx, esi
shr edx, 8
cmp dl, byte [esp + 0x10]
jne 0x416001
movzx edx, byte [esp + 0x11]
movsx ebx, byte [edi]
add edx, ebx
xor edx, esi
test dl, dl
jne 0x416001
inc ecx
inc edi
add ebp, 2
cmp ecx, 0x81
jl 0x415fd0
cmp ecx, 2
mov ebp, dword [esp + 0x14]
jl 0x41606f
add ebp, ecx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x416032
mov edx, dword [eax]
mov esi, dword [eax + 0xc]
mov bl, byte [eax + 4]
mov byte [edx + esi], bl
mov edx, dword [eax + 0x10]
mov dword [eax + 0xc], edx
inc edx
mov dword [eax + 0x10], edx
mov dword [eax + 8], 0
movzx edx, byte [eax + 4]
add dword [eax + 8], 2
mov edi, dword [esp + 0x2c]
add dl, dl
add dl, dl
or dl, 3
mov byte [eax + 4], dl
mov edx, dword [eax + 0x10]
sub cl, 2
or cl, 0x80
mov byte [edi + edx], cl
movzx edx, byte [esp + 0x11]
mov esi, 1
add dword [eax + 0x10], esi
mov ecx, dword [eax + 0x10]
mov byte [ecx + edi], dl
add dword [eax + 0x10], esi
jmp 0x416152
mov edi, dword [esp + 0x2c]
mov dl, byte [esp + 0x12]
mov bl, byte [esp + 0x13]
test bl, bl
jne 0x4160b8
cmp dword [eax + 8], 8
jne 0x4160a1
mov ecx, dword [eax]
mov esi, dword [eax + 0xc]
mov bl, byte [eax + 4]
mov byte [ecx + esi], bl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov ecx, dword [eax + 0x10]
add dword [eax + 8], 2
shl byte [eax + 4], 2
mov byte [edi + ecx], dl
inc dword [eax + 0x10]
inc ebp
jmp 0x41614e
cmp bl, byte [esp + 0x10]
jne 0x4160fd
cmp dword [eax + 8], 8
jne 0x4160e0
mov ecx, dword [eax]
mov esi, dword [eax + 0xc]
mov bl, byte [eax + 4]
mov byte [ecx + esi], bl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
add dword [eax + 8], 2
add cl, cl
add cl, cl
or cl, 1
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [edi + ecx], dl
inc dword [eax + 0x10]
inc ebp
jmp 0x41614e
cmp dword [eax + 8], 8
jne 0x416124
movzx ebx, byte [eax + 4]
mov ecx, dword [eax]
mov esi, dword [eax + 0xc]
mov byte [ecx + esi], bl
mov ecx, dword [eax + 0x10]
mov bl, byte [esp + 0x13]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
add dword [eax + 8], 2
add cl, cl
add cl, cl
or cl, 2
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [edi + ecx], dl
mov edx, 1
add dword [eax + 0x10], edx
mov ecx, dword [eax + 0x10]
mov byte [ecx + edi], bl
add dword [eax + 0x10], edx
add ebp, edx
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x28]
cmp word [edx + ebp*2], 0
jne 0x415f10
mov dl, byte [eax + 4]
mov ecx, 8
sub ecx, dword [eax + 8]
shl dl, cl
mov ecx, dword [eax + 0xc]
mov byte [edi + ecx], dl
mov eax, dword [eax + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc