Function at 0x4bd660
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x3c
mov edx, dword [ebx + 0x24]
test edx, edx
je 0x4bd77a
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x2c]
mov esi, edx
shl esi, 4
add esi, dword [eax + 0x58]
mov eax, dword [esi + 4]
or eax, dword [esi]
jne 0x4bd77a
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x4bd830
cmp edx, dword [eax]
mov edi, 2
je 0x4bd830
mov eax, dword [ebx + 0x30]
mov dword [ebp - 0x1c], 0
mov ecx, dword [eax]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], edi
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [ecx + 0x14]
sub esp, 0x10
test eax, eax
je 0x4bd7a0
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4bd840
mov esi, eax
mov eax, dword [edx]
mov dword [esp], edx
call dword [eax + 8]
sub esp, 4
test esi, esi
jne 0x4bd77c
xor esi, esi
cmp byte [ebx + 0xf], 0
mov eax, dword [ebx + 0x28]
je 0x4bd726
mov edx, dword [ebx + 0x2c]
mov ecx, eax
shl ecx, 4
add ecx, dword [edx + 0x58]
mov edx, dword [ebx + 0x10]
not edx
cmp dword [ecx + 8], edx
setne cl
movzx ecx, cl
lea esi, [ecx + ecx*2]
mov edx, dword [ebx + 8]
test edx, edx
je 0x4bd742
mov eax, dword [edx]
mov dword [esp], edx
call dword [eax + 8]
mov eax, dword [ebx + 0x28]
sub esp, 4
mov dword [ebx + 8], 0
mov edx, dword [ebx + 0x20]
mov byte [ebx + 0xe], 0
test edx, edx
je 0x4bd796
cmp dword [edx], eax
je 0x4bd790
add eax, 1
mov dword [ebx + 0x28], eax
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 8
test eax, eax
mov esi, eax
jne 0x4bd77c
mov edx, dword [ebx + 0x24]
test edx, edx
jne 0x4bd680
xor esi, esi
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
add edx, 4
mov dword [ebx + 0x20], edx
sub dword [ebx + 0x24], 1
jmp 0x4bd751
mov eax, dword [ebp - 0x1c]
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x4bd7b7
mov ecx, eax
mov eax, dword [eax]
mov dword [esp], ecx
call dword [eax + 4]
sub esp, 4
mov eax, dword [ebx + 8]
test eax, eax
je 0x4bd7c9
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 0x10], 0xffffffff
mov dword [ebx + 8], eax
movzx eax, byte [ebx + 0xd]
test al, al
je 0x4bd7ed
movzx eax, byte [esi + 0xe]
test al, al
je 0x4bd7ed
movzx eax, byte [esi + 0xd]
xor eax, 1
mov edx, dword [esi + 4]
mov byte [ebx + 0xf], al
test edi, edi
mov eax, dword [esi]
mov byte [ebx + 0xe], 1
mov dword [ebx + 0x1c], edx
mov dword [ebx + 0x18], eax
jne 0x4bd80a
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4bd850
mov eax, dword [ebx + 0x30]
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x18]
mov edx, dword [ebp - 0x1c]
sub esp, 8
mov esi, eax
test edx, edx
je 0x4bd6fb
jmp 0x4bd6f0
movzx edi, byte [ebx + 0xc]
jmp 0x4bd6b1
lea esp, [ebp - 0xc]
mov esi, eax
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x28]
cmp eax, dword [edx + 0xe0]
jae 0x4bd86a
mov edx, dword [edx + 0xdc]
cmp byte [edx + eax], 0
jne 0x4bd80a
cmp byte [esi + 0xd], 0
mov eax, 2
cmove edi, eax
jmp 0x4bd80a