Function at 0x10064d40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x1008c0c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x38]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0xb8], ecx
lea ecx, [ebp - 0x6c]
sar ebx, 1
push ebx
push ecx
mov dword [ebp - 0xb4], ecx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp + 0xc]
push ecx
push eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0x74], ebx
call fcn.10065370
movsx edi, word [0x1007c6e8]
lea esi, [ebp - 0x38]
push ebx
mov eax, esi
mov dword [ebp - 0x70], esi
push edi
push eax
mov dword [ebp - 0x7c], edi
call fcn.10065220
mov ebx, eax
add esp, 0x1c
mov dword [ebp - 0x78], ebx
test ebx, ebx
jns 0x10064de2
mov eax, dword [ebp - 0x90]
lea esi, [ebp - 0x6c]
push dword [ebp - 0x74]
xor ecx, ecx
mov dword [ebp - 0x70], esi
push edi
mov word [eax], cx
mov eax, esi
push eax
call fcn.10065220
mov ebx, eax
mov dword [ebp - 0x80], 1
add esp, 0xc
mov dword [ebp - 0x78], ebx
jmp 0x10064de7
xor eax, eax
mov dword [ebp - 0x80], eax
xor eax, eax
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x74]
lea ecx, [eax*4]
mov dword [ebp - 0xa8], ecx
mov edx, 1
mov dword [ebp - 0x8c], edx
movsx ecx, word [edx*2 + 0x1007c6e8]
push eax
push ecx
push esi
mov dword [ebp - 0x84], ecx
call fcn.10065220
mov ecx, dword [ebp - 0x88]
add esp, 0xc
mov dword [ebp - 0x9c], eax
test ebx, ebx
jg 0x10064e43
cmp eax, ecx
jge 0x10064e53
test ebx, ebx
js 0x100650f0
neg ecx
cmp eax, ecx
jg 0x100650f0
xor ecx, ecx
mov dword [ebp - 0x94], 0xffffff00
test eax, eax
mov eax, dword [ebp - 0xa8]
sete cl
xor edx, edx
mov dword [ebp - 0x88], ecx
mov eax, dword [eax + esi]
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x98], edx
mov dword [ebp - 0xac], eax
mov esi, dword [ebp - 0x74]
lea eax, [ecx + edi]
mov ecx, eax
and eax, 1
sar ecx, 1
add ecx, eax
mov eax, dword [ebp - 0xac]
mov edi, ecx
mov dword [ebp - 0xa0], ecx
shl edi, 4
cmp esi, 8
jne 0x10064fb8
movzx edx, ax
mov ecx, eax
sar ecx, 0x10
movsx esi, di
imul edx, esi
imul ecx, esi
sar edi, 0xf
inc edi
sar edi, 1
sar edx, 0x10
add edx, ecx
mov ecx, edi
imul ecx, eax
mov eax, dword [ebp - 0x70]
add edx, ecx
add edx, dword [eax + 0x1c]
movzx ecx, dx
mov eax, edx
sar eax, 0x10
imul eax, esi
imul ecx, esi
sar ecx, 0x10
add ecx, eax
mov eax, edi
imul eax, edx
add ecx, eax
mov eax, dword [ebp - 0x70]
add ecx, dword [eax + 0x18]
movzx edx, cx
mov eax, ecx
sar eax, 0x10
imul eax, esi
imul edx, esi
sar edx, 0x10
add edx, eax
mov eax, edi
imul eax, ecx
add edx, eax
mov eax, dword [ebp - 0x70]
add edx, dword [eax + 0x14]
movzx ecx, dx
mov eax, edx
sar eax, 0x10
imul eax, esi
imul ecx, esi
sar ecx, 0x10
add ecx, eax
mov eax, edi
imul eax, edx
add ecx, eax
mov eax, dword [ebp - 0x70]
add ecx, dword [eax + 0x10]
movzx edx, cx
mov eax, ecx
sar eax, 0x10
imul eax, esi
imul edx, esi
sar edx, 0x10
add edx, eax
mov eax, edi
imul eax, ecx
add edx, eax
mov eax, dword [ebp - 0x70]
add edx, dword [eax + 0xc]
movzx ecx, dx
mov eax, edx
sar eax, 0x10
imul ecx, esi
imul eax, esi
sar ecx, 0x10
add ecx, eax
mov eax, edi
imul eax, edx
add ecx, eax
mov eax, dword [ebp - 0x70]
add ecx, dword [eax + 8]
movzx edx, cx
mov eax, ecx
imul edx, esi
sar edx, 0x10
sar eax, 0x10
imul eax, esi
add edx, eax
mov eax, edi
imul eax, ecx
add edx, eax
mov eax, dword [ebp - 0x70]
add edx, dword [eax + 4]
movzx eax, dx
mov ecx, edx
imul eax, esi
sar ecx, 0x10
imul ecx, esi
mov esi, dword [ebp - 0x70]
imul edi, edx
sar eax, 0x10
add eax, ecx
add eax, edi
add eax, dword [esi]
jmp 0x10064fec
add esi, 0xffffffff
js 0x10064ff8
movsx ebx, di
sar edi, 0xf
inc edi
sar edi, 1
movzx edx, ax
mov ecx, eax
imul edx, ebx
sar ecx, 0x10
imul ecx, ebx
imul eax, edi
sar edx, 0x10
add edx, ecx
mov ecx, dword [ebp - 0x70]
add edx, dword [ecx + esi*4]
add eax, edx
sub esi, 1
jns 0x10064fc6
mov ebx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x98]
mov ecx, dword [ebp - 0xa0]
test ebx, ebx
jg 0x10065002
test eax, eax
jns 0x10065008
test ebx, ebx
js 0x1006501f
test eax, eax
jg 0x1006501f
mov esi, dword [ebp - 0x94]
mov edi, dword [ebp - 0x7c]
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x9c], eax
jmp 0x10065046
mov esi, dword [ebp - 0x94]
mov edi, ecx
mov ebx, eax
mov dword [ebp - 0x7c], edi
mov ecx, edx
mov dword [ebp - 0x78], ebx
mov eax, 0x80
sar eax, cl
mov ecx, dword [ebp - 0x84]
add esi, eax
mov dword [ebp - 0x94], esi
inc edx
mov dword [ebp - 0x98], edx
cmp edx, 3
jl 0x10064e87
mov eax, ebx
mov ecx, ebx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x10000
jge 0x10065079
sub ecx, dword [ebp - 0x9c]
je 0x10065089
mov eax, ecx
shl ebx, 5
sar eax, 1
add eax, ebx
jmp 0x10065084
sub ecx, dword [ebp - 0x9c]
mov eax, ebx
sar ecx, 5
cdq
idiv ecx
add esi, eax
mov edx, dword [ebp - 0x8c]
mov eax, edx
shl eax, 8
add eax, esi
cmp eax, 0x7fff
jl 0x100650a2
mov eax, 0x7fff
mov ecx, dword [ebp - 0x80]
mov ebx, dword [ebp - 0x90]
mov word [ebx + ecx*2], ax
inc ecx
mov dword [ebp - 0x80], ecx
cmp ecx, dword [ebp + 0x10]
jge 0x10065202
movsx edi, word [edx*2 + 0x1007c6e6]
mov eax, ecx
and eax, 1
mov dword [ebp - 0x7c], edi
mov ebx, 0x1000
mov esi, dword [ebp + eax*4 - 0xb8]
mov eax, ecx
and eax, 2
mov dword [ebp - 0x70], esi
shl eax, 0xc
sub ebx, eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x78], ebx
jmp 0x10064e14
mov edx, dword [ebp - 0x8c]
mov ebx, eax
mov edi, dword [ebp - 0x84]
xor eax, eax
inc edx
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x78], ebx
cmp edx, 0x80
jle 0x10064e14
mov eax, dword [ebp - 0xa4]
inc eax
mov dword [ebp - 0xa4], eax
cmp eax, 0x10
jg 0x100651d1
mov esi, dword [ebp - 0xb0]
mov ecx, eax
mov edx, 1
mov eax, 0x10000
shl edx, cl
sub eax, edx
push eax
push dword [ebp + 0x10]
push esi
call fcn.10068740
mov ebx, dword [ebp - 0x74]
lea eax, [ebp - 0x6c]
push ebx
push eax
lea eax, [ebp - 0x38]
push eax
push esi
call fcn.10065370
movsx edi, word [0x1007c6e8]
lea esi, [ebp - 0x38]
push ebx
mov eax, esi
mov dword [ebp - 0x70], esi
push edi
push eax
mov dword [ebp - 0x7c], edi
call fcn.10065220
mov ebx, eax
add esp, 0x28
mov dword [ebp - 0x78], ebx
test ebx, ebx
jns 0x100651c4
mov eax, dword [ebp - 0x90]
lea esi, [ebp - 0x6c]
push dword [ebp - 0x74]
xor ecx, ecx
mov dword [ebp - 0x70], esi
push edi
mov word [eax], cx
mov eax, esi
push eax
call fcn.10065220
mov ebx, eax
mov dword [ebp - 0x80], 1
mov eax, dword [ebp - 0x74]
add esp, 0xc
mov dword [ebp - 0x78], ebx
jmp 0x10064e09
xor eax, eax
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x74]
jmp 0x10064e09
mov ebx, dword [ebp + 0x10]
mov eax, 0x8000
cdq
lea ecx, [ebx + 1]
idiv ecx
mov edx, dword [ebp - 0x90]
mov ecx, 1
mov word [edx], ax
cmp ebx, ecx
jle 0x10065202
mov ax, word [edx + ecx*2 - 2]
add ax, word [edx]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, ebx
jl 0x100651f1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret