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 [esi + edi*4], al
jae 0x474604
and esi, dword [0x5bb724]
xor eax, 0x5bb724
je 0x47467b
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 0x47464f
mov edx, 0xfffffffe
rol edx, cl
and dword [eax*4 + 0x5bb728], edx
jne 0x47464f
btr dword [0x5bb724], eax
mov edi, 0xfffffff0
and edi, dword [esi - 4]
cmp edi, 0x10a60
jb 0x4746cb
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.004742d3
jmp 0x4746d0
movzx ecx, word [ebx + 0x18]
mov edi, dword [0x5bb720]
cmp edi, ecx
jb 0x4746af
mov esi, dword [0x5bb71c]
movzx ecx, word [ebx + 0x1a]
lea edx, [ecx + 0xb30]
cmp edi, edx
jb 0x47469f
mov edi, ecx
sub esi, edi
sub dword [0x5bb720], edi
mov dword [0x5bb71c], esi
jmp 0x4746d0
movzx eax, word [ebx + 0x1a]
mov edi, eax
call fcn.0047439f
mov esi, eax
test eax, eax
jne 0x4746d0
mov byte [ebp - 0x5def8a40], 0x18
mov bh, 0x5b
add byte [eax + 0x5b5e5f03], cl
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
ror byte [ebx - 0x48d76afc], 1
pop ebx
add byte [edi], cl
mov esp, 0xc1d089c8
loopne 0x4747ab
or ecx, eax
jmp 0x4747df
mov ecx, dword [0x5bb720]
sub ecx, ebx
jb 0x4747cf
mov eax, dword [0x5bb71c]
sub eax, ebx
mov dword [0x5bb71c], eax
mov dword [0x5bb720], ecx
or ebx, 2
mov dword [eax - 4], ebx
jmp 0x4747d6
mov eax, ebx
call fcn.0047439f
mov byte [0x5bb718], 0
pop ebx
ret
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 0x47480e
mov eax, 0xfffffffe
rol eax, cl
and dword [edx*4 + 0x5bb728], eax
jne 0x47480e
btr dword [0x5bb724], edx
mov edi, 0xfffffff0
and edi, dword [esi - 4]
mov edx, edi
sub edx, ebx
je 0x47483b
lea eax, [ebx + esi]
lea ecx, [edx + 3]
mov dword [eax - 4], ecx
mov dword [edx + eax - 8], edx
cmp edx, 0xb30
jb 0x474840
call fcn.004742d3
jmp 0x474840
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