Function at 0x436af0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, ebp
sub eax, dword [esp + 0x48]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x20], eax
cmp eax, ebp
jbe 0x436d91
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x436b83
mov ebx, dword [esp]
mov edi, ebx
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
cmp ebx, dword [esp + 0xc]
je 0x436bd9
mov ebx, dword [esp + 0x38]
mov edi, dword [esp]
mov dword [eax + ecx*4], ebp
add edi, 4
mov dword [ebx + 4], edi
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x20]
jae 0x436d91
test edx, edx
je 0x436b8c
cmp byte [edx], 0x3f
je 0x436b98
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x44]
cmp cl, byte [eax]
jne 0x436b78
mov dword [esp], edi
cmp dword [esp + 0x48], 2
jb 0x436b50
xor ecx, ecx
jmp 0x436bcc
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x44]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x4c]
jne 0x436c83
inc ecx
cmp esi, ecx
je 0x436b50
test edx, edx
je 0x436bb0
cmp byte [edx + ecx + 1], 0x3f
jne 0x436bb0
jmp 0x436bc7
mov dword [esp + 0x10], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x1c], ecx
add edx, ecx
cmp edx, eax
ja 0x436bf0
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.00408e10
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov dword [esp + 4], eax
mov ebx, dword [esp + 0x38]
je 0x436d65
cmp eax, edx
mov edi, eax
mov ebx, dword [esp + 0x10]
jbe 0x436c8d
lea eax, [edx + ebx]
cmp eax, edi
jbe 0x436c8d
test ebx, ebx
je 0x436d51
mov edx, dword [esp + 8]
lea eax, [edx + ebx]
dec eax
mov ecx, dword [esp + 4]
add ecx, ebx
dec ecx
not edx
add edx, dword [esp]
and ebx, 7
je 0x436ce6
mov dword [esp], edx
neg ebx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x436c60
add eax, edi
mov ebx, dword [esp + 0x10]
add ebx, edi
add ecx, edi
mov edx, dword [esp]
cmp edx, 7
jae 0x436cef
jmp 0x436d51
add ebp, ecx
mov edi, dword [esp]
jmp 0x436b78
mov ecx, ebx
shr ecx, 2
mov eax, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov edx, ebx
and edx, 0xfffffffc
mov ecx, dword [esp + 4]
lea edi, [ecx + edx]
add edx, eax
mov ecx, ebx
xor ecx, 0xfffffffc
mov eax, ebx
or eax, 3
and eax, ecx
mov ecx, eax
shr ecx, 1
mov dword [esp + 0x14], edx
mov dword [esp], edx
mov dword [esp + 0x18], edi
mov edx, dword [esp]
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
test bl, 1
je 0x436d51
and eax, 0xfffffffe
mov ecx, dword [esp + 0x14]
movzx ecx, byte [ecx + eax]
mov edx, dword [esp + 0x18]
mov byte [edx + eax], cl
jmp 0x436d51
mov ebx, dword [esp + 0x10]
cmp edx, 7
jb 0x436d51
neg ebx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ebx
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
mov ebx, edi
add edx, 0xfffffff8
cmp edi, edx
jne 0x436d00
push dword [esp + 8]
call fcn.00408e20
add esp, 4
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 4]
mov dword [ebx], eax
mov ecx, dword [esp + 0x1c]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
lea edx, [edx + eax*4]
mov eax, dword [esp + 4]
mov dword [esp + 0xc], edx
mov dword [ebx + 8], edx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x4c]
jmp 0x436b6d
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret