Function at 0x435420
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x1c]
push ebx
mov dword [ebp - 4], ecx
push esi
lea ecx, [eax*4]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0x2c]
push edi
mov edi, 1
mov dword [ebp - 8], ecx
cmp dword [ecx + eax], edi
cmovg edi, dword [ecx + eax]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
test eax, 0xffff0000
je 0x435465
sar eax, 0x10
mov ecx, eax
call fcn.004294b0
jmp 0x43546f
mov ecx, eax
call fcn.004294b0
add eax, 0x10
lea ecx, [eax - 1]
mov dword [ebp + 0x2c], eax
shl edi, cl
mov eax, 0x1fffffff
mov esi, edi
cdq
sar esi, 0x10
idiv esi
movzx edi, di
mov ebx, eax
movsx edx, bx
imul edi, edx
mov ecx, edx
imul ecx, esi
mov esi, ebx
sar esi, 0xf
inc esi
shl ebx, 0x10
sar esi, 1
sar edi, 0x10
add edi, ecx
mov ecx, 0x1d
neg edi
shl edi, 3
movzx eax, di
imul esi, edi
imul eax, edx
sar edi, 0x10
imul edi, edx
sar eax, 0x10
add esi, eax
mov eax, dword [ebp + 0x2c]
dec eax
add esi, edi
sub ecx, eax
add esi, ebx
test ecx, ecx
jg 0x435508
neg ecx
mov eax, 0x80000000
mov edx, 0x7fffffff
sar eax, cl
sar edx, cl
cmp eax, edx
jle 0x4354f3
cmp esi, eax
jg 0x435504
cmp esi, edx
mov eax, esi
cmovl eax, edx
shl eax, cl
jmp 0x435515
cmp esi, edx
jle 0x4354fd
mov eax, edx
shl eax, cl
jmp 0x435515
cmp esi, eax
cmovl esi, eax
mov eax, esi
shl eax, cl
jmp 0x435515
cmp ecx, 0x20
jge 0x435513
mov eax, esi
sar eax, cl
jmp 0x435515
xor eax, eax
mov ecx, dword [ebp - 8]
mov edi, 0x7fff
mov ebx, dword [ebp - 4]
cmp eax, edi
cmovl edi, eax
mov eax, dword [ebp + 0x30]
mov dword [ebp + 0x2c], edi
cmp dword [ebx + 0x1938], 0
mov ecx, dword [ecx + eax]
mov dword [ebp - 8], ecx
je 0x435592
shl edi, 0x10
cmp dword [ebp + 0x1c], 0
jne 0x43554d
movsx eax, word [ebp + 0x28]
sar edi, 0xe
imul edi, eax
mov eax, dword [ebx + 0x1928]
mov esi, eax
sub esi, ecx
sub esi, 2
cmp esi, eax
jge 0x43558f
movzx eax, di
mov dword [ebp + 0x1c], eax
sar edi, 0x10
mov ecx, dword [ebp + 0x14]
mov edx, eax
mov eax, edi
movsx ecx, word [ecx + esi*2]
imul edx, ecx
imul eax, ecx
sar edx, 0x10
add edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax + esi*4], edx
inc esi
mov eax, dword [ebp + 0x1c]
cmp esi, dword [ebx + 0x1928]
jl 0x435567
mov edi, dword [ebp + 0x2c]
mov edx, dword [ebx + 0x1934]
cmp edi, edx
je 0x4357b8
push ecx
mov ecx, edi
call fcn.004320b0
mov edx, dword [ebx + 0x192c]
mov edi, eax
mov ecx, dword [ebp + 0x10]
mov ebx, edx
shl ecx, 2
add esp, 4
sub ebx, ecx
movzx eax, di
mov dword [ebp + 0x1c], eax
cmp ebx, edx
jge 0x435614
mov esi, dword [ebp - 4]
mov eax, edi
sar eax, 0x10
add esi, 0x780
mov dword [ebp + 0x30], eax
lea esi, [esi + ebx*4]
nop dword [eax + eax]
mov edx, dword [esi]
lea esi, [esi + 4]
movsx ecx, word [esi - 4]
inc ebx
mov eax, dword [ebp + 0x1c]
sar edx, 0xf
inc edx
imul eax, ecx
sar edx, 1
imul edx, edi
sar eax, 0x10
add edx, eax
mov eax, dword [ebp + 0x30]
imul eax, ecx
add edx, eax
mov eax, dword [ebp - 4]
mov dword [esi - 4], edx
cmp ebx, dword [eax + 0x192c]
jl 0x4355e0
mov ebx, dword [ebp - 4]
cmp dword [ebx + 0x1938], 0
jne 0x435672
mov eax, dword [ebx + 0x1928]
mov esi, eax
sub esi, dword [ebp - 8]
sub esi, 2
cmp esi, eax
jge 0x435672
mov eax, edi
sar eax, 0x10
mov dword [ebp + 0x30], eax
mov eax, dword [ebp + 0x18]
nop dword [eax]
mov edx, dword [eax + esi*4]
movsx ecx, word [eax + esi*4]
mov eax, dword [ebp + 0x1c]
sar edx, 0xf
inc edx
imul eax, ecx
sar edx, 1
imul edx, edi
sar eax, 0x10
add edx, eax
mov eax, dword [ebp + 0x30]
imul eax, ecx
add edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax + esi*4], edx
inc esi
cmp esi, dword [ebx + 0x1928]
jl 0x435640
cmp dword [ebp + 0x20], 0
jle 0x4357b5
mov esi, dword [ebp - 0xc]
mov ebx, edi
sar ebx, 0x10
add esi, 0x5a0
movzx eax, di
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x30], esi
mov edx, dword [esi]
movsx ecx, word [esi]
sar edx, 0xf
inc edx
imul eax, ecx
sar edx, 1
imul edx, edi
mov dword [ebp - 8], 0x20
sar eax, 0x10
add edx, eax
mov eax, ebx
imul eax, ecx
add edx, eax
mov dword [esi], edx
add esi, 0xfffffda0
nop
mov edx, dword [esi]
lea esi, [esi + 4]
movsx ecx, word [esi - 4]
mov eax, dword [ebp + 0x1c]
sar edx, 0xf
inc edx
imul eax, ecx
sar edx, 1
imul edx, edi
sar eax, 0x10
add edx, eax
mov eax, ebx
imul eax, ecx
add edx, eax
sub dword [ebp - 8], 1
mov dword [esi - 4], edx
jne 0x4356c0
mov esi, dword [ebp + 0x30]
add esi, 0xfffffd60
mov dword [ebp - 8], 0x10
nop dword [eax]
mov edx, dword [esi]
lea esi, [esi + 4]
movsx ecx, word [esi - 4]
mov eax, dword [ebp + 0x1c]
sar edx, 0xf
inc edx
imul eax, ecx
sar edx, 1
imul edx, edi
sar eax, 0x10
add edx, eax
mov eax, ebx
imul eax, ecx
add edx, eax
sub dword [ebp - 8], 1
mov dword [esi - 4], edx
jne 0x435700
mov eax, dword [ebp + 0x30]
add eax, 0xfffffc60
mov dword [ebp - 8], 0x20
nop dword [eax]
mov esi, dword [eax - 0x80]
lea eax, [eax + 4]
movsx edx, word [eax - 0x84]
mov ecx, dword [ebp + 0x1c]
sar esi, 0xf
inc esi
imul ecx, edx
sar esi, 1
imul esi, edi
sar ecx, 0x10
add esi, ecx
mov ecx, ebx
imul ecx, edx
movsx edx, word [eax - 4]
add esi, ecx
mov ecx, dword [ebp + 0x1c]
mov dword [eax - 0x84], esi
mov esi, dword [eax - 4]
sar esi, 0xf
inc esi
imul ecx, edx
sar esi, 1
imul esi, edi
sar ecx, 0x10
add esi, ecx
mov ecx, ebx
imul ecx, edx
add esi, ecx
sub dword [ebp - 8], 1
mov dword [eax - 4], esi
jne 0x435740
mov esi, dword [ebp + 0x30]
mov eax, dword [ebp + 0x1c]
add esi, 0x5b0
sub dword [ebp + 0x20], 1
mov dword [ebp + 0x30], esi
jne 0x435693
mov ebx, dword [ebp - 4]
mov edi, dword [ebp + 0x2c]
mov esi, dword [ebp + 0x10]
xor ecx, ecx
test esi, esi
jle 0x435888
cmp esi, 0x10
jb 0x435864
cmp dword [0x58b1a0], 2
jl 0x435864
mov edx, dword [ebp + 8]
and esi, 0xfffffff0
movsx eax, di
movd xmm0, eax
mov eax, dword [ebp + 0xc]
punpcklwd xmm0, xmm0
add eax, 0x20
pshufd xmm0, xmm0, 0
add edx, 0x10
pmovsxwd xmm1, xmm0
nop
pmovsxwd xmm0, qword [edx - 0x10]
pmulld xmm0, xmm1
psrad xmm0, 6
lea edx, [edx + 0x20]
add ecx, 0x10
lea eax, [eax + 0x40]
movups xmmword [eax - 0x60], xmm0
pmovsxwd xmm0, qword [edx - 0x28]
pmulld xmm0, xmm1
psrad xmm0, 6
movups xmmword [eax - 0x50], xmm0
pmovsxwd xmm0, qword [edx - 0x20]
pmulld xmm0, xmm1
psrad xmm0, 6
movups xmmword [eax - 0x40], xmm0
pmovsxwd xmm0, qword [edx - 0x18]
pmulld xmm0, xmm1
psrad xmm0, 6
movups xmmword [eax - 0x30], xmm0
cmp ecx, esi
jl 0x435800
mov esi, dword [ebp + 0x10]
cmp ecx, esi
jge 0x435888
mov ebx, dword [ebp + 0xc]
movsx edx, di
mov edi, dword [ebp + 8]
nop dword [eax]
movsx eax, word [edi + ecx*2]
imul eax, edx
sar eax, 6
mov dword [ebx + ecx*4], eax
inc ecx
cmp ecx, esi
jl 0x435870
mov ebx, dword [ebp - 4]
mov edi, dword [ebp + 0x2c]
mov dword [ebx + 0x1934], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret