Function at 0x435590
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add eax, ebp
sub eax, dword [esp + 0x44]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x1c], eax
cmp eax, ebp
jbe 0x435831
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x435623
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 0x435679
mov ebx, dword [esp + 0x34]
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 + 0x1c]
jae 0x435831
test edx, edx
je 0x43562c
cmp byte [edx], 0x3f
je 0x435638
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x40]
cmp cl, byte [eax]
jne 0x435618
mov dword [esp], edi
cmp dword [esp + 0x44], 2
jb 0x4355f0
xor ecx, ecx
jmp 0x43566c
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x40]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x48]
jne 0x435723
inc ecx
cmp esi, ecx
je 0x4355f0
test edx, edx
je 0x435650
cmp byte [edx + ecx + 1], 0x3f
jne 0x435650
jmp 0x435667
mov dword [esp + 0x10], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x18], ecx
add edx, ecx
cmp edx, eax
ja 0x435690
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.00408d80
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov ebx, dword [esp + 0x34]
mov dword [esp + 4], eax
je 0x435805
cmp eax, edx
mov ebx, dword [esp + 0x10]
mov edi, eax
jbe 0x43572d
lea eax, [edx + ebx]
cmp eax, edi
jbe 0x43572d
test ebx, ebx
je 0x4357f1
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 0x435789
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 0x435700
add eax, edi
mov ebx, dword [esp + 0x10]
add ebx, edi
add ecx, edi
mov edx, dword [esp]
cmp edx, 7
jae 0x435792
jmp 0x4357f1
add ebp, ecx
mov edi, dword [esp]
jmp 0x435618
mov eax, ebx
mov ecx, ebx
shr ecx, 2
mov dword [esp], edx
mov ebx, dword [esp]
xchg esi, ebx
rep movsd dword es:[edi], dword [esi]
xchg esi, ebx
mov ebx, eax
and ebx, 0xfffffffc
add ebx, dword [esp + 4]
mov ecx, eax
xor ecx, 3
mov edi, edx
mov edx, eax
or edx, 0xfffffffc
and edx, ecx
add edx, edi
mov ecx, eax
shr ecx, 1
and ecx, 1
mov edi, edx
mov dword [esp], edx
mov dword [esp + 0x14], ebx
mov edi, ebx
mov ebx, dword [esp]
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test al, 1
je 0x4357f1
and eax, 2
movzx ecx, byte [edx + eax]
mov edx, dword [esp + 0x14]
mov byte [edx + eax], cl
jmp 0x4357f1
mov ebx, dword [esp + 0x10]
cmp edx, 7
jb 0x4357f1
neg ebx
xor edx, edx
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 0x4357a0
push dword [esp + 8]
call fcn.00408d90
add esp, 4
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 4]
mov dword [ebx], eax
mov ecx, dword [esp + 0x18]
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 + 0x48]
jmp 0x43560d
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret