Function at 0x413402
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416d25
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xafc
push edi
mov dword [ebp - 0xb08], ecx
lea eax, [ebp - 0x9e4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x41c764
lea ecx, [ebp - 0x450]
call fcn.00414d5c
mov dword [ebp - 4], 0
push 0x41c768
lea ecx, [ebp - 0x34]
call fcn.00414d5c
mov byte [ebp - 4], 1
mov word [ebp - 0xaf0], 0
mov dword [ebp - 0xae8], 0
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0xaf0]
push ecx
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x450]
push eax
lea ecx, [ebp - 0xae8]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.MFC42.DLL_AfxParseURL
push 0x41c30c
call dword [sym.imp.WS2_32.dll_getprotobyname]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x3c], 0x400
mov eax, dword [ebp - 0x3c]
push eax
push 0
lea ecx, [ebp - 0x854]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x34]
call fcn.00405100
push eax
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::GetBuffer
push eax
lea ecx, [ebp - 0x450]
call fcn.00405100
push eax
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov edx, dword [ebp - 0x3c]
push edx
lea eax, [ebp - 0x854]
push eax
mov ecx, dword [ebp - 0xb08]
call fcn.00413200
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x450]
call fcn.00405140
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x44c], 0
jne 0x413563
mov byte [ebp - 0xaf4], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0xaf4]
jmp 0x4137f6
push 4
mov ecx, dword [ebp - 0x44c]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x48]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 0x10
push 0
lea edx, [ebp - 0x28]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [ebp - 0x28], 2
mov ax, word [ebp - 0xaf0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x26], ax
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x24], ecx
mov byte [ebp - 0xae4], 0
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0xae3]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x21]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x22]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x23]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x24]
and edx, 0xff
push edx
push str._d._d._d._d
lea eax, [ebp - 0xae4]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
lea ecx, [ebp - 0xae4]
push ecx
push str.IP___s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
mov edx, dword [ebp - 0x44]
movsx eax, word [edx + 8]
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x413660
mov byte [ebp - 0xaf8], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0xaf8]
jmp 0x4137f6
push 0x10
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4136a5
mov byte [ebp - 0xafc], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0xafc]
jmp 0x4137f6
push 0
mov eax, dword [ebp - 0x30]
push eax
lea ecx, [ebp - 0x854]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x4136fb
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [ebp - 0xb00], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0xb00]
jmp 0x4137f6
mov byte [ebp - 0x448], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x447]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x400
lea ecx, [ebp - 0x448]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov ecx, dword [ebp - 0xb08]
call fcn.00413807
mov dword [ebp - 0xaec], eax
mov dword [ebp - 0x2c], 0x3e8
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov ecx, dword [ebp - 0xb08]
call fcn.004138aa
mov byte [ebp - 0x18], 0
xor edx, edx
mov dword [ebp - 0x17], edx
mov dword [ebp - 0x13], edx
mov byte [ebp - 0xf], dl
mov dword [ebp - 0x454], 0
push 0xa
lea eax, [ebp - 0x18]
push eax
push str.Content_Length
lea ecx, [ebp - 0x448]
push ecx
mov ecx, dword [ebp - 0xb08]
call fcn.004138e9
mov dword [ebp - 0x454], eax
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [ebp - 0x454], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x454]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov ecx, dword [ebp - 0xb08]
call fcn.004139ad
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [ebp - 0xb04], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x450]
call sub.MFC42.DLL_CString::CString
mov al, byte [ebp - 0xb04]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
mov esp, ebp
pop ebp
ret 8