Function at 0x509db5
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00508d4c
mov esi, eax
test esi, esi
je 0x50a048
mov eax, ebx
shr eax, 0x10
and ax, 0xffff
test ax, ax
je 0x509e1d
movzx edx, ax
mov dword [esi + 0x184], edx
cmp dword [0x56cdd8], 0
je 0x509e02
push 1
push 0x3c
push esi
push 0x56ded0
call fcn.00508df7
push esi
call fcn.00508cec
test eax, eax
je 0x50a048
xor ecx, ecx
mov dword [esi + 0x184], ecx
jmp 0x50a048
push 0
call fcn.0055ca2c
pop ecx
mov dword [esi + 0x180], eax
call fcn.00508ad8
mov ebx, eax
test ebx, ebx
jne 0x509e57
cmp dword [0x56cdd8], 0
je 0x50a048
push 4
push 0x3c
push esi
push 0x56dedc
call fcn.00508df7
jmp 0x50a048
mov dword [ebx + 0x14c], 2
push 0
call fcn.0055ca2c
pop ecx
mov edi, eax
mov dword [ebx + 0x17c], edi
mov dword [ebx + 0x180], edi
mov eax, dword [esi + 0x190]
mov dword [ebx + 0x190], eax
mov dword [ebp - 4], 0x10
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x1c]
push ecx
push dword [esi + 0x18c]
call sub.WSOCK32.dll_accept
mov edi, eax
mov dword [ebx + 0x18c], edi
cmp edi, 0xffffffff
jne 0x509ef8
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esi + 0x184], eax
cmp dword [0x56cdd8], 0
je 0x509ecd
push 2
push 0x3c
push esi
push 0x56dee8
call fcn.00508df7
push esi
call fcn.00508cec
test eax, eax
je 0x509edf
xor eax, eax
mov dword [esi + 0x184], eax
push ebx
call fcn.00508cec
test eax, eax
je 0x50a048
push ebx
call fcn.00508c2b
jmp 0x50a048
cmp dword [esi + 0x18c], 0xffffffff
je 0x509f47
mov dword [ebp - 8], 0x10
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 0x2c]
push ecx
push dword [esi + 0x18c]
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x509f47
push dword [ebp - 0x28]
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x64
lea eax, [esi + 0xca]
push eax
call fcn.0042e5e3
mov dx, word [ebp - 0x2a]
push edx
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x12e], ax
push dword [ebp - 0x18]
call sub.WSOCK32.dll_htonl
mov edx, eax
mov eax, edx
shr eax, 0x10
and ax, 0xffff
movzx eax, ax
movzx edx, dx
xor ecx, ecx
mov cl, dl
push ecx
movzx edx, dx
sar edx, 8
and dl, 0xff
xor ecx, ecx
mov cl, dl
push ecx
xor edx, edx
mov dl, al
push edx
movzx eax, ax
sar eax, 8
and al, 0xff
xor ecx, ecx
mov cl, al
push ecx
push 0x56def4
lea eax, [ebx + 0x64]
push eax
call sub.USER32.dll_wsprintfA
add esp, 0x18
mov dx, word [ebp - 0x1a]
push edx
call sub.WSOCK32.dll_ntohs
mov word [ebx + 0xc8], ax
cmp dword [0x56cdd8], 0
je 0x509fc9
push 0
push 0x3c
push esi
push str.SOCKLISTEN
call fcn.00508df7
push ebx
call fcn.00508cec
test eax, eax
je 0x50a048
cmp byte [ebx], 0
jne 0x509fd6
push ebx
call fcn.00508c2b
jmp 0x50a048
push dword [ebx + 0x18c]
call fcn.005279f5
push 0x23
push 0x8038
push dword [0x56f018]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_WSAAsyncSelect
cmp dword [ebx + 0x18c], 0xffffffff
je 0x50a048
mov dword [ebp - 0xc], 0x10
lea ecx, [ebp - 0xc]
push ecx
lea eax, [ebp - 0x3c]
push eax
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x50a048
push dword [ebp - 0x38]
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x64
lea edx, [ebx + 0xca]
push edx
call fcn.0042e5e3
mov cx, word [ebp - 0x3a]
push ecx
call sub.WSOCK32.dll_ntohs
mov word [ebx + 0x12e], ax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8