Function at 0x508289
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.00507220
mov esi, eax
test esi, esi
je 0x50851c
mov eax, ebx
shr eax, 0x10
and ax, 0xffff
test ax, ax
je 0x5082f1
movzx edx, ax
mov dword [esi + 0x184], edx
cmp dword [0x56acb4], 0
je 0x5082d6
push 1
push 0x3c
push esi
push 0x56bda0
call fcn.005072cb
push esi
call fcn.005071c0
test eax, eax
je 0x50851c
xor ecx, ecx
mov dword [esi + 0x184], ecx
jmp 0x50851c
push 0
call fcn.0055aa70
pop ecx
mov dword [esi + 0x180], eax
call fcn.00506fac
mov ebx, eax
test ebx, ebx
jne 0x50832b
cmp dword [0x56acb4], 0
je 0x50851c
push 4
push 0x3c
push esi
push 0x56bdac
call fcn.005072cb
jmp 0x50851c
mov dword [ebx + 0x14c], 2
push 0
call fcn.0055aa70
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 0x5083cc
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esi + 0x184], eax
cmp dword [0x56acb4], 0
je 0x5083a1
push 2
push 0x3c
push esi
push 0x56bdb8
call fcn.005072cb
push esi
call fcn.005071c0
test eax, eax
je 0x5083b3
xor eax, eax
mov dword [esi + 0x184], eax
push ebx
call fcn.005071c0
test eax, eax
je 0x50851c
push ebx
call fcn.005070ff
jmp 0x50851c
cmp dword [esi + 0x18c], 0xffffffff
je 0x50841b
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 0x50841b
push dword [ebp - 0x28]
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x64
lea eax, [esi + 0xca]
push eax
call fcn.0042e322
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 0x56bdc4
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 [0x56acb4], 0
je 0x50849d
push 0
push 0x3c
push esi
push str.SOCKLISTEN
call fcn.005072cb
push ebx
call fcn.005071c0
test eax, eax
je 0x50851c
cmp byte [ebx], 0
jne 0x5084aa
push ebx
call fcn.005070ff
jmp 0x50851c
push dword [ebx + 0x18c]
call fcn.00525bcd
push 0x23
push 0x8038
push dword [0x56cee8]
push dword [ebx + 0x18c]
call sub.WSOCK32.dll_WSAAsyncSelect
cmp dword [ebx + 0x18c], 0xffffffff
je 0x50851c
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 0x50851c
push dword [ebp - 0x38]
call sub.WSOCK32.dll_inet_ntoa
push eax
push 0x64
lea edx, [ebx + 0xca]
push edx
call fcn.0042e322
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