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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x47c
push esi
push edi
lea edi, [ebp - 0x47c]
mov ecx, 0x11f
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4b965c]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x88]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x94], 0
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x98], ecx
lea edx, [ebp - 0x88]
mov dword [ebp - 0x9c], edx
mov dword [ebp - 0xa4], 0
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x188]
mov word [ebp - 0xac], cx
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x18a]
mov dword [ebp - 0xb0], eax
mov ecx, 4
shl ecx, 3
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x4e4]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jne 0x47f733
movzx ecx, word [ebp - 0xac]
test ecx, ecx
jne 0x47f733
xor eax, eax
jmp 0x47fe64
push 0x80
push 0
lea edx, [ebp - 0x88]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp - 0xb4], 0
je 0x47fbdb
mov eax, dword [ebp - 0xb4]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
cmp eax, 0xff
jae 0x47fbdb
mov cl, byte [0x4ba898]
mov byte [ebp - 0x1bc], cl
push 0xff
push 0
lea edx, [ebp - 0x1bb]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1c4], 0
mov byte [ebp - 0x1c5], 0
mov byte [ebp - 0x1c6], 0
mov eax, dword [0x4b59e0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, esp
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [0x4b59e0]
push edx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
cmp esi, esp
call fcn.004a09b1
test eax, eax
jne 0x47f800
mov eax, dword [0x4b59e0]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, dword [ebp - 0xb4]
mov dword [ebp - 0xb4], eax
mov byte [ebp - 0x1c5], 1
jmp 0x47f855
mov ecx, dword [str.host_]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, esp
push eax
mov edx, dword [ebp - 0xb4]
push edx
mov eax, dword [str.host_]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
cmp esi, esp
call fcn.004a09b1
test eax, eax
jne 0x47f855
mov ecx, dword [str.host_]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, dword [ebp - 0xb4]
mov dword [ebp - 0xb4], eax
mov byte [ebp - 0x1c6], 1
movzx edx, byte [ebp - 0x1c6]
test edx, edx
jne 0x47f921
push 0x100
lea eax, [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x464]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
call fcn.0049a070
add esp, 0x18
mov dword [ebp - 0x47c], eax
cmp dword [ebp - 0x47c], 0
je 0x47f8b4
cmp dword [ebp - 0x47c], 1
je 0x47f8e3
cmp dword [ebp - 0x47c], 2
je 0x47f8ed
jmp 0x47f921
movzx eax, byte [ebp - 0x1c5]
test eax, eax
je 0x47f8e1
mov ecx, dword [ebp - 0xb4]
push ecx
push str.Couldnt_bind_to_interface__s
mov edx, dword [ebp + 8]
push edx
call fcn.0042e770
add esp, 0xc
mov eax, 0x2d
jmp 0x47fe64
jmp 0x47f921
mov eax, 1
jmp 0x47fe64
mov byte [ebp - 0x1c5], 1
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0xb4]
push edx
push str.Local_Interface__s_is_ip__s_using_address_family__i
mov eax, dword [ebp + 8]
push eax
call fcn.0042e8d0
add esp, 0x14
mov dword [ebp - 0x1c4], 1
movzx ecx, byte [ebp - 0x1c5]
test ecx, ecx
jne 0x47fa4c
mov edx, dword [ebp + 0xc]
mov al, byte [edx + 0x470]
mov byte [ebp - 0x1c7], al
cmp dword [ebp + 0x14], 2
jne 0x47f951
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x470], 1
jmp 0x47f961
cmp dword [ebp + 0x14], 0x17
jne 0x47f961
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x470], 2
lea eax, [ebp - 0xa4]
push eax
push 0
push 0x50
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0043dd30
add esp, 0x14
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 1
jne 0x47f9a1
lea eax, [ebp - 0xa4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041a770
add esp, 8
mov edx, dword [ebp + 0xc]
mov al, byte [ebp - 0x1c7]
mov byte [edx + 0x470], al
cmp dword [ebp - 0xa4], 0
je 0x47fa42
push 0x100
lea ecx, [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0xa4]
mov eax, dword [edx]
push eax
call fcn.0043e560
add esp, 0xc
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push eax
lea ecx, [ebp - 0x1bc]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0xb4]
push eax
push str.Name__s_family__i_resolved_to__s_family__i
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e8d0
add esp, 0x18
mov edx, dword [ebp - 0xa4]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0043e320
add esp, 8
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x14]
cmp eax, dword [edx + 4]
je 0x47fa36
mov eax, 1
jmp 0x47fe64
mov dword [ebp - 0x1c4], 1
jmp 0x47fa4c
mov dword [ebp - 0x1c4], 0xffffffff
cmp dword [ebp - 0x1c4], 0
jle 0x47fba1
cmp dword [ebp + 0x14], 0x17
jne 0x47fb43
push 0x25
lea ecx, [ebp - 0x1bc]
push ecx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1d0], eax
cmp dword [ebp - 0x1d0], 0
je 0x47fa9b
mov edx, dword [ebp - 0x1d0]
mov byte [edx], 0
mov eax, dword [ebp - 0x1d0]
add eax, 1
mov dword [ebp - 0x1d0], eax
mov ecx, dword [ebp - 0x9c]
add ecx, 8
push ecx
lea edx, [ebp - 0x1bc]
push edx
push 0x17
call fcn.00456ce0
add esp, 0xc
test eax, eax
jle 0x47fb37
mov eax, 0x17
mov ecx, dword [ebp - 0x9c]
mov word [ecx], ax
mov esi, esp
movzx edx, word [ebp - 0xac]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.004a09b1
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
cmp dword [ebp - 0x1d0], 0
je 0x47fb37
mov esi, esp
push 0xa
push 0
mov edx, dword [ebp - 0x1d0]
push edx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
add esp, 0xc
cmp esi, esp
call fcn.004a09b1
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0xffffffff
jbe 0x47fb28
mov eax, 1
jmp 0x47fe64
mov eax, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0x1d4]
mov dword [eax + 0x18], ecx
mov dword [ebp - 0x94], 0x1c
jmp 0x47fba1
cmp dword [ebp + 0x14], 2
jne 0x47fba1
mov edx, dword [ebp - 0x98]
add edx, 4
push edx
lea eax, [ebp - 0x1bc]
push eax
push 2
call fcn.00456ce0
add esp, 0xc
test eax, eax
jle 0x47fba1
mov ecx, 2
mov edx, dword [ebp - 0x98]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xac]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.004a09b1
mov ecx, dword [ebp - 0x98]
mov word [ecx + 2], ax
mov dword [ebp - 0x94], 0x10
cmp dword [ebp - 0x1c4], 1
jge 0x47fbd6
mov edx, dword [ebp + 8]
mov byte [edx + 0xd57], 0
mov eax, dword [ebp - 0xb4]
push eax
push str.Couldnt_bind_to__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e770
add esp, 0xc
mov eax, 0x2d
jmp 0x47fe64
jmp 0x47fc5b
cmp dword [ebp + 0x14], 0x17
jne 0x47fc1c
mov edx, 0x17
mov eax, dword [ebp - 0x9c]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xac]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.004a09b1
mov edx, dword [ebp - 0x9c]
mov word [edx + 2], ax
mov dword [ebp - 0x94], 0x1c
jmp 0x47fc5b
cmp dword [ebp + 0x14], 2
jne 0x47fc5b
mov eax, 2
mov ecx, dword [ebp - 0x98]
mov word [ecx], ax
mov esi, esp
movzx edx, word [ebp - 0xac]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.004a09b1
mov ecx, dword [ebp - 0x98]
mov word [ecx + 2], ax
mov dword [ebp - 0x94], 0x10
mov esi, esp
mov edx, dword [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x90]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp esi, esp
call fcn.004a09b1
test eax, eax
jl 0x47fd55
mov dword [ebp - 0x264], 0x80
push 0x80
push 0
lea edx, [ebp - 0x258]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, esp
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebp - 0x258]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp esi, esp
call fcn.004a09b1
test eax, eax
jge 0x47fd2b
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.004a09b1
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xb8]
mov dword [eax + 0x934], ecx
push 0x100
lea edx, [ebp - 0x36c]
push edx
mov eax, dword [ebp - 0xb8]
push eax
call fcn.00409790
add esp, 0xc
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
push 0x4b5a84
mov edx, dword [ebp + 8]
push edx
call fcn.0042e770
add esp, 0x10
mov eax, 0x2d
jmp 0x47fe64
movzx eax, word [ebp - 0xac]
push eax
push str.Local_port:__hu
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e8d0
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x1f6], 1
xor eax, eax
jmp 0x47fe64
mov eax, dword [ebp - 0xb0]
sub eax, 1
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0
jle 0x47fe00
mov cx, word [ebp - 0xac]
add cx, 1
mov word [ebp - 0xac], cx
movzx edx, word [ebp - 0xac]
test edx, edx
jne 0x47fd90
jmp 0x47fe07
movzx eax, word [ebp - 0xac]
sub eax, 1
push eax
push str.Bind_to_local_port__d_failed__trying_next
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e8d0
add esp, 0xc
mov edx, dword [ebp - 0x90]
movzx eax, word [edx]
cmp eax, 2
jne 0x47fddd
mov esi, esp
movzx ecx, word [ebp - 0xac]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.004a09b1
mov edx, dword [ebp - 0x98]
mov word [edx + 2], ax
jmp 0x47fdfe
mov esi, esp
movzx eax, word [ebp - 0xac]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.004a09b1
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
jmp 0x47fe02
jmp 0x47fe07
jmp 0x47fc5b
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.004a09b1
mov dword [ebp - 0xb8], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xb8]
mov dword [edx + 0x934], eax
push 0x100
lea ecx, [ebp - 0x474]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
call fcn.00409790
add esp, 0xc
push eax
mov eax, dword [ebp - 0xb8]
push eax
push str.bind_failed_with_errno__d:__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e770
add esp, 0x10
mov eax, 0x2d
push edx
mov ecx, ebp
push eax
lea edx, [0x47fe94]
call fcn.004a095d
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a039d
add esp, 0x47c
cmp ebp, esp
call fcn.004a09b1
mov esp, ebp
pop ebp
ret