Function at 0x411d0c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x548
mov ebx, dword [esp + 0x55c]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 7
mov word [esp + 0x14], 0
push ebx
call fcn.005ff144
add esp, 4
mov esi, eax
cmp eax, 7
jbe 0x411d6b
cmp esi, 0x7fffffff
jae 0x412322
mov ebp, esi
or ebp, 7
cmp ebp, 0x7ffffffe
jbe 0x411d8c
mov ebp, bind
mov eax, 0xfffffffe
jmp 0x411da5
lea edi, [esp + 0x14]
mov dword [edi + 0x10], esi
mov eax, esi
add eax, esi
push eax
push ebx
push edi
call fcn.005e2280
add esp, 0xc
mov word [esp + esi*2 + 0x14], 0
mov edi, dword [edi]
jmp 0x411de6
cmp ebp, 0xa
mov ebx, 0xa
cmova ebx, ebp
lea eax, [ebx + ebx]
add eax, 2
cmp ebx, 0x7ff
jb 0x411db4
push eax
call fcn.00401ee4
add esp, 4
mov edi, eax
mov ebx, ebp
jmp 0x411dbf
push eax
call fcn.005db3dd
add esp, 4
mov edi, eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebx
mov eax, esi
add eax, esi
push eax
push dword [esp + 0x560]
push edi
call fcn.005e2280
add esp, 0xc
mov word [edi + esi*2], 0
mov dword [esp + 0x14], edi
lea ebp, [esp + 0x14]
mov esi, dword [ebp + 0x10]
cmp dword [ebp + 0x14], 7
cmovbe edi, ebp
test esi, esi
je 0x411e14
add esi, esi
xor ebx, ebx
movzx eax, word [edi + ebx]
push eax
call fcn.005ff962
add esp, 4
mov word [edi + ebx], ax
add ebx, 2
cmp esi, ebx
jne 0x411dfc
mov esi, 0x208
xor edi, edi
lea ebx, [esp + 0x340]
push esi
push edi
push ebx
call fcn.005e2800
add esp, 0xc
lea eax, [esp + 0x138]
push esi
mov esi, eax
push edi
push eax
call fcn.005e2800
add esp, 0xc
xorpd xmm0, xmm0
movsd xmm4, qword [0x6126f0]
movsd xmm5, qword [0x6126f8]
movsd xmm6, qword [0x612408]
movsd xmm7, qword [0x612700]
xorpd xmm3, xmm3
movapd xmm1, xmm3
mulsd xmm1, qword [0x6126d8]
mulsd xmm1, xmm3
movapd xmm2, xmm3
mulsd xmm2, xmm3
subsd xmm1, xmm2
movapd xmm2, xmm3
mulsd xmm2, qword [0x6126e0]
mulsd xmm2, xmm3
addsd xmm2, qword [0x6126e8]
divsd xmm1, xmm2
addsd xmm1, xmm0
movapd xmm2, xmm3
mulsd xmm2, xmm4
addsd xmm2, xmm1
movapd xmm0, xmm5
cmpltsd xmm0, xmm1
andpd xmm2, xmm0
andnpd xmm0, xmm1
orpd xmm0, xmm2
addsd xmm3, xmm6
ucomisd xmm7, xmm3
ja 0x411e69
xorpd xmm1, xmm1
ucomisd xmm1, xmm0
jbe 0x411ef5
insb byte es:[edi], dx
insd dword es:[edi], dx
cmp dword [edx + edx*2 + 0x6f], edx
jbe 0x411f14
sub cl, byte [eax + 0x26]
jne 0x411f20
cmpsd dword [esi], dword es:[edi]
sbb byte [esi - 0x16785b7c], 0x3a
add eax, dword [eax]
add byte [ebp + 0x411eea05], cl
add byte [ecx + 0x660c2444], cl
movq mm1, qword [0x612110]
lea eax, [0x411eea]
mov dword [esp + 0xc], eax
movdqa xmm1, xmmword [0x612110]
xor eax, eax
movdqa xmm2, xmmword [0x612120]
movdqu xmmword [esp + eax + 0x38], xmm1
dec esp
add al, 0x38
add eax, 0x10
paddb xmm1, xmm2
cmp eax, 0x100
jne 0x411f11
add dword [eax], eax
add byte [ebp - 0x14], dh
movsd xmm1, qword [0x612130]
movapd xmm2, xmm0
subsd xmm2, xmm1
cvttsd2si eax, xmm2
lea ecx, [0x411eda]
mov dword [esp + 8], ecx
xor eax, 0x80000000
cvttsd2si ecx, xmm0
ucomisd xmm0, xmm1
cmovae ecx, eax
mov eax, ecx
shr eax, 0x18
mov dword [esp + 0x10], eax
mov dword [esp], ecx
shr ecx, 0x10
mov dword [esp + 4], ecx
mov esi, 0xff
xor ecx, ecx
xor ebx, ebx
xor edx, edx
inc edx
cmp esi, 2
jb 0x411f81
xor edx, edx
inc edx
add edx, edx
inc edx
cmp edx, esi
jb 0x411f7a
mov ebp, 0xc
cmp ecx, 3
ja case.default.0x411f8b
jmp dword [ecx*4 + 0x612ad8]
movzx eax, bl
add eax, esp
add eax, 0x38
mov ebx, dword [esp]
jmp 0x411fc8
movzx eax, bl
add eax, esp
add eax, 0x38
mov ebx, dword [esp + 4]
jmp 0x411fc8
movzx eax, bl
add eax, esp
add eax, 0x38
mov ebx, dword [esp]
mov bl, bh
jmp 0x411fda
movzx eax, bl
add eax, esp
add eax, 0x38
mov ebx, dword [esp + 0x10]
jmp 0x411fda
movzx eax, bl
mov bl, byte [esp + eax + 0x38]
mov eax, dword [esp + 8]
add eax, ecx
add eax, 0xfffffffc
add bl, byte [eax]
inc ecx
movzx eax, bl
add bl, 0x14
cmp ecx, 0x13
movzx ebx, bl
cmovbe ebx, eax
mov eax, 0
cmova ecx, eax
movzx edi, bl
mov eax, edx
and eax, edi
dec ebp
je 0x412004
cmp eax, esi
ja 0x411f86
jmp 0x41200a
xor edx, edx
div esi
mov eax, edx
cmp esi, eax
je 0x412026
mov dl, byte [esp + esi + 0x38]
xor dl, byte [esp + eax + 0x38]
mov byte [esp + esi + 0x38], dl
xor dl, byte [esp + eax + 0x38]
mov byte [esp + eax + 0x38], dl
xor byte [esp + esi + 0x38], dl
dec esi
jne 0x411f6f
movzx edx, byte [esp + 0x39]
mov al, byte [esp + 0x3d]
mov byte [esp], al
movzx esi, byte [esp + 0x3f]
movzx ebp, byte [esp + edi + 0x38]
mov dword [esp + 4], ebp
mov eax, dword [esp + 0xc]
mov bh, byte [eax]
mov bl, byte [eax + 1]
mov al, byte [esp + edx + 0x38]
add al, byte [esp + 0x3b]
mov byte [esp + 8], al
movzx edi, al
mov al, byte [esp + edi + 0x38]
movzx ecx, byte [esp + ebp + 0x38]
mov byte [esp + ebp + 0x38], al
mov al, byte [esp + esi + 0x38]
mov byte [esp + edi + 0x38], al
mov eax, edx
mov dword [esp + 0x10], edx
inc al
movzx ebp, al
mov al, byte [esp + ebp + 0x38]
mov byte [esp + esi + 0x38], al
mov byte [esp + ebp + 0x38], cl
add bl, 0x7e
shl bh, 4
add bh, 0x50
or bh, bl
movzx eax, byte [esp + edi + 0x38]
add eax, ecx
mov edi, 0xff
and eax, edi
mov ebp, 0xff
movzx edi, bh
xor bh, byte [esp + eax + 0x38]
mov bl, byte [esp]
add bl, byte [esp + ecx + 0x38]
mov byte [esp], bl
movzx eax, byte [esp + esi + 0x38]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x38]
add esi, eax
movzx eax, bl
movzx eax, byte [esp + eax + 0x38]
add eax, esi
and eax, ebp
movzx eax, byte [esp + eax + 0x38]
xor bh, byte [esp + eax + 0x38]
mov esi, dword [esp + 0xc]
mov bl, byte [esi + 2]
mov al, byte [esp + 8]
add al, cl
mov byte [esp + 8], al
mov cl, byte [esi + 3]
movzx esi, al
mov ch, byte [esp + esi + 0x38]
mov dword [esp + 0x34], edi
movzx eax, byte [esp + edi + 0x38]
mov byte [esp + edi + 0x38], ch
movzx edi, bh
mov ch, byte [esp + edi + 0x38]
mov byte [esp + esi + 0x38], ch
mov ch, dl
add ch, 2
movzx edx, ch
mov ch, byte [esp + edx + 0x38]
mov byte [esp + edi + 0x38], ch
mov byte [esp + edx + 0x38], al
add cl, 0x7e
shl bl, 4
add bl, 0x50
or bl, cl
movzx ecx, byte [esp + esi + 0x38]
add ecx, eax
mov edx, eax
mov esi, 0xff
and ecx, esi
movzx ebp, bl
xor bl, byte [esp + ecx + 0x38]
movzx eax, byte [esp + edi + 0x38]
mov ecx, dword [esp + 0x34]
movzx ecx, byte [esp + ecx + 0x38]
add ecx, eax
mov al, byte [esp]
add al, byte [esp + edx + 0x38]
mov byte [esp], al
movzx eax, al
movzx eax, byte [esp + eax + 0x38]
add eax, ecx
and eax, esi
movzx eax, byte [esp + eax + 0x38]
xor bl, byte [esp + eax + 0x38]
movsx eax, bl
mov word [esp + 0x2e], ax
mov eax, dword [esp + 0xc]
mov cl, byte [eax + 4]
mov byte [esp + 4], cl
mov bh, byte [eax + 5]
mov al, byte [esp + 8]
add al, dl
movzx esi, byte [esp + ebp + 0x38]
movzx edx, al
mov ah, byte [esp + edx + 0x38]
mov byte [esp + ebp + 0x38], ah
movzx edi, bl
mov ah, byte [esp + edi + 0x38]
mov byte [esp + edx + 0x38], ah
mov eax, dword [esp + 0x10]
add al, 3
movzx eax, al
mov ch, byte [esp + eax + 0x38]
mov byte [esp + edi + 0x38], ch
mov ecx, esi
mov byte [esp + eax + 0x38], cl
movzx eax, byte [esp + edx + 0x38]
add eax, esi
mov dl, byte [esp]
add dl, byte [esp + esi + 0x38]
mov cl, byte [esp + 4]
shl cl, 4
add cl, 0x50
add bh, 0x7e
or bh, cl
movzx ecx, dl
mov esi, 0xff
and eax, esi
xor bh, byte [esp + eax + 0x38]
movzx eax, byte [esp + edi + 0x38]
movzx edx, byte [esp + ebp + 0x38]
add edx, eax
movzx eax, byte [esp + ecx + 0x38]
add eax, edx
and eax, esi
movzx eax, byte [esp + eax + 0x38]
xor bh, byte [esp + eax + 0x38]
movsx eax, bh
mov word [esp + 0x30], ax
mov word [esp + 0x32], 0
lea ebp, [esp + 0x14]
lea ebx, [esp + 0x340]
lea esi, [esp + 0x138]
cmp dword [esp + 0x28], 7
jbe 0x41223a
mov ebp, dword [esp + 0x14]
xor eax, eax
push eax
push eax
push esi
push ebx
push ebp
call fcn.005fc6a8
add esp, 0x14
lea eax, [esp + 0x2e]
push eax
push ebx
call fcn.005ffbc6
add esp, 8
test eax, eax
jne 0x41226d
push esi
call fcn.005ff144
add esp, 4
cmp eax, 2
jae 0x41226d
xor ebx, ebx
jmp 0x4122cf
mov esi, dword [esp + 0x24]
test esi, esi
jle 0x4122cd
inc esi
xor edi, edi
lea ebp, [esp + 0x14]
xor ebx, ebx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
cmp ecx, 7
mov edx, ebp
cmova edx, eax
cmp word [edx + esi*2 - 2], 0x2e
jne 0x41229a
mov bl, 1
jmp 0x4122c7
test bl, 1
je 0x4122c7
cmp ecx, 8
jb 0x4122ab
movzx eax, word [eax + esi*2 - 2]
jmp 0x4122b0
movzx eax, word [esp + esi*2 + 0x12]
cmp ax, 0x5f
je 0x412317
movzx eax, ax
push eax
call fcn.005fdd28
add esp, 4
test eax, eax
je 0x412269
inc edi
dec esi
cmp esi, 1
jg 0x41227e
mov bl, 1
mov ecx, dword [esp + 0x28]
cmp ecx, 8
jb 0x41230a
mov eax, dword [esp + 0x14]
lea edx, [ecx + ecx]
add edx, 2
cmp edx, 0x1000
jb 0x412300
mov edx, eax
add edx, 0xfffffffc
mov eax, dword [eax - 4]
sub edx, eax
cmp edx, 0x20
jae 0x412327
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005db412
add esp, 8
mov eax, ebx
add esp, 0x548
pop esi
pop edi
pop ebx
pop ebp
ret
cmp edi, 3
jl 0x412269
jmp 0x4122cd
call fcn.00401eda
call fcn.005f5844
sub word [esi], sp
outsd dx, dword [esi]
and byte ss:[ecx + eax*2 + 0x6c], cl
outsd dx, dword [esi]
cmp bh, byte ss:[esi + 0x79]
jp 0x41244a
insd dword es:[edi], dx
adc al, cl
adc bh, byte [edi - 0x3af442e8]
or eax, 0x19bd18c3
mov edi, 0xc70bc012
jmp 0x41258f
invalid
xor edx, edx
inc edx
add edx, edx
inc edx
cmp edx, edi
jb 0x4124ad
jmp dword [ecx*4 + 0x612ae8]
mov edi, dword [ebp - 0x20]
cmp eax, edi
ja 0x4124bc
jmp 0x41255a
mov dl, byte [ebp + edi - 0x138]
xor dl, byte [ebp + eax - 0x138]
mov byte [ebp + edi - 0x138], dl
xor dl, byte [ebp + eax - 0x138]
mov byte [ebp + eax - 0x138], dl
xor byte [ebp + edi - 0x138], dl
inc ebp
jno 0x41267e
and al, 0x5e
push edi
dec ecx
pop ebx
cmp dl, byte [eax + 0x61]
imul esp, dword [esi + 0x4e], 0x51614169
pop ecx
pop esi
jge 0x41269a
imul edx, dword [ebp + 0x4e], 0x4d
and al, 0x33
ret
add byte [ecx], dh
shl byte [esi + 0xf], 0x6f
adc eax, 0x612120
add byte [ecx], al
add byte [eax], al
xor edx, edx
inc edx
add edx, edx
inc edx
cmp edx, edi
jb 0x4126f2
jmp dword [ecx*4 + 0x612af8]
cmp eax, dword [ebp - 0x20]
ja 0x412701
jmp 0x412793
mov dl, byte [ebp + edi - 0x138]
xor dl, byte [ebp + eax - 0x138]
mov byte [ebp + edi - 0x138], dl
xor dl, byte [ebp + eax - 0x138]
mov byte [ebp + eax - 0x138], dl
xor byte [ebp + edi - 0x138], dl
add ecx, ecx
add ecx, 0x25
mov edx, ecx
add ecx, ecx
add ecx, 0x25
mov edx, ecx