Function at 0x4366f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x44]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
add esi, ebp
sub esi, edx
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
cmp esi, ebp
jbe 0x436a42
mov ebx, dword [esp + 0x48]
lea eax, [edx - 1]
mov dword [esp + 0x1c], eax
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], esi
jmp 0x436791
push eax
push dword [esp + 0xc]
push edx
call fcn.00408340
add esp, 0xc
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dword [ecx + eax], ebp
add esi, 4
mov eax, dword [esp + 0x34]
mov dword [eax + 4], esi
add ebp, edx
dec ebp
mov dword [esp + 8], esi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x48]
inc ebp
mov dword [esp], ecx
cmp ebp, esi
jae 0x436a42
test ebx, ebx
je 0x43679a
cmp byte [ebx], 0x3f
je 0x4367a6
movzx eax, byte [ebp]
mov ecx, dword [esp + 0x40]
cmp al, byte [ecx]
jne 0x436820
cmp edx, 2
jb 0x4367e0
xor eax, eax
jmp 0x4367ca
movzx ecx, byte [ebp + eax + 1]
mov edi, dword [esp + 0x40]
cmp cl, byte [edi + eax + 1]
jne 0x43692f
inc eax
cmp dword [esp + 0x1c], eax
je 0x4367e0
test ebx, ebx
je 0x4367b0
cmp byte [ebx + eax + 1], 0x3f
jne 0x4367b0
jmp 0x4367c3
mov esi, dword [esp]
mov eax, esi
mov edi, dword [esp + 8]
xor eax, edi
mov ebx, esi
not ebx
and ebx, edi
add ebx, ebx
sub ebx, eax
cmp edi, dword [esp + 0x10]
je 0x436828
mov eax, edi
sub eax, esi
mov dword [esp + 0xc], esi
mov esi, edi
cmp eax, ebx
jae 0x436765
jmp 0x4369bd
mov ecx, dword [esp]
jmp 0x436785
mov eax, ebx
sar eax, 2
inc eax
mov ecx, edi
sub ecx, esi
mov dword [esp + 4], ecx
sar ecx, 2
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
ja 0x436845
mov edx, eax
mov dword [esp + 0x10], edx
lea eax, [edx*4]
push eax
call fcn.004082c0
add esp, 4
mov ecx, eax
test esi, esi
mov dword [esp + 0xc], eax
je 0x436993
mov dword [esp + 0x14], ebx
cmp ecx, esi
jbe 0x436939
cmp edi, ecx
jbe 0x436939
cmp dword [esp + 4], 0
je 0x43697c
mov edi, dword [esp]
mov edx, dword [esp + 4]
lea eax, [edi + edx]
dec eax
mov ecx, dword [esp + 0xc]
add ecx, edx
dec ecx
mov esi, edx
and esi, 7
je 0x4368c7
neg esi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp esi, edx
jne 0x4368b0
add eax, edx
add ecx, edx
add edx, dword [esp + 4]
mov edi, dword [esp]
mov esi, edi
sub esi, dword [esp + 8]
cmp esi, 0xfffffff8
ja 0x43697c
neg edx
xor esi, esi
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + esi]
mov byte [ecx + esi], bl
movzx ebx, byte [eax + esi - 1]
mov byte [ecx + esi - 1], bl
movzx ebx, byte [eax + esi - 2]
mov byte [ecx + esi - 2], bl
movzx ebx, byte [eax + esi - 3]
mov byte [ecx + esi - 3], bl
movzx ebx, byte [eax + esi - 4]
mov byte [ecx + esi - 4], bl
movzx ebx, byte [eax + esi - 5]
mov byte [ecx + esi - 5], bl
movzx ebx, byte [eax + esi - 6]
mov byte [ecx + esi - 6], bl
movzx ebx, byte [eax + esi - 7]
mov byte [ecx + esi - 7], bl
add esi, 0xfffffff8
cmp edx, esi
jne 0x4368e0
jmp 0x43697c
add ebp, eax
mov ecx, dword [esp]
jmp 0x436785
mov edi, ecx
mov ebx, dword [esp + 4]
mov ecx, ebx
shr ecx, 2
mov eax, esi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edx, ebx
and edx, 0xfffffffc
mov eax, dword [esp + 0xc]
add eax, edx
add edx, esi
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov esi, edx
mov edi, eax
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
test bl, 1
je 0x43697c
mov ecx, dword [esp + 4]
and ecx, 2
movzx edx, byte [edx + ecx]
mov byte [eax + ecx], dl
push dword [esp]
call fcn.004082d0
add esp, 4
mov edi, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
mov dword [eax], ecx
lea esi, [ecx + ebx]
mov dword [eax + 4], esi
mov edx, dword [esp + 0x10]
lea ecx, [ecx + edx*4]
mov dword [esp + 0x10], ecx
mov dword [eax + 8], ecx
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 4]
cmp eax, ebx
jae 0x436765
mov ecx, eax
mov eax, dword [esp + 0xc]
lea edx, [eax + ecx]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
lea edx, [eax + ecx]
add edx, 4
mov eax, dword [esp]
add eax, ebx
sub eax, edi
cmp eax, 4
jg 0x43674f
mov ecx, eax
shr ecx, 2
mov dword [esp], eax
mov eax, dword [esp + 8]
mov ebx, eax
mov edi, edx
xchg esi, ebx
rep movsd dword es:[edi], dword [esi]
xchg esi, ebx
mov ecx, dword [esp]
mov ebx, ecx
and ebx, 0xfffffffc
add edx, ebx
add ebx, eax
shr ecx, 1
and ecx, 1
mov eax, ebx
mov dword [esp + 8], edx
mov edi, edx
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov eax, dword [esp]
mov ecx, eax
test al, 1
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 4]
je 0x436765
mov eax, ecx
and eax, 2
movzx ecx, byte [ebx + eax]
mov edi, dword [esp + 8]
mov byte [edi + eax], cl
jmp 0x436761
mov eax, dword [esp + 0x34]
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret