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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
mov eax, dword [0x100554b0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
mov ecx, dword [ebx + 0x184]
push esi
movzx esi, word [ebx + 0x180]
push edi
mov edi, dword [ebx + 0x43c]
mov dword [ebp - 0x190], eax
xor eax, eax
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x1a0], esi
mov dword [ebp - 0x1a4], ecx
cmp edi, eax
jne 0x100022fb
cmp si, ax
je 0x1000260a
push 0x80
push eax
lea edx, [ebp - 0x18c]
push edx
call fcn.1003e2a0
add esp, 0xc
test edi, edi
je 0x100024df
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002320
sub eax, edx
cmp eax, 0xff
jae 0x100024df
push 0xff
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], cl
call fcn.1003e2a0
add esp, 0xc
push 3
push edi
push 0x1004bc74
mov dword [ebp - 0x19c], 0
call fcn.10035f7d
add esp, 0xc
test eax, eax
jne 0x10002376
add edi, 3
lea ecx, [eax + 1]
jmp 0x10002395
push 5
push edi
push str.host_
call fcn.10035f7d
add esp, 0xc
test eax, eax
jne 0x1000238f
add edi, 5
jmp 0x100023fa
mov ecx, dword [ebp - 0x19c]
call sym.libcurl.dll_curl_pushheader_byname
sub eax, 0
je 0x100023da
dec eax
je 0x100023c4
dec eax
jne 0x100023f2
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x10c]
push edx
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebx
call fcn.10022c60
add esp, 0x14
jmp 0x100024a2
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x100023fa
push edi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.10022ce0
add esp, 0xc
jmp 0x1000264a
test ecx, ecx
jne 0x100024cb
cmp dword [ebp + 0x10], 2
mov esi, dword [ebp - 0x190]
mov eax, dword [esi + 0x318]
mov dword [ebp - 0x19c], eax
jne 0x1000241c
mov dword [esi + 0x318], 1
lea ecx, [ebp - 0x198]
push ecx
push 0
push edi
push esi
call fcn.10010e50
add esp, 0x10
cmp eax, 1
jne 0x10002443
lea edx, [ebp - 0x198]
push edx
call fcn.10001370
add esp, 4
mov eax, dword [ebp - 0x19c]
mov dword [esi + 0x318], eax
mov eax, dword [ebp - 0x198]
test eax, eax
je 0x100024cb
mov ecx, dword [eax]
push 0x100
lea esi, [ebp - 0x10c]
call fcn.10010b10
mov esi, dword [ebp - 0x198]
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, dword [ebp + 0x10]
add esp, 4
push edx
lea eax, [ebp - 0x10c]
push eax
push ecx
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.10022c60
push esi
mov eax, ebx
call fcn.10010ff0
mov esi, dword [ebp - 0x1a0]
add esp, 0x1c
cmp dword [ebp + 0x10], 2
jne 0x10002509
lea eax, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.100185f0
test eax, eax
jle 0x10002509
mov edx, 2
mov word [ebp - 0x18c], dx
jmp 0x100024f1
push edi
push str.Couldnt_bind_to__s
push ebx
call fcn.10022ce0
add esp, 0xc
jmp 0x1000264a
cmp dword [ebp + 0x10], 2
jne 0x10002509
mov eax, 2
mov word [ebp - 0x18c], ax
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x194], 0x10
mov word [ebp - 0x18a], ax
mov ecx, dword [ebp - 0x194]
mov edi, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x18c]
push edx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x10002589
jmp 0x10002530
mov eax, dword [ebp - 0x1a4]
dec eax
mov dword [ebp - 0x1a4], eax
test eax, eax
jle 0x1000261d
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.10022c60
add esp, 0xc
inc esi
cmp word [ebp - 0x18c], 2
jne 0x10002570
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
mov ecx, dword [ebp - 0x194]
push ecx
lea edx, [ebp - 0x18c]
push edx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x10002530
push 0x80
lea eax, [ebp - 0x8c]
push 0
push eax
mov dword [ebp - 0x1a0], 0x80
call fcn.1003e2a0
add esp, 0xc
lea ecx, [ebp - 0x1a0]
push ecx
lea edx, [ebp - 0x8c]
push edx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x100025e8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [ebp - 0x190]
push eax
mov dword [ebx + 0x4734], edi
call fcn.10027b30
add esp, 4
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x10002641
movzx ecx, si
push ecx
push str.Local_port:__hu_n
push ebx
call fcn.10022c60
mov edx, dword [ebp - 0x190]
add esp, 0xc
mov dword [edx + 0x2d4], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.10035d36
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [ebp - 0x190]
push eax
mov dword [ebx + 0x4734], edi
call fcn.10027b30
add esp, 4
push eax
push edi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.10022ce0
add esp, 0x10
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2d
pop ebx
call fcn.10035d36
mov esp, ebp
pop ebp
ret