Function at 0x402910
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4043c1
mov eax, dword fs:[0]
push eax
sub esp, 0xc78
mov eax, dword [0x407004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xc84], edx
mov esi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc7c], eax
mov dword [ebp - 0xc74], 0
mov dword [ebp - 0xc38], 0
mov dword [ebp - 0xc34], 0xf
mov byte [ebp - 0xc48], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc20], 0
mov dword [ebp - 0xc1c], 0xf
mov byte [ebp - 0xc30], 0
mov dword [ebp - 0xc60], 0
mov dword [ebp - 0xc5c], 0xf
mov byte [ebp - 0xc70], 0
push 0x4034c0
mov byte [ebp - 4], 2
mov edx, str.readUrl
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00403270
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea eax, [ebp - 0xc70]
mov ecx, esi
push eax
lea eax, [ebp - 0xc30]
push eax
lea edx, [ebp - 0xc48]
call fcn.00402430
add esp, 8
lea esi, [ebp - 0xc48]
cmp dword [ebp - 0xc34], 0x10
cmovae esi, dword [ebp - 0xc48]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0xc78], ebx
cmp ebx, 0xffffffff
jne 0x402a2e
xor ebx, ebx
mov dword [ebp - 0xc78], ebx
jmp 0x402ac6
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
push esi
call edi
push esi
cmp eax, 0xffffffff
jne 0x402a45
call dword [sym.imp.WS2_32.dll_gethostbyname]
jmp 0x402a5e
call edi
push 2
mov dword [ebp - 0xc18], eax
lea eax, [ebp - 0xc18]
push 4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x402a74
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call eax
xor ebx, ebx
mov dword [ebp - 0xc78], ebx
jmp 0x402ac6
mov eax, dword [eax + 0xc]
push 0x50
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0xc54], eax
mov eax, 2
mov word [ebp - 0xc58], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xc56], ax
lea eax, [ebp - 0xc58]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x402ac2
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call eax
xor ebx, ebx
mov dword [ebp - 0xc78], ebx
jmp 0x402ac6
test ebx, ebx
jne 0x402ad3
push str.Could_not_connect_to_server__n
call fcn.00401050
add esp, 4
cmp dword [ebp - 0xc1c], 0x10
lea eax, [ebp - 0xc30]
cmovae eax, dword [ebp - 0xc30]
push eax
push str.GET__s_HTTP_1.0
lea eax, [ebp - 0xc14]
push 0x400
push eax
call fcn.004010e0
lea eax, [ebp - 0xc14]
push eax
lea eax, [ebp - 0x414]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
lea eax, [ebp - 0x414]
add esp, 0x1c
push 0x4057fc
push 0x400
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0xc48]
cmp dword [ebp - 0xc34], 0x10
cmovae eax, dword [ebp - 0xc48]
push eax
push str.Host:__s
lea eax, [ebp - 0xc14]
push 0x400
push eax
call fcn.004010e0
lea eax, [ebp - 0xc14]
push eax
lea eax, [ebp - 0x414]
push 0x400
push eax
call esi
add esp, 0x1c
lea eax, [ebp - 0x414]
push 0x4057fc
push 0x400
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x4057fc
push 0x400
push eax
call esi
lea ecx, [ebp - 0x414]
add esp, 0xc
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402bb0
push 0
sub ecx, edx
lea eax, [ebp - 0x414]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x414]
push eax
push str.Buffer_being_sent:_n_s
call fcn.00401050
push 0x400
xor esi, esi
lea eax, [ebp - 0x814]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x14
lea eax, [ebp - 0x814]
push esi
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jle 0x402c77
nop dword [eax]
xor ecx, ecx
mov eax, edi
add eax, esi
setb cl
neg ecx
or ecx, eax
push ecx
push dword [ebp - 0xc74]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
push edi
lea ecx, [ebp - 0x814]
mov dword [ebp - 0xc74], eax
push ecx
lea ecx, [esi + eax]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x14
lea eax, [ebp - 0x814]
add esi, edi
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x814]
push 0
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jg 0x402c10
mov edi, dword [ebp - 0xc74]
or ebx, 0xffffffff
push str._r_n_r_n
push edi
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x402ca6
push str._n_r_n_r
push edi
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
je 0x402cad
mov ebx, eax
sub ebx, edi
add ebx, 4
sub esi, ebx
mov dword [ebp - 0xc80], esi
lea eax, [esi + 1]
push eax
call fcn.00403604
add esp, 4
mov dword [ebp - 0xc18], eax
lea ecx, [ebx + edi]
push esi
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0xc18]
add esp, 0xc
mov byte [eax + esi], 0
lea esi, [ebx + 1]
push esi
call fcn.00403604
add esp, 4
mov edi, eax
push ebx
push dword [ebp - 0xc74]
push esi
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
push 1
push dword [ebp - 0xc74]
mov byte [ebx + edi], 0
call fcn.004035f6
mov eax, dword [ebp - 0xc7c]
add esp, 0x18
mov ecx, dword [ebp - 0xc84]
push dword [ebp - 0xc78]
mov dword [eax], edi
mov eax, dword [ebp - 0xc80]
mov dword [ecx], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0xc5c]
cmp edx, 0x10
jb 0x402d6e
mov ecx, dword [ebp - 0xc70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402d64
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402d64
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004035f6
add esp, 8
mov edx, dword [ebp - 0xc1c]
cmp edx, 0x10
jb 0x402daa
mov ecx, dword [ebp - 0xc30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402da0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402da0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004035f6
add esp, 8
mov edx, dword [ebp - 0xc34]
mov dword [ebp - 0xc20], 0
mov dword [ebp - 0xc1c], 0xf
mov byte [ebp - 0xc30], 0
cmp edx, 0x10
jb 0x402e01
mov ecx, dword [ebp - 0xc48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402df7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402df7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004035f6
add esp, 8
mov eax, dword [ebp - 0xc18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004035b5
mov esp, ebp
pop ebp
ret