Function at 0x180004e80
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x10a8
call fcn.18001eb80
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x1010], xmm6
mov qword [rbp + 0x1008], 0xfffffffffffffffe
mov rdi, r9
mov r15, r8
mov r14, rdx
mov rbx, rcx
mov ecx, 2
mov edx, 1
mov r8d, 6
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
je 0x18000500d
mov rsi, rax
mov word [rbp + 0xfa8], 2
call fcn.1800272b4
mov r12, rax
cmp qword [r15 + 0x18], 0x10
mov qword [rbp + 0x1000], rbx
jb 0x180004f04
mov r15, qword [r15]
mov dword [r12], 0
lea rbx, [rbp - 0x60]
mov rcx, r15
mov rdx, rbx
mov r8d, 0xa
call fcn.18002a64c
cmp r15, qword [rbp - 0x60]
je 0x180005449
cmp dword [r12], 0x22
je 0x180005455
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0xfaa], ax
lea r8, [rbp + 0xfac]
cmp qword [r14 + 0x18], 0x10
jb 0x180004f56
mov r14, qword [r14]
mov ecx, 2
mov rdx, r14
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x180005053
lea rdx, [rbp + 0xfa8]
mov rcx, rsi
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x180005089
mov r14, qword [rdi + 0x10]
mov rax, r14
shr rax, 2
movabs rcx, 0x1fffffffffffffff
cmp rax, rcx
je 0x180005461
mov rax, qword [rdi]
mov r12, qword [rdi + 0x18]
xorps xmm0, xmm0
movaps xmmword [rbp - 0x60], xmm0
lea r13, [r14 + 4]
mov r15d, recv
cmp r13, 0x10
jb 0x18000511b
test r13, r13
mov qword [rbp + 0xfb8], rax
js 0x1800050f1
mov rax, r13
or rax, 0xf
cmp rax, 0x17
mov r15d, socket
cmovae r15, rax
cmp rax, 0xfff
jae 0x1800050fb
lea rcx, [r15 + 1]
call fcn.18001d5d0
mov rbx, rax
jmp 0x180005110
lea rsi, [0x18005e840]
lea rdx, str.socket_creation_failed:
mov rcx, rsi
call fcn.1800055e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180005930
mov rcx, rsi
call fcn.180005dd0
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], recv
jmp 0x180005429
lea rdi, [0x18005e840]
lea rdx, str.inet_pton_failed:
mov rcx, rdi
call fcn.1800055e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180005930
mov rcx, rdi
call fcn.180005dd0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x1800050cf
lea rdi, [0x18005e840]
lea rdx, str.connect_failed:
mov rcx, rdi
call fcn.1800055e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180005930
mov rcx, rdi
call fcn.180005dd0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
pop rax
push rbx
je 0x1800050c3
je 0x1800050c8
and dword [rcx + rsi], esi
xor dh, byte [rbx]
pop rbx
and dword [rcx + rsi], esi
xor dh, byte [rbx]
push rax
xorps xmm0, xmm0
mov rax, qword [rbp + 0x1000]
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], recv
jmp 0x180005429
movabs r15, 0x7fffffffffffffff
lea rcx, [r15 + 0x28]
call fcn.18001d5d0
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
mov qword [rbp - 0x60], rbx
mov rax, qword [rbp + 0xfb8]
cmp r12, 0x10
cmovae rdi, rax
mov qword [rbp - 0x50], r13
mov qword [rbp - 0x48], r15
mov dword [rbx], 0x20544547
lea rcx, [rbx + 4]
mov rdx, rdi
mov r8, r14
call fcn.180013d70
mov byte [rbx + r14 + 4], 0
lea rdx, str._HTTP_1.1_r_nHost:_api.pinduoduo.com_r_nConnection:_close_r_n_r_n
lea rcx, [rbp - 0x60]
mov r8d, 0x39
call fcn.1800060c0
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rbp + 0xfd0], xmm1
movaps xmmword [rbp + 0xfc0], xmm0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], recv
mov byte [rax], 0
mov rax, qword [rbp - 0x48]
cmp rax, 0x10
mov rdi, qword [rbp + 0x1000]
jb 0x1800051ca
mov rcx, qword [rbp - 0x60]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1800051c5
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x180005389
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.18001d614
mov r8d, dword [rbp + 0xfd0]
cmp qword [rbp + 0xfd8], 0x10
jb 0x1800051e4
mov rdx, qword [rbp + 0xfc0]
jmp 0x1800051eb
lea rdx, [rbp + 0xfc0]
mov rcx, rsi
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x180005399
xorps xmm6, xmm6
movups xmmword [rdi], xmm6
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], recv
lea rdi, [rbp - 0x60]
mov r12, qword [sym.imp.WS2_32.dll_recv]
lea rbx, [rbp + 0xfe0]
jmp 0x18000523f
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.18001d614
mov rcx, rsi
mov rdx, rdi
mov r8d, 0x1000
xor r9d, r9d
call r12
test eax, eax
jle 0x18000538e
movaps xmmword [rbp + 0xff0], xmm6
movaps xmmword [rbp + 0xfe0], xmm6
mov rcx, rdi
call fcn.18002a000
test rax, rax
js 0x180005444
mov r14, rax
cmp rax, 0xf
ja 0x1800052b0
mov qword [rbp + 0xff0], r14
mov qword [rbp + recvf8], 0xf
mov rcx, rbx
mov rdx, rdi
mov r8, r14
call fcn.180013d70
mov byte [rbp + r14 + 0xfe0], 0
jmp 0x180005324
mov rax, r14
or rax, 0xf
cmp rax, 0x17
mov r13d, socket
cmovae r13, rax
cmp rax, 0xfff
jb 0x1800052f0
lea rcx, [r13 + 0x28]
call fcn.18001d5d0
mov r15, rax
add r15, 0x27
and r15, 0xffffffffffffffe0
mov qword [r15 - 8], rax
jmp 0x1800052fc
lea rcx, [r13 + 1]
call fcn.18001d5d0
mov r15, rax
mov qword [rbp + 0xfe0], r15
mov qword [rbp + 0xff0], r14
mov qword [rbp + 0xff8], r13
mov rcx, r15
mov rdx, rdi
mov r8, r14
call fcn.180013d70
mov byte [r15 + r14], 0
mov r8, qword [rbp + 0xff0]
cmp qword [rbp + 0xff8], 0x10
mov rdx, rbx
jb 0x18000533f
mov rdx, qword [rbp + 0xfe0]
mov rcx, qword [rbp + 0x1000]
call fcn.1800060c0
mov rax, qword [rbp + 0xff8]
cmp rax, 0x10
jb 0x18000523f
mov rcx, qword [rbp + 0xfe0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x18000523a
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jb 0x180005230
call fcn.180027b08
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x1800053e4
lea rcx, [0x18005e840]
lea rdx, str.send_failed:
call fcn.1800055e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.180005930
lea rcx, [0x18005e840]
call fcn.180005dd0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], recv
mov rax, qword [rbp + 0xfd8]
cmp rax, 0x10
jb 0x180005429
mov rcx, qword [rbp + 0xfc0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x180005424
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x180005389
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.18001d614
movaps xmm6, xmmword [rbp + 0x1010]
add rsp, 0x10a8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call fcn.1800060a0
lea rcx, str.invalid_stoi_argument
call fcn.18001af10
lea rcx, str.stoi_argument_out_of_range
call fcn.18001af58
call fcn.1800060a0
int3