Function at 0x18001d500
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:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x650
mov rax, qword [0x180417240]
xor rax, rsp
mov qword [rsp + 0x640], rax
mov dword [rsp + 0x20], 0
lea rdx, [rsp + 0xa0]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x18001d569
lea rdx, str.Error_initializing_Winsock
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0x70], 1
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x68]
lea rdx, str.http
lea rcx, str.api64.ipify.org
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x18001d5ee
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rdx, str.Error_getting_address_information
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
mov rax, qword [rsp + 0x40]
mov r8d, dword [rax + 0xc]
mov rax, qword [rsp + 0x40]
mov edx, dword [rax + 8]
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0xffffffffffffffff
jne 0x18001d657
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rdx, str.Error_creating_socket
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
mov rax, qword [rsp + 0x40]
mov r8d, dword [rax + 0x10]
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax + 0x20]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0xffffffff
jne 0x18001d6c7
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rdx, str.Error_connecting_to_the_server
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
xor r9d, r9d
mov r8d, 0x3d
lea rdx, str.GET___HTTP_1.1_r_nHost:_api64.ipify.org_r_nConnection:_close_r_n_r_n
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0xffffffff
jne 0x18001d735
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rdx, str.Error_sending_data
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rsp + 0x240]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0xffffffff
jne 0x18001d7a4
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rdx, str.Error_receiving_data
mov rcx, qword [rsp + 0x660]
call fcn.180005b40
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x660]
jmp 0x18001d858
movsxd rax, dword [rsp + 0x24]
mov r8, rax
lea rdx, [rsp + 0x240]
lea rcx, [rsp + 0x48]
call fcn.180012e50
nop
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xor r8d, r8d
lea rdx, str._r_n_r_n
lea rcx, [rsp + 0x48]
call fcn.1800267f0
add rax, 4
mov qword [rsp + 0x30], rax
xor r8d, r8d
lea rdx, [0x180245338]
lea rcx, [rsp + 0x48]
call fcn.1800267f0
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov r9, rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x660]
lea rcx, [rsp + 0x48]
call fcn.180026790
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x48]
call fcn.180005a50
mov rax, qword [rsp + 0x660]
mov rcx, qword [rsp + 0x640]
xor rcx, rsp
call fcn.1801ce080
add rsp, 0x650
pop rdi
ret