Function at 0x436ab0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
add edx, ebp
sub edx, dword [esp + 0x4c]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
cmp edx, ebp
jbe 0x436e37
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
lea ebx, [eax - 1]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebx
jmp 0x436b4f
mov dword [ecx + edi*4], ebp
add esi, 4
mov eax, dword [esp + 0x3c]
mov dword [eax + 4], esi
mov ebx, dword [esp + 0x20]
add ebp, ebx
mov dword [esp + 4], esi
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x48]
inc ebp
mov dword [esp], ecx
cmp ebp, edx
jae 0x436e37
test esi, esi
je 0x436b58
cmp byte [esi], 0x3f
je 0x436b64
movzx eax, byte [ebp]
cmp al, byte [edi]
jne 0x436be0
cmp dword [esp + 0x4c], 2
jb 0x436ba0
xor eax, eax
jmp 0x436b84
movzx ecx, byte [ebp + eax + 1]
cmp cl, byte [edi + eax + 1]
jne 0x436d03
inc eax
cmp ebx, eax
je 0x436ba0
test esi, esi
je 0x436b70
cmp byte [esi + eax + 1], 0x3f
jne 0x436b70
jmp 0x436b7f
mov esi, dword [esp]
mov eax, esi
mov ebx, dword [esp + 4]
xor eax, ebx
mov edi, esi
not edi
mov edx, edi
and edx, ebx
add edx, edx
sub edx, eax
sar edx, 2
cmp ebx, dword [esp + 8]
je 0x436be8
mov edi, ebx
sub edi, esi
sar edi, 2
mov ecx, esi
mov esi, ebx
cmp edi, edx
jae 0x436b20
jmp 0x436d8f
mov ecx, dword [esp]
jmp 0x436b43
mov dword [esp + 0x1c], edx
lea eax, [edx + 1]
mov ecx, ebx
sub ecx, esi
mov dword [esp + 8], ecx
sar ecx, 2
mov edx, ecx
shr edx, 1
mov dword [esp + 0x10], ecx
add edx, ecx
cmp edx, eax
ja 0x436c0a
mov edx, eax
mov dword [esp + 0x18], edx
lea eax, [edx*4]
push eax
call fcn.00408570
add esp, 4
mov ecx, eax
test esi, esi
je 0x436d65
mov eax, dword [esp + 8]
lea edx, [eax + 0x5ba92d98]
cmp ecx, esi
mov dword [esp + 0xc], ecx
jbe 0x436d0d
cmp ebx, ecx
jbe 0x436d0d
mov ebx, dword [esp + 8]
test ebx, ebx
je 0x436d54
lea eax, [esi + edx]
add eax, 0xa456d267
mov ecx, dword [esp + 0xc]
add ecx, edx
add ecx, 0xa456d267
add edi, dword [esp + 4]
and edx, 7
je 0x436c9d
mov dword [esp + 0x14], edi
neg edx
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, edx
movzx edx, byte [eax + esi]
mov byte [ecx + esi], dl
mov edx, edi
dec esi
cmp edi, esi
jne 0x436c80
add eax, esi
add ebx, esi
add ecx, esi
mov esi, dword [esp]
mov edi, dword [esp + 0x14]
cmp edi, 7
jb 0x436d54
neg ebx
xor edx, edx
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 0x436cb0
jmp 0x436d54
add ebp, eax
mov ecx, dword [esp]
jmp 0x436b43
mov dword [esp + 0x14], edx
mov edx, ecx
mov ebx, dword [esp + 8]
mov ecx, ebx
shr ecx, 2
mov eax, esi
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
and ebx, 0xfffffffc
lea eax, [edx + ebx]
mov edx, dword [esp + 0x14]
add ebx, esi
mov ecx, edx
shr ecx, 1
and ecx, 1
mov esi, ebx
mov edi, eax
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
mov esi, dword [esp]
test dl, 1
je 0x436d54
and edx, 2
movzx ecx, byte [ebx + edx]
mov byte [eax + edx], cl
push esi
call fcn.00408580
add esp, 4
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
mov dword [eax], ecx
mov edx, dword [esp + 0x1c]
lea esi, [ecx + edx*4]
mov dword [eax + 4], esi
mov edi, dword [esp + 0x18]
lea edi, [ecx + edi*4]
mov dword [esp + 8], edi
mov dword [eax + 8], edi
mov edi, dword [esp + 0x10]
cmp edi, edx
jae 0x436b20
mov eax, dword [esp]
lea eax, [eax + edx*4]
mov edx, eax
sub edx, ebx
mov dword [esp + 4], ebx
lea ebx, [ecx + edi*4]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edi
lea edi, [ecx + edi*4]
add edi, 4
lea ecx, [ebx + edx]
cmp ecx, edi
jbe 0x436ddd
cmp eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov eax, edi
mov edi, dword [esp + 0x10]
je 0x436b20
push edx
push ebx
push eax
call fcn.00408600
mov ecx, dword [esp + 0x18]
add esp, 0xc
jmp 0x436b20
mov ecx, edx
shr ecx, 2
mov eax, ebx
mov dword [esp], ebx
mov ebx, edi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and eax, 0xfffffffc
add ebx, eax
add eax, dword [esp]
mov ecx, edx
shr ecx, 1
and ecx, 1
mov edi, eax
mov dword [esp], eax
mov dword [esp + 4], ebx
mov edi, ebx
mov ebx, dword [esp]
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test dl, 1
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
je 0x436b20
and edx, 2
movzx eax, byte [eax + edx]
mov ebx, dword [esp + 4]
mov byte [ebx + edx], al
jmp 0x436b20
mov eax, dword [esp + 0x3c]
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret