Function at 0x415d80
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 0x415dc4
movzx edx, dx
mov esi, 0xff
cmp dx, si
ja 0x415dbc
movzx edx, word [ebx + ecx*2 + 2]
inc ecx
test dx, dx
jne 0x415da5
jmp 0x415dc4
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 0x415de6
sub ecx, esi
mov dword [esp + 0x18], ecx
cmp word [ebx], bp
je 0x416051
jmp 0x415e02
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 0x415f6b
mov edx, dword [esp + 0x24]
xor ecx, ecx
add ebp, edx
mov dword [esp + 0x1c], ebp
mov edx, esi
jmp 0x415e30
movzx edi, word [edx]
test di, di
je 0x415e50
movsx ebx, byte [ebp]
movzx edi, di
cmp edi, ebx
jne 0x415e50
inc ecx
add edx, 2
inc ebp
cmp ecx, 0x81
jl 0x415e30
cmp ecx, 2
jl 0x415ea7
mov ebp, dword [esp + 0x14]
add ebp, ecx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x415e81
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 0x416042
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 0x415ef1
mov edx, esi
shr edx, 8
cmp dl, byte [esp + 0x10]
jne 0x415ef1
movzx edx, byte [esp + 0x11]
movsx ebx, byte [edi]
add edx, ebx
xor edx, esi
test dl, dl
jne 0x415ef1
inc ecx
inc edi
add ebp, 2
cmp ecx, 0x81
jl 0x415ec0
cmp ecx, 2
mov ebp, dword [esp + 0x14]
jl 0x415f5f
add ebp, ecx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x415f22
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 0x416042
mov edi, dword [esp + 0x2c]
mov dl, byte [esp + 0x12]
mov bl, byte [esp + 0x13]
test bl, bl
jne 0x415fa8
cmp dword [eax + 8], 8
jne 0x415f91
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 0x41603e
cmp bl, byte [esp + 0x10]
jne 0x415fed
cmp dword [eax + 8], 8
jne 0x415fd0
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 0x41603e
cmp dword [eax + 8], 8
jne 0x416014
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 0x415e00
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