Function at 0x180045560
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f0]
sub rsp, 0x3f0
mov rax, qword [0x18005a080]
xor rax, rsp
mov qword [rbp + 0x2e0], rax
cmp byte [reloc.WS2_32.dll_closesocket], 3
mov r13, rcx
mov dword [rsp + 0x60], edx
jne 0x1800455b0
movsx rax, byte [0x18005a012]
mov dword [rax], 3
jmp 0x1800455d2
movzx eax, word [0x18005a010]
movsx edx, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, al
xor cl, 0x36
cmp cl, dl
je 0x1800455d9
movsx rax, byte [0x18005a012]
mov dword [rax], edx
movzx eax, word [0x18005a010]
movsx r8d, byte [0x18005a015]
cmp r8b, 5
jne 0x1800455f6
movsx ecx, al
movsx rax, byte [0x18005a012]
mov dword [rax], ecx
jmp 0x180045621
movsx ecx, byte [0x18005a014]
mov edx, r8d
xor edx, ecx
add ecx, 0x20
cmp edx, ecx
je 0x180045629
movsx edx, byte [0x18005a012]
movsx rcx, al
movsx rax, byte [reloc.WS2_32.dll_closesocket]
xor rcx, rax
mov dword [rcx], edx
movzx r8d, byte [0x18005a015]
cmp byte [0x180060644], 0
je 0x18004563b
cmp byte [0x180060645], 0
jne 0x180045646
movsx rax, byte [0x18005a014]
mov byte [rax], r8b
movzx r11d, byte [0x1800611c8]
movzx r10d, byte [0x1800611ca]
movzx r9d, byte [0x1800611cb]
lea ecx, [r10 + r11]
cmp r9d, ecx
je 0x180045689
mov ecx, r10d
and rcx, r9
mov word [rcx], r11w
movzx r9d, byte [0x1800611cb]
movzx r10d, byte [0x1800611ca]
movzx r11d, byte [0x1800611c8]
movzx r8d, r9b
movzx ecx, r10b
mov eax, r8d
sub eax, ecx
movzx ecx, r11b
cdq
idiv ecx
movzx edx, byte [0x1800611c9]
add eax, r8d
cmp edx, eax
je 0x1800456d0
movzx ecx, r11b
movzx eax, r10b
and rcx, rax
mov byte [rcx], dl
movzx r9d, byte [0x1800611cb]
movzx r10d, byte [0x1800611ca]
movzx r11d, byte [0x1800611c8]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, r9b
cdq
idiv ecx
movsx ecx, byte [0x18005a019]
cmp eax, ecx
je 0x180045707
movzx ecx, r10b
movzx eax, r9b
and rcx, rax
mov byte [rcx], r11b
movzx r9d, byte [0x1800611cb]
movzx r10d, byte [0x1800611ca]
movzx r8d, byte [0x1800611cc]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
mov r11d, r8d
movzx ecx, r9b
cdq
idiv ecx
mov ecx, r8d
lea r9, [0x180000000]
imul eax, r8d
mov edx, r8d
shl edx, cl
cmp edx, eax
jne 0x180045743
test r8b, 0xf6
jne 0x180045770
cmp r8b, 9
je 0x180045770
mov edx, r11d
imul edx, r11d
lea r8d, [rdx + 1]
shl r8b, cl
mov ecx, edx
imul ecx, r11d
shl edx, cl
movsxd rax, edx
mov byte [rax + r9 + 0x5a01c], r8b
movsx rax, r8b
mov byte [rax + r9 + 0x611c8], r10b
xor r14d, r14d
mov r15d, r14d
nop word [rax + rax]
cmp byte [r15 + r9 + 0x602ec], r14b
jne 0x1800459d5
mov rax, qword [section..data]
inc byte [rax + 6]
mov rsi, qword [section..data]
movsx edi, byte [rsi + 6]
movsx r8d, byte [rsi + 3]
movsx r10d, byte [rsi + 2]
movsx ecx, byte [rsi + 9]
movsx r9d, byte [rsi + 1]
movsx ebx, byte [rsi + 8]
lea eax, [rdi + r10]
imul eax, ecx
cdqe
movsx rdx, byte [rax + rsi]
mov eax, r9d
imul eax, ecx
movzx r11d, byte [rdx + rsi]
cdqe
movsx rcx, byte [rax + rsi]
mov eax, r8d
imul eax, ebx
add r11b, byte [rcx + rsi]
lea ecx, [rdi + r8]
cdqe
movsx edx, byte [rax + rsi]
movsx eax, byte [rsi + 7]
imul edx, ecx
imul edx, r9d
movsxd rcx, edx
movsx rdx, byte [rcx + rsi]
movsx r8d, byte [rdx + rsi]
cdq
idiv r10d
movsxd rcx, eax
mov eax, edi
movsx edx, byte [rcx + rsi]
imul r8d, edx
cdq
idiv ebx
mov ecx, eax
mov eax, r8d
cdq
idiv ecx
movsxd rcx, eax
mov byte [rcx + rsi], r11b
mov rdx, qword [section..data]
movsx eax, byte [rdx + 2]
movsx ecx, byte [rdx + 6]
add ecx, eax
movsx eax, byte [rdx + 9]
imul eax, ecx
cdqe
movsx rcx, byte [rax + rdx]
inc byte [rcx + rdx]
mov r8, qword [section..data]
movsx eax, byte [r8 + 5]
movsx ecx, byte [r8 + 6]
movsx edx, byte [r8 + 7]
imul edx, eax
movzx eax, byte [r8 + 1]
imul edx, ecx
imul edx, ecx
movsxd rcx, edx
mov byte [rcx + r8], al
mov rax, qword [section..data]
inc byte [rax + 1]
mov rdi, qword [section..data]
movsx r9d, byte [rdi + 3]
movsx ebx, byte [rdi + 1]
mov eax, r9d
movsx r8d, byte [rdi + 4]
cdq
idiv r8d
mov r10d, ebx
mov r11d, eax
movsx eax, byte [rdi]
imul eax, ebx
cdq
idiv r11d
movsxd rcx, eax
movsx rdx, byte [rcx + rdi]
add bl, byte [rdx + rdi]
movsx ecx, byte [rdi + 9]
mov eax, r8d
cdq
idiv ecx
mov ecx, eax
movsx eax, byte [rdi + 2]
imul eax, r9d
cdq
idiv ecx
movsxd rcx, eax
movsx rax, byte [rcx + rdi]
movsx eax, byte [rax + rdi]
imul eax, r10d
cdq
idiv r11d
movsxd rcx, eax
mov byte [rcx + rdi], bl
mov r9, qword [section..data]
movsx ecx, byte [r9 + 4]
movsx eax, byte [r9 + 3]
cdq
idiv ecx
movsx ecx, byte [r9]
mov r8d, eax
movsx eax, byte [r9 + 1]
imul eax, ecx
cdq
idiv r8d
movsxd rcx, eax
movsx rax, byte [rcx + r9]
inc byte [rax + r9]
mov rsi, qword [section..data]
movsx edi, byte [rsi + 6]
movsx ecx, byte [rsi + 9]
movsx r8d, byte [rsi + 3]
movsx r10d, byte [rsi + 2]
movsx r9d, byte [rsi + 1]
movsx ebx, byte [rsi + 8]
lea eax, [rdi + r10]
imul eax, ecx
cdqe
movsx rdx, byte [rax + rsi]
mov eax, r9d
imul eax, ecx
movzx r11d, byte [rdx + rsi]
cdqe
movsx rcx, byte [rax + rsi]
mov eax, r8d
imul eax, ebx
add r11b, byte [rcx + rsi]
lea ecx, [r8 + rdi]
cdqe
movsx edx, byte [rax + rsi]
movsx eax, byte [rsi + 7]
imul edx, ecx
imul edx, r9d
movsxd rcx, edx
movsx rdx, byte [rcx + rsi]
movsx r8d, byte [rdx + rsi]
cdq
idiv r10d
movsxd rcx, eax
mov eax, edi
movsx edx, byte [rcx + rsi]
imul r8d, edx
cdq
idiv ebx
mov ecx, eax
mov eax, r8d
cdq
idiv ecx
movsxd rcx, eax
mov byte [rcx + rsi], r11b
mov rdx, qword [section..data]
movsx eax, byte [rdx + 2]
movsx ecx, byte [rdx + 6]
add ecx, eax
movsx eax, byte [rdx + 9]
imul eax, ecx
cdqe
movsx rcx, byte [rax + rdx]
inc byte [rcx + rdx]
lea r9, [0x180000000]
inc r15
cmp r15, 3
jb 0x180045780
movzx r8d, byte [0x18005a01c]
movzx edx, byte [reloc.WS2_32.dll_socket]
cmp r8b, 8
je 0x1800459fc
cmp dl, 0x17
jne 0x180045a12
movzx ecx, byte [0x18005a865]
movzx eax, byte [0x18005acb3]
shl al, cl
mov byte [0x18005a251], al
test r8b, r8b
jne 0x180045a1c
cmp dl, 6
je 0x180045a2e
movzx ecx, byte [0x18005a028]
movzx eax, cl
shl al, cl
mov byte [0x18005a096], al
cmp byte [0x18005a018], r14b
jne 0x180045a4a
movsx rax, byte [0x18005a015]
movsx ecx, byte [0x18005a014]
mov dword [rax], ecx
jmp 0x180045a77
movsx r8, byte [0x18005a015]
movzx ecx, byte [0x18005a019]
mov edx, r8d
movsx eax, byte [0x18005a010]
sar edx, cl
sub eax, 4
cmp edx, eax
je 0x180045a77
movsx rax, byte [0x18005a016]
mov qword [rax], r8
mov rax, qword [0x1800602f0]
lea rcx, [rbp + 0xc0]
xor edx, edx
mov qword [rsp + 0x38], rax
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
mov ebx, 8
mov edx, 0x1f
mov ecx, ebx
call fcn.18004b830
test eax, eax
mov r12d, eax
mov rdi, r14
cmove r12d, ebx
movsxd rbx, r12d
test r12d, r12d
je 0x180045ade
nop dword [rax]
mov edx, 0xff
mov ecx, 1
call fcn.18004b830
mov byte [rbp + rdi + 0xc0], al
inc rdi
cmp rdi, rbx
jb 0x180045ac0
mov rax, qword [0x1800608e8]
mov qword [rsp + 0x58], r14
test rax, rax
je 0x180045afc
movsx rcx, byte [0x180060901]
xor rcx, rax
jmp 0x180045aff
mov rcx, r14
mov r15, 0xffffffffffffffff
lea rsi, [0x180060900]
mov rax, r15
inc rax
cmp byte [rsi + rax], r14b
jne 0x180045b10
movsx r8, byte [0x180060902]
lea rdx, [0x18004f7b4]
xor r8, qword [0x1800608f0]
add rax, rcx
add r8, rax
lea rcx, [rsp + 0x40]
add r8, rbx
call fcn.1800469c0
mov rcx, qword [0x1800608f0]
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x68], xmm0
movsd xmm1, qword [rax + 0x10]
xorps xmm0, xmm0
xor eax, eax
movsd qword [rsp + 0x78], xmm1
xorps xmm1, xmm1
mov dword [rbp + 0x40], eax
mov dword [rbp + 0xb0], eax
movsx rax, byte [0x180060902]
mov r8, rax
xor r8, rcx
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x50], xmm1
movups xmmword [rbp + 0x60], xmm1
movups xmmword [rbp + 0x70], xmm1
movups xmmword [rbp + 0x80], xmm1
movups xmmword [rbp + 0x90], xmm1
movups xmmword [rbp + 0xa0], xmm1
je 0x180045bee
mov rax, r15
nop dword [rax]
inc rax
cmp byte [rsi + rax], r14b
jne 0x180045bc0
mov r9, rsi
mov dword [rsp + 0x20], eax
lea rdx, [rbp - 0x20]
lea rcx, [0x180060de0]
call fcn.18004afa0
mov rcx, qword [0x1800608f0]
movzx eax, byte [0x180060902]
movsx r8, al
lea rdx, [rbp - 0x20]
xor r8, rcx
lea rcx, [rsp + 0x68]
call fcn.180046970
mov rax, qword [0x1800608e8]
test rax, rax
je 0x180045c45
movsx rdi, byte [0x180060901]
xor rdi, rax
je 0x180045c48
mov rax, r15
nop
inc rax
cmp byte [rsi + rax], r14b
jne 0x180045c20
mov r9, rsi
mov dword [rsp + 0x20], eax
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [0x1800609e0]
call fcn.18004afa0
jmp 0x180045c48
mov rdi, r14
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x68]
call fcn.180046970
mov r8, r15
nop dword [rax]
inc r8
cmp byte [rsi + r8], r14b
jne 0x180045c60
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.180046970
mov r8, rbx
lea rdx, [rbp + 0xc0]
lea rcx, [rsp + 0x68]
call fcn.180046970
movzx eax, byte [0x180060900]
cmp byte [0x18005a784], al
jne 0x180045d22
movzx edx, byte [0x18005a782]
lea r8, [0x180000000]
movzx eax, byte [rbp - 0x20]
cmp dl, al
je 0x180045ce2
movsx rax, byte [0x18005a781]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x18005a016]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x5a014]
mov qword [rcx], rax
movzx eax, byte [rbp - 0x20]
movzx edx, byte [0x18005a782]
movsx ecx, byte [0x18005a781]
cmp cl, al
jne 0x180045d22
movsx eax, dl
add eax, ecx
cdqe
movsx rcx, byte [rax + r8 + 0x5a780]
movsx rax, byte [rcx + r8 + 0x5a780]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x18005a016]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x5a014]
mov qword [rcx], rax
movsxd rax, dword [0x180060524]
lea r9, [0x180060540]
mov r8, rbx
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0xc0]
call fcn.18004add0
mov edx, 2
lea rcx, [rsp + 0x68]
call fcn.180046b90
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.180048410
mov byte [rsp + 0x30], al
call fcn.180048260
mov r9, qword [rsp + 0x58]
mov edi, r14d
movsxd rsi, dword [rsp + 0x60]
test r9, r9
je 0x18004607a
mov rcx, qword [r9]
mov rax, rcx
mov qword [rsp + 0x60], rcx
shr rax, 0x20
mov rdx, rcx
and al, 0xf8
shr rdx, 8
cmp al, 0xc0
jne 0x180045eb3
movzx eax, dl
xor al, 8
cmp al, 0xde
jne 0x180045e57
mov rax, rcx
shr rax, 0x18
xor al, cl
cmp al, 0x57
jne 0x180045dc9
mov edi, 1
jmp 0x180045ef2
test dl, dl
je 0x180045ef2
movzx ecx, byte [rsp + 0x64]
movzx eax, byte [rsp + 0x62]
nop dword [rax + rax]
test rsi, rsi
je 0x180045ef2
movzx eax, al
mov r8d, eax
shr r8, cl
movzx eax, byte [rsp + rax + 0x60]
movzx ecx, byte [rsp + rax + 0x60]
movzx eax, byte [rsp + r8 + 0x60]
movzx edx, byte [rsp + rcx + 0x60]
mov byte [rsp + rdx + 0x60], al
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + rax + 0x60]
movzx eax, byte [rsp + rcx + 0x60]
inc byte [rsp + rax + 0x60]
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + rax + 0x60]
inc byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + 0x62]
inc byte [rsp + rax + 0x60]
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + 0x64]
inc al
inc cl
mov byte [rsp + 0x62], al
mov byte [rsp + 0x64], cl
cmp byte [rsp + 0x61], dil
jne 0x180045de0
jmp 0x180045ef2
test cl, cl
je 0x180045ef2
movzx r8d, byte [rsp + 0x62]
movzx ecx, byte [rsp + 0x61]
nop word [rax + rax]
test rsi, rsi
je 0x180045ef2
movzx eax, cl
movzx edx, r8b
xor rdx, rax
movzx eax, r8b
shl eax, cl
movsxd rcx, eax
movzx eax, byte [rsp + rdx + 0x60]
mov byte [rsp + rcx + 0x60], al
movzx ecx, byte [rsp + 0x61]
movzx r8d, byte [rsp + 0x62]
inc cl
inc r8b
mov byte [rsp + 0x61], cl
mov byte [rsp + 0x62], r8b
cmp byte [rsp + 0x60], dil
jne 0x180045e70
jmp 0x180045ef2
test dl, dl
je 0x180045ef2
movzx edx, byte [rsp + 0x63]
movzx ecx, byte [rsp + 0x61]
test rsi, rsi
je 0x180045ef2
movzx eax, dl
shl eax, cl
movzx ecx, dl
cdqe
movzx eax, byte [rsp + rax + 0x60]
mov byte [rsp + rcx + 0x60], al
movzx edx, byte [rsp + 0x63]
movzx ecx, byte [rsp + 0x61]
inc dl
add cl, 1
mov byte [rsp + 0x63], dl
mov byte [rsp + 0x61], cl
jne 0x180045ec1
test r13, r13
je 0x180045f0f
lea rcx, [r9 + 0x20]
sub r13, rcx
nop
movzx eax, byte [rcx]
mov byte [rcx + r13], al
lea rcx, [rcx + 1]
test al, al
jne 0x180045f00
xor cl, cl
mov rax, r14
mov qword [rsp + 0x60], rax
cmp edi, 1
jne 0x18004603c
lea r13, [r9 + 0x20]
inc r15
cmp byte [r15 + r13], al
jne 0x180045f26
movsxd rdi, dword [r15 + r13 + 1]
lea rcx, [rbp + 0x1d0]
xorps xmm0, xmm0
mov dword [rbp - 0x30], eax
xor edx, edx
mov byte [rbp - 0x2c], al
mov r8d, 0x104
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call sub.VCRUNTIME140.dll_memset
mov r9d, dword [0x180060524]
lea r8, [rbp - 0x80]
lea rdx, [0x180060540]
lea rcx, [0x180060420]
call fcn.18004ae30
movsxd rax, dword [0x180060524]
lea rcx, [r13 + 5]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x60]
lea rax, [rbp - 0x80]
mov rdx, rdi
add rcx, r15
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x1d0]
call fcn.180049d60
movsxd rax, dword [0x180060524]
lea r9, [0x180060540]
xorps xmm0, xmm0
mov qword [rsp + 0x20], rax
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x80], xmm0
mov r8, rbx
movdqa xmmword [rbp - 0x70], xmm1
lea rdx, [rbp + 0x1d0]
movdqa xmmword [rbp - 0x60], xmm0
lea rcx, [rbp + 0x1d0]
movdqa xmmword [rbp - 0x50], xmm1
movdqa xmmword [rbp - 0x40], xmm0
mov dword [rbp - 0x30], r14d
mov byte [rbp - 0x2c], r14b
call fcn.18004add0
mov rcx, r14
test r12d, r12d
je 0x180046032
mov byte [rsp + 0x30], 1
movzx eax, byte [rbp + rcx + 0xc0]
cmp byte [rbp + rcx + 0x1d0], al
jne 0x180046030
inc rcx
cmp rcx, rbx
jb 0x180046010
movzx ecx, byte [rsp + 0x30]
jmp 0x180046032
xor cl, cl
mov r9, qword [rsp + 0x58]
mov rax, qword [rsp + 0x60]
test r12d, r12d
je 0x180046050
test rax, rax
jne 0x180046053
nop word [rax + rax]
movzx ecx, al
movzx edi, cl
mov rcx, r9
call fcn.18004d634
mov r9, qword [rsp + 0x58]
cmp edi, 1
jne 0x180046087
mov rax, qword [rsp + 0x38]
cmp rax, qword [0x1800602f0]
cmove edi, r14d
jmp 0x180046087
cmp byte [rsp + 0x30], dil
mov eax, 2
cmove edi, eax
test r12d, r12d
cmovne r12d, edi
test rbx, rbx
jne 0x1800460da
mov rdx, rsi
shl rdx, 5
nop word [rax + rax]
test rsi, rsi
je 0x1800460da
movups xmm0, xmmword [r14 + r9 - 0x20]
sub r14, 0x20
lea rax, [rdx + r14]
mov rcx, qword [rax + r9 + 0x18]
shl rcx, 5
movups xmmword [rcx + r9], xmm0
movups xmm1, xmmword [r14 + r9 + 0x10]
movups xmmword [rcx + r9 + 0x10], xmm1
sub rbx, 1
jne 0x1800460da
mov r9, qword [rsp + 0x58]
jmp 0x1800460a0
mov eax, r12d
mov rcx, qword [rbp + 0x2e0]
xor rcx, rsp
call fcn.18004c400
mov rbx, qword [rsp + 0x440]
add rsp, 0x3f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret