Function at 0x47e350
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
mov dword [esp + 0x34], edx
mov eax, dword [eax]
mov edx, dword [edx]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x28]
push esi
mov esi, dword [ebp + 0x2c]
mov dword [esp + 0x54], eax
lea eax, [ebx + 6]
push edi
mov dword [esp + 0x5c], edx
mov edi, 0xfffffffe
mov dword [esp + 0xc], eax
cmp byte [edx], 0x7f
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], edi
jne 0x47e3d8
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 4]
shl ecx, 8
or ecx, eax
mov eax, dword [esi + 0x20]
mov dword [esp + 0x50], eax
xor eax, eax
mov word [esp + 0x56], ax
lea eax, [esp + 0x50]
mov dword [esp + 0x34], ecx
mov word [esp + 0x54], cx
mov dword [esi + 0x20], eax
lea eax, [edx + 1]
add ebx, 3
mov byte [eax], 0
lea ecx, [esp + 0xc]
mov dword [esp + 0x48], eax
add ebx, edx
lea eax, [edx + 2]
xor edx, edx
mov byte [eax], 0
cmp dword [ebp + 0x30], edx
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x38]
cmove ecx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x14], ebx
je 0x47e419
mov dword [esi + 0x38], eax
cmp dword [ebp + 0x10], 0
je 0x47e438
mov byte [ebx], 0x76
inc ebx
mov dword [esp + 0x30], ebx
mov word [ebx], 0
add ebx, 2
add dword [esp + 0xc], 3
mov dword [esp + 0x14], ebx
push ecx
push esi
push dword [ebp + 0x1c]
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [ebp + 0xc]
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x34]
lea ecx, [esp + 0x4c]
call fcn.0047acd0
add esp, 0x20
test eax, eax
je 0x47e5c4
mov ecx, dword [esp + 0x24]
cmp dword [esi + 0x38], ecx
mov eax, dword [ebp + 0x30]
cmovg ecx, dword [esi + 0x38]
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], ebx
test eax, eax
jne 0x47e536
cmp byte [edx], 0x71
mov eax, dword [esp + 0x28]
je 0x47e4a5
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
jmp 0x47e4e7
mov ecx, dword [esp + 0x20]
test ecx, ecx
js 0x47e4be
cmp ecx, eax
je 0x47e4d1
test edi, edi
mov dword [esp + 0x20], 0xffffffff
cmovs edi, ecx
test eax, eax
js 0x47e4d1
mov ecx, dword [esp + 0x1c]
test ecx, ecx
cmovs ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x47e4d5
mov ecx, dword [esp + 0x1c]
mov eax, ecx
xor eax, edi
test eax, 0xdfffffff
je 0x47e4e5
or edi, 0xffffffff
jmp 0x47e4e7
or edi, ecx
cmp dword [ebp + 0x10], 0
je 0x47e533
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
shr edx, 0xb
push esi
push 0
and edx, 1
mov byte [ebx], 0
call fcn.00479b80
mov ecx, eax
add esp, 8
cmp ecx, 0xfffffffd
jne 0x47e519
mov dword [esi + 0x5c], 1
jmp 0x47e52f
test ecx, ecx
js 0x47e5a5
mov edx, dword [esp + 0x30]
mov eax, ecx
sar eax, 8
mov byte [edx], al
mov byte [edx + 1], cl
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0x30]
mov esi, dword [esp + 0x18]
cmp byte [esi], 0x7c
jne 0x47e5d6
test eax, eax
je 0x47e56f
mov eax, dword [esp + 0x3c]
mov ebx, dword [ebp + 0x18]
add dword [esp + 0xc], 3
add ebx, 3
mov ecx, dword [esp + 0x44]
mov eax, dword [eax]
add ebx, eax
mov eax, dword [esp + 0x40]
inc esi
mov dword [esp + 0x18], esi
mov esi, dword [ebp + 0x2c]
jmp 0x47e40c
mov eax, ebx
mov byte [ebx], 0x71
sub eax, edx
mov ecx, ebx
sar eax, 8
mov byte [ebx + 1], al
mov al, bl
sub al, dl
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x44]
mov byte [ebx + 2], al
mov eax, dword [esp + 0x40]
mov dword [esp + 0x5c], ebx
add ebx, 3
inc esi
mov dword [esp + 0x18], esi
mov esi, dword [ebp + 0x2c]
jmp 0x47e40c
cmp ecx, 0xfffffffe
jne 0x47e5af
lea eax, [ecx + 0x26]
jmp 0x47e5bf
cmp ecx, 0xfffffffc
mov eax, 0x19
mov edx, 0x46
cmove eax, edx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x18]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x47e604
mov dword [esp + 0x44], ebx
sub ebx, edx
movzx ecx, byte [edx + 1]
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
mov byte [edx + 2], bl
mov eax, ebx
mov ebx, ecx
sar eax, 8
mov byte [edx + 1], al
sub edx, ecx
test ecx, ecx
jg 0x47e5e0
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
mov eax, ebx
mov edx, dword [ebp + 0x2c]
sub eax, ecx
sar eax, 8
mov byte [ebx], 0x72
mov byte [ebx + 1], al
mov al, bl
sub al, cl
mov byte [ebx + 2], al
add ebx, 3
cmp dword [esp + 0x34], 0
jle 0x47e698
mov eax, dword [edx + 0x20]
cmp word [eax + 6], 0
je 0x47e68a
mov eax, ebx
sub eax, ecx
push eax
push ecx
lea eax, [ecx + 3]
push eax
call fcn.00486480
mov edx, dword [esp + 0x44]
add ebx, 3
mov eax, dword [esp + 0x54]
mov ecx, ebx
sub ecx, edx
add esp, 0xc
sar ecx, 8
mov byte [edx], 0x7b
mov byte [eax], cl
mov al, bl
sub al, dl
mov edx, dword [esp + 0x4c]
mov byte [edx], al
mov edx, dword [ebp + 0x2c]
mov byte [ebx], 0x72
mov byte [ebx + 1], cl
mov byte [ebx + 2], al
add ebx, 3
mov ecx, dword [esp + 0xc]
mov eax, dword [edx + 0x20]
add ecx, 6
mov dword [esp + 0xc], ecx
mov eax, dword [eax]
mov dword [edx + 0x20], eax
jmp 0x47e69c
mov eax, dword [edx + 0x20]
mov ecx, dword [esp + 0xc]
mov eax, dword [eax]
mov dword [edx + 0x20], eax
jmp 0x47e69c
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
mov dword [edx + 0x38], eax
mov eax, dword [esp + 0x3c]
mov dword [eax], ebx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x30]
mov dword [eax], esi
mov eax, dword [ebp + 0x20]
mov esi, dword [esp + 0x20]
mov dword [eax], esi
mov eax, dword [ebp + 0x24]
mov dword [eax], edi
test ebx, ebx
je 0x47e6e7
mov edx, dword [ebx]
mov eax, 0x7fffffeb
sub eax, edx
cmp eax, ecx
jge 0x47e6e2
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edx + ecx]
mov dword [ebx], eax
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret