Function at 0x52d596
Capabilities:
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov dword [ebp - 4], 1
mov dword [ebp - 0x70], 1
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_isdigit]
add esp, 4
test eax, eax
je 0x52d600
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x52d5fe
push str.Listen__inet_addr___failed__error_INADDR_NONE
mov ecx, dword [ebp + 8]
call fcn.005262b5
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
or eax, 0xffffffff
jmp 0x52d954
jmp 0x52d66e
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x84], eax
cmp dword [ebp - 0x84], 0
jne 0x52d64a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str._nListen_Address__s_Not_Found_______err___d_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.005262b5
or eax, 0xffffffff
jmp 0x52d954
mov ecx, dword [ebp - 0x84]
movsx edx, word [ecx + 0xa]
push edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0xffffffff
jne 0x52d6cf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov eax, dword [ebp - 8]
push eax
push str.socket___failed__error___d__s_n
lea ecx, [ebp - 0x6c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x6c]
push edx
mov ecx, dword [ebp + 8]
call fcn.005262b5
or eax, 0xffffffff
jmp 0x52d954
mov word [ebp - 0x80], 2
mov ax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x7e], ax
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x52d75c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x52d75c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.Listen_Ioctl__failed__error___d__s_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.005262b5
or eax, 0xffffffff
jmp 0x52d954
push 4
lea ecx, [ebp - 0x70]
push ecx
push 4
push 0xffff
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x52d7d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.Setsockopt_rc___d_error___d___s_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.005262b5
push 0
push str.Listen_sock_option
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
or eax, 0xffffffff
jmp 0x52d954
push 0x10
lea edx, [ebp - 0x80]
push edx
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x52d843
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov edx, dword [ebp - 8]
push edx
push str.Listen_Bind___failed__error___d__s_n
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.005262b5
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
or eax, 0xffffffff
jmp 0x52d954
push 0x1c
push 0x465
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x52d8cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x52d8cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov eax, dword [ebp - 8]
push eax
push 0x5fd0bc
lea ecx, [ebp - 0x6c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x6c]
push edx
mov ecx, dword [ebp + 8]
call fcn.005262b5
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
or eax, 0xffffffff
jmp 0x52d954
push 5
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x52d94f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x52d94f
cmp dword [ebp - 8], 0x2733
je 0x52d94f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x5fc898
call fcn.0052d564
add esp, 8
push eax
mov edx, dword [ebp - 8]
push edx
push str.Listen___failed__error___d__s_n
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.005262b5
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
or eax, 0xffffffff
jmp 0x52d954
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov esp, ebp
pop ebp
ret