Function at 0x10004d50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 4]
mov dword [ebp - 8], edx
test edx, edx
jns 0x10004d86
cmp dword [eax], 0
jg 0x10004d86
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add eax, ecx
push eax
push ecx
call fcn.10003810
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [eax], edx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0x10]
add ecx, esi
push edi
xor edi, edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ecx
mov eax, ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], edi
cmp esi, ecx
je 0x10004dcf
lea eax, [ebp - 0x20]
push eax
push ecx
push esi
call fcn.1000dab0
mov esi, dword [ebp - 0x2c]
add esp, 0xc
mov edi, dword [ebp - 0x20]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], esi
xor ebx, ebx
mov byte [ebp - 0x1c], 0
cmp esi, eax
je 0x10004e8e
nop dword [eax]
mov dword [ebp - 0x10], ebx
cmp ebx, edx
jne 0x10004def
test edx, edx
jns 0x10004e8e
cmp edi, 0x25fd
jae 0x10004e1a
mov eax, 1
mov ecx, 0x101136c0
cmp edi, dword [ecx]
jb 0x10004e54
add ecx, 4
xor eax, 3
cmp ecx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
jne 0x10004e01
mov eax, 1
jmp 0x10004e54
mov eax, 0x101136c0
mov edx, 0xca
mov esi, edx
shr esi, 1
cmp edi, dword [eax + esi*4]
lea ecx, [eax + esi*4]
jae 0x10004e34
mov edx, esi
jmp 0x10004e3e
lea eax, [ecx + 4]
or ecx, 0xffffffff
sub ecx, esi
add edx, ecx
test edx, edx
jg 0x10004e24
mov edx, dword [ebp - 8]
sub eax, 0x101136c0
mov esi, dword [ebp - 4]
sar eax, 2
and eax, 1
inc eax
mov ecx, 0x7fffffff
sub ecx, eax
cmp ecx, ebx
jl 0x10004ef1
add ebx, eax
cmp ebx, edx
jle 0x10004e6d
test edx, edx
jns 0x10004e8b
lea ecx, [ebp - 0x2c]
call fcn.1000ce30
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 4], esi
cmp esi, dword [ebp - 0x28]
je 0x10004e8e
mov edi, dword [ebp - 0x20]
mov edx, dword [ebp - 8]
jmp 0x10004de0
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], esi
mov eax, dword [ebp + 0x10]
xor esi, esi
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x10], 1
mov dword [ebp - 8], esi
mov al, byte [eax + 9]
test al, al
movzx edx, al
cmove edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
cmp ebx, edx
jge 0x10004f00
mov eax, dword [ebp - 0x10]
movzx eax, al
sub eax, 1
je 0x10004f30
sub eax, 1
je 0x10004efc
sub eax, 1
jne 0x10004f00
mov eax, edx
sub eax, ebx
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp + 0x18]
sar edi, 1
mov esi, dword [eax]
sub esi, edi
sub esi, ebx
mov dword [ebp - 8], esi
jmp 0x10004f03
test edx, edx
jns 0x10004e8e
mov ebx, 0x7fffffff
jmp 0x10004e91
mov edi, edx
sub edi, ebx
mov eax, dword [ebp + 0x18]
lea ebx, [eax + 0xf]
movzx eax, byte [eax + 0xe]
mov edx, ebx
test edi, edi
jle 0x10004f40
lea esi, [ebx + eax]
mov dword [ebp + 0x18], esi
push ecx
push esi
push ebx
call fcn.10003810
dec edi
add esp, 0xc
mov ecx, edx
test edi, edi
jg 0x10004f16
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 0x18]
jmp 0x10004f43
mov eax, dword [ebp + 0x18]
mov esi, edx
sub esi, ebx
lea ebx, [eax + 0xf]
movzx eax, byte [eax + 0xe]
mov edx, ebx
lea edi, [eax + edx]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
sub edx, eax
push ecx
add edx, eax
push edx
push eax
call fcn.10003810
add esp, 0xc
test esi, esi
jle 0x10004f70
nop dword [eax]
push edx
push edi
push ebx
call fcn.10003810
dec esi
add esp, 0xc
test esi, esi
jg 0x10004f60
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword [eax], edx
mov esp, ebp
pop ebp
ret