Function at 0x47397d
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], edi
mov ebx, dword [edi + 0x2c]
mov edx, dword [edi + 0x74]
mov dword [ebp - 0x10], ebx
mov eax, dword [edi + 0x2c]
mov esi, dword [edi + 0x3c]
add eax, 0xfffffefa
sub esi, dword [edi + 0x6c]
add eax, ebx
sub esi, edx
mov dword [ebp - 0xc], esi
cmp dword [edi + 0x6c], eax
jb 0x473a25
mov ecx, dword [edi + 0x38]
push ebx
lea eax, [ecx + ebx]
push eax
push ecx
call fcn.005896a0
mov ecx, dword [edi + 0x4c]
add esp, 0xc
mov eax, dword [edi + 0x44]
sub dword [edi + 0x70], ebx
sub dword [edi + 0x6c], ebx
sub dword [edi + 0x5c], ebx
mov dword [ebp - 4], ecx
lea edi, [eax + ecx*2]
lea edi, [edi - 2]
xor ecx, ecx
movzx eax, word [edi]
mov edx, eax
sub eax, ebx
cmp edx, ebx
movzx eax, ax
cmovae ecx, eax
sub dword [ebp - 4], 1
mov word [edi], cx
jne 0x4739d4
mov edi, dword [ebp - 8]
mov ecx, ebx
mov dword [ebp - 4], ecx
mov esi, ebx
mov eax, dword [edi + 0x40]
lea edi, [eax + ecx*2]
lea edi, [edi - 2]
xor ecx, ecx
movzx eax, word [edi]
mov edx, eax
sub eax, ebx
cmp edx, ebx
movzx eax, ax
cmovae ecx, eax
mov word [edi], cx
sub esi, 1
jne 0x473a01
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
add esi, ebx
mov ebx, dword [edi]
mov eax, dword [ebx + 4]
test eax, eax
je 0x473b4e
mov edx, dword [edi + 0x6c]
mov ecx, dword [edi + 0x74]
add edx, ecx
add edx, dword [edi + 0x38]
cmp eax, esi
mov dword [ebp - 0xc], edx
cmovbe esi, eax
test esi, esi
je 0x473a98
sub eax, esi
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x473a66
mov edx, dword [ebx]
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004758a9
jmp 0x473a7e
cmp eax, 2
jne 0x473a82
mov edx, dword [ebx]
test edx, edx
jne 0x473a75
xor eax, eax
jmp 0x473a7f
mov ecx, dword [ebx + 0x30]
push esi
call fcn.00473554
pop ecx
mov dword [ebx + 0x30], eax
push esi
push dword [ebx]
push dword [ebp - 0xc]
call fcn.005896a0
add dword [ebx], esi
add esp, 0xc
add dword [ebx + 8], esi
mov ecx, dword [edi + 0x74]
lea edx, [ecx + esi]
mov dword [ebp - 0xc], edx
mov dword [edi + 0x74], edx
cmp edx, 3
jb 0x473ac8
mov edx, dword [edi + 0x6c]
mov eax, dword [edi + 0x38]
mov ecx, dword [edi + 0x58]
movzx esi, byte [edx + eax]
mov dword [edi + 0x48], esi
movzx eax, byte [edx + eax + 1]
mov edx, dword [ebp - 0xc]
shl esi, cl
xor esi, eax
and esi, dword [edi + 0x54]
mov dword [edi + 0x48], esi
cmp edx, 0x106
jae 0x473ae0
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x473ae0
mov ebx, dword [ebp - 0x10]
jmp 0x473994
mov ecx, dword [edi + 0x16c0]
mov esi, dword [edi + 0x3c]
cmp ecx, esi
jae 0x473b4e
mov ebx, dword [edi + 0x6c]
add ebx, edx
cmp ecx, ebx
jae 0x473b1e
mov eax, 0x102
sub esi, ebx
cmp esi, eax
cmova esi, eax
mov eax, dword [edi + 0x38]
push esi
add eax, ebx
push 0
push eax
call fcn.0058a1a0
lea eax, [esi + ebx]
add esp, 0xc
mov dword [edi + 0x16c0], eax
jmp 0x473b4e
lea eax, [ebx + 0x102]
cmp ecx, eax
jae 0x473b4e
sub ebx, ecx
sub esi, ecx
lea eax, [ebx + 0x102]
cmp eax, esi
cmovbe esi, eax
mov eax, dword [edi + 0x38]
push esi
add eax, ecx
push 0
push eax
call fcn.0058a1a0
add esp, 0xc
add dword [edi + 0x16c0], esi
pop edi
pop esi
pop ebx
leave
ret