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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x59e080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x290], ecx
mov dword [ebp - 0x28c], ecx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x54c]
movzx ebx, word [edi + 0x190]
mov dword [ebp - 0x294], eax
mov eax, dword [edi + 0x194]
mov dword [ebp - 0x298], eax
test esi, esi
jne 0x52e1c1
test bx, bx
je 0x52e53c
push 0x80
push ecx
lea eax, [ebp - 0x284]
push eax
call fcn.0055e280
add esp, 0xc
test esi, esi
je 0x52e41d
push esi
call fcn.0056c2b0
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x52e41d
push ecx
lea eax, [ebp - 0x103]
mov byte [ebp - 0x104], 0
push 0
push eax
call fcn.0055e280
push dword [0x59e15c]
mov byte [ebp - 0x285], 0
call fcn.0056c2b0
push eax
push esi
push dword [0x59e15c]
call fcn.0056e1b0
add esp, 0x1c
test eax, eax
jne 0x52e356
push dword [0x59e15c]
call fcn.0056c2b0
pop ecx
add esi, eax
mov byte [ebp - 0x285], 1
push 0x100
lea eax, [ebp - 0x104]
push eax
mov eax, dword [ebp - 0x294]
push esi
push dword [eax + 0x54]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00420e10
add esp, 0x18
sub eax, 0
je 0x52e3ea
sub eax, 1
je 0x52e34e
sub eax, 1
je 0x52e38c
cmp byte [ebp - 0x285], 0
jne 0x52e40e
cmp dword [ebp + 0x10], 2
mov eax, dword [ebp - 0x294]
mov cl, byte [eax + 0x100]
mov byte [ebp - 0x285], cl
jne 0x52e2b2
mov byte [eax + 0x100], 1
lea eax, [ebp - 0x28c]
push eax
push 0
push 0
push esi
push edi
call fcn.005316fb
add esp, 0x14
cmp eax, 1
jne 0x52e2db
lea eax, [ebp - 0x28c]
push eax
push edi
call fcn.005250b3
pop ecx
pop ecx
mov eax, dword [ebp - 0x294]
mov cl, byte [ebp - 0x285]
mov byte [eax + 0x100], cl
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x52e40e
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push dword [eax]
call fcn.005316ce
mov eax, dword [ebp - 0x28c]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x10]
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.0052ccc0
push dword [ebp - 0x28c]
push edi
call fcn.00531956
mov ecx, dword [ebp - 0x28c]
add esp, 0x2c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
je 0x52e3a8
xor eax, eax
inc eax
jmp 0x52e53e
push dword [0x59e160]
call fcn.0056c2b0
push eax
push esi
push dword [0x59e160]
call fcn.0056e1b0
add esp, 0x10
test eax, eax
jne 0x52e247
push dword [0x59e160]
call fcn.0056c2b0
pop ecx
add esi, eax
jmp 0x52e293
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.0052ccc0
mov eax, dword [ebp + 0x10]
add esp, 0x14
push 2
pop esi
cmp eax, esi
jne 0x52e425
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.00553a05
add esp, 0xc
test eax, eax
jle 0x52e425
push ebx
mov word [ebp - 0x284], si
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x282], ax
pop eax
mov dword [ebp - 0x290], eax
jmp 0x52e42b
cmp byte [ebp - 0x285], 0
je 0x52e293
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.0052cc10
add esp, 0xc
push 0x2d
pop eax
jmp 0x52e53e
push esi
mov byte [edi + 0xcf7], 0
push str.Couldnt_bind_to__s
jmp 0x52e3fd
push 2
pop esi
cmp dword [ebp + 0x10], esi
je 0x52e3ca
mov eax, dword [ebp - 0x290]
push eax
jmp 0x52e473
mov eax, dword [ebp - 0x298]
dec eax
mov dword [ebp - 0x298], eax
test eax, eax
jle 0x52e4f4
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.0052ccc0
add esp, 0xc
inc ebx
cmp word [ebp - 0x284], si
jne 0x52e46d
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x282], ax
push dword [ebp - 0x290]
lea eax, [ebp - 0x284]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x52e42e
mov eax, 0x80
push eax
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.0055e280
add esp, 0xc
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x52e51d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x204]
push 0x100
push eax
push esi
mov dword [edi + 0x964], esi
call fcn.0053cedc
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0052cc10
add esp, 0x1c
jmp 0x52e406
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
mov dword [edi + 0x964], esi
call fcn.0053cedc
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x52e4e6
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.0052ccc0
mov eax, dword [ebp - 0x294]
add esp, 0xc
mov byte [eax + 0x270], 1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051bf16
leave
ret