Function at 0x140006040
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 rsi
push rdi
push rbx
mov eax, 0x10d8
call fcn.140030700
sub rsp, rax
lea rbp, [rsp + 0x80]
mov rsi, rcx
mov rax, qword [0x14006c0c0]
xor rax, rbp
mov qword [rbp + 0x1050], rax
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], r9
mov qword [rbp - 0x48], r8
mov qword [rbp - 0x40], rdx
mov ecx, 2
mov edx, 1
mov r8d, 6
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0xffffffffffffffff
jne 0x1400060e7
lea rcx, [0x14006db90]
lea rdx, str.socket_creation_failed:
call fcn.140006370
mov rdi, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
mov edx, eax
call fcn.140006610
lea rdx, [0x1400067d0]
mov rcx, rax
call fcn.140006820
lea rdx, [0x140063bee]
mov rcx, rsi
call fcn.140005120
jmp 0x140006351
mov word [rbp + 0x1040], 2
mov rcx, qword [rbp - 0x48]
xor edx, edx
mov r8d, 0xa
call fcn.140006840
mov cx, ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x1042], ax
lea rdi, [rbp + 0x1040]
add rdi, 4
mov rcx, qword [rbp - 0x40]
call fcn.140006930
mov ecx, 2
mov rdx, rax
mov r8, rdi
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 0
jg 0x14000618e
lea rcx, [0x14006db90]
lea rdx, str.inet_pton_failed:
call fcn.140006370
mov rdi, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
mov edx, eax
call fcn.140006610
lea rdx, [0x1400067d0]
mov rcx, rax
call fcn.140006820
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
lea rdx, [0x140063bee]
mov rcx, rsi
call fcn.140005120
jmp 0x140006351
mov rcx, qword [rbp - 0x30]
lea rdx, [rbp + 0x1040]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000620f
lea rcx, [0x14006db90]
lea rdx, str.connect_failed:
call fcn.140006370
mov rdi, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
mov edx, eax
call fcn.140006610
lea rdx, [0x1400067d0]
mov rcx, rax
call fcn.140006820
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
pop rax
push rbx
je 0x1400061ef
je 0x1400061f4
and dword [rcx + rsi], esi
xor dh, byte [rbx]
pop rbx
and dword [rcx + rsi], esi
xor dh, byte [rbx]
push rax
lea rdx, [0x140063bee]
mov rcx, rsi
call fcn.140005120
jmp 0x140006351
mov r8, qword [rbp - 0x50]
lea rcx, [rbp + 0x1000]
lea rdx, str.GET
call fcn.140006950
lea rcx, [rbp + 0x1020]
lea rdx, [rbp + 0x1000]
lea r8, str._HTTP_1.1_r_nHost:_api.pinduoduo.com_r_nConnection:_close_r_n_r_n
call fcn.140006a00
lea rcx, [rbp + 0x1000]
call fcn.140005190
lea rcx, [rbp + 0x1020]
call fcn.140006a40
mov rdi, rax
lea rcx, [rbp + 0x1020]
call fcn.140006930
mov rcx, qword [rbp - 0x30]
mov rdx, rax
mov r8d, edi
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1400062d6
lea rcx, [0x14006db90]
lea rdx, str.send_failed:
call fcn.140006370
mov rdi, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
mov edx, eax
call fcn.140006610
lea rdx, [0x1400067d0]
mov rcx, rax
call fcn.140006820
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
lea rdx, [0x140063bee]
mov rcx, rsi
call fcn.140005120
mov dword [rbp - 0x34], 1
jmp 0x140006345
mov byte [rbp - 0x21], 0
mov rcx, rsi
call fcn.140006a50
mov rdx, rbp
mov rcx, qword [rbp - 0x30]
mov r8d, 0x1000
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0
jle 0x140006320
mov rdx, rbp
lea rcx, [rbp - 0x20]
call fcn.140005120
lea rdx, [rbp - 0x20]
mov rcx, rsi
call fcn.140006a80
lea rcx, [rbp - 0x20]
call fcn.140005190
jmp 0x1400062e2
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov byte [rbp - 0x21], 1
mov dword [rbp - 0x34], 1
test byte [rbp - 0x21], 1
jne 0x140006343
mov rcx, rsi
call fcn.140005190
jmp 0x140006345
lea rcx, [rbp + 0x1020]
call fcn.140005190
mov rcx, qword [rbp + 0x1050]
xor rcx, rbp
call fcn.14002f510
mov rax, rsi
add rsp, 0x10d8
pop rbx
pop rdi
pop rsi
pop rbp
ret