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

Disassembly:
sub esp, 0x5b4
lea eax, [esp + 0x24]
push ebx
push ebp
push esi
push edi
push eax
mov esi, ecx
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4895fd
push 0
push str.WSAStart__
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
xor ebp, ebp
mov edi, 2
push ebp
push edi
push edi
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x489630
push ebp
push 0x5dec1c
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov eax, dword [esp + 0x5c8]
mov ebx, 1
cmp eax, ebx
je 0x48964f
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x5b4
ret 8
push ebp
push ebx
push edi
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x48967c
push ebp
push 0x5dec04
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov edx, dword [esi + 0x84]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov ax, word [esi + 0x88]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x18], edx
mov edx, dword [esi]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x14]
push 0x10
push ecx
push edx
mov word [esp + 0x20], di
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4897a2
mov eax, dword [esi + 0x10]
cmp eax, ebp
je 0x489785
cmp dword [eax + 0x1d0], ebp
jne 0x4896df
cmp dword [eax + 0x1d8], ebp
je 0x489785
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2741
jne 0x489785
push 0x5debb8
lea eax, [esp + 0x1c8]
push 0x5d77ac
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x1c4]
push 0x24
push 0x5d959c
push ecx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x4899b6
mov edx, dword [esi + 0x10]
mov ecx, dword [esp + 0x5cc]
push 0x10
mov dword [edx + 0x1d0], ebp
mov eax, dword [esi + 0x10]
xor edx, edx
mov dword [eax + 0x1d8], ebp
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [ecx], ebp
mov ax, word [esi + 0x88]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov edx, dword [esi]
lea ecx, [esp + 0x18]
mov dword [esi + 0x84], ebp
push ecx
push edx
mov word [esp + 0x20], di
mov dword [esp + 0x24], ebp
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4897a2
push ebp
push 0x5deb88
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov ecx, dword [esi + 4]
lea eax, [esp + 0x14]
push 0x10
push eax
push ecx
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4897d4
mov edx, dword [esi + 4]
push edx
call sub.WSOCK32.dll_closesocket
push ebp
push 0x5deb7c
mov dword [esi + 4], 0xffffffff
call fcn.00438bb0
add esp, 8
mov ecx, dword [esi]
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x1c], ebx
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x48980b
push ebp
push str.ioctlsocket
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x489844
lea edx, [esp + 0x10]
push edx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x489844
push ebp
push str.ioctlsocket_tcp
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov ecx, dword [esi]
lea eax, [esp + 0x10]
push 4
push eax
push 0x20
push 0xffff
push ecx
mov dword [esp + 0x24], ebx
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x48987f
push ebp
push str.setsockopt__broadcast
call fcn.00438bb0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8
mov eax, dword [esi]
lea edx, [esp + 0x24]
push 4
push edx
push 0x1001
mov ebx, 0x100000
mov edi, 0x8000
push 0xffff
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4898d9
mov edx, dword [esi]
lea ecx, [esp + 0x28]
push 4
push ecx
push 0x1001
push 0xffff
push edx
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4898d9
push ebp
push str.setsockopt___sendbuf
call fcn.00438bb0
add esp, 8
mov ecx, dword [esi]
lea eax, [esp + 0x24]
push 4
push eax
push 0x1002
push 0xffff
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x489929
mov eax, dword [esi]
lea edx, [esp + 0x28]
push 4
push edx
push 0x1002
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x489929
push ebp
push str.setsockopt___recvbuf
call fcn.00438bb0
add esp, 8
mov eax, dword [esi + 4]
mov edi, 1
cmp eax, 0xffffffff
mov dword [esp + 0x10], edi
je 0x489960
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0xffff
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x489960
push ebp
push str.setsockopt_tcp___reuseaddr
call fcn.00438bb0
add esp, 8
mov eax, dword [esi]
lea edx, [esp + 0x2c]
push 4
push edx
push 4
push ebp
push eax
mov dword [esp + 0x40], edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x489988
push ebp
push str.setsockopt_tcp___multicastloop
call fcn.00438bb0
add esp, 8
mov edx, dword [esi]
lea ecx, [esp + 0x30]
push 4
push ecx
push 3
push ebp
push edx
mov dword [esp + 0x44], 0x10
call sub.WSOCK32.dll_setsockopt
mov esi, dword [esi + 4]
cmp esi, 0xffffffff
je 0x4899c5
push 5
push esi
call sub.WSOCK32.dll_listen
test eax, eax
je 0x4899c5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x5b4
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 8