Function at 0x49f065
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov ebx, dword [ecx + 4]
movzx ebp, byte [esi + 0x22]
mov edx, eax
push edi
mov edi, dword [esi + 0x24]
shr edx, 8
shr eax, 0xb
add edi, 8
and edx, 7
and eax, 0x1f
cmp ebx, 3
jne 0x49f09f
lea ebx, [esp + 0x14]
push ebx
push edi
push edx
push eax
push ebp
call fcn.00476960
jmp 0x49f0b8
cmp ebx, 2
jne 0x49f0b8
mov ebx, dword [ecx]
lea ebp, [esp + 0x14]
push ebp
push edi
push edx
push eax
movzx eax, byte [esi + 0x22]
push eax
mov eax, dword [ebx + 0x18]
call eax
movzx edx, byte [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 0x20]
mov ebx, dword [esi + 0x24]
shl ecx, 0x1c
or edx, ecx
mov ecx, dword [esi + 0x1c]
mov ebp, dword [ecx + 4]
mov edi, eax
shr edi, 8
shr eax, 0xb
or edx, 0x8000000
add ebx, 8
and edi, 7
and eax, 0x1f
cmp ebp, 3
jne 0x49f0fe
push edx
push ebx
push edi
push eax
movzx eax, byte [esi + 0x22]
push eax
call fcn.00473de0
jmp 0x49f113
cmp ebp, 2
jne 0x49f113
mov ebp, dword [ecx]
push edx
mov edx, dword [ebp + 0x1c]
push ebx
push edi
push eax
movzx eax, byte [esi + 0x22]
push eax
call edx
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
mov edi, dword [esi + 0x24]
mov ebp, dword [ebx + 4]
and eax, 7
or eax, 0xffffffa0
shl eax, 8
or eax, dword [esp + 0x24]
mov edx, ecx
shr edx, 8
shr ecx, 0xb
shl eax, 0x10
add edi, 4
and edx, 7
and ecx, 0x1f
cmp ebp, 3
jne 0x49f15b
push eax
movzx eax, byte [esi + 0x22]
push edi
push edx
push ecx
push eax
mov ecx, ebx
call fcn.00473de0
jmp 0x49f172
cmp ebp, 2
jne 0x49f172
mov ebp, dword [ebx]
push eax
movzx eax, byte [esi + 0x22]
push edi
push edx
push ecx
push eax
mov eax, dword [ebp + 0x1c]
mov ecx, ebx
call eax
mov dword [esp + 0x1c], 0x186a0
lea ebx, [ebx]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov edi, dword [ecx + 4]
mov ebx, dword [esi + 0x24]
movzx ebp, byte [esi + 0x22]
mov edx, eax
shr edx, 8
shr eax, 0xb
and edx, 7
and eax, 0x1f
cmp edi, 3
jne 0x49f1b3
lea edi, [esp + 0x10]
push edi
push ebx
push edx
push eax
push ebp
call fcn.00476960
jmp 0x49f1cc
cmp edi, 2
jne 0x49f1cc
mov edi, dword [ecx]
lea ebp, [esp + 0x10]
push ebp
push ebx
push edx
mov edx, dword [edi + 0x18]
push eax
movzx eax, byte [esi + 0x22]
push eax
call edx
mov eax, dword [esp + 0x10]
test eax, 0x10000000
jne 0x49f1de
test eax, 0xa0000000
jne 0x49f1e9
sub dword [esp + 0x1c], 1
jns 0x49f180
mov eax, dword [esp + 0x10]
mov ecx, eax
and ecx, 0xa0000000
cmp ecx, 0x80000000
je 0x49f37f
mov dword [esp + 0x1c], 0x3e8
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov edi, dword [esi + 0x24]
mov ebx, dword [ecx + 4]
movzx ebp, byte [esi + 0x22]
mov edx, eax
shr edx, 8
shr eax, 0xb
add edi, 8
and edx, 7
and eax, 0x1f
cmp ebx, 3
jne 0x49f23b
lea ebx, [esp + 0x14]
push ebx
push edi
push edx
push eax
push ebp
call fcn.00476960
jmp 0x49f254
cmp ebx, 2
jne 0x49f254
mov ebx, dword [ecx]
lea ebp, [esp + 0x14]
push ebp
push edi
push edx
mov edx, dword [ebx + 0x18]
push eax
movzx eax, byte [esi + 0x22]
push eax
call edx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov edi, dword [esp + 0x14]
mov ebx, dword [esi + 0x24]
mov edx, eax
shr eax, 0xb
and eax, 0x1f
shr edx, 8
mov ebp, eax
mov eax, dword [ecx + 4]
xor edi, 0x8000000
add ebx, 8
and edx, 7
cmp eax, 3
jne 0x49f292
movzx eax, byte [esi + 0x22]
push edi
push ebx
push edx
push ebp
push eax
call fcn.00473de0
jmp 0x49f2a7
cmp eax, 2
jne 0x49f2a7
movzx eax, byte [esi + 0x22]
push edi
push ebx
push edx
push ebp
push eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
call eax
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov ebx, dword [ecx + 4]
mov edi, dword [esi + 0x24]
movzx ebp, byte [esi + 0x22]
mov edx, eax
shr edx, 8
shr eax, 0xb
and edx, 7
and eax, 0x1f
cmp ebx, 3
jne 0x49f2da
lea ebx, [esp + 0x10]
push ebx
push edi
push edx
push eax
push ebp
call fcn.00476960
jmp 0x49f2f3
cmp ebx, 2
jne 0x49f2f3
mov ebx, dword [ecx]
lea ebp, [esp + 0x10]
push ebp
push edi
push edx
mov edx, dword [ebx + 0x18]
push eax
movzx eax, byte [esi + 0x22]
push eax
call edx
mov eax, dword [esp + 0x10]
and eax, 0xb0000000
cmp eax, 0x10000000
je 0x49f30e
sub dword [esp + 0x1c], 1
jns 0x49f205
mov dword [esp + 0x1c], 0x3e8
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov edi, dword [ecx + 4]
mov ebx, dword [esi + 0x24]
movzx ebp, byte [esi + 0x22]
mov edx, eax
shr edx, 8
shr eax, 0xb
and edx, 7
and eax, 0x1f
cmp edi, 3
jne 0x49f349
lea edi, [esp + 0x10]
push edi
push ebx
push edx
push eax
push ebp
call fcn.00476960
jmp 0x49f362
cmp edi, 2
jne 0x49f362
mov edi, dword [ecx]
lea ebp, [esp + 0x10]
push ebp
push ebx
push edx
mov edx, dword [edi + 0x18]
push eax
movzx eax, byte [esi + 0x22]
push eax
call edx
mov eax, dword [esp + 0x10]
test eax, 0x10000000
jne 0x49f374
test eax, 0xa0000000
jne 0x49f37b
sub dword [esp + 0x1c], 1
jns 0x49f316
mov eax, dword [esp + 0x10]
pop edi
mov ecx, eax
pop esi
and ecx, 0xa0000000
pop ebp
pop ebx
cmp ecx, 0x80000000
jne 0x49f3ad
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov byte [edx], al
shr eax, 8
mov byte [ecx], al
mov eax, 1
add esp, 8
ret 0x14
xor eax, eax
add esp, 8
ret 0x14