Function at 0x49d0d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
add eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
movzx ecx, byte [ebp + 0x14]
cmp ecx, 1
jne 0x49d115
mov dword [ebp - 0x18], 1
jmp 0x49d173
mov dword [ebp - 0x18], 2
movzx edx, byte [ebp + 0x14]
mov eax, 3
sub eax, edx
mov dword [ebp - 4], eax
jmp 0x49d135
mov ecx, dword [ebp - 4]
add ecx, 2
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp + 0x10]
jge 0x49d14c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x49d14c
jmp 0x49d12c
mov edx, dword [ebp - 4]
xor eax, eax
cmp edx, dword [ebp + 0x10]
setl al
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
xor ecx, 1
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
movzx edx, byte [ebp + 0x14]
and edx, 1
add edx, dword [ebp + 8]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x49d198
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
movzx eax, byte [edx + 0x64a060]
and eax, 1
je 0x49d198
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x49d173
mov edx, dword [ebp + 8]
cmp edx, dword [ebp - 8]
jae 0x49d1d1
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2d
jne 0x49d1bd
mov dword [ebp - 0x20], 1
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
jmp 0x49d1d1
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2b
jne 0x49d1d1
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp - 8]
jae 0x49d1f5
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0x30
jne 0x49d1f5
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x49d1d7
mov dword [ebp - 4], 0
jmp 0x49d207
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jae 0x49d255
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0x30
jl 0x49d255
cmp dword [ebp - 0x24], 0x39
jg 0x49d255
push 0
push 0xa
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005b8800
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0x24]
cdq
add ecx, eax
adc esi, edx
sub ecx, 0x30
sbb esi, 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], esi
jmp 0x49d1fe
cmp dword [ebp - 0xc], 0x7fffffff
jb 0x49d29a
ja 0x49d266
cmp dword [ebp - 0x10], 0xffffffff
jbe 0x49d29a
cmp dword [ebp - 0x20], 0
je 0x49d27c
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], connect
jmp 0x49d28a
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x28], connect
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x2c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x28]
mov dword [edx + 4], ecx
jmp 0x49d2c5
cmp dword [ebp - 0x20], 0
je 0x49d2b7
mov edx, dword [ebp - 0x10]
neg edx
mov eax, dword [ebp - 0xc]
adc eax, 0
neg eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edx
mov dword [ecx + 4], eax
jmp 0x49d2c5
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
mov ecx, dword [ebp - 0xc]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jb 0x49d2ef
cmp dword [ebp - 4], 0
jne 0x49d2de
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
je 0x49d2ef
mov ecx, dword [ebp - 0x18]
imul ecx, ecx, 0x13
cmp dword [ebp - 4], ecx
jg 0x49d2ef
cmp dword [ebp - 0x14], 0
je 0x49d2f8
mov eax, 1
jmp 0x49d344
mov edx, dword [ebp - 0x18]
imul edx, edx, 0x13
cmp dword [ebp - 4], edx
jge 0x49d309
xor eax, eax
jmp 0x49d344
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049d350
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jge 0x49d328
xor eax, eax
jmp 0x49d344
cmp dword [ebp - 0x24], 0
jle 0x49d337
mov eax, 1
jmp 0x49d344
mov eax, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
pop esi
mov esp, ebp
pop ebp
ret