Function at 0x140018520
Capabilities:
Encrypt data using openssl rsa

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x60
xor r12d, r12d
mov rsi, rcx
mov rcx, qword [rcx]
mov rax, rdx
sub rax, rcx
mov r14, r8
mov r9, rdx
mov ebp, r12d
mov r13d, r12d
cmp rax, 1
jge 0x140018561
mov eax, 0xffffffa0
add eax, 0xffffc300
jmp 0x140018640
cmp byte [rcx], 0x30
je 0x140018575
mov eax, 0xffffff9e
add eax, 0xffffc300
jmp 0x140018640
inc rcx
sub rdx, rcx
mov qword [rsi], rcx
cmp rdx, 1
jl 0x140018552
movzx eax, byte [rcx]
test al, al
js 0x140018595
inc rcx
mov edx, eax
mov qword [rsi], rcx
jmp 0x1400185d8
mov edi, eax
and edi, 0x7f
lea eax, [rdi - 1]
cmp eax, 3
ja 0x140018977
mov eax, edi
cmp rdx, rax
jle 0x140018552
lea rax, [rcx + 1]
mov rdx, r12
mov qword [rsi], rax
nop word [rax + rax]
mov rcx, qword [rsi]
shl rdx, 8
movzx eax, byte [rcx]
or rdx, rax
inc rcx
mov qword [rsi], rcx
sub edi, 1
jne 0x1400185c0
sub r9, rcx
cmp rdx, r9
ja 0x140018552
xor eax, eax
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], r15
lea r9, [rsp + 0x20]
lea r15, [rdx + rcx]
mov qword [rsp + 0x30], rax
xorps xmm0, xmm0
lea r8, [rsp + 0x40]
mov rdx, r15
mov rcx, rsi
movups xmmword [rsp + 0x20], xmm0
call fcn.14001a070
test eax, eax
je 0x140018655
lea ebx, [rax - 0x3a80]
test ebx, ebx
je 0x14001871a
mov eax, ebx
mov rbx, qword [rsp + 0x90]
mov r15, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
add rsp, 0x60
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
cmp qword [0x14005d790], r12
lea rdi, [0x14005d790]
mov rbp, qword [rsp + 0x50]
mov rcx, rdi
mov rbx, qword [rsp + 0x48]
je 0x140018696
cmp qword [rcx + 8], rbx
jne 0x14001868a
mov rcx, qword [rcx]
mov r8, rbx
mov rdx, rbp
call fcn.140051c70
test eax, eax
je 0x1400186de
add rdi, 0x28
mov rcx, rdi
cmp qword [rdi], r12
jne 0x140018672
cmp qword [0x14005d8b0], r12
lea rdi, [0x14005d8b0]
mov rcx, rdi
je 0x1400186d4
nop dword [rax]
cmp qword [rcx + 8], rbx
jne 0x1400186c8
mov rcx, qword [rcx]
mov r8, rbx
mov rdx, rbp
call fcn.140051c70
test eax, eax
je 0x14001870c
add rdi, 0x28
mov rcx, rdi
cmp qword [rdi], r12
jne 0x1400186b0
mov ebx, 0xffffc380
jmp 0x14001862e
test rdi, rdi
je 0x140018696
mov ebp, dword [rdi + 0x20]
cmp ebp, 1
jne 0x14001871a
mov edx, dword [rsp + 0x20]
cmp edx, 5
je 0x1400186f8
test edx, edx
jne 0x140018702
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x14001871f
mov ebx, 0xffffc580
jmp 0x14001862e
test rdi, rdi
je 0x1400186d4
mov r13d, dword [rdi + 0x20]
mov ebp, 2
mov rbx, qword [rsp + 0x28]
mov rcx, qword [rsi]
mov rax, r15
sub rax, rcx
cmp rax, 1
jge 0x14001873d
mov eax, 0xffffffa0
add eax, 0xffffc500
jmp 0x140018630
cmp byte [rcx], 3
je 0x140018751
mov eax, 0xffffff9e
add eax, 0xffffc500
jmp 0x140018630
inc rcx
mov rdx, r15
sub rdx, rcx
mov qword [rsi], rcx
cmp rdx, 1
jl 0x14001872e
movzx eax, byte [rcx]
test al, al
js 0x140018774
inc rcx
mov edx, eax
mov qword [rsi], rcx
jmp 0x1400187b8
mov edi, eax
and edi, 0x7f
lea eax, [rdi - 1]
cmp eax, 3
ja 0x140018968
mov eax, edi
cmp rdx, rax
jle 0x14001872e
lea rax, [rcx + 1]
mov rdx, r12
mov qword [rsi], rax
nop word [rax + rax]
mov rcx, qword [rsi]
shl rdx, 8
movzx eax, byte [rcx]
or rdx, rax
inc rcx
mov qword [rsi], rcx
sub edi, 1
jne 0x1400187a0
mov rax, r15
sub rax, rcx
cmp rdx, rax
ja 0x14001872e
test rdx, rdx
jne 0x1400187db
mov eax, 0xffffff98
add eax, 0xffffc500
jmp 0x140018630
cmp byte [rcx], r12b
jne 0x1400187cc
lea rax, [rcx + 1]
mov qword [rsi], rax
dec rax
add rax, rdx
cmp rax, r15
je 0x1400187fc
mov eax, 0xffffc49a
jmp 0x140018630
mov ecx, ebp
sub ecx, 1
je 0x140018837
sub ecx, 1
je 0x14001882e
sub ecx, 1
je 0x140018825
cmp ecx, 1
je 0x14001881c
mov eax, 0xffffc380
jmp 0x140018630
lea rdi, reloc.WS2_32.dll_connect
jmp 0x14001883e
lea rdi, reloc.WS2_32.dll_closesocket
jmp 0x14001883e
lea rdi, reloc.WS2_32.dll_bind
jmp 0x14001883e
lea rdi, reloc.WS2_32.dll_accept
cmp qword [r14], r12
jne 0x14001895e
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x140018865
call rax
mov qword [r14 + 8], rax
test rax, rax
jne 0x140018865
mov eax, 0xffffc080
jmp 0x140018630
mov qword [r14], rdi
cmp ebp, 1
jne 0x1400188c1
movups xmm0, xmmword [r14]
movq rcx, xmm0
movaps xmmword [rsp + 0x20], xmm0
test rcx, rcx
je 0x14001888b
mov ecx, dword [rcx]
cmp ecx, ebp
jne 0x14001888b
mov r12, qword [rsp + 0x28]
mov rdx, qword [rsi]
mov r8, r15
sub r8, rdx
mov rcx, r12
call fcn.14001bd40
mov ebx, eax
test eax, eax
jne 0x1400188aa
mov qword [rsi], r15
jmp 0x14001862e
add eax, 0x6c
cmp eax, 0xc
ja 0x1400188ba
sub ebx, 0x3b00
jmp 0x14001891d
mov ebx, 0xffffc500
jmp 0x140018936
lea eax, [rbp - 2]
cmp eax, 1
jbe 0x1400188d0
mov ebx, 0xffffc380
jmp 0x140018936
lea eax, [r13 - 9]
test eax, 0xfffffffb
je 0x1400188ea
mov rdx, r14
lea rcx, [rsp + 0x20]
call fcn.140018480
jmp 0x140018901
cmp dword [rsp + 0x20], r12d
jne 0x140018931
test rbx, rbx
jne 0x140018931
mov edx, r13d
mov rcx, r14
call fcn.14001bc40
mov ebx, eax
test eax, eax
jne 0x140018936
mov rdx, qword [rsi]
mov r8, r15
sub r8, rdx
mov rcx, r14
call fcn.14001bcf0
mov ebx, eax
mov qword [rsi], r15
test ebx, ebx
jne 0x140018936
cmp qword [rsi], r15
je 0x14001862e
mov ebx, 0xffffc49a
jmp 0x140018936
mov ebx, 0xffffc300
mov rax, qword [r14]
test rax, rax
je 0x14001894d
mov rdx, qword [rax + 0x50]
test rdx, rdx
je 0x14001894d
mov rcx, qword [r14 + 8]
call rdx
mov rdi, r14
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
jmp 0x14001862e
mov eax, 0xffffc180
jmp 0x140018630
mov eax, 0xffffff9c
add eax, 0xffffc500
jmp 0x140018630
mov eax, 0xffffff9c
add eax, 0xffffc300
jmp 0x140018640