Function at 0x49bfa0
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x5b4
lea eax, [esp + 0x24]
push ebp
push esi
push edi
push eax
mov esi, ecx
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x49bfdb
push 0
push str.WSAStart__
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
xor ebp, ebp
push ebp
push 2
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x49c00b
push ebp
push 0x5e9090
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov eax, dword [esp + 0x5c4]
mov edi, 1
cmp eax, edi
jne 0x49c3f8
push ebp
push edi
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x49c04c
push ebp
push 0x5e9078
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov edx, dword [esi + 0x8c]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov ax, word [esi + 0x90]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x14], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x10]
push 0x10
push ecx
push edx
mov word [esp + 0x1c], 2
mov word [esp + 0x1e], ax
call sub.WSOCK32.dll_bind
test eax, eax
je 0x49c180
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x49c15f
cmp dword [eax + 0x1d4], ebp
jne 0x49c0ba
cmp dword [eax + 0x1dc], ebp
je 0x49c15f
call edi
cmp eax, 0x2741
jne 0x49c15f
push 0x5e902c
lea eax, [esp + 0x1c4]
push 0x5e1600
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x1c0]
push 0x24
push 0x5e3534
push ecx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x49c39c
mov edx, dword [esi + 0x18]
mov ecx, dword [esp + 0x5c8]
push 0x10
mov dword [edx + 0x1d4], ebp
mov eax, dword [esi + 0x18]
xor edx, edx
mov dword [eax + 0x1dc], ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [ecx], ebp
mov ax, word [esi + 0x90]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov edx, dword [esi + 8]
lea ecx, [esp + 0x14]
mov dword [esi + 0x8c], ebp
push ecx
push edx
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], ebp
mov word [esp + 0x1e], ax
call sub.WSOCK32.dll_bind
test eax, eax
je 0x49c17b
push ebp
push 0x5e8ffc
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov edi, 1
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x10]
push 0x10
push eax
push ecx
call sub.WSOCK32.dll_bind
test eax, eax
je 0x49c1b2
mov edx, dword [esi + 0xc]
push edx
call sub.WSOCK32.dll_closesocket
push ebp
push 0x5e8ff0
mov dword [esi + 0xc], 0xffffffff
call fcn.0043c4a0
add esp, 8
mov ecx, dword [esi + 8]
lea eax, [esp + 0xc]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x18], edi
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x49c1e9
push ebp
push str.ioctlsocket
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x49c221
lea edx, [esp + 0xc]
push edx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x49c221
push ebp
push str.ioctlsocket_tcp
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov ecx, dword [esi + 8]
lea eax, [esp + 0xc]
push 4
push eax
push 0x20
push 0xffff
push ecx
mov dword [esp + 0x20], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c25c
push ebp
push str.setsockopt__broadcast
call fcn.0043c4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8
mov eax, dword [esi + 8]
lea edx, [esp + 0x20]
push 4
push edx
push 0x1001
mov edi, 0x8000
push 0xffff
push eax
mov dword [esp + 0x34], 0x100000
mov dword [esp + 0x38], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c2b7
mov edx, dword [esi + 8]
lea ecx, [esp + 0x24]
push 4
push ecx
push 0x1001
push 0xffff
push edx
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c2b7
push ebp
push str.setsockopt___sendbuf
call fcn.0043c4a0
add esp, 8
mov ecx, dword [esi + 8]
lea eax, [esp + 0x20]
push 4
push eax
push 0x1002
push 0xffff
push ecx
mov dword [esp + 0x34], 0x100000
mov dword [esp + 0x38], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c30d
mov eax, dword [esi + 8]
lea edx, [esp + 0x24]
push 4
push edx
push 0x1002
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c30d
push ebp
push str.setsockopt___recvbuf
call fcn.0043c4a0
add esp, 8
mov eax, dword [esi + 0xc]
mov edi, 1
cmp eax, 0xffffffff
mov dword [esp + 0xc], edi
je 0x49c344
lea ecx, [esp + 0xc]
push 4
push ecx
push 4
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c344
push ebp
push str.setsockopt_tcp___reuseaddr
call fcn.0043c4a0
add esp, 8
mov eax, dword [esi + 8]
lea edx, [esp + 0x28]
push 4
push edx
push 4
push ebp
push eax
mov dword [esp + 0x3c], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x49c36d
push ebp
push str.setsockopt_tcp___multicastloop
call fcn.0043c4a0
add esp, 8
mov edx, dword [esi + 8]
lea ecx, [esp + 0x2c]
push 4
push ecx
push 3
push ebp
push edx
mov dword [esp + 0x40], 0x10
call sub.WSOCK32.dll_setsockopt
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x49c3aa
push 5
push eax
call sub.WSOCK32.dll_listen
test eax, eax
je 0x49c3aa
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x5b4
ret 8
mov eax, dword [esi + 0x8c]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov ecx, dword [esi + 0x90]
push eax
push 8
push edi
push ecx
mov ecx, esi
call sub.MFC42.DLL_CAsyncSocket::Create
test eax, eax
jne 0x49c3da
push ebp
push 0x5e8f38
call fcn.0043c4a0
add esp, 8
mov edx, dword [esi + 4]
push 5
push edx
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x49c3f8
push ebp
push str.Socket_Listen
call fcn.0043c4a0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x5b4
ret 8