Function at 0x430530
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x48
test eax, eax
je 0x4306d6
push edi
mov edi, dword [esp + 0x54]
test edi, edi
je 0x4306d5
push esi
mov esi, dword [eax]
cmp esi, 1
jl 0x4306d4
mov ecx, dword [eax + 4]
cmp ecx, 1
jl 0x4306d4
push ebp
mov ebp, dword [edi]
cmp ebp, 1
jle 0x4306d3
mov edi, dword [edi + 4]
cmp edi, 1
jle 0x4306d3
mov dl, byte [esp + 0x60]
test dl, 1
push ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], edi
jne 0x430854
mov dword [esp + 0x1c], 0
mov ebx, 1
test dl, 2
jne 0x4e007c
mov edx, dword [esp + 0x60]
mov edx, dword [edx + 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], edx
mov edi, edx
imul edx, dword [esp + 0x10]
mov ebp, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
add edx, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x60]
mov eax, dword [eax + 0x14]
sub ebp, esi
mov dword [esp + 0x28], ebp
lea ebp, [eax + edx*4]
mov eax, dword [esp + 0x24]
shl eax, 8
sub eax, 0x100
cdq
idiv esi
test ecx, ecx
jle 0x4306d0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
shl eax, 8
sub eax, 0x100
cdq
idiv ecx
mov ecx, dword [esp + 0x28]
lea edx, [ecx*4]
mov dword [esp + 0x54], edx
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 0x24], eax
jmp 0x43063c
add eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x24], ecx
mov ecx, eax
sar ecx, 8
imul ecx, edi
lea ebp, [ebp + ecx*4]
xor ecx, ecx
and eax, 0xff
cmp esi, ecx
mov dword [esp + 0x28], ebp
jle 0x4306b4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jmp 0x430669
add ecx, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov edx, ecx
sar edx, 8
imul edx, ebx
lea ebp, [ebp + edx*4]
lea eax, [ebp + edi*4]
mov dl, byte [eax + ebx*4 + 3]
or dl, byte [ebp + ebx*4 + 3]
lea edi, [eax + ebx*4]
or dl, byte [eax + 3]
lea esi, [ebp + ebx*4]
and ecx, 0xff
or dl, byte [ebp + 3]
ja 0x4306da
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x5c]
mov esi, dword [edx]
add dword [esp + 0x14], 4
mov edi, dword [esp + 0x18]
add eax, 1
cmp eax, esi
jl 0x430661
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
add dword [esp + 0x14], edx
mov edx, dword [esp + 0x5c]
add ecx, 1
cmp ecx, dword [edx + 4]
jl 0x430630
emms
pop ebx
pop ebp
pop esi
pop edi
add esp, 0x48
ret
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x40], eax
mov edx, 0x100
sub edx, edi
mov eax, 0x100
imul edx, ecx
mov dword [esp + 0x4c], esi
sub eax, ecx
imul eax, edi
mov esi, ecx
imul esi, edi
sar edx, 8
mov edi, 0x101
sar eax, 8
sub edi, edx
sar esi, 8
sub edi, eax
sub edi, esi
mov dword [esp + 0x50], ebp
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edi
pxor mm0, mm0
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
movd mm1, dword [esi]
movd mm3, dword [edi]
punpcklbw mm1, mm0
punpcklbw mm3, mm0
movd mm2, dword [esp + 0x48]
movd mm4, dword [esp + 0x44]
punpcklwd mm2, mm2
punpcklwd mm4, mm4
punpcklwd mm2, mm2
punpcklwd mm4, mm4
pmullw mm1, mm2
pmullw mm3, mm4
movq mm5, mm1
paddw mm5, mm3
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
movd mm1, dword [esi]
movd mm3, dword [edi]
punpcklbw mm1, mm0
punpcklbw mm3, mm0
movd mm2, dword [esp + 0x38]
movd mm4, dword [esp + 0x34]
punpcklwd mm2, mm2
punpcklwd mm4, mm4
punpcklwd mm2, mm2
punpcklwd mm4, mm4
pmullw mm1, mm2
pmullw mm3, mm4
paddw mm5, mm1
paddw mm5, mm3
psrlw mm5, 8
packuswb mm5, mm0
movd dword [esp + 0x10], mm5
mov edx, dword [esp + 0x68]
mov esi, dword [0x5ab9e4]
lea eax, [esp + 0x10]
mov dword [esp + 0x4c], eax
mov eax, dword [edx]
mov dword [esp + 0x50], eax
mov al, byte [esp + 0x13]
mov edi, 1
add dword [esi + 0x16c], edi
cmp al, 0xff
je 0x430847
test al, al
jbe 0x430696
cmp dword [edx], 0
jle 0x430696
add dword [esi + 0x160], edi
pxor mm5, mm5
mov eax, dword [esp + 0x4c]
movd mm4, dword [eax]
punpcklbw mm4, mm5
mov eax, dword [esp + 0x14]
movd mm1, dword [eax]
punpcklbw mm1, mm5
movd mm2, dword [esp + 0x50]
punpcklwd mm2, mm2
punpcklwd mm2, mm2
pmullw mm4, mm2
psrlw mm4, 8
movq mm0, mm4
punpckhwd mm0, mm0
punpckhwd mm0, mm0
pxor mm0, qword [0x5aa970]
pmullw mm1, mm0
paddw mm1, qword [0x5aa968]
movq mm0, mm1
psrlw mm0, 8
paddw mm0, mm1
psrlw mm0, 8
paddusb mm0, mm4
packuswb mm0, mm5
movd dword [eax], mm0
jmp 0x430696
cmp dword [edx], 0x101
jne 0x4307d9
jmp 0x4e0099
add ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
or ebx, 0xffffffff
jmp 0x43059f
mov edx, edi
add edx, 0xffffffff
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x60]
mov edx, dword [edx + 0x10]
mov edi, edx
neg edi
mov dword [esp + 0x18], edi
jmp 0x4305bd
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [eax], edx
add dword [esi + 0x15c], edi
jmp 0x430696