Function at 0x4101f0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x45f91c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x10
push eax
lea eax, [ebp - 0x3c]
xorps xmm0, xmm0
push eax
push dword [ebp + 8]
movups xmmword [ebp - 0x3c], xmm0
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
xorps xmm0, xmm0
mov dword [ebp - 0x64], esi
test esi, esi
jns 0x410272
sub esp, 0x10
movq qword [ebp - 0x44], xmm0
lea eax, [ebp - 0x44]
movlpd qword [ebp - 0x54], xmm0
mov dword [ebp - 0x4c], eax
mov eax, esp
movups xmm0, xmmword [ebp - 0x54]
push str.error_accept_new_connection
push str.pvpgn::d2cs::server_accept
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
push 0x16
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 0x38]
mov word [ebp - 8], 0
push eax
push 2
movups xmmword [ebp - 0x1c], xmm0
call sub.WS2_32.dll_inet_ntop
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x54], 0xa
mov dword [ebp - 0x44], eax
sub esp, 0x10
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov eax, esp
push str.accept_connection_from_
mov dword [ebp - 0x50], 0
movups xmm0, xmmword [ebp - 0x54]
push str.pvpgn::d2cs::server_accept
push 4
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
mov dword [ebp - 0x5c], 1
lea eax, [ebp - 0x5c]
push 4
push eax
push 8
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x410326
sub esp, 0x10
lea eax, [ebp - 0x44]
xorps xmm0, xmm0
mov dword [ebp - 0x4c], eax
mov eax, esp
movq qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x54], xmm0
movups xmm0, xmmword [ebp - 0x54]
push str.error_set_sock_option_keep_alive
push str.pvpgn::d2cs::server_accept
push 8
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
push 0x8004667e
push esi
call fcn.0041fa10
add esp, 8
xorps xmm0, xmm0
test eax, eax
jns 0x410386
sub esp, 0x10
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov eax, esp
push str.error_set_socket_to_non_blocking_mode
movq qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x54], xmm0
movups xmm0, xmmword [ebp - 0x54]
push str.pvpgn::d2cs::server_accept
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x60]
mov dword [ebp - 0x60], 0x10
push eax
lea eax, [ebp - 0x2c]
xor edi, edi
push eax
push esi
movups xmmword [ebp - 0x2c], xmm0
xor ebx, ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4103dd
sub esp, 0x10
lea eax, [ebp - 0x44]
xorps xmm0, xmm0
mov dword [ebp - 0x4c], eax
mov eax, esp
movq qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x54], xmm0
movups xmm0, xmmword [ebp - 0x54]
push str.unable_to_get_local_socket_info
push str.pvpgn::d2cs::server_accept
push 8
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
jmp 0x41043c
mov ax, word [ebp - 0x2c]
cmp ax, 2
je 0x410425
movzx eax, ax
sub esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov eax, esp
push str.got_bad_socket_family_
mov dword [ebp - 0x54], 3
mov dword [ebp - 0x50], ebx
movups xmm0, xmmword [ebp - 0x54]
push str.pvpgn::d2cs::server_accept
push 8
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
jmp 0x41043c
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_ntohl]
push dword [ebp - 0x2a]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
push dword [ebp - 0x3a]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [ebp - 0x38]
call dword [sym.imp.WS2_32.dll_ntohl]
push eax
push edi
push ebx
push esi
call fcn.00402760
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x41047c
sub esp, 0x10
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
xorps xmm0, xmm0
mov eax, esp
push str.error_create_new_connection
jmp 0x41034b
push 0x410030
push 1
push edi
call fcn.004017b0
add esp, 0xc
test eax, eax
jns 0x4104c4
lea eax, [ebp - 0x64]
push eax
push str.error_adding_socket__to_fdwatch_pool__max_sockets__
push str.pvpgn::d2cs::server_accept
push 0x10
call fcn.00409a00
push 0x20
push edi
call fcn.00403060
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004217ea
mov esp, ebp
pop ebp
ret