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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x100b02c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
mov dword [ebp - 0x20c], eax
xor eax, eax
mov dword [ebp - 0x210], eax
movzx ecx, word [esi + 0x148]
push edi
mov edi, dword [esi + 0x344]
mov ebx, 0xff
mov dword [ebp - 0x208], ecx
mov ecx, dword [esi + 0x14c]
push ebx
push eax
mov dword [ebp - 0x214], eax
mov byte [ebp - 0x104], al
lea eax, [ebp - 0x103]
push eax
mov dword [ebp - 0x218], ecx
call fcn.10062b80
add esp, 0xc
test edi, edi
jne 0x1004d630
cmp word [ebp - 0x208], di
jne 0x1004d630
xor eax, eax
jmp 0x1004d8bc
push 0x80
lea eax, [ebp - 0x184]
push 0
push eax
call fcn.10062b80
add esp, 0xc
test edi, edi
je 0x1004d772
push edi
call fcn.100652c0
pop ecx
cmp eax, ebx
jae 0x1004d772
mov ebx, pe_nt_image_headers32
push ebx
lea eax, [ebp - 0x104]
push eax
push edi
push dword [ebp + 0x10]
call fcn.10058d73
add esp, 0x10
test eax, eax
je 0x1004d698
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
push eax
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.1004c61d
add esp, 0x14
jmp 0x1004d73a
cmp dword [ebp + 0x10], 2
mov eax, dword [esi + 0x270]
mov dword [ebp - 0x21c], eax
jne 0x1004d6b4
mov dword [esi + 0x270], 1
lea eax, [ebp - 0x210]
push eax
push 0
push edi
push dword [ebp - 0x20c]
call fcn.10049bac
add esp, 0x10
cmp eax, 1
jne 0x1004d6e5
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x20c]
call fcn.1004bafa
pop ecx
pop ecx
mov eax, dword [ebp - 0x21c]
mov dword [esi + 0x270], eax
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x1004d75e
push ebx
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.100499bb
mov eax, dword [ebp - 0x210]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x10]
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.1004c61d
push dword [ebp - 0x210]
push esi
call fcn.10049d0e
add esp, 0x2c
cmp dword [ebp + 0x10], 2
jne 0x1004d79f
lea eax, [ebp - 0x180]
push eax
lea eax, [ebp - 0x104]
push eax
push 2
call fcn.10058d4a
add esp, 0xc
test eax, eax
jle 0x1004d79f
jmp 0x1004d778
push edi
push str.Couldnt_bind_to__s
push esi
call fcn.1004c687
add esp, 0xc
jmp 0x1004d8b9
cmp dword [ebp + 0x10], 2
jne 0x1004d79f
push 2
pop eax
push dword [ebp - 0x208]
mov word [ebp - 0x184], ax
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x214], 0x10
mov word [ebp - 0x182], ax
mov edi, dword [sym.imp.WS2_32.dll_bind]
jmp 0x1004d7f3
dec dword [ebp - 0x218]
cmp dword [ebp - 0x218], 0
jle 0x1004d88f
movzx eax, word [ebp - 0x208]
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.1004c61d
add esp, 0xc
inc dword [ebp - 0x208]
cmp word [ebp - 0x184], 2
jne 0x1004d7f3
push dword [ebp - 0x208]
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x182], ax
push dword [ebp - 0x214]
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jl 0x1004d7a7
mov eax, 0x80
push eax
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.10062b80
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x204]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x1004d864
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push dword [ebp - 0x20c]
mov dword [esi + 0x8554], edi
call fcn.10058acf
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1004d8b0
movzx eax, word [ebp - 0x208]
push eax
push str.Local_port:__hu_n
push esi
call fcn.1004c61d
mov eax, dword [ebp - 0x20c]
add esp, 0xc
mov dword [eax + 0x18c], 1
jmp 0x1004d629
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push dword [ebp - 0x20c]
mov dword [esi + 0x8554], edi
call fcn.10058acf
push eax
push edi
push str.bind_failed_with_errno__d:__s
push esi
call fcn.1004c687
add esp, 0x18
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005fc2b
leave
ret