Function at 0x140001130
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x670
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x6b8], rbx
mov rax, qword [0x140058c50]
xor rax, rsp
mov qword [rsp + 0x660], rax
mov rbp, r8
mov qword [rsp + 0x48], r8
mov r15, rcx
mov qword [rsp + 0xa8], rcx
mov qword [rsp + 0xb0], r8
cmp qword [rcx + 0x20], 0x10
jb 0x140001191
lea rdi, [rcx + 8]
mov r9, qword [rdi]
jmp 0x140001198
lea rdi, [rcx + 8]
mov r9, rdi
cmp qword [r8 + 0x20], 0x10
jb 0x1400011a8
lea rsi, [r8 + 8]
mov r8, qword [rsi]
jmp 0x1400011af
lea rsi, [r8 + 8]
mov r8, rsi
mov dword [rsp + 0x20], 0x118
lea rdx, str.GET___s_HTTP_1.1_r_nHost:__s:_d_r_nConnection:_close_r_n_r_n
lea rcx, [rsp + 0x58]
call fcn.140001090
nop
mov ecx, 0x202
lea rdx, [rsp + 0xc0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14000124b
cmp qword [rsp + 0x78], 0x10
jb 0x1400011f2
mov rcx, qword [rsp + 0x60]
call fcn.140002838
mov qword [rsp + 0x78], SafeArrayGetDim
xor r12d, r12d
mov qword [rsp + 0x70], r12
mov byte [rsp + 0x60], r12b
cmp qword [r15 + 0x20], 0x10
jb 0x140001217
mov rcx, qword [rdi]
call fcn.140002838
mov qword [r15 + 0x20], SafeArrayGetDim
mov qword [r15 + 0x18], r12
mov byte [rdi], 0
cmp qword [rbp + 0x20], 0x10
jb 0x140001235
mov rcx, qword [rsi]
call fcn.140002838
mov qword [rbp + 0x20], SafeArrayGetDim
mov qword [rbp + 0x18], r12
mov byte [rsi], 0
xor eax, eax
jmp 0x14000176f
mov edx, 1
lea ecx, [rdx + 1]
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov r14, rax
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
jne 0x1400012d6
cmp qword [rsp + 0x78], 0x10
jb 0x14000127d
mov rcx, qword [rsp + 0x60]
call fcn.140002838
mov qword [rsp + 0x78], SafeArrayGetDim
xor r12d, r12d
mov qword [rsp + 0x70], r12
mov byte [rsp + 0x60], r12b
cmp qword [r15 + 0x20], 0x10
jb 0x1400012a2
mov rcx, qword [rdi]
call fcn.140002838
mov qword [r15 + 0x20], SafeArrayGetDim
mov qword [r15 + 0x18], r12
mov byte [rdi], 0
cmp qword [rbp + 0x20], 0x10
jb 0x1400012c0
mov rcx, qword [rsi]
call fcn.140002838
mov qword [rbp + 0x20], SafeArrayGetDim
mov qword [rbp + 0x18], r12
mov byte [rsi], 0
xor eax, eax
jmp 0x14000176f
cmp qword [r15 + 0x20], 0x10
jb 0x1400012e2
mov rcx, qword [rdi]
jmp 0x1400012e5
mov rcx, rdi
lea r9, [rsp + 0x38]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x1400012d6
mov rax, qword [rsp + 0x38]
mov rbx, qword [rax + 0x20]
mov ecx, 0x118
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbx + 2], ax
nop word [rax + rax]
mov rdx, qword [rsp + 0x38]
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140001320
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rdx, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x70]
inc r8d
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x1400013cf
cmp qword [rsp + 0x78], 0x10
jb 0x140001376
mov rcx, qword [rsp + 0x60]
call fcn.140002838
mov qword [rsp + 0x78], SafeArrayGetDim
xor r12d, r12d
mov qword [rsp + 0x70], r12
mov byte [rsp + 0x60], r12b
cmp qword [r15 + 0x20], 0x10
jb 0x14000139b
mov rcx, qword [rdi]
call fcn.140002838
mov qword [r15 + 0x20], SafeArrayGetDim
mov qword [r15 + 0x18], r12
mov byte [rdi], 0
cmp qword [rbp + 0x20], 0x10
jb 0x1400013b9
mov rcx, qword [rsi]
call fcn.140002838
mov qword [rbp + 0x20], SafeArrayGetDim
mov qword [rbp + 0x18], r12
mov byte [rsi], 0
xor eax, eax
jmp 0x14000176f
mov ecx, 0x1000
call fcn.140002840
mov qword [rsp + 0x38], rax
mov r13b, 1
xor r12d, r12d
mov esi, r12d
mov dword [rsp + 0x30], r12d
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rsp + 0x260]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
mov r14d, eax
test eax, eax
jle 0x140001722
mov rbp, qword [rsp + 0x40]
test r13b, r13b
je 0x140001651
mov qword [rsp + 0xa0], SafeArrayGetDim
mov qword [rsp + 0x98], r12
mov byte [rsp + 0x88], r12b
movsxd r8, r14d
lea rdx, [rsp + 0x260]
lea rcx, [rsp + 0x80]
call fcn.140001d30
mov r11, qword [rsp + 0x98]
test r11, r11
je 0x14000169e
cmp r11, 6
jb 0x14000169e
lea rdi, [r11 - 5]
lea rbx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 0x10
cmovae rbx, qword [rsp + 0x88]
mov r8, rdi
mov edx, 0x32
mov rcx, rbx
call fcn.14002a474
mov r11, rax
test rax, rax
je 0x14000169e
nop dword [rax + rax]
lea rdx, str.200_OK
mov r8d, dword [r11]
cmp r8d, dword [rdx]
jne 0x1400014d0
mov r8w, word [r11 + 4]
cmp r8w, word [rdx + 4]
jne 0x1400014d0
mov eax, r12d
jmp 0x1400014d5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140001503
sub rbx, r11
lea rdi, [rdi + rbx - 1]
lea rbx, [r11 + 1]
mov r8, rdi
mov edx, 0x32
mov rcx, rbx
call fcn.14002a474
mov r11, rax
test rax, rax
je 0x14000169e
jmp 0x1400014b0
lea rax, [rsp + 0x88]
mov rbx, qword [rsp + 0x88]
mov rdi, qword [rsp + 0xa0]
cmp rdi, 0x10
cmovae rax, rbx
sub r11, rax
cmp r11, 0xffffffffffffffff
je 0x14000169e
xor r13b, r13b
mov rax, qword [rsp + 0x98]
test rax, rax
je 0x140001643
cmp rax, 4
jb 0x140001643
lea rbp, [rax - 3]
lea rsi, [rsp + 0x88]
cmp rdi, 0x10
cmovae rsi, rbx
mov r8, rbp
mov edx, SafeArrayGetDim
mov rcx, rsi
call fcn.14002a474
mov r11, rax
test rax, rax
je 0x140001629
nop
mov ecx, dword [r11]
cmp ecx, dword [str._r_n_r_n]
je 0x1400015c5
sub rsi, r11
lea rbp, [rsi + rbp - 1]
lea rsi, [r11 + 1]
mov r8, rbp
mov edx, SafeArrayGetDim
mov rcx, rsi
call fcn.14002a474
mov r11, rax
test rax, rax
jne 0x140001580
mov rdi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x88]
mov esi, dword [rsp + 0x30]
jmp 0x140001643
lea rax, [rsp + 0x88]
mov rbx, qword [rsp + 0x88]
mov rdi, qword [rsp + 0xa0]
cmp rdi, 0x10
cmovae rax, rbx
sub r11, rax
cmp r11, 0xffffffffffffffff
je 0x14000163f
mov eax, 0xfffffffc
sub eax, r11d
add r14d, eax
movsxd r8, r14d
lea rdx, [rsp + r11 + 0x264]
mov rcx, qword [rsp + 0x38]
call fcn.14002bc60
mov esi, dword [rsp + 0x30]
add esi, r14d
mov dword [rsp + 0x30], esi
cmp rdi, 0x10
jb 0x14000166f
mov rcx, rbx
call fcn.140002838
jmp 0x14000166f
mov rdi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x88]
mov esi, dword [rsp + 0x30]
jmp 0x140001643
mov esi, dword [rsp + 0x30]
cmp rdi, 0x10
jb 0x140001651
mov rcx, rbx
call fcn.140002838
movsxd r8, r14d
mov ecx, esi
add rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x260]
call fcn.14002bc60
add esi, r14d
mov dword [rsp + 0x30], esi
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rsp + 0x260]
mov rbp, qword [rsp + 0x40]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
mov r14d, eax
test eax, eax
jle 0x14000171d
jmp 0x140001416
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
cmp qword [rsp + 0xa0], 0x10
jb 0x1400016c5
mov rcx, qword [rsp + 0x88]
call fcn.140002838
mov qword [rsp + 0xa0], SafeArrayGetDim
mov qword [rsp + 0x98], r12
mov byte [rsp + 0x88], r12b
cmp qword [rsp + 0x78], 0x10
jb 0x1400016f3
mov rcx, qword [rsp + 0x60]
call fcn.140002838
mov qword [rsp + 0x78], SafeArrayGetDim
mov qword [rsp + 0x70], r12
mov byte [rsp + 0x60], 0
mov rcx, r15
call fcn.140001bd0
nop
mov rcx, qword [rsp + 0x48]
call fcn.140001bd0
xor eax, eax
jmp 0x14000176f
mov rbp, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
nop
cmp qword [rsp + 0x78], 0x10
jb 0x140001746
mov rcx, qword [rsp + 0x60]
call fcn.140002838
mov qword [rsp + 0x78], SafeArrayGetDim
mov qword [rsp + 0x70], r12
mov byte [rsp + 0x60], 0
mov rcx, r15
call fcn.140001bd0
nop
mov rcx, rbp
call fcn.140001bd0
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x660]
xor rcx, rsp
call fcn.14002a080
mov rbx, qword [rsp + 0x6b8]
add rsp, 0x670
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret