Function at 0x4973c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
push 0x98
push 0
mov dword [esp + 0x10], edi
lea eax, [edi + 0x110]
push eax
call fcn.004a5da0
mov eax, dword [edi + 0x30]
add esp, 0xc
add eax, dword [edi + 0x34]
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x40], eax
mov dword [edi + 0x2c], 0
mov dword [edi + 0x14], 0
lea esi, [eax + ecx]
shr ecx, 3
mov eax, 0xaaaaaaab
mul ecx
mov ecx, 0xc
shr edx, 3
imul eax, edx, 0x54
mov edx, esi
sub edx, eax
mov eax, dword [edi + 0x18]
cmp eax, ecx
mov dword [edi + 0xc], eax
mov dword [edi + 0x44], edx
cmovb ecx, eax
mov dword [edi + 8], edx
not ecx
lea eax, [edx + 0x600]
mov dword [edi + 0x24], ecx
mov dword [edi + 0x20], ecx
lea ecx, [esi - 0xc]
mov dword [edi + 0x38], eax
xor eax, eax
mov dword [edi + 0x3c], ecx
mov dword [edi], ecx
mov dword [edi + 4], ecx
mov dword [ecx + 4], edx
add edx, 2
mov dword [ecx], 0x1010100
mov dword [ecx + 8], 0
mov byte [edx - 2], al
lea edx, [edx + 6]
xor ecx, ecx
mov byte [edx - 7], 1
inc eax
mov dword [edx - 6], ecx
cmp eax, 0x100
jb 0x497157
push ebx
push ebp
xor ebx, ebx
lea ebp, [edi + 0x9fc]
nop dword [eax + eax]
mov esi, ebp
xor edi, edi
movzx eax, word [edi + 0x4c1530]
lea ecx, [ebx + 2]
xor edx, edx
div ecx
mov ecx, 0x4000
sub ecx, eax
xor eax, eax
movzx ecx, cx
nop
mov word [esi + eax*2], cx
add eax, 8
cmp eax, 0x40
jb 0x4971a0
add edi, 2
add esi, 2
cmp edi, 0x10
jb 0x497184
inc ebx
sub ebp, 0xffffff80
cmp ebx, 0x80
jb 0x497180
mov edi, dword [esp + 0x10]
mov edx, 0x50
pop ebp
pop ebx
lea esi, [edi + 0x3bc]
mov eax, esi
mov ecx, 0x10
nop dword [eax + eax]
mov word [eax], dx
lea eax, [eax + 4]
mov word [eax - 2], 0x403
sub ecx, 1
jne 0x4971e0
add edx, 0x28
add esi, 0x40
cmp edx, 0x438
jb 0x4971d4
mov dword [edi + 0x3b8], 0x40070000
pop edi
pop esi
pop ecx
ret
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x24], esi
mov ecx, dword [esi + 8]
cmp byte [ecx + 1], 0x1f
jae 0x49743e
mov eax, dword [esi]
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x49743e
cmp word [ebx], 1
jne 0x4973f3
mov al, byte [ebx + 3]
cmp al, 0x20
jae 0x49743e
inc al
mov byte [ebx + 3], al
jmp 0x49743e
mov edi, dword [ebx + 4]
mov al, byte [ecx]
cmp byte [edi], al
je 0x49742d
nop dword [eax]
mov ebp, edi
add edi, 6
cmp byte [edi], al
jne 0x497400
mov al, byte [edi + 1]
cmp al, byte [edi - 5]
jb 0x49742d
mov eax, dword [edi - 6]
mov ecx, dword [edi]
mov dx, word [edi + 4]
mov dword [edi], eax
mov ax, word [edi - 2]
mov dword [edi - 6], ecx
mov word [edi + 4], ax
mov word [edi - 2], dx
mov edi, ebp
mov al, byte [edi + 1]
cmp al, 0x73
jae 0x49743e
add al, 2
mov byte [edi + 1], al
add word [ebx + 2], 2
cmp dword [esi + 0xc], 0
jne 0x49746e
mov ecx, esi
call fcn.00496a80
mov dword [esi], eax
mov dword [esi + 4], eax
test eax, eax
je 0x49775a
mov ecx, dword [esi + 8]
mov word [ecx + 2], ax
shr eax, 0x10
mov word [ecx + 4], ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esi + 8]
mov ebx, dword [esi + 0x40]
mov al, byte [eax]
mov byte [ebx], al
inc ebx
mov dword [esp + 0x1c], ebx
mov dword [esi + 0x40], ebx
cmp ebx, dword [esi + 0x44]
jae 0x49775a
mov edx, dword [esi + 8]
movzx ecx, word [edx + 4]
movzx eax, word [edx + 2]
shl ecx, 0x10
or ecx, eax
je 0x4974cd
cmp ecx, ebx
ja 0x4974b0
mov ecx, esi
call fcn.00496a80
mov ecx, eax
test ecx, ecx
je 0x49775a
add dword [esi + 0xc], 0xffffffff
mov edx, dword [esi]
mov dword [esp + 0x10], edx
jne 0x4974e2
xor eax, eax
mov dword [esp + 0x1c], ecx
cmp dword [esi + 4], edx
setne al
sub dword [esi + 0x40], eax
jmp 0x4974e2
mov eax, ebx
mov word [edx + 2], bx
shr eax, 0x10
mov word [edx + 4], ax
mov ecx, dword [esi]
mov edx, ecx
mov dword [esp + 0x10], ecx
mov edi, dword [esi + 4]
mov dword [esi], ecx
mov dword [esi + 4], ecx
cmp edi, edx
je 0x497466
mov eax, dword [esi + 8]
movzx ecx, word [edx + 2]
movzx ebp, word [edx]
mov dword [esp + 0x14], ebp
movzx eax, byte [eax + 1]
sub ecx, eax
sub ecx, ebp
inc ecx
mov dword [esp + 0x30], ecx
movzx eax, word [edi]
mov edx, 3
mov ebx, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], ebx
cmp ebx, 1
je 0x497628
test bl, 1
jne 0x4975f7
mov ebp, ebx
shr ebp, 1
movzx ecx, byte [esi + ebp + 0x8f]
movzx eax, byte [esi + ebp + 0x90]
mov dword [esp + 0x28], ecx
cmp ecx, eax
je 0x4975f3
lea edx, [ecx + 1]
mov ebx, dword [esi + edx*4 + 0x110]
lea ecx, [esi + edx*4]
test ebx, ebx
je 0x49756c
mov eax, dword [ebx]
mov dword [ecx + 0x110], eax
jmp 0x49759c
movzx eax, byte [edx + esi + 0x68]
mov ebx, dword [esi + 0x38]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x3c]
shl ecx, 2
sub eax, ebx
cmp eax, ecx
jb 0x49758b
lea eax, [ebx + ecx]
mov dword [esi + 0x38], eax
jmp 0x497594
mov ecx, esi
call fcn.00496900
mov ebx, eax
test ebx, ebx
je 0x49775a
mov esi, dword [edi + 4]
mov eax, ebx
sub eax, esi
mov dword [esp + 0x2c], esi
mov edx, ebx
mov dword [esp + 0x20], eax
lea ecx, [esi + 8]
mov esi, eax
mov eax, dword [ecx - 8]
lea edx, [edx + 0xc]
mov dword [edx - 0xc], eax
lea ecx, [ecx + 0xc]
mov eax, dword [ecx - 0x10]
mov dword [edx - 8], eax
mov eax, dword [ecx - 0xc]
mov dword [esi + ecx - 0xc], eax
sub ebp, 1
jne 0x4975b2
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + edx*4 + 0x110]
mov dword [ecx], eax
mov dword [esi + edx*4 + 0x110], ecx
mov dword [edi + 4], ebx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
movzx edx, word [edi + 2]
lea eax, [ebx*8]
cmp eax, edx
lea eax, [ebx*4]
sbb ecx, ecx
inc ecx
cmp ebp, eax
sbb eax, eax
inc eax
and ecx, eax
lea eax, [ebx + ebx]
cmp eax, ebp
sbb eax, eax
neg eax
add eax, edx
lea edx, [eax + ecx*2]
jmp 0x4976ae
mov ecx, dword [esi + 0x110]
test ecx, ecx
je 0x49763c
mov eax, dword [ecx]
mov dword [esi + 0x110], eax
jmp 0x497672
movzx eax, byte [esi + 0x68]
mov ecx, dword [esi + 0x38]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x3c]
shl edx, 2
sub eax, ecx
cmp eax, edx
jb 0x49765a
lea eax, [ecx + edx]
mov dword [esi + 0x38], eax
jmp 0x497665
xor edx, edx
mov ecx, esi
call fcn.00496900
mov ecx, eax
test ecx, ecx
je 0x49775a
mov edx, 3
mov al, byte [edi + 2]
movzx ebx, byte [edi + 3]
mov byte [ecx], al
movzx eax, word [edi + 4]
mov word [ecx + 2], ax
movzx eax, word [edi + 6]
mov word [ecx + 4], ax
mov dword [edi + 4], ecx
cmp ebx, 0x1e
jae 0x497697
add ebx, ebx
jmp 0x49769c
mov ebx, 0x78
cmp edx, ebp
mov byte [ecx + 1], bl
sbb edx, edx
neg edx
add edx, dword [esi + 0x10]
add edx, ebx
mov ebx, dword [esp + 0x18]
mov eax, dword [edi + 4]
lea ecx, [ebx + ebx*2]
mov ebx, dword [esp + 0x30]
add ebx, edx
lea eax, [eax + ecx*2]
mov ecx, dword [esi + 8]
mov dword [esp + 0x18], eax
lea eax, [edx + 6]
movzx ebp, byte [ecx + 1]
imul ebp, eax
mov al, byte [ecx]
mov ecx, dword [esp + 0x18]
add ebp, ebp
mov byte [ecx], al
mov eax, dword [esp + 0x34]
inc eax
mov word [edi], ax
mov eax, dword [esp + 0x1c]
mov word [ecx + 2], ax
shr eax, 0x10
mov word [ecx + 4], ax
lea eax, [ebx + ebx*2]
add eax, eax
cmp ebp, eax
jae 0x497712
lea eax, [ebx*4]
cmp ebp, eax
sbb ecx, ecx
inc ecx
cmp ebx, ebp
sbb eax, eax
neg eax
inc eax
add ecx, eax
add edx, 3
jmp 0x497739
mov eax, ebx
shl eax, 4
sub eax, ebx
cmp ebp, eax
lea eax, [ebx + ebx*8]
sbb ecx, ecx
inc ecx
cmp ebp, eax
sbb eax, eax
add eax, 5
add ecx, eax
lea eax, [ebx + ebx*2]
shl eax, 2
cmp ebp, eax
sbb eax, eax
inc eax
add ecx, eax
add edx, ecx
mov eax, dword [esp + 0x18]
mov word [edi + 2], dx
mov byte [eax + 1], cl
mov edi, dword [edi + 8]
cmp edi, dword [esp + 0x10]
je 0x497466
mov ebp, dword [esp + 0x14]
jmp 0x49750d
pop edi
mov ecx, esi
pop esi
pop ebp
pop ebx
add esp, 0x28
jmp 0x4970c0