Function at 0x48e840
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x34]
push ebp
cdq
push esi
mov ebp, eax
mov eax, dword [ebx + 4]
xor ebp, edx
sub ebp, edx
cmp ebp, dword [esp + 0x44]
mov esi, ebp
mov ecx, ebp
mov dword [esp + 0x28], ebp
cmovl esi, dword [esp + 0x44]
sub eax, dword [ebx + 8]
imul esi, eax
cmp ebp, dword [esp + 0x4c]
mov ebp, dword [esp + 0x30]
cmovl ecx, dword [esp + 0x4c]
imul ecx, dword [ebx + 8]
push edi
push 0
add esi, ecx
mov ecx, ebp
sub esi, dword [ebx + 0xc]
add esi, dword [esp + 0x3c]
push esi
call fcn.00487190
mov eax, dword [ebp + 4]
mov edi, 0x5d0e60
mov ebx, dword [esp + 0x3c]
test eax, eax
mov dword [esp + 0x18], 0
cmovne edi, eax
mov eax, dword [esp + 0x38]
lea eax, [ebx + eax*2]
mov dword [esp + 0x10], eax
cmp ebx, eax
je 0x48ea78
cmp word [ebx], 0x25
mov dword [esp + 0x14], ebx
je 0x48e8d9
nop word [eax + eax]
add ebx, 2
cmp word [ebx], 0x25
jne 0x48e8d0
movzx eax, word [ebx + 2]
mov dword [esp + 0x24], ebx
mov ecx, eax
add ebx, 2
mov dword [esp + 0x28], ecx
mov esi, eax
cmp eax, 0x4c
jne 0x48e8f8
movzx esi, word [ebx + 2]
add ebx, 2
call fcn.0048f960
test al, al
je 0x48e916
movzx eax, si
push eax
call fcn.0048d120
add esp, 4
movsx ebp, word [eax + 2]
sar ebp, 0xb
jmp 0x48e925
lea eax, [esi - 0x30]
cmp ax, 9
ja 0x48e987
movzx ebp, si
sub ebp, 0x30
cmp ebp, 0xffffffff
je 0x48e98a
lea eax, [ebx + 2]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
je 0x48e98a
mov si, word [eax]
mov word [esp + 0x1c], si
call fcn.0048f960
test al, al
je 0x48e95d
movzx eax, si
push eax
call fcn.0048d120
add esp, 4
movsx ecx, word [eax + 2]
sar ecx, 0xb
jmp 0x48e970
mov eax, dword [esp + 0x1c]
add eax, 0xffffffd0
cmp ax, 9
ja 0x48e98a
movzx ecx, si
sub ecx, 0x30
cmp ecx, 0xffffffff
je 0x48e98a
mov ebx, dword [esp + 0x20]
lea eax, [ebp*4]
add eax, ebp
lea ebp, [ecx + eax*2]
jmp 0x48e98a
or ebp, 0xffffffff
mov eax, dword [esp + 0x40]
cmp ebp, dword [eax]
mov eax, dword [esp + 0x14]
je 0x48e9af
mov esi, ebx
sub esi, eax
and esi, 0xfffffffe
push esi
push eax
push edi
call fcn.00591570
add esp, 0xc
add edi, esi
jmp 0x48ea42
mov ebp, dword [esp + 0x24]
add ebx, 2
sub ebp, eax
and ebp, 0xfffffffe
push ebp
push eax
push edi
call fcn.00591570
add edi, ebp
lea eax, [esp + 0x5c]
mov ebp, dword [esp + 0x38]
lea ecx, [esp + 0x54]
add esp, 0xc
cmp word [esp + 0x28], 0x4c
cmovne eax, ecx
mov esi, dword [eax]
sub ebp, esi
cmp dword [esp + 0x44], 0
mov edx, dword [eax + 4]
jle 0x48ea01
mov ecx, ebp
test ebp, ebp
jle 0x48ea01
mov ax, word [esp + 0x58]
dec ecx
mov word [edi], ax
add edi, 2
test ecx, ecx
jg 0x48e9f1
add esi, esi
push esi
push edx
push edi
call fcn.00591570
add esp, 0xc
add edi, esi
cmp dword [esp + 0x44], 0
jge 0x48ea30
test ebp, ebp
jle 0x48ea30
nop dword [eax + eax]
mov ax, word [esp + 0x58]
dec ebp
mov word [edi], ax
add edi, 2
test ebp, ebp
jg 0x48ea20
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 4]
je 0x48ea58
cmp ebx, dword [esp + 0x10]
jne 0x48e8c0
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x10]
sub eax, ebx
and eax, 0xfffffffe
push eax
push ebx
push edi
call fcn.00591570
mov eax, dword [esp + 0x40]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x20
ret