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

Disassembly:
sub esp, 0x19c
mov eax, dword [0x10098688]
xor eax, esp
mov dword [esp + 0x198], eax
push ebx
mov ebx, dword [esp + 0x1a4]
push esi
xor edx, edx
push edi
mov edi, dword [ebx]
mov dword [esp + 0x10], edx
movzx eax, word [edi + 0x1b8]
mov esi, dword [edi + 0x474]
mov ecx, dword [edi + 0x1bc]
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], ecx
test esi, esi
jne 0x10035876
test ax, ax
jne 0x10035876
xor eax, eax
jmp 0x10035be1
push ebp
push 0x80
push edx
lea eax, [esp + 0x30]
push eax
call fcn.1005ec70
add esp, 0xc
test esi, esi
je 0x10035ad2
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10035897
sub ecx, edx
mov eax, 0xff
cmp ecx, eax
jae 0x10035ad2
push eax
lea eax, [esp + 0xad]
push 0
push eax
mov byte [esp + 0xb4], 0
call fcn.1005ec70
mov edx, dword [0x10098354]
mov ecx, edx
add esp, 0xc
and dword [esp + 0x20], 0
lea ebp, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100358d8
sub ecx, ebp
push ecx
push esi
push edx
call fcn.1005ff40
add esp, 0xc
push 2
pop ebp
test eax, eax
jne 0x10035977
mov ecx, dword [0x10098354]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10035900
sub ecx, edx
add esi, ecx
mov dword [esp + 0x20], 1
push 0x100
lea eax, [esp + 0xac]
push eax
push esi
push dword [ebx + 0x90]
push dword [esp + 0x1cc]
push dword [esp + 0x1cc]
call fcn.1002ca04
add esp, 0x18
sub eax, 0
je 0x10035abf
dec eax
je 0x10035ab7
dec eax
jne 0x10035a98
push dword [esp + 0x1b8]
lea eax, [esp + 0xac]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.100346c5
add esp, 0x14
jmp 0x10035a53
mov edx, dword [str.host_]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x1c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10035986
sub ecx, dword [esp + 0x1c]
push ecx
push esi
push edx
call fcn.1005ff40
add esp, 0xc
test eax, eax
jne 0x10035913
mov ecx, dword [str.host_]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100359ad
sub ecx, edx
add esi, ecx
mov eax, dword [ebx + 0x478]
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1b8], ebp
jne 0x100359d5
mov dword [ebx + 0x478], 1
lea eax, [esp + 0x14]
push eax
push 0
push esi
push ebx
call fcn.1002c42d
add esp, 0x10
cmp eax, 1
jne 0x100359f8
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.1002bc45
pop ecx
pop ecx
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x478], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10035aa3
push 0x100
lea ecx, [esp + 0xac]
push ecx
push dword [eax]
call fcn.1002c405
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x1cc]
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.100346c5
push dword [esp + 0x38]
push edi
call fcn.1002c583
add esp, 0x2c
cmp dword [esp + 0x1b8], ebp
jne 0x10035ae4
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0xac]
push eax
push ebp
call fcn.1003ec00
mov esi, dword [esp + 0x24]
add esp, 0xc
test eax, eax
jle 0x10035ae8
push esi
mov word [esp + 0x2c], bp
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [esp + 0x2e], ax
pop eax
mov dword [esp + 0x10], eax
jmp 0x10035aec
cmp dword [esp + 0x20], 0
je 0x100359b8
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.10034609
add esp, 0xc
jmp 0x10035b9f
xor eax, eax
inc eax
jmp 0x10035be0
cmp dword [esp + 0x20], 0
je 0x100359b8
push esi
push str.Couldnt_bind_to_interface__s
jmp 0x10035aa9
mov esi, dword [esp + 0x18]
push 2
pop ebp
cmp dword [esp + 0x1b8], ebp
jne 0x10035ae8
jmp 0x10035a7e
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push eax
jmp 0x10035b2a
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
test eax, eax
jle 0x10035ba4
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.100346c5
add esp, 0xc
inc esi
cmp word [esp + 0x28], bp
jne 0x10035b26
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2a], ax
push dword [esp + 0x10]
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x1bc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x10035aef
mov eax, 0x80
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0xac]
push 0
push eax
call fcn.1005ec70
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xac]
push eax
push dword [esp + 0x1bc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x10035bc2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.100409d4
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.10034609
add esp, 0x18
push 0x2d
pop eax
jmp 0x10035be0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
mov dword [edi + 0x47e4], esi
call fcn.100409d4
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x10035b96
movzx eax, si
push eax
push str.Local_port:__hu_n
push edi
call fcn.100346c5
add esp, 0xc
mov dword [ebx + 0x42c], 1
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x1a4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1005c9a6
add esp, 0x19c
ret