Function at 0x40e61d
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp 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
mov eax, 0x15f8
call fcn.00410ac0
sub esp, eax
lea eax, [ebp - 0x1c0]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40e6ac
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], 0x443a58
mov dword [esp], eax
call sym._fprintf_7
mov eax, 0
jmp 0x40e8d2
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xa]
movsx edx, ax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x1d0]
add eax, 4
mov dword [esp], eax
call sym._memcpy
mov word [ebp - 0x1d0], 2
mov dword [esp], 0x50
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1ce], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1d0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
mov dword [esp + 4], 0x400
lea eax, [ebp - 0x5d0]
mov dword [esp], eax
call sym._snprintf_1
lea eax, [ebp - 0x5d0]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x5d0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov dword [ebp - 0x28], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
jmp 0x40e7d7
mov eax, dword [ebp - 0x28]
add dword [ebp - 0xc], eax
lea edx, [ebp - 0x15d0]
mov eax, dword [ebp - 0xc]
add eax, edx
mov byte [eax], 0
mov dword [esp + 4], str._r_n_r_n
lea eax, [ebp - 0x15d0]
mov dword [esp], eax
call sym._strstr
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40e7d7
lea eax, [ebp - 0x15d0]
mov edx, dword [ebp - 0x2c]
sub edx, eax
lea eax, [edx + 4]
mov dword [ebp - 0x10], eax
jmp 0x40e81b
mov eax, dword [ebp - 0xc]
mov edx, 0xfff
sub edx, eax
mov ecx, edx
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x15d0]
add eax, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jg 0x40e791
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
jle 0x40e880
lea eax, [ebp - 0x15d0]
mov dword [ebp - 0x18], eax
jmp 0x40e864
mov eax, dword [ebp - 0x14]
add eax, 6
mov dword [ebp - 0x18], eax
mov dword [esp + 4], 0x443aba
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strstr
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x40e864
mov eax, dword [ebp - 0x30]
mov byte [eax], 0
add dword [ebp - 0x14], 6
jmp 0x40e880
mov dword [esp + 4], str.Date:
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strstr
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40e833
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x14], 0
je 0x40e8b8
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strcpy
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, dword [ebp - 0x1c]
leave
ret