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

Disassembly:
sub esp, 0x218
mov eax, dword [0x658aa8]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push ebx
push ebp
mov ebp, dword [eax]
xor ebx, ebx
push esi
mov dword [esp + 0x18], ebx
mov esi, dword [ebp + 0x94c]
push edi
movzx edi, word [ebp + 0x5e8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x5ec]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
cmp esi, ebx
jne 0x4c7da7
cmp di, bx
je 0x4c81d7
push 0x80
lea ecx, [esp + 0x28]
push ebx
push ecx
call fcn.004a0660
add esp, 0xc
cmp esi, ebx
je 0x4c8164
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c7dc7
sub eax, edx
cmp eax, 0xff
jae 0x4c8164
push 0xff
lea edx, [esp + 0x129]
push ebx
push edx
mov byte [esp + 0x130], bl
call fcn.004a0660
mov edx, dword [0x659fa0]
mov eax, edx
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c7e03
sub eax, edi
push eax
push esi
push edx
call fcn.0049a942
add esp, 0xc
test eax, eax
jne 0x4c7e94
mov eax, dword [0x659fa0]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c7e23
sub eax, edx
add esi, eax
mov ebx, 1
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x8c]
mov edi, dword [esp + 0x234]
push 0x100
lea eax, [esp + 0x128]
push eax
mov eax, dword [esp + 0x240]
push esi
push edx
push eax
push edi
call fcn.00546ad0
add esp, 0x18
sub eax, 0
je 0x4c7edb
sub eax, 1
je 0x4c7ed1
sub eax, 1
jne 0x4c7ef3
push edi
lea ecx, [esp + 0x128]
push ecx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebp
call fcn.004c2070
add esp, 0x14
jmp 0x4c7fbc
mov edx, dword [str.host_]
mov eax, edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c7ea0
sub eax, edi
push eax
push esi
push edx
call fcn.0049a942
add esp, 0xc
test eax, eax
jne 0x4c7e33
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c7ec4
sub eax, edx
add esi, eax
jmp 0x4c7efb
mov eax, 1
jmp 0x4c8211
test ebx, ebx
je 0x4c7efb
push esi
push str.Couldnt_bind_to_interface__s
push ebp
call fcn.004c2150
add esp, 0xc
jmp 0x4c820c
test ebx, ebx
jne 0x4c8149
mov eax, dword [esp + 0x234]
mov edx, dword [esp + 0x10]
mov edi, dword [edx + 0x2c0]
cmp eax, 2
jne 0x4c7f1f
mov ebx, edx
mov dword [ebx + 0x2c0], 1
jmp 0x4c7f36
cmp eax, 0x17
jne 0x4c7f34
mov eax, edx
mov dword [eax + 0x2c0], 2
mov ebx, eax
jmp 0x4c7f36
mov ebx, edx
lea ecx, [esp + 0x1c]
push ecx
push 0
push esi
push ebx
call fcn.004c3e50
add esp, 0x10
cmp eax, 1
jne 0x4c7f5a
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.004bc0d0
add esp, 8
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x2c0], edi
test eax, eax
je 0x4c8149
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0x128]
push ecx
push edx
call fcn.004c3380
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
mov ecx, dword [esp + 0x240]
push edx
lea eax, [esp + 0x134]
push eax
push ecx
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebp
call fcn.004c2070
mov edx, dword [esp + 0x40]
push edx
push ebp
call fcn.004c4070
mov edi, dword [esp + 0x260]
add esp, 0x2c
cmp edi, 0x17
jne 0x4c80fe
lea eax, [esp + 0x124]
push 0x25
push eax
call fcn.004a6380
mov esi, eax
add esp, 8
test esi, esi
je 0x4c7fe1
mov byte [esi], 0
inc esi
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x128]
push edx
push 0x17
call fcn.004e77e0
add esp, 0xc
test eax, eax
jle 0x4c8027
mov ecx, dword [esp + 0x18]
mov eax, 0x17
push ecx
mov word [esp + 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
test esi, esi
je 0x4c8027
push esi
call fcn.0049a937
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], 0x1c
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x230]
push edx
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x4c8096
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4c81db
movzx ecx, di
push ecx
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebp
call fcn.004c2070
add esp, 0xc
inc edi
push edi
call esi
mov edx, dword [esp + 0x14]
mov word [esp + 0x26], ax
push edx
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4c8055
push 0x80
lea ecx, [esp + 0xa8]
push 0
push ecx
mov dword [esp + 0x2c], 0x80
call fcn.004a0660
add esp, 0xc
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0xa8]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x4c81b7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x80
lea ecx, [esp + 0x128]
mov esi, eax
push ecx
push esi
mov dword [ebp + 0xcac], esi
call fcn.004b6fe0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c8203
cmp edi, 2
jne 0x4c802f
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x128]
push eax
push edi
call fcn.004e77e0
add esp, 0xc
test eax, eax
jle 0x4c802f
mov edx, dword [esp + 0x18]
mov ecx, edi
push edx
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x14], 0x10
jmp 0x4c802f
and dword [ebp + 0xf6c], 0xfffffff7
push esi
push str.Couldnt_bind_to__s
push ebp
call fcn.004c2150
add esp, 0xc
jmp 0x4c820c
mov eax, dword [esp + 0x234]
cmp eax, 0x17
jne 0x4c818e
push edi
mov word [esp + 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x14], 0x1c
jmp 0x4c8033
cmp eax, 2
jne 0x4c8033
mov ecx, eax
push edi
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x14], 0x10
jmp 0x4c8033
movzx edx, di
push edx
push str.Local_port:__hu_n
push ebp
call fcn.004c2070
mov eax, dword [esp + 0x1c]
add esp, 0xc
or dword [eax + 0x294], 0x1000000
xor eax, eax
jmp 0x4c8211
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x80
lea eax, [esp + 0x128]
push eax
push esi
mov dword [ebp + 0xcac], esi
call fcn.004b6fe0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebp
call fcn.004c2150
add esp, 0x1c
mov eax, 0x2d
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00499a1c
add esp, 0x218
ret