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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5c1334]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, ecx
mov dword [ebp - 0x21c], edx
push ebx
push esi
push edi
mov ebx, dword [eax]
mov dword [ebp - 0x210], eax
push 0x100
push 0
mov eax, dword [ebx + 0x1c4]
movzx esi, word [ebx + 0x1c0]
mov edi, dword [ebx + 0x3dc]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x10c]
push eax
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x214], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test edi, edi
jne 0x494e36
test si, si
je 0x49517f
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test edi, edi
je 0x494fec
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x494e60
sub ecx, edx
cmp ecx, 0xff
jae 0x494fec
push 3
push edi
push 0x59a6e4
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x494eb2
add edi, 3
push edi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.00494100
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
push 5
push edi
push str.host_
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x494eca
add edi, 5
cmp dword [ebp + 8], 2
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax + 0x2c8]
mov dword [ebp - 0x220], ecx
jne 0x494eec
mov dword [eax + 0x2c8], 1
lea ecx, [ebp - 0x214]
mov edx, edi
push ecx
push 0
mov ecx, eax
call fcn.004971f0
add esp, 8
cmp eax, 1
jne 0x494f17
mov ecx, dword [ebp - 0x210]
lea edx, [ebp - 0x214]
call fcn.004a1140
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp - 0x220]
mov dword [eax + 0x2c8], ecx
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x494fc7
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.00496ec0
mov eax, dword [ebp - 0x214]
add esp, 4
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.00494040
mov edx, dword [ebp - 0x214]
add esp, 0x18
mov ecx, ebx
call fcn.00497480
cmp dword [ebp + 8], 2
jne 0x495019
lea eax, [ebp - 0x188]
push eax
lea edx, [ebp - 0x10c]
call fcn.004adc20
add esp, 4
test eax, eax
jle 0x495019
mov eax, 2
push esi
mov word [ebp - 0x18c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18a], ax
mov eax, 0x10
mov dword [ebp - 0x218], eax
jmp 0x49501b
push edi
push str.Couldnt_bind_to__s
push ebx
call fcn.00494100
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 2
jne 0x495019
mov eax, 2
push esi
mov word [ebp - 0x18c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18a], ax
mov eax, 0x10
mov dword [ebp - 0x218], eax
jmp 0x49501b
xor eax, eax
mov edi, dword [sym.imp.WS2_32.dll_bind]
push eax
lea eax, [ebp - 0x18c]
push eax
push dword [ebp - 0x21c]
call edi
test eax, eax
jns 0x495099
nop word [eax + eax]
mov eax, dword [ebp - 0x224]
dec eax
mov dword [ebp - 0x224], eax
test eax, eax
jle 0x49511c
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.00494040
add esp, 0xc
inc esi
cmp word [ebp - 0x18c], 2
jne 0x495080
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
push dword [ebp - 0x218]
lea eax, [ebp - 0x18c]
push eax
push dword [ebp - 0x21c]
call edi
test eax, eax
js 0x495040
push 0x80
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x220], 0x80
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x49515d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x210]
mov esi, eax
mov edx, esi
mov dword [ebx + 0x863c], esi
call fcn.00490350
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00494100
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x210]
mov esi, eax
mov edx, esi
mov dword [ebx + 0x863c], esi
call fcn.00490350
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.00494100
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
movzx eax, si
push eax
push str.Local_port:__hu_n
push ebx
call fcn.00494040
mov eax, dword [ebp - 0x210]
add esp, 0xc
mov dword [eax + 0x2a8], 1
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00528802
mov esp, ebp
pop ebp
ret