Function at 0x4010a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp 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 ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407d49
mov eax, dword fs:[0]
push eax
mov eax, 0x2940
call fcn.00407c80
mov eax, dword [0x40b004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2900], 0
mov dword [ebp - 4], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x275c], xmm0
push 1
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP140.dll_private:_static_class_std::locale::_Locimp____cdecl_std::locale::_Init_bool_]
add esp, 4
mov dword [ebp - 0x2758], eax
xor edi, edi
mov dword [ebp - 0x2740], 0xf
mov dword [ebp - 0x2744], edi
mov byte [ebp - 0x2754], 0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2918]
mov eax, dword [ebp + 0x18]
add eax, 0x16
mov dword [ebp - 0x2908], edi
push eax
mov dword [ebp - 0x2904], 0xf
mov byte [ebp - 0x2918], 0
mov dword [ebp - 0x2900], 1
call fcn.00406d30
mov edx, dword [ebp - 0x2904]
mov eax, edx
mov ecx, dword [ebp - 0x2908]
sub eax, ecx
push 0x16
push str.GET___HTTP_1.1_r_nHost:
cmp eax, 0x16
jb 0x401198
cmp edx, 0x10
lea esi, [ebp - 0x2918]
lea eax, [ecx + 0x16]
cmovae esi, dword [ebp - 0x2918]
add esi, ecx
mov dword [ebp - 0x2908], eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0x16], 0
jmp 0x4011b2
mov byte [ebp - 0x2724], 0
lea ecx, [ebp - 0x2918]
push dword [ebp - 0x2724]
push 0x16
call fcn.00406ba0
cmp dword [ebp + 0x1c], 0x10
lea edx, [ebp + 8]
mov ecx, dword [ebp + 0x18]
cmovae edx, dword [ebp + 8]
mov eax, dword [ebp - 0x2904]
mov esi, dword [ebp - 0x2908]
sub eax, esi
mov dword [ebp - 0x2724], ecx
push ecx
push edx
cmp ecx, eax
ja 0x40120e
cmp dword [ebp - 0x2904], 0x10
lea eax, [esi + ecx]
mov dword [ebp - 0x2908], eax
lea eax, [ebp - 0x2918]
cmovae eax, dword [ebp - 0x2918]
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x2724]
add esp, 0xc
mov byte [esi + eax], 0
jmp 0x401227
mov byte [ebp - 0x2724], 0
push dword [ebp - 0x2724]
push ecx
lea ecx, [ebp - 0x2918]
call fcn.00406ba0
mov edx, dword [ebp - 0x2904]
mov eax, edx
mov ecx, dword [ebp - 0x2908]
sub eax, ecx
push 9
push str._r_n_r_nFlag:
cmp eax, 9
jb 0x401273
cmp edx, 0x10
lea esi, [ebp - 0x2918]
lea eax, [ecx + 9]
cmovae esi, dword [ebp - 0x2918]
add esi, ecx
mov dword [ebp - 0x2908], eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 9], 0
lea eax, [ebp - 0x2918]
jmp 0x40128d
mov byte [ebp - 0x2724], 0
lea ecx, [ebp - 0x2918]
push dword [ebp - 0x2724]
push 9
call fcn.00406ba0
mov dword [ebp - 0x2920], 0
mov dword [ebp - 0x291c], 0
movups xmm0, xmmword [eax]
mov dword [ebp - 0x2900], 3
movups xmmword [ebp - 0x2930], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x2920], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 6
lea edx, [ebp + 0x20]
cmp dword [ebp + 0x34], 0x10
mov ecx, dword [ebp + 0x30]
cmovae edx, dword [ebp + 0x20]
mov eax, dword [ebp - 0x291c]
mov esi, dword [ebp - 0x2920]
sub eax, esi
mov dword [ebp - 0x2724], ecx
push ecx
push edx
cmp ecx, eax
ja 0x401339
cmp dword [ebp - 0x291c], 0x10
lea eax, [ecx + esi]
mov dword [ebp - 0x2920], eax
lea eax, [ebp - 0x2930]
cmovae eax, dword [ebp - 0x2930]
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x2724]
add esp, 0xc
mov byte [eax + esi], 0
lea eax, [ebp - 0x2930]
jmp 0x401352
mov byte [ebp - 0x2724], 0
push dword [ebp - 0x2724]
push ecx
lea ecx, [ebp - 0x2930]
call fcn.00406ba0
mov dword [ebp - 0x2938], 0
mov dword [ebp - 0x2934], 0
movups xmm0, xmmword [eax]
mov dword [ebp - 0x2900], 7
movups xmmword [ebp - 0x2948], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x2938], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x2934]
mov eax, edx
mov ecx, dword [ebp - 0x2938]
sub eax, ecx
push 0x1d
push str._r_n_r_n_r_n_r_nConnection:_close_r_n_r_n
cmp eax, 0x1d
jb 0x4013e8
cmp edx, 0x10
lea esi, [ebp - 0x2948]
lea eax, [ecx + 0x1d]
cmovae esi, dword [ebp - 0x2948]
add esi, ecx
mov dword [ebp - 0x2938], eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0x1d], 0
lea eax, [ebp - 0x2948]
jmp 0x401402
mov byte [ebp - 0x2724], 0
lea ecx, [ebp - 0x2948]
push dword [ebp - 0x2724]
push 0x1d
call fcn.00406ba0
mov dword [ebp - 0x272c], 0
mov dword [ebp - 0x2728], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x273c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x272c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x2934]
cmp edx, 0x10
jb 0x40147e
mov ecx, dword [ebp - 0x2948]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401474
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401474
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov dword [ebp - 0x2938], 0
mov dword [ebp - 0x2934], 0xf
mov byte [ebp - 0x2948], 0
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x291c]
cmp edx, 0x10
jb 0x4014d9
mov ecx, dword [ebp - 0x2930]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4014cf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4014cf
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov dword [ebp - 0x2920], 0
mov dword [ebp - 0x291c], 0xf
mov byte [ebp - 0x2930], 0
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x2904]
cmp edx, 0x10
jb 0x401534
mov ecx, dword [ebp - 0x2918]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40152a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40152a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
lea eax, [ebp - 0x28fc]
mov dword [ebp - 0x2908], 0
push eax
push 0x202
mov dword [ebp - 0x2904], 0xf
mov byte [ebp - 0x2918], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x401700
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
mov dword [ebp - 0x2900], eax
cmovae ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x401700
push 0x50
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x276a], ax
mov eax, 2
mov word [ebp - 0x276c], ax
mov eax, dword [esi + 0xc]
push 0x10
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2768], eax
lea eax, [ebp - 0x276c]
push eax
push dword [ebp - 0x2900]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x401700
mov edx, dword [ebp - 0x2728]
lea ecx, [ebp - 0x273c]
mov esi, dword [ebp - 0x273c]
cmp edx, 0x10
cmovae ecx, esi
lea eax, [ecx + 1]
mov dword [ebp - 0x2724], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401600
sub ecx, dword [ebp - 0x2724]
lea eax, [ebp - 0x273c]
push 0
cmp edx, 0x10
push ecx
cmovae eax, esi
mov esi, dword [ebp - 0x2900]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push 0
push 0x2710
lea eax, [ebp - 0x2720]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4016ec
nop word [eax + eax]
lea esi, [ebp - 0x2720]
mov cl, byte [esi]
cmp cl, 0x20
jge 0x401667
cmp cl, 0xa
je 0x401667
cmp cl, 0xd
jne 0x4016c9
mov edx, dword [ebp - 0x2740]
mov byte [ebp - 0x2724], cl
cmp edi, edx
jae 0x4016a1
lea eax, [edi + 1]
cmp edx, 0x10
mov dword [ebp - 0x2744], eax
lea eax, [ebp - 0x2754]
cmovae eax, dword [ebp - 0x2754]
inc esi
mov byte [eax + edi], cl
mov byte [eax + edi + 1], 0
mov edi, dword [ebp - 0x2744]
jmp 0x401656
push dword [ebp - 0x2724]
mov byte [ebp - 0x294c], 0
push dword [ebp - 0x294c]
push ecx
lea ecx, [ebp - 0x2754]
call fcn.00406a60
mov edi, dword [ebp - 0x2744]
inc esi
jmp 0x401656
mov esi, dword [ebp - 0x2900]
lea eax, [ebp - 0x2720]
push 0
push 0x2710
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x401650
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, 1
jmp 0x401702
xor esi, esi
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x2728]
cmp edx, 0x10
jb 0x401742
mov ecx, dword [ebp - 0x273c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401738
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401738
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2740]
mov dword [ebp - 0x272c], 0
mov dword [ebp - 0x2728], 0xf
mov byte [ebp - 0x273c], 0
cmp eax, 0x10
jb 0x40179f
mov ecx, dword [ebp - 0x2754]
lea edx, [eax + 1]
mov eax, ecx
cmp edx, 0x1000
jb 0x401795
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401795
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x2758]
test ecx, ecx
je 0x4017c0
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x4017c0
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x4017f6
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4017ec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4017ec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov edx, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0xf
mov byte [ebp + 8], 0
cmp edx, 0x10
jb 0x40183e
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401834
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401834
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00406f24
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406ee3
mov esp, ebp
pop ebp
ret