Function at 0x405670
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp 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
mov eax, 0x10028
call fcn.00425850
mov eax, dword [0x43400c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push 6
push 1
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10024], eax
test eax, eax
je 0x4058d6
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4058d6
mov ecx, 2
mov word [ebp - 0x1001c], cx
mov eax, dword [eax + 0xc]
push ebx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x10018], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp - 0x10024]
mov word [ebp - 0x1001a], ax
lea eax, [ebp - 0x1001c]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4058d6
push esi
push edi
lea eax, [ebp - 0x1000c]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
push eax
call fcn.00405910
lea ecx, [ebp - 0x1000c]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405720
push 0
sub ecx, edx
lea eax, [ebp - 0x1000c]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor al, al
mov byte [ebp - 0x1001d], al
nop dword [eax + eax]
push 0xffff
xor esi, esi
lea eax, [ebp - 0x1000c]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
nop word [eax + eax]
push 0
push 1
lea eax, [ebp - 0x1001e]
push eax
push ebx
call edi
test eax, eax
jle 0x40579c
mov al, byte [ebp - 0x1001e]
mov byte [ebp + esi - 0x1000c], al
cmp al, 0xa
je 0x40579c
inc esi
cmp esi, 0xfffe
jl 0x405770
test esi, esi
jle 0x4058c6
add esi, 0xffffffff
js 0x4057d3
nop dword [eax]
cmp byte [ebp + esi - 0x1000c], 0x20
jge 0x4057d3
cmp esi, 0xffff
jae 0x4058fc
mov byte [ebp + esi - 0x1000c], 0
sub esi, 1
jns 0x4057b0
lea ecx, [ebp - 0x1000c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4057e0
sub ecx, edx
je 0x4058c6
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok_s]
lea eax, [ebp - 0x10028]
push eax
lea eax, [ebp - 0x1000c]
mov dword [ebp - 0x10028], 0
push 0x4289a4
push eax
call esi
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4058c6
mov edx, str.HTTP_1.0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x405846
test bl, bl
je 0x405842
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x405846
add eax, 2
add edx, 2
test bl, bl
jne 0x405826
xor eax, eax
jmp 0x40584b
sbb eax, eax
or eax, 1
test eax, eax
je 0x405887
mov eax, str.HTTP_1.1
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405874
test dl, dl
je 0x405870
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405874
add ecx, 2
add eax, 2
test dl, dl
jne 0x405854
xor eax, eax
jmp 0x405879
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x10024]
test eax, eax
jne 0x405750
lea eax, [ebp - 0x10028]
push eax
push 0x4289a4
push 0
call esi
add esp, 0xc
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, dword [ebp - 0x10024]
add esp, 4
mov dword [0x50ff10], eax
cmp eax, 0xc8
jne 0x405750
mov byte [ebp - 0x1001d], 1
jmp 0x405750
cmp byte [ebp - 0x1001d], 0
jne 0x4058e9
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00424550
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00424550
mov esp, ebp
pop ebp
ret
call fcn.00424ac0
int3