Function at 0x474500
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x48]
mov edx, dword [ebp - 4]
mov eax, dword [edx + eax*4 + 0x40]
mov al, byte [eax]
dec al
je 0x47453a
dec al
je 0x4745a7
dec al
je 0x47460e
dec al
je 0x4746bb
jmp 0x474796
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
inc eax
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x20]
sub edx, eax
jb 0x474796
inc edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x24]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0x48]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4 + 0x40]
mov al, byte [edx + eax]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0x48]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4 + 0x40]
mov ecx, dword [ebp - 0x1c]
add al, byte [edx + ecx]
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0x48]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4 + 0x40]
mov ecx, dword [ebp - 0x1c]
mov byte [edx + ecx], al
inc dword [ebp - 0x1c]
dec dword [ebp - 0x20]
jne 0x474556
jmp 0x474796
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
test eax, eax
jbe 0x474796
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x48]
xor al, 1
and eax, 0x7f
mov edx, dword [ebp - 4]
mov eax, dword [edx + eax*4 + 0x40]
mov edx, dword [ebp - 0x1c]
mov al, byte [eax + edx]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0x48]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4 + 0x40]
mov ecx, dword [ebp - 0x1c]
add al, byte [edx + ecx]
and al, 0xff
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0x48]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4 + 0x40]
mov ecx, dword [ebp - 0x1c]
mov byte [eax + edx*4], al
nop
movsx esi, byte [ebx + 1]
and esi, dword [0x5bb724]
je 0x47467e
bsf eax, esi
lea esi, [eax*8]
mov ecx, dword [eax*4 + 0x5bb728]
bsf ecx, ecx
lea ecx, [ecx + esi*4]
lea edi, [ecx*8 + 0x5bb7a8]
mov esi, dword [edi + 4]
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
mov dword [edx], edi
cmp edi, edx
jne 0x474652
mov edx, 0xfffffffe
rol edx, cl
and dword [eax*4 + 0x5bb728], edx
jne 0x474652
btr dword [0x5bb724], eax
mov edi, 0xfffffff0
and edi, dword [esi - 4]
cmp edi, 0x10a60
jb 0x4746ce
mov edx, edi
movzx edi, word [ebx + 0x1a]
sub edx, edi
lea eax, [edi + esi]
lea ecx, [edx + 3]
mov dword [eax - 4], ecx
mov dword [edx + eax - 8], edx
call fcn.004742d6
jmp 0x4746d3
movzx ecx, word [ebx + 0x18]
mov edi, dword [0x5bb720]
cmp edi, ecx
jb 0x4746b2
mov esi, dword [0x5bb71c]
movzx ecx, word [ebx + 0x1a]
lea edx, [ecx + 0xb30]
cmp edi, edx
jb 0x4746a2
mov edi, ecx
sub esi, edi
sub dword [0x5bb720], edi
mov dword [0x5bb71c], esi
jmp 0x4746d3
movzx eax, word [ebx + 0x1a]
mov edi, eax
call fcn.004743a2
mov esi, eax
test eax, eax
jne 0x4746d3
invalid
mov byte [0x5bb718], al
mov byte [ebx], al
pop edi
pop esi
pop ebx
ret
and byte [edi + esi - 4], 0xf7
lea ecx, [edi + 6]
mov dword [esi - 4], ecx
xor eax, eax
mov byte [0x5bb718], al
mov dword [esi], ebx
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov dword [ebx + 0x10], esi
lea eax, [esi + 0x20]
movzx ecx, word [ebx + 2]
lea edx, [ecx + eax]
mov dword [ebx + 8], edx
add edi, esi
sub edi, ecx
mov dword [ebx + 0xc], edi
mov byte [ebx], 0
mov dword [eax - 4], esi
pop edi
pop esi
pop ebx
ret
pop ss
bsf edx, eax
mov eax, dword [edx*4 + 0x5bb728]
bsf ecx, eax
mov eax, edx
shl eax, 5
or ecx, eax
jmp 0x4747e2
push esi
push edi
lea edi, [ecx*8 + 0x5bb7a8]
mov esi, dword [edi + 4]
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov dword [eax], edi
cmp edi, eax
jne 0x474811
mov eax, 0xfffffffe
rol eax, cl
and dword [edx*4 + 0x5bb728], eax
jne 0x474811
btr dword [0x5bb724], edx
mov edi, 0xfffffff0
and edi, dword [esi - 4]
mov edx, edi
sub edx, ebx
je 0x47483e
lea eax, [ebx + esi]
lea ecx, [edx + 3]
mov dword [eax - 4], ecx
mov dword [edx + eax - 8], edx
cmp edx, 0xb30
jb 0x474843
call fcn.004742d6
jmp 0x474843
and byte [edi + esi - 4], 0xf7
lea ecx, [ebx + 2]
mov dword [esi - 4], ecx
mov byte [0x5bb718], 0
mov eax, esi
pop edi
pop esi
pop ebx
ret