Function at 0x436a80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
add edx, ebp
sub edx, edi
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
cmp edx, ebp
jbe 0x436d3a
mov ecx, dword [esp + 0x44]
lea eax, [edi - 1]
mov dword [esp + 0x18], eax
xor eax, eax
xor esi, esi
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], edx
jmp 0x436b05
mov ebx, dword [esp + 4]
mov dword [ebx + esi], ebp
add edx, 4
mov eax, dword [esp + 0x30]
mov dword [eax + 4], edx
add ebp, edi
dec ebp
mov eax, edx
mov edx, dword [esp + 0x14]
inc ebp
mov esi, ebx
cmp ebp, edx
jae 0x436d3a
mov dword [esp], eax
test ecx, ecx
je 0x436b11
cmp byte [ecx], 0x3f
je 0x436b21
movzx eax, byte [ebp]
mov ebx, dword [esp + 0x3c]
cmp al, byte [ebx]
jne 0x436c71
cmp edi, 2
jb 0x436b60
xor eax, eax
jmp 0x436b4e
movzx ecx, byte [ebp + eax + 1]
mov ebx, dword [esp + 0x3c]
cmp cl, byte [ebx + eax + 1]
mov ecx, dword [esp + 0x44]
jne 0x436c6f
inc eax
cmp dword [esp + 0x18], eax
je 0x436b60
test ecx, ecx
je 0x436b30
cmp byte [ecx + eax + 1], 0x3f
jne 0x436b30
jmp 0x436b47
mov ebx, dword [esp]
mov edi, ebx
sub edi, esi
mov dword [esp + 4], esi
mov edx, ebx
cmp ebx, dword [esp + 0xc]
jne 0x436cf1
mov ecx, edi
sar ecx, 2
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
mov ebx, edi
ja 0x436b8d
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.00408330
add esp, 4
test esi, esi
mov dword [esp + 4], eax
je 0x436cce
cmp eax, esi
mov ecx, dword [esp]
mov dword [esp + 8], ebx
jbe 0x436c7b
cmp ecx, eax
jbe 0x436c7b
test ebx, ebx
je 0x436cbd
mov edx, dword [esp + 8]
lea eax, [esi + edx]
dec eax
mov ecx, dword [esp + 4]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x436c04
neg edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp edi, edx
jne 0x436bf0
add eax, edx
add ecx, edx
add edx, dword [esp + 8]
mov edi, esi
sub edi, dword [esp]
cmp edi, 0xfffffff8
ja 0x436cbd
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
movzx ebx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], bl
movzx ebx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], bl
movzx ebx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], bl
movzx ebx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], bl
movzx ebx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], bl
movzx ebx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], bl
movzx ebx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x436c20
jmp 0x436cbd
add ebp, eax
mov ebx, esi
mov eax, dword [esp]
jmp 0x436afa
mov ecx, ebx
shr ecx, 2
mov edx, esi
mov edi, eax
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov edx, ebx
and edx, 0xfffffffc
lea edi, [eax + edx]
add edx, esi
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov eax, edx
mov dword [esp + 0x10], edi
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
test bl, 1
je 0x436cbd
mov eax, dword [esp + 8]
and eax, 2
movzx ecx, byte [edx + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + eax], cl
push esi
call fcn.00408340
add esp, 4
mov eax, dword [esp + 4]
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
lea edx, [eax + ebx]
mov dword [ecx + 4], edx
mov edi, dword [esp + 0xc]
lea eax, [eax + edi*4]
mov dword [esp + 0xc], eax
mov dword [ecx + 8], eax
mov ecx, dword [esp + 0x44]
mov edi, ebx
mov ebx, dword [esp]
mov eax, esi
xor eax, ebx
not esi
and esi, ebx
add esi, esi
sub esi, eax
cmp esi, edi
mov edi, dword [esp + 0x40]
jae 0x436ae0
mov eax, dword [esp + 4]
lea ebx, [eax + esi]
lea edi, [eax + esi]
add edi, 4
mov dword [esp], edi
mov eax, ebx
xor ecx, ecx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edi, dword [esp]
xor ecx, ecx
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
jmp 0x436ae0
mov eax, dword [esp + 0x30]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret