Function at 0x401d8c
Capabilities:
Get local ipv4 addresses
Get socket information
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
push ebx
lea eax, [ebp - 0x1c]
push esi
lea ecx, [ebp - 8]
push edi
mov esi, dword [ebp + 8]
push eax
push ecx
mov ecx, esi
call fcn.0040560a
test eax, eax
je 0x4021e4
push 0
mov eax, dword [ebp - 8]
movzx ecx, word [eax]
push 1
push ecx
call sub.WSOCK32.dll_socket
mov edi, eax
push 0x10
push 0
lea ecx, [ebp - 0x98]
push ecx
call sub.MSVCRT20.dll_memset
add esp, 0xc
mov eax, dword [ebp - 8]
mov ax, word [eax]
mov ecx, dword [ebp - 0x1c]
mov word [ebp - 0x98], ax
push ecx
lea eax, [ebp - 0x98]
mov dword [ebp - 4], ecx
push eax
push edi
call sub.WSOCK32.dll_bind
test eax, eax
jne 0x402144
push 2
push edi
call sub.WSOCK32.dll_listen
test eax, eax
jne 0x402144
push dword [ebp - 8]
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x98]
push ecx
push edi
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x401ebc
mov ebx, dword [esi + 4]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0xfc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], ecx
push 3
mov dword [esi + 4], edx
mov dword [esi + 8], 0x64
lea eax, [ebp - 0x88]
mov ecx, esi
mov dword [esi + 0xc], 0
mov byte [ebp - 0x88], 5
mov byte [ebp - 0x87], 0
mov byte [ebp - 0x86], 0
push eax
call fcn.004056b0
push 1
lea ecx, [ebp - 0x98]
push ecx
push esi
call fcn.004014c1
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
push ecx
mov dword [esi + 4], ebx
mov ecx, esi
mov dword [esi + 8], eax
lea eax, [ebp - 0xfc]
mov dword [esi + 0xc], edx
push eax
call fcn.004056b0
jmp 0x401ec7
push 0
mov ecx, esi
push 0
call section..text
mov ecx, esi
call fcn.0040584e
cmp eax, edi
mov ebx, eax
jae 0x401ed6
mov ebx, edi
mov dword [ebp - 0x264], 0
mov ecx, esi
call fcn.0040584e
mov dword [ebp - 0x260], eax
inc dword [ebp - 0x264]
cmp dword [ebp - 0x264], 0x40
jae 0x401f0f
mov eax, dword [ebp - 0x264]
mov dword [ebp + eax*4 - 0x260], edi
inc dword [ebp - 0x264]
mov ecx, esi
call fcn.00405855
push eax
call fcn.00404d3d
add esp, 4
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x264]
push eax
inc ebx
mov dword [ebp - 0x20], 0
push 0
push 0
push ecx
push ebx
call sub.WSOCK32.dll_select
lea ecx, [ebp - 0x264]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x40212e
lea eax, [ebp - 4]
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], 0x10
push eax
push ecx
push edi
call sub.WSOCK32.dll_accept
mov ebx, eax
push edi
call sub.WSOCK32.dll_closesocket
lea eax, [ebp - 0x98]
lea ecx, [ebp - 0xfc]
push eax
call fcn.00405067
lea ecx, [ebp - 0xfc]
call fcn.004051ee
mov edi, eax
mov ecx, esi
call fcn.00405602
push eax
mov dword [ebp - 0xc], eax
push edi
call sub.MSVCRT20.dll_strcmp
add esp, 8
mov dword [ebp - 0x18], eax
push edi
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x402059
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edi, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0xc], ecx
push 3
mov dword [esi + 4], eax
mov dword [esi + 8], 0x64
mov dword [esi + 0xc], 0
mov byte [ebp - 0x88], 5
mov byte [ebp - 0x87], 1
mov byte [ebp - 0x86], 0
lea ecx, [ebp - 0x88]
push ecx
mov ecx, esi
call fcn.004056b0
push 1
push 0
push esi
call fcn.004014c1
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
push ecx
mov dword [esi + 4], eax
lea eax, [ebp - 0x160]
mov ecx, esi
push eax
mov dword [esi + 8], edx
mov dword [esi + 0xc], edi
call fcn.004056b0
push ebx
call sub.WSOCK32.dll_closesocket
lea ecx, [ebp - 0xfc]
call fcn.00405107
jmp 0x4021e4
lea eax, [ebp - 4]
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], 0x10
push eax
push ecx
push ebx
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x4020f1
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edi, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0xc], ecx
mov dword [esi + 8], 0x64
push 3
mov dword [esi + 4], eax
xor eax, eax
lea ecx, [ebp - 0x88]
push ecx
mov dword [esi + 0xc], eax
mov byte [ebp - 0x88], 5
mov ecx, esi
mov byte [ebp - 0x87], al
mov byte [ebp - 0x86], al
call fcn.004056b0
push 1
lea ecx, [ebp - 0x98]
push ecx
push esi
call fcn.004014c1
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
push ecx
mov dword [esi + 4], eax
lea eax, [ebp - 0x160]
mov ecx, esi
push eax
mov dword [esi + 8], edx
mov dword [esi + 0xc], edi
call fcn.004056b0
jmp 0x4020fc
push 0
mov ecx, esi
push 0
call section..text
push 0
push 1
push 0
push esi
call fcn.0040320d
add esp, 0x10
mov ecx, esi
push ebx
call fcn.00405859
push ebx
call sub.WSOCK32.dll_closesocket
lea ecx, [ebp - 0xfc]
call fcn.00405107
mov eax, 1
jmp 0x4021e6
push 0
mov ecx, esi
push 1
call section..text
push edi
call sub.WSOCK32.dll_closesocket
jmp 0x4021e4
push edi
call sub.WSOCK32.dll_closesocket
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0xc], ecx
push 3
mov dword [esi + 4], eax
mov dword [esi + 8], 0x64
lea edx, [ebp - 0x88]
mov ecx, esi
mov dword [esi + 0xc], 0
push edx
lea edi, [ebp - 0xfb]
mov byte [ebp - 0x88], 5
mov byte [ebp - 0x87], 1
mov byte [ebp - 0x86], 0
call fcn.004056b0
xor eax, eax
push 7
mov byte [ebp - 0xfc], 1
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xfc]
mov ecx, esi
push eax
call fcn.004056b0
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
push ecx
mov ecx, esi
mov dword [esi + 4], eax
lea eax, [ebp - 0x160]
mov dword [esi + 8], ebx
push eax
mov dword [esi + 0xc], edx
call fcn.004056b0
push dword [ebp - 8]
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret