Function at 0x40a7c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441d11
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x44f6c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x22c], ecx
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x24]
mov dword [ebp - 0x230], ecx
mov edx, dword [ebp - 0x230]
add edx, 1
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x230]
mov cl, byte [eax]
mov byte [ebp - 0x235], cl
add dword [ebp - 0x230], 1
cmp byte [ebp - 0x235], 0
jne 0x40a80f
mov edx, dword [ebp - 0x230]
sub edx, dword [ebp - 0x234]
mov dword [ebp - 0x23c], edx
jne 0x40a848
xor al, al
jmp 0x40ad52
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x24]
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x240]
add edx, 1
mov dword [ebp - 0x244], edx
mov eax, dword [ebp - 0x240]
mov cl, byte [eax]
mov byte [ebp - 0x245], cl
add dword [ebp - 0x240], 1
cmp byte [ebp - 0x245], 0
jne 0x40a866
mov edx, dword [ebp - 0x240]
sub edx, dword [ebp - 0x244]
mov dword [ebp - 0x24c], edx
mov eax, dword [ebp - 0x24c]
add eax, 1
cmp eax, 0x800
jbe 0x40a8ad
xor al, al
jmp 0x40ad52
mov dword [ebp - 0x1ac], 0
mov ecx, dword [ebp - 0x22c]
call fcn.0040a300
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x34]
push edx
lea ecx, [ebp - 0x21c]
call fcn.00408410
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x22c]
cmp dword [eax + 0x2c], 0xffffffff
je 0x40a90e
mov byte [ebp - 0x21d], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x21d]
jmp 0x40ad52
mov ecx, dword [ebp - 0x22c]
mov dword [ecx + 0x2c], 0xffffffff
mov edx, 0x101
mov word [ebp - 0x1f8], dx
lea eax, [ebp - 0x1a4]
push eax
movzx ecx, word [ebp - 0x1f8]
push ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x200], eax
cmp dword [ebp - 0x200], 0
je 0x40a958
push str.WSAStartup_error
call fcn.00428f65
add esp, 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edx, dword [ebp - 0x22c]
mov dword [edx + 0x2c], eax
mov eax, dword [ebp - 0x22c]
cmp dword [eax + 0x2c], 0
jge 0x40a99d
mov byte [ebp - 0x21e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x21e]
jmp 0x40ad52
lea ecx, [ebp - 0x1e4]
call fcn.00410c20
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x24]
push edx
lea ecx, [ebp - 0x1e4]
call fcn.00410a30
lea ecx, [ebp - 0x1e4]
call fcn.0040c950
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1a8], 0
jge 0x40aa0e
mov byte [ebp - 0x21f], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x21f]
jmp 0x40ad52
lea ecx, [ebp - 0x1e4]
call fcn.00407c60
test eax, eax
jne 0x40aa50
mov byte [ebp - 0x220], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x220]
jmp 0x40ad52
lea ecx, [ebp - 0x1e4]
call fcn.00407c60
push eax
lea ecx, [ebp - 0x1c8]
call fcn.00408410
mov byte [ebp - 4], 2
push 0x4465bf
lea eax, [ebp - 0x1c8]
push eax
call fcn.0040bd30
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x40aac8
mov byte [ebp - 0x221], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x221]
jmp 0x40ad52
xor edx, edx
mov dword [ebp - 0x1f4], edx
mov dword [ebp - 0x1f0], edx
mov dword [ebp - 0x1ec], edx
mov dword [ebp - 0x1e8], edx
mov eax, 2
mov word [ebp - 0x1f4], ax
movzx ecx, word [ebp - 0x1a8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1f2], ax
lea ecx, [ebp - 0x1c8]
call fcn.0040bac0
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x1ac], eax
cmp dword [ebp - 0x1ac], 0
jne 0x40ab71
mov ecx, dword [ebp - 0x22c]
call fcn.0040ae00
mov byte [ebp - 0x222], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x222]
jmp 0x40ad52
mov edx, dword [ebp - 0x1ac]
movsx eax, word [edx + 0xa]
push eax
mov ecx, dword [ebp - 0x1ac]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x1f0]
push ecx
call fcn.0042b380
add esp, 0xc
push 0x10
lea edx, [ebp - 0x1f4]
push edx
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1fc], eax
cmp dword [ebp - 0x1fc], 0
jne 0x40ac03
mov byte [ebp - 0x223], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x223]
jmp 0x40ad52
cmp dword [ebp - 0x1fc], 0
jge 0x40ac63
call fcn.00429251
cmp dword [eax], 0x70
je 0x40ac63
mov ecx, dword [ebp - 0x22c]
call fcn.0040ae00
mov byte [ebp - 0x224], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x224]
jmp 0x40ad52
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x2c]
push eax
mov ecx, dword [ebp - 0x22c]
call fcn.00409d50
mov dword [ebp - 0x1fc], eax
cmp dword [ebp - 0x1fc], 0
jle 0x40accb
mov byte [ebp - 0x225], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x225]
jmp 0x40ad52
mov ecx, dword [ebp - 0x22c]
call fcn.0040ae00
mov byte [ebp - 0x226], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c8]
call fcn.004022f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1e4]
call fcn.00410c70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.004022f0
mov al, byte [ebp - 0x226]
jmp 0x40ad52
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004286dd
mov esp, ebp
pop ebp
ret