Function at 0x77c7d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
cmp dword [esp + 0x30], 0
mov dword [esp + 0x10], edx
js 0x77cd5c
mov eax, dword [esp + 0x10]
mov dword [esp], ecx
mov esi, 0x8a
mov ecx, 7
mov edx, 4
mov edi, 0xffffffff
movzx ebp, word [eax + 2]
xor eax, eax
test bp, bp
sete al
cmove ecx, esi
xor esi, esi
sub edx, eax
mov eax, dword [esp]
mov dword [esp + 0xc], edx
xor edx, edx
mov ebx, ebp
mov ebp, dword [esp + 0x10]
mov dword [esp + 4], esi
inc esi
mov dword [esp + 0x18], edx
cmp esi, ecx
movzx ebp, word [ebp + edx*4 + 6]
jge 0x77c83d
cmp ebx, ebp
je 0x77cd4b
cmp esi, dword [esp + 0xc]
mov dword [esp + 0x14], ebp
mov dword [esp + 8], ebx
jge 0x77c8fb
mov ecx, dword [eax + 0x16bc]
movzx edi, word [eax + ebx*4 + 0xa7c]
movzx edx, word [eax + ebx*4 + 0xa7e]
mov ebp, 0x10
mov ebx, edi
sub ebp, edx
shl ebx, cl
or bx, word [eax + 0x16b8]
cmp ecx, ebp
mov word [eax + 0x16b8], bx
jle 0x77c8e3
mov ecx, dword [eax + 8]
mov ebp, dword [eax + 0x14]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
lea eax, [ebp + 1]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 4]
mov ecx, dword [esp]
mov byte [eax + ebp], bl
mov eax, dword [esp]
mov ebx, dword [esp]
mov ecx, dword [ecx + 8]
movzx eax, byte [eax + 0x16b9]
mov ebx, dword [ebx + 0x14]
mov byte [esp + 4], al
mov eax, dword [esp]
lea ebp, [ebx + 1]
mov dword [eax + 0x14], ebp
movzx eax, byte [esp + 4]
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
shr edi, cl
lea ecx, [edx + ebx - 0x10]
mov word [eax + 0x16b8], di
jmp 0x77c8e5
add ecx, edx
mov ebx, dword [esp + 8]
dec esi
mov dword [eax + 0x16bc], ecx
jne 0x77c855
jmp 0x77cd1a
test ebx, ebx
je 0x77cacd
cmp ebx, edi
jne 0x77c916
mov edx, dword [eax + 0x16bc]
mov dword [esp + 4], esi
jmp 0x77c9b1
mov ecx, dword [esp]
mov edx, dword [eax + 0x16bc]
movzx esi, word [eax + ebx*4 + 0xa7e]
mov ebp, dword [esp]
mov eax, 0x10
movzx edi, word [ecx + ebx*4 + 0xa7c]
mov ecx, edx
sub eax, esi
mov ebx, edi
shl ebx, cl
or bx, word [ebp + 0x16b8]
cmp edx, eax
mov eax, dword [esp]
mov word [eax + 0x16b8], bx
jle 0x77c9a9
mov ecx, dword [esp]
mov eax, dword [esp]
mov edx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov edx, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [edx + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea edx, [esi + ebx - 0x10]
shr edi, cl
mov word [eax + 0x16b8], di
jmp 0x77c9ab
add edx, esi
mov dword [eax + 0x16bc], edx
mov ecx, dword [esp]
movzx esi, word [eax + 0xabe]
mov ebp, dword [esp]
mov eax, 0x10
movzx edi, word [ecx + 0xabc]
mov ecx, edx
sub eax, esi
mov ebx, edi
shl ebx, cl
or bx, word [ebp + 0x16b8]
cmp edx, eax
mov eax, dword [esp]
mov word [eax + 0x16b8], bx
jle 0x77ca3e
mov ecx, dword [esp]
mov eax, dword [esp]
mov edx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov edx, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [edx + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea edx, [esi + ebx - 0x10]
shr edi, cl
mov word [eax + 0x16b8], di
mov ebx, edi
jmp 0x77ca40
add edx, esi
mov ecx, dword [esp + 4]
mov dword [eax + 0x16bc], edx
add ecx, 0xfffd
movzx ebp, cx
mov ecx, edx
mov eax, ebp
shl eax, cl
or ebx, eax
mov eax, dword [esp]
cmp edx, 0xf
mov word [eax + 0x16b8], bx
jl 0x77cac3
mov ecx, dword [esp]
mov eax, dword [esp]
mov edi, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov esi, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov esi, dword [esi + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov eax, dword [esp]
mov cl, 0x10
mov edx, dword [eax + 0x16bc]
sub cl, dl
shr ebp, cl
mov ecx, edx
mov word [eax + 0x16b8], bp
add ecx, 0xfffffff2
jmp 0x77cd10
mov ecx, edx
add ecx, 2
jmp 0x77cd10
cmp esi, 0xa
jg 0x77cbf7
mov ecx, dword [esp]
mov edx, dword [eax + 0x16bc]
movzx esi, word [eax + 0xac2]
mov ebp, dword [esp]
mov eax, 0x10
movzx edi, word [ecx + 0xac0]
mov ecx, edx
sub eax, esi
mov ebx, edi
shl ebx, cl
or bx, word [ebp + 0x16b8]
cmp edx, eax
mov eax, dword [esp]
mov word [eax + 0x16b8], bx
jle 0x77cb69
mov ecx, dword [esp]
mov eax, dword [esp]
mov edx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov edx, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [edx + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea edx, [esi + ebx - 0x10]
shr edi, cl
mov word [eax + 0x16b8], di
mov ebx, edi
jmp 0x77cb6b
add edx, esi
mov dword [eax + 0x16bc], edx
mov eax, dword [esp + 4]
mov ecx, edx
add eax, 0xfffe
movzx edx, ax
mov eax, edx
shl eax, cl
or ebx, eax
mov eax, dword [esp]
cmp ecx, 0xe
mov word [eax + 0x16b8], bx
jl 0x77cbed
mov ecx, dword [esp]
mov eax, dword [esp]
mov edi, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov esi, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov esi, dword [esi + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
shr edx, cl
mov ecx, ebx
mov word [eax + 0x16b8], dx
add ecx, 0xfffffff3
jmp 0x77cd10
mov esi, ecx
add ecx, 3
jmp 0x77cd10
mov ecx, dword [esp]
mov edx, dword [eax + 0x16bc]
movzx esi, word [eax + 0xac6]
mov ebp, dword [esp]
mov eax, 0x10
movzx edi, word [ecx + 0xac4]
mov ecx, edx
sub eax, esi
mov ebx, edi
shl ebx, cl
or bx, word [ebp + 0x16b8]
cmp edx, eax
mov eax, dword [esp]
mov word [eax + 0x16b8], bx
jle 0x77cc8a
mov ecx, dword [esp]
mov eax, dword [esp]
mov edx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebp, [ecx + 1]
mov dword [edx + 0x14], ebp
mov edx, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [edx + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
mov edx, dword [esp]
lea ebp, [ebx + 1]
mov dword [edx + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea edx, [esi + ebx - 0x10]
shr edi, cl
mov word [eax + 0x16b8], di
mov ebx, edi
jmp 0x77cc8c
add edx, esi
mov dword [eax + 0x16bc], edx
mov eax, dword [esp + 4]
mov ecx, edx
add eax, 0xfff6
movzx edx, ax
mov eax, edx
shl eax, cl
or ebx, eax
mov eax, dword [esp]
cmp ecx, 0xa
mov word [eax + 0x16b8], bx
jl 0x77cd0b
mov ecx, dword [esp]
mov eax, dword [esp]
mov edi, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov esi, dword [esp]
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov esi, dword [esi + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
shr edx, cl
mov ecx, ebx
mov word [eax + 0x16b8], dx
add ecx, 0xfffffff7
jmp 0x77cd10
mov esi, ecx
add ecx, 7
mov ebx, dword [esp + 8]
mov dword [eax + 0x16bc], ecx
mov ebp, dword [esp + 0x14]
xor esi, esi
test bp, bp
jne 0x77cd34
mov ecx, 0x8a
mov dword [esp + 0xc], 3
jmp 0x77cd49
xor ecx, ecx
cmp ebx, ebp
mov edx, 4
sete cl
sub edx, ecx
xor ecx, 7
mov dword [esp + 0xc], edx
mov edi, ebx
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 0x30]
lea edx, [edx + 1]
jne 0x77c81d
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret