Function at 0x140001700
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
lea rbp, [rsp - 0x18f0]
mov eax, 0x19f0
call fcn.140002d50
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x18d0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140001752
lea rcx, str.Failed_to_initialize_Winsock._n
call fcn.140001010
mov eax, 1
jmp 0x140001ded
mov qword [rsp + 0x1a00], rbx
xor r8d, r8d
mov qword [rsp + 0x19e0], r15
mov edx, 1
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400017a6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_socket:__d_n
call fcn.140001010
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001ddd
lea rcx, str.irc.libera.con
mov qword [rsp + 0x1a10], rdi
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rdi, rax
test rax, rax
jne 0x1400017e8
lea rcx, str.Failed_to_get_host_by_name._n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001dd5
mov ecx, 0x1a0b
mov word [rsp + 0x20], r15w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x22], ax
lea rcx, [rsp + 0x24]
mov rdx, qword [rdi + 0x18]
movsx r8, word [rdi + 0x12]
mov rdx, qword [rdx]
call sub.VCRUNTIME140.dll_memcpy
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000185a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Failed_to_connect_to_server:__d_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001dd5
lea rdx, str.NICK_MyBot
mov rcx, rbx
call fcn.140001650
lea rdx, str.USER_MyBot_0__:MyBot
mov rcx, rbx
call fcn.140001650
lea rdx, str.JOIN_testchannel
mov rcx, rbx
call fcn.140001650
lea rdx, str.PRIVMSG_testchannel_:Hello__World_
mov rcx, rbx
call fcn.140001650
xor r8d, r8d
mov edx, 1
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400018dd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_SMTP_socket:__d_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001dd5
lea rcx, str.smtp.example.com
mov qword [rsp + 0x1a08], rsi
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rsi, rax
test rax, rax
jne 0x14000190b
lea rcx, str.Failed_to_get_SMTP_host_by_name._n
call fcn.140001010
jmp 0x14000199e
mov ecx, 0x24b
mov word [rsp + 0x20], r15w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x22], ax
lea rcx, [rsp + 0x24]
mov rdx, qword [rsi + 0x18]
movsx r8, word [rsi + 0x12]
mov rdx, qword [rdx]
call sub.VCRUNTIME140.dll_memcpy
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000195f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.Failed_to_connect_to_SMTP_server:__d_n
jmp 0x140001997
mov rcx, rdi
call fcn.140001250
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor r8d, r8d
mov edx, 1
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400019c0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.Failed_to_create_POP3_socket:__d_n
mov edx, eax
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001dcd
lea rcx, str.pop.example.com
mov qword [rsp + 0x19e8], r14
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov r14, rax
test rax, rax
jne 0x1400019eb
lea rcx, str.Failed_to_get_POP3_host_by_name._n
call fcn.140001010
jmp 0x140001a44
mov ecx, 0x3e3
mov word [rsp + 0x20], r15w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x22], ax
lea rcx, [rsp + 0x24]
mov rdx, qword [r14 + 0x18]
movsx r8, word [r14 + 0x12]
mov rdx, qword [rdx]
call sub.VCRUNTIME140.dll_memcpy
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140001a6f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Failed_to_connect_to_POP3_server:__d_n
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001dc5
lea r8, str.your_email_example.com
lea rdx, str.USER__s_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001aa0
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea r8, str.your_password
lea rdx, str.PASS__s_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x140001b00
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea rdx, str.STAT_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001b60
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea rdx, str.LIST_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001bc0
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea rdx, str.RETR_1_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001c20
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea rdx, str.QUIT_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140001c80
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor r9d, r9d
lea rdx, [rbp + 0x10d0]
mov r8d, 0x7ff
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140001d90
mov ecx, eax
cmp rcx, 0x800
jae 0x140001e05
mov byte [rbp + rcx + 0x10d0], 0
lea rdx, [rbp + 0x10d0]
lea rcx, [0x140003630]
call fcn.140001010
mov r8d, 4
lea rdx, str.PING
lea rcx, [rbp + 0x10d0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140001d6d
lea r8, [rbp + 0x10d5]
lea rdx, str.PONG__s_r_n
lea rcx, [rbp + 0xd0]
call fcn.140001070
lea rax, [rbp + 0xd0]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x140001d50
xor r9d, r9d
lea rdx, [rbp + 0xd0]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [rbp + 0x10d0]
mov r8d, 0x7ff
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x140001ce0
test eax, eax
jne 0x140001da0
lea rcx, str.Connection_closed_by_server._n
call fcn.140001010
jmp 0x140001db4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.Failed_to_receive_data:__d_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov r14, qword [rsp + 0x19e8]
mov rsi, qword [rsp + 0x1a08]
mov rdi, qword [rsp + 0x1a10]
mov rbx, qword [rsp + 0x1a00]
mov r15, qword [rsp + 0x19e0]
mov rcx, qword [rbp + 0x18d0]
xor rcx, rsp
call fcn.140001e20
add rsp, 0x19f0
pop rbp
ret
call fcn.140001f48
int3