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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
xor eax, eax
mov dword [esp + 8], eax
mov ecx, dword [esi + 0x13c]
mov ebx, dword [esi + 0x334]
push edi
xor edx, edx
test ebx, ebx
mov dx, word [esi + 0x138]
mov dword [esp + 0x1c], ecx
mov byte [esp + 0xa0], al
mov dword [esp + 0x10], eax
mov ecx, 0x3f
lea edi, [esp + 0xa1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x14], edx
stosb byte es:[edi], al
jne 0x45b9c0
test dx, dx
je 0x45bc0b
xor eax, eax
test ebx, ebx
mov ecx, 0x20
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
je 0x45bb0b
mov eax, ebx
lea edi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x45b9e0
sub eax, edi
cmp eax, 0xff
jae 0x45bb0b
mov edi, dword [ebp + 0x10]
push 0x100
lea edx, [esp + 0xa4]
push edx
push ebx
push edi
call fcn.004fe5d0
add esp, 0x10
test eax, eax
je 0x45ba2f
push edi
lea eax, [esp + 0xa4]
push eax
push ebx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push esi
call fcn.0045b210
add esp, 0x14
jmp 0x45baca
mov edi, dword [ebp + 8]
cmp dword [ebp + 0x10], 2
mov ecx, dword [edi + 0x20c]
mov dword [esp + 0x18], ecx
jne 0x45ba4c
mov dword [edi + 0x20c], 1
lea edx, [esp + 0xc]
push edx
push 0
push ebx
push edi
call fcn.00452050
add esp, 0x10
cmp eax, 1
jne 0x45ba70
lea eax, [esp + 0xc]
push eax
push edi
call fcn.0045eb60
add esp, 8
mov eax, dword [esp + 0xc]
test eax, eax
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x20c], ecx
je 0x45baf0
mov eax, dword [eax]
push 0x100
lea edx, [esp + 0xa4]
push edx
push eax
call fcn.00451e50
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
mov edx, dword [ebp + 0x10]
push eax
lea ecx, [esp + 0xb0]
push ecx
push edx
push ebx
push str.Name__s_family__i_resolved_to__s_family__i_n
push esi
call fcn.0045b210
mov eax, dword [esp + 0x30]
push eax
push esi
call fcn.00452250
mov edi, dword [ebp + 0x10]
add esp, 0x2c
cmp edi, 2
jne 0x45bb2c
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0xa4]
push edx
push edi
call fcn.0046a5f0
add esp, 0xc
test eax, eax
jle 0x45bb2c
mov eax, dword [esp + 0x14]
push eax
jmp 0x45bb12
push ebx
push str.Couldnt_bind_to__s
push esi
call fcn.0045b2d0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x10], 2
jne 0x45bb2c
push edx
mov word [esp + 0x24], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x10], 0x10
mov ecx, dword [esp + 0x10]
mov ebx, dword [ebp + 0xc]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x45bb99
mov eax, dword [esp + 0x1c]
dec eax
test eax, eax
mov dword [esp + 0x1c], eax
jle 0x45bc14
mov edi, dword [esp + 0x14]
movzx eax, di
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push esi
call fcn.0045b210
add esp, 0xc
inc edi
cmp word [esp + 0x20], 2
mov dword [esp + 0x14], edi
jne 0x45bb84
push edi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x22], ax
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x45bb44
xor eax, eax
mov ecx, 0x20
lea edi, [esp + 0x1a0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x1a4]
push ecx
push ebx
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x45bbea
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov edi, eax
push edi
push edx
mov dword [esi + 0x854c], edi
call fcn.00469d70
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x45bc33
movzx eax, word [esp + 0x14]
push eax
push str.Local_port:__hu_n
push esi
call fcn.0045b210
mov ecx, dword [ebp + 8]
add esp, 0xc
mov dword [ecx + 0x1f0], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov edi, eax
push edi
push edx
mov dword [esi + 0x854c], edi
call fcn.00469d70
push eax
push edi
push str.bind_failed_with_errno__d:__s
push esi
call fcn.0045b2d0
add esp, 0x18
pop edi
pop esi
mov eax, 0x2d
pop ebx
mov esp, ebp
pop ebp
ret