Function at 0x4065be
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x638847
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x45c
mov dword [ebp - 0x468], ecx
lea eax, [ebp - 0x2a8]
push eax
push 0x201
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea ecx, [ebp - 0x2ac]
call fcn.00403370
mov dword [ebp - 4], 0
push 0x6d5bb4
lea ecx, [ebp - 0x118]
call fcn.00618dec
mov byte [ebp - 4], 1
mov byte [ebp - 0x10], 1
lea ecx, [ebp - 0x45c]
push ecx
push 0x201
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x2cc], eax
cmp dword [ebp - 0x2cc], 0xffffffff
jne 0x40668d
push 0x40
push 0x6d5bc4
push 0x6d5bcc
mov edx, dword [ebp - 0x468]
mov eax, dword [edx + 0x1c]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.00618d7e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2ac]
call fcn.00618d7e
jmp 0x40688e
mov dword [ebp - 0x460], 1
lea ecx, [ebp - 0x460]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x2cc]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x2c8], 3
mov dword [ebp - 0x2c4], 0
mov dword [ebp - 0x2c0], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x2c0], eax
cmp dword [ebp - 0x2c0], 0
jne 0x4066f0
mov byte [ebp - 0x10], 0
jmp 0x4067f8
push 0x10
push 0
lea ecx, [ebp - 0x2bc]
push ecx
call fcn.004ac1d0
add esp, 0xc
mov word [ebp - 0x2bc], 2
mov dx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2ba], ax
mov eax, dword [ebp - 0x2c0]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [ebp - 0x2b8], eax
push 0x10
lea ecx, [ebp - 0x2bc]
push ecx
mov edx, dword [ebp - 0x2cc]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x464], 0
jmp 0x40676c
mov eax, dword [ebp - 0x464]
add eax, 1
mov dword [ebp - 0x464], eax
mov ecx, dword [ebp - 0x464]
cmp ecx, dword [ebp - 0x114]
jae 0x406793
mov edx, dword [ebp - 0x464]
mov eax, dword [ebp + edx*4 - 0x110]
cmp eax, dword [ebp - 0x2cc]
jne 0x406791
jmp 0x406793
jmp 0x40675d
mov ecx, dword [ebp - 0x464]
cmp ecx, dword [ebp - 0x114]
jne 0x4067cc
cmp dword [ebp - 0x114], 0x40
jae 0x4067cc
mov edx, dword [ebp - 0x464]
mov eax, dword [ebp - 0x2cc]
mov dword [ebp + edx*4 - 0x110], eax
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
xor edx, edx
test edx, edx
jne 0x406751
lea eax, [ebp - 0x2c8]
push eax
push 0
lea ecx, [ebp - 0x114]
push ecx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4067f8
mov byte [ebp - 0x10], 0
mov edx, dword [ebp - 0x2cc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x6d5be4
lea edx, [ebp - 0x2ac]
push edx
call fcn.00610e57
add esp, 0x10
mov eax, dword [ebp - 0x10]
and eax, 0xff
test eax, eax
je 0x406843
push 0x6d5c14
lea ecx, [ebp - 0x118]
call fcn.00618f07
push 0x40
lea ecx, [ebp - 0x118]
call fcn.00403580
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00403580
push eax
mov ecx, dword [ebp - 0x468]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.00618d7e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2ac]
call fcn.00618d7e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8