Function at 0x180003cf0
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x570]
sub rsp, 0x670
movzx r15d, r8w
mov r12d, edx
mov rbx, rcx
call fcn.180003588
mov r14d, eax
cmp eax, 0xffffffff
je 0x18000403f
xor r8d, r8d
lea r13d, [r8 + 2]
mov ecx, r13d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x180003d55
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x18000403f
movzx ecx, word [rbx + 0x30]
mov dword [rsp + 0x44], r14d
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x40], r13w
lea rdx, [rsp + 0x40]
mov word [rsp + 0x42], ax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x180004030
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r9d, r15d
lea rdx, [0x1800012d8]
mov r8, rax
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
xor r9d, r9d
lea rdx, [rsp + 0x50]
mov r8d, eax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x180004030
xor ebx, ebx
xor r14d, r14d
and dword [rbp + 0x5a0], ebx
and dword [rsp + 0x38], 0
lea rax, [rsp + 0x38]
lea r9, [rbp + 0x150]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x3c], 0x2710
lea rdx, [rbp + 0x360]
mov qword [rbp + 0x368], rdi
xor ecx, ecx
mov dword [rbp + 0x360], 1
mov qword [rbp + 0x158], rdi
mov dword [rbp + 0x150], 1
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x18000400b
test eax, eax
jle 0x180003f2b
lea rdx, [rbp + 0x150]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x180004011
lea rdx, [rbp + 0x360]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180003f2b
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call fcn.180004610
xor r9d, r9d
lea rdx, [rsp + 0x50]
mov r8d, 0x1ff
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
movsxd r12, eax
cmp r12d, 0xffffffff
je 0x18000400b
test eax, eax
je 0x180004011
lea r13d, [r14 + r12]
cmp r13d, 0x200
jge 0x180004011
lea edx, [r13 + 1]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x180004003
lea eax, [r13 + 1]
xor edx, edx
movsxd r8, eax
mov rcx, r15
call fcn.180004610
test r14d, r14d
jle 0x180003f0c
test rbx, rbx
je 0x180003f0c
movsxd r8, r14d
mov rdx, rbx
mov rcx, r15
call fcn.1800045f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
movsxd rcx, r14d
lea rdx, [rsp + 0x50]
add rcx, r15
mov r8, r12
call fcn.1800045f0
mov r14d, r13d
mov rbx, r15
mov r13d, 2
cmp r14d, 4
jle 0x180003ddf
movsxd r15, r14d
lea rcx, [rbx - 4]
add rcx, r15
lea rdx, [0x1800012f4]
mov r8d, 4
call qword [sym.imp.SHLWAPI.dll_StrCmpNA]
test eax, eax
je 0x180003f75
lea rcx, [rbx - 2]
mov r8d, r13d
add rcx, r15
lea rdx, [0x1800012fc]
call qword [sym.imp.SHLWAPI.dll_StrCmpNA]
test eax, eax
jne 0x180003ddf
and qword [rbp + 0x5b8], 0
lea r9, [rbp + 0x5b8]
xor r8d, r8d
mov dl, 0xa
mov rcx, rbx
call fcn.180004514
test eax, eax
je 0x180004011
mov rcx, qword [rbp + 0x5b8]
mov dl, 0x20
call fcn.18000449c
cmp eax, r13d
jle 0x180003ff4
mov rcx, qword [rbp + 0x5b8]
lea r9, [rsp + 0x30]
and qword [rsp + 0x30], 0
mov r8d, 1
mov dl, 0x20
call fcn.180004514
test eax, eax
je 0x180003ff4
mov rcx, qword [rsp + 0x30]
lea r8, [rbp + 0x5a0]
xor edx, edx
call qword [sym.imp.SHLWAPI.dll_StrToIntExA]
test eax, eax
jne 0x180003fe9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp + 0x5b8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180004011
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x180004011
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test rbx, rbx
je 0x18000401f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [rbp + 0x5a0], 0xc8
jne 0x180004036
mov rax, rdi
jmp 0x180004043
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
lea r11, [rsp + 0x670]
mov rbx, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret