Function at 0x416540
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x480d83
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x250
push ebx
mov ebx, ecx
mov ecx, dword [0x4ccd64]
push esi
push edi
call fcn.0044c0e0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x416e39
test eax, eax
je 0x416e39
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x416e39
mov eax, dword [0x4ccd64]
mov eax, dword [eax + 0x1c]
push eax
call dword [0x483528]
push eax
call fcn.0047d3d9
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0x60], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebx + 0x5c]
mov dword [ebx + 0x4c], eax
add eax, edi
mov byte [ebx + 0x39c], 1
mov dword [edx], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebx + 0x54], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x50], ecx
add ecx, eax
mov dword [ebx + 0x58], ecx
mov al, byte [esi + 4]
cmp al, 8
mov edi, dword [ebp - 0x1c]
setne cl
dec ecx
lea eax, [ebx + 0x4c]
and ecx, 0xfffffffd
push eax
add ecx, 4
push esi
mov byte [ebx + 0x7c], cl
push edx
mov ecx, edi
call fcn.0040ad70
mov eax, dword [esi + 0xc]
test eax, eax
je 0x416606
mov eax, dword [eax + 4]
jmp 0x416608
xor eax, eax
mov edi, dword [edi + 0xc]
test edi, edi
je 0x416614
mov edi, dword [edi + 4]
jmp 0x416616
xor edi, edi
mov cl, byte [ebx + 0x7c]
cmp cl, 1
jne 0x416632
add eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
shl eax, 2
mov dword [ebx + 0x74], eax
jmp 0x41663c
lea edx, [eax*4]
mov dword [ebx + 0x74], edx
and ecx, 0xff
lea eax, [edi*4]
imul ecx, dword [ebx + 0x4c]
mov edi, dword [ebx + 0x50]
mov dword [ebx + 0x78], eax
imul edi, dword [ebx + 0x74]
imul eax, dword [ebx + 0x60]
mov edx, dword [esi + 0x10]
add edx, ecx
mov ecx, dword [ebp - 0x1c]
add edi, edx
mov edx, dword [ebx + 0x5c]
mov dword [ebx + 0x64], edi
mov ecx, dword [ecx + 0x10]
add ecx, eax
lea edi, [ebx + 0x4c]
lea eax, [ecx + edx*4]
mov ecx, dword [ebx + 0x54]
mov edx, dword [edi]
mov dword [ebx + 0x68], eax
sub ecx, edx
mov edx, dword [ebx + 0x58]
mov dword [ebx + 0x6c], ecx
mov ecx, dword [ebx + 0x50]
sub edx, ecx
lea ecx, [ebp - 0x34]
mov dword [ebx + 0x70], edx
call fcn.0047d337
push 0x1940
mov dword [ebp - 4], 0
call fcn.004785c2
add esp, 4
mov dword [ebp + 0x1c], eax
test eax, eax
mov byte [ebp - 4], 1
je 0x4166c1
mov ecx, eax
call fcn.0040a830
mov dword [ebp + 0x20], eax
jmp 0x4166c8
mov dword [ebp + 0x20], 0
mov eax, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x6c]
push 0
push eax
push ecx
mov ecx, dword [ebp + 0x20]
mov byte [ebp - 4], 0
call fcn.0040aa80
test al, al
jne 0x416706
push 0
push 0
push 0x48f59c
call fcn.0047e19f
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x416e2a
mov edx, dword [ecx]
push 1
call dword [edx]
jmp 0x416e2a
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax + 0x10]
mov eax, dword [ebx + 0x70]
imul eax, dword [ebx + 0x6c]
mov dword [ebp + 0x1c], eax
mov dword [ebp - 0x20], ecx
lea eax, [eax + eax*2]
push eax
push 0
mov dword [ebp + 0xc], eax
call dword [0x4832e0]
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
push edx
push 0
call dword [0x4832e0]
mov edx, dword [ebp + 0x14]
xor ecx, ecx
cmp edx, ecx
mov dword [ebp + 0x18], eax
je 0x416df7
cmp eax, ecx
je 0x416df7
push ecx
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x20]
push esi
push eax
call fcn.0040af00
cld
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
movsb byte es:[edi], byte [esi]
movsb byte es:[edi], byte [esi]
movsb byte es:[edi], byte [esi]
inc esi
loop 0x41676e
mov edx, dword [ebx + 0x6c]
mov eax, dword [ebx + 0x5c]
mov esi, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x60]
mov dword [ebp - 0x5c], eax
add edx, eax
mov dword [ebp - 0x58], ecx
add esi, ecx
xor eax, eax
mov dword [ebp - 0x54], edx
mov edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
push eax
push ecx
mov ecx, dword [ebp + 0x20]
lea eax, [ebp - 0x18]
push edx
push eax
mov dword [ebp - 0x50], esi
call fcn.0040af00
cld
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
movsb byte es:[edi], byte [esi]
movsb byte es:[edi], byte [esi]
movsb byte es:[edi], byte [esi]
inc esi
loop 0x4167b7
push 0
call dword [0x483064]
push eax
lea ecx, [ebp - 0x34]
call fcn.0047d3ee
mov esi, dword [ebp + 0x20]
mov edi, dword [ebp - 0x30]
lea eax, [ebp - 0x34]
mov ecx, dword [esi + 8]
neg eax
sbb eax, eax
push ecx
and eax, edi
push eax
call dword [0x483060]
mov edi, dword [0x48359c]
mov dword [ebp - 0x14], eax
call edi
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebx + 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x344], esi
mov esi, dword [ebx + 0x38]
sub ecx, edx
mov edx, dword [ebx + 0x6c]
sub eax, esi
mov byte [ebp + 0x1f], 0
mov dword [ebx + 0x334], eax
add edx, eax
mov eax, dword [ebx + 0x70]
mov dword [ebp - 0x24], 0
add eax, ecx
mov dword [ebx + 0x338], ecx
mov dword [ebx + 0x33c], edx
mov dword [ebx + 0x340], eax
jmp 0x416841
mov edi, dword [0x48359c]
call edi
sub eax, 0x21
mov dword [ebp + 0xc], eax
call edi
mov edx, dword [ebp - 0x3c]
mov esi, eax
mov eax, dword [ebp + 0x24]
mov ecx, esi
sub ecx, edx
cmp ecx, eax
ja 0x416899
mov eax, ecx
xor edx, edx
shl eax, 8
sub eax, ecx
mov byte [ebp + 0x10], 0xff
div dword [ebp + 0x24]
cmp eax, 0xff
ja 0x416875
mov byte [ebp + 0x10], al
mov cl, byte [ebp + 0x10]
mov al, byte [ebp + 0x1f]
cmp al, cl
je 0x416887
sub esi, dword [ebp + 0xc]
cmp esi, 0x21
jae 0x41689d
call edi
mov edx, dword [ebp - 0x3c]
mov esi, eax
mov eax, dword [ebp + 0x24]
mov ecx, esi
sub ecx, edx
cmp ecx, eax
jbe 0x41685b
mov byte [ebp + 0x10], 0xff
mov dl, byte [ebp + 0x10]
mov edi, dword [ebp + 0x10]
xor ecx, ecx
xor esi, esi
mov byte [ebp + 0x1f], dl
and edi, 0xff
mov eax, 0x80808081
imul esi
add edx, esi
add esi, edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov al, cl
sub al, dl
mov byte [ebp + ecx - 0x25c], dl
mov byte [ebp + ecx - 0x15c], al
inc ecx
cmp ecx, 0x100
jl 0x4168b0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x416ae2
mov eax, dword [ebx + 0x70]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x20]
cdq
sub eax, edx
mov dword [ebp - 0x10], 0
sar eax, 1
test eax, eax
jle 0x416a3e
mov eax, dword [ebx + 0x6c]
mov dword [ebp + 0xc], 0
inc eax
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x41698f
xor edx, edx
xor eax, eax
mov dl, byte [esi]
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
add edi, 4
mov dl, byte [ebp + edx - 0x15c]
add esi, 4
add dl, byte [ebp + eax - 0x25c]
mov eax, dword [ebp + 0xc]
mov byte [ecx], dl
add ecx, 6
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
inc eax
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x41691f
mov eax, dword [ebx + 0x6c]
add edi, 3
cdq
sub eax, edx
add esi, 3
sar eax, 1
add ecx, 4
mov dword [ebp + 0xc], 0
test eax, eax
jle 0x416a1b
xor eax, eax
xor edx, edx
mov al, byte [esi]
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
add edi, 4
mov al, byte [ebp + eax - 0x15c]
add esi, 4
add al, byte [ebp + edx - 0x25c]
add ecx, 6
mov byte [ecx - 6], al
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x4169ab
mov eax, dword [ebp - 0x10]
sub edi, 3
sub esi, 3
sub ecx, 4
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x70]
cdq
sub eax, edx
mov edx, dword [ebp - 0x10]
sar eax, 1
cmp edx, eax
jl 0x41690b
mov edx, dword [ebx + 0x70]
and edx, 0x80000001
jns 0x416a4e
dec edx
or edx, 0xfffffffe
inc edx
je 0x416cd7
mov eax, dword [ebx + 0x6c]
mov dword [ebp + 0xc], 0
inc eax
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x416cd7
xor eax, eax
xor edx, edx
mov al, byte [esi]
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
add edi, 4
mov al, byte [ebp + eax - 0x15c]
add esi, 4
add al, byte [ebp + edx - 0x25c]
add ecx, 6
mov byte [ecx - 6], al
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
inc eax
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x416a6c
jmp 0x416cd7
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x10], 0
lea edi, [ecx + 3]
lea ecx, [eax + 4]
mov eax, dword [ebx + 0x70]
lea esi, [edx + 3]
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x416c3e
mov eax, dword [ebx + 0x6c]
mov dword [ebp + 0xc], 0
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x416b8d
xor edx, edx
xor eax, eax
mov dl, byte [esi]
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
add edi, 4
mov dl, byte [ebp + edx - 0x15c]
add esi, 4
add dl, byte [ebp + eax - 0x25c]
mov eax, dword [ebp + 0xc]
mov byte [ecx], dl
add ecx, 6
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x416b1e
mov eax, dword [ebx + 0x6c]
sub edi, 3
sub esi, 3
sub ecx, 4
inc eax
mov dword [ebp + 0xc], 0
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x416c1b
xor eax, eax
xor edx, edx
mov al, byte [esi]
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
add edi, 4
mov al, byte [ebp + eax - 0x15c]
add esi, 4
add al, byte [ebp + edx - 0x25c]
add ecx, 6
mov byte [ecx - 6], al
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
inc eax
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x416baa
mov eax, dword [ebp - 0x10]
add edi, 3
add esi, 3
add ecx, 4
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x70]
cdq
sub eax, edx
mov edx, dword [ebp - 0x10]
sar eax, 1
cmp edx, eax
jl 0x416b0b
mov edx, dword [ebx + 0x70]
and edx, 0x80000001
jns 0x416c4e
dec edx
or edx, 0xfffffffe
inc edx
je 0x416cd7
mov eax, dword [ebx + 0x6c]
mov dword [ebp + 0xc], 0
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x416cd7
xor eax, eax
xor edx, edx
mov al, byte [esi]
mov dl, byte [edi]
mov al, byte [ebp + eax - 0x15c]
add al, byte [ebp + edx - 0x25c]
inc ecx
inc esi
xor edx, edx
mov byte [ecx - 1], al
inc edi
mov dl, byte [esi]
xor eax, eax
mov al, byte [edi]
mov dl, byte [ebp + edx - 0x15c]
add dl, byte [ebp + eax - 0x25c]
inc ecx
inc esi
xor eax, eax
mov byte [ecx - 1], dl
inc edi
mov al, byte [esi]
xor edx, edx
mov dl, byte [edi]
add edi, 4
mov al, byte [ebp + eax - 0x15c]
add esi, 4
add al, byte [ebp + edx - 0x25c]
add ecx, 6
mov byte [ecx - 6], al
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x6c]
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
cmp edx, eax
jl 0x416c67
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x38]
lea esi, [ebx + 0x5c]
sub ecx, edx
mov edi, dword [ebx + 0x70]
mov edx, dword [esi]
push 0xcc0020
sub edx, eax
lea eax, [ebp - 0x34]
neg eax
sbb eax, eax
push 0
and eax, dword [ebp - 0x30]
push 0
push eax
mov eax, dword [ebx + 0x6c]
push edi
push eax
push ecx
mov ecx, dword [ebp - 0x38]
push edx
mov edx, dword [ecx + 4]
push edx
call dword [0x48305c]
mov ecx, dword [ebp - 0x24]
xor eax, eax
test ecx, ecx
sete al
mov dword [ebp - 0x24], eax
mov al, byte [ebp + 0x10]
cmp al, 0xff
je 0x416d46
mov eax, dword [ebp + 0x28]
test eax, eax
jne 0x41683b
mov ecx, dword [0x4cc9f8]
call fcn.0044cd40
test al, al
je 0x41683b
mov ecx, dword [ebp + 8]
lea eax, [ebx + 0x4c]
push 0
push eax
push ecx
mov ecx, dword [ebp - 0x1c]
push esi
mov dword [ebx + 0x344], 0
call fcn.0040af00
mov eax, dword [esi]
mov ecx, dword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x70]
mov esi, dword [ebx + 0x6c]
sub eax, ecx
mov ecx, dword [ebx + 0x60]
mov dword [ebp - 0x4c], eax
sub ecx, edi
add eax, esi
mov dword [ebp - 0x48], ecx
add ecx, edx
lea edx, [ebp - 0x4c]
mov dword [ebp - 0x40], ecx
mov ecx, dword [0x4ccd64]
push 0
push edx
mov dword [ebp - 0x44], eax
call fcn.00448090
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push ecx
neg eax
sbb eax, eax
and eax, esi
push eax
call dword [0x483060]
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x416dbd
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [ebp + 0x14]
mov esi, dword [0x4832e8]
push eax
call esi
mov ecx, dword [ebp + 0x18]
push ecx
call esi
lea ecx, [ebp - 0x34]
call fcn.0047d456
mov edx, dword [ebp - 0x38]
mov ecx, dword [0x4ccd64]
mov eax, dword [edx + 4]
mov edx, dword [ecx + 0x1c]
push eax
push edx
call dword [0x48352c]
mov byte [ebx + 0x39c], 0
jmp 0x416e2a
push ecx
push ecx
push 0x48f568
call fcn.0047e19f
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x416e10
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp + 0x14]
mov esi, dword [0x4832e8]
test eax, eax
je 0x416e20
push eax
call esi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x416e2a
push eax
call esi
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.0047d46c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x24