Function at 0x49762c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbd8
push ebx
push esi
push edi
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x108], edx
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x104]
cmp byte [eax + 0xc], 3
jne 0x49786f
mov eax, dword [ebp - 0x104]
call fcn.0047b630
test al, al
jne 0x497863
lea edx, [ebp - 0x100]
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x24]
call fcn.0049756c
mov ecx, 0xff
xor edx, edx
mov eax, dword [ebp - 0x10c]
call fcn.004351cc
test al, al
je 0x4976e6
mov eax, dword [ebp - 0x10c]
xor ebx, ebx
lea edx, [ebp - 0x100]
xor ecx, ecx
mov cl, byte [edx]
cmp ecx, dword [ebp - 0x10c]
jne 0x4976b5
mov eax, ebx
jmp 0x4976bf
inc ebx
inc edx
cmp ebx, 0x100
jne 0x4976a5
mov edx, dword [ebp - 0x10c]
mov dl, byte [ebp + edx - 0x100]
mov byte [ebp + eax - 0x100], dl
mov al, byte [ebp - 0x10c]
mov edx, dword [ebp - 0x10c]
mov byte [ebp + edx - 0x100], al
xor eax, eax
lea edx, [ebp - 0x100]
lea ecx, [eax + eax*2]
mov ebx, dword [ebp - 0x104]
mov ebx, dword [ebx + 0x24]
movzx esi, byte [edx]
lea esi, [esi + esi*2]
add ebx, ecx
mov cx, word [ebx]
mov word [ebp + esi - 0x428], cx
mov cl, byte [ebx + 2]
mov byte [ebp + esi - 0x426], cl
inc eax
inc edx
cmp eax, 0x100
jne 0x4976ee
mov ecx, 3
mov edx, dword [ebp - 0x104]
lea eax, [ebp - 0x100]
call fcn.004935a8
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x24]
mov edi, eax
lea esi, [ebp - 0x428]
mov ecx, 0xc0
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jle 0x497859
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x110], 1
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp - 0x104]
call fcn.0047b624
mov esi, eax
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x10]
dec eax
test eax, eax
jle 0x497841
mov dword [ebp - 0x128], eax
mov ebx, 1
xor eax, eax
mov al, byte [esi + ebx]
cmp eax, dword [ebp - 0x10c]
jne 0x4977c5
cmp dword [ebp - 0x10c], 0xffffffff
jne 0x497834
mov eax, dword [ebp - 0x114]
mov cl, byte [eax + ebx - 1]
mov eax, dword [ebp - 0x114]
mov dl, byte [eax + ebx]
mov al, byte [esi + ebx - 1]
call fcn.0049742c
mov edi, eax
and edi, 0xff
lea eax, [edi + edi*2]
mov dl, byte [ebp + eax - 0x426]
shl edx, 0x10
mov dx, word [ebp + eax - 0x428]
push edx
xor eax, eax
mov al, byte [esi + ebx]
lea eax, [eax + eax*2]
mov dl, byte [ebp + eax - 0x426]
shl edx, 0x10
mov dx, word [ebp + eax - 0x428]
push edx
call fcn.004975e8
cmp eax, dword [ebp - 0x108]
jge 0x497834
cmp edi, dword [ebp - 0x10c]
je 0x497834
mov eax, edi
mov byte [esi + ebx], al
inc ebx
dec dword [ebp - 0x128]
jne 0x4977af
mov dword [ebp - 0x114], esi
inc dword [ebp - 0x110]
dec dword [ebp - 0x124]
jne 0x49777f
mov eax, 4
jmp 0x497a3f
mov dword [ebp - 0x118], 1
jmp 0x497879
mov dword [ebp - 0x118], 3
mov eax, dword [ebp - 0x108]
inc eax
sar eax, 1
jns 0x497887
adc eax, 0
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x114], eax
xor eax, eax
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jle 0x497a3a
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x110], 1
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp - 0x104]
call fcn.0047b624
mov esi, eax
mov ebx, dword [ebp - 0x118]
mov eax, dword [ebp - 0x104]
mov eax, dword [eax + 0x10]
dec eax
sub eax, ebx
jl 0x497a22
inc eax
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x10c], 0xffffffff
je 0x49794b
cmp dword [ebp - 0x118], 1
jne 0x49791d
xor eax, eax
mov al, byte [esi + ebx]
cmp eax, dword [ebp - 0x10c]
je 0x497a15
jmp 0x49794b
mov eax, ebx
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x120], edx
mov eax, ebx
sub eax, dword [ebp - 0x120]
lea eax, [esi + eax]
mov eax, dword [eax]
and eax, 0xffffff
cmp eax, dword [ebp - 0x10c]
je 0x497a15
mov eax, ebx
sub eax, dword [ebp - 0x118]
movzx edi, byte [esi + eax]
mov eax, dword [ebp - 0x114]
movzx eax, byte [eax + ebx]
add edi, eax
shr edi, 1
mov cl, byte [esi + ebx]
xor eax, eax
mov al, cl
push eax
mov eax, edi
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [ebp - 0x108]
jg 0x497983
mov eax, edi
jmp 0x4979cc
mov eax, edi
push eax
mov eax, ecx
pop edx
sub al, dl
and eax, 0xff
cdq
idiv dword [ebp - 0x108]
mov eax, edx
cmp eax, dword [ebp - 0x11c]
jge 0x4979b3
xor edx, edx
mov dl, byte [esi + ebx]
sub edx, eax
mov eax, edx
xor edx, edx
call fcn.00435184
jmp 0x4979cc
xor edx, edx
mov dl, byte [esi + ebx]
add edx, dword [ebp - 0x108]
sub edx, eax
mov eax, edx
mov edx, 0xff
call fcn.0043513c
cmp dword [ebp - 0x10c], 0xffffffff
jne 0x4979da
mov byte [esi + ebx], al
jmp 0x497a15
cmp dword [ebp - 0x118], 1
jne 0x4979f0
cmp eax, dword [ebp - 0x10c]
je 0x497a15
mov byte [esi + ebx], al
jmp 0x497a15
mov byte [esi + ebx], al
cmp dword [ebp - 0x120], 2
jne 0x497a15
lea edx, [esi + ebx - 2]
mov edx, dword [edx]
and edx, 0xffffff
cmp edx, dword [ebp - 0x10c]
jne 0x497a15
xor al, 1
mov byte [esi + ebx], al
inc ebx
dec dword [ebp - 0x128]
jne 0x4978f8
mov dword [ebp - 0x114], esi
inc dword [ebp - 0x110]
dec dword [ebp - 0x124]
jne 0x4978c6
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret