Function at 0x440752
Capabilities:
Connect socket
Resolve dns
Send data
Send data on socket

Disassembly:
push 0x24c
mov eax, 0x471fd5
call fcn.00448de7
mov al, byte [ebp + 0xc]
lea ecx, [ebp - 0x224]
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x225], al
call fcn.004406f1
mov dl, byte [ebp - 0x225]
and dword [ebp - 4], 0
test dl, dl
movzx ecx, word [0x49d4bc]
push 6
pop esi
push 0x11
pop eax
cmovne esi, eax
xor eax, eax
test dl, dl
mov dword [ebp - 0x230], esi
setne al
inc eax
test dl, dl
mov dword [ebp - 0x238], eax
movzx eax, word [0x49d4b0]
cmovne ecx, eax
movzx eax, cx
push eax
call dword [sym.imp.WS2_32.dll_htons]
and dword [ebp - 0x258], 0
lea edi, [ebp - 0x254]
movzx eax, ax
push 7
pop ecx
mov dword [ebp - 0x234], eax
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x24c], esi
mov esi, dword [ebp - 0x238]
xor edi, edi
cmp dword [0x49d4d8], 0x10
mov eax, 0x49d4c4
push ecx
cmovae eax, dword [0x49d4c4]
lea ecx, [ebp - 0x258]
push ecx
push edi
push eax
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x250], esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x440a31
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x440a31
mov eax, dword [ecx + 4]
cmp eax, 2
je 0x44086f
cmp eax, 0x17
je 0x44086f
mov dl, byte [0x4f10f4]
test dl, dl
je 0x440863
push eax
movzx eax, dl
push str.bad_address_family:__d
push eax
call fcn.00410c7f
mov ecx, dword [ebp - 0x22c]
add esp, 0xc
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x440a63
push dword [ebp - 0x230]
push esi
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x230], esi
test esi, esi
jns 0x4408cc
cmp byte [0x4f10f4], 0
je 0x4408c4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x225], 0
mov ecx, 0x47f800
push edi
push eax
mov eax, 0x47f7fc
cmove eax, ecx
push eax
movzx eax, byte [0x4f10f4]
push str._s_socket_creation_failed_with_err:__d
push eax
call fcn.00410c5f
add esp, 0x14
push dword [ebp - 0x22c]
jmp 0x440864
push 0x80
lea eax, [ebp - 0x90]
push edi
push eax
call fcn.0044d500
mov ecx, dword [ebp - 0x22c]
add esp, 0xc
mov ax, word [ecx + 4]
mov word [ebp - 0x90], ax
cmp dword [ecx + 4], 2
jne 0x440916
mov eax, dword [ecx + 0x18]
push 0x10
pop edi
mov eax, dword [eax + 4]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x234]
mov word [ebp - 0x8e], ax
jmp 0x44094a
cmp dword [ecx + 4], 0x17
jne 0x440944
mov esi, dword [ecx + 0x18]
lea edi, [ebp - 0x88]
mov eax, dword [ebp - 0x234]
add esi, 8
push 0x1c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x230]
mov word [ebp - 0x8e], ax
pop edi
jmp 0x44094a
mov edi, dword [ebp - 0x230]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp byte [ebp - 0x225], 0
je 0x44097a
cmp dword [ebx + 0x14], 0x10
mov eax, dword [ebx + 0x10]
jb 0x440965
mov ebx, dword [ebx]
push edi
lea ecx, [ebp - 0x90]
push ecx
push 0
push eax
push ebx
push esi
call dword [sym.imp.WS2_32.dll_sendto]
jmp 0x4409ef
push edi
lea eax, [ebp - 0x90]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x4409be
cmp byte [0x4f10f4], 0
je 0x4409b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
movzx eax, byte [0x4f10f4]
push str.tcp_connect_failed__err:__d
push eax
call fcn.00410c7f
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x440a63
mov ecx, dword [ebx + 0x10]
xor edi, edi
test ecx, ecx
je 0x4409ef
cmp dword [ebx + 0x14], 0x10
jb 0x4409d1
mov eax, dword [ebx]
jmp 0x4409d3
mov eax, ebx
push 0
sub ecx, edi
add eax, edi
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
js 0x4409f3
mov ecx, dword [ebx + 0x10]
add edi, eax
cmp edi, ecx
jb 0x4409c7
test eax, eax
jns 0x4409b2
cmp byte [0x4f10f4], 0
je 0x4409b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x225], 0
mov ecx, 0x47f800
push 0
push eax
mov eax, 0x47f7fc
cmove eax, ecx
push eax
movzx eax, byte [0x4f10f4]
push str._s_send_failed__err:__d
push eax
call fcn.00410c5f
add esp, 0x14
jmp 0x4409b2
mov cl, byte [0x4f10f4]
test cl, cl
je 0x440a63
cmp byte [ebp - 0x225], 0
mov edx, 0x47f800
push edi
push eax
mov eax, 0x47f7fc
cmove eax, edx
push eax
movzx eax, cl
push str._s_host_lookup_failed__err:__d
push eax
call fcn.00410c5f
add esp, 0x14
cmp byte [ebp - 0x94], 0
je 0x440a72
call dword [sym.imp.WS2_32.dll_WSACleanup]
call fcn.00448d91
ret