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

Disassembly:
sub esp, 0x29c
mov eax, dword [0x630160]
xor eax, esp
mov dword [esp + 0x298], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x1b4]
push ebx
movzx ebx, word [edi + 0x1b0]
push ebp
xor ebp, ebp
push esi
mov esi, dword [edi + 0x5bc]
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ecx
cmp esi, ebp
jne 0x4c4de0
cmp bx, bp
je 0x4c51f4
push 0x80
lea edx, [esp + 0x28]
push ebp
push edx
call fcn.00422f70
add esp, 0xc
cmp esi, ebp
je 0x4c50ce
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4e00
sub eax, edx
cmp eax, 0xff
jae 0x4c50ce
push 0xff
lea eax, [esp + 0xa9]
push ebp
push eax
mov byte [esp + 0xb0], cl
call fcn.00422f70
mov edx, dword [0x6434e8]
mov eax, edx
mov dword [esp + 0x28], ebp
add esp, 0xc
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4e40
sub eax, ebp
push eax
push esi
push edx
call fcn.0041ca68
add esp, 0xc
test eax, eax
jne 0x4c4ed5
mov eax, dword [0x6434e8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4e60
sub eax, edx
add esi, eax
mov dword [esp + 0x1c], 1
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x54]
mov ebp, dword [esp + 0x2b0]
push 0x100
lea ecx, [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0x2bc]
push esi
push eax
push ecx
push ebp
call fcn.0053f5e0
add esp, 0x18
sub eax, 0
je 0x4c4f35
sub eax, 1
je 0x4c4f18
sub eax, 1
jne 0x4c4f50
push ebp
lea edx, [esp + 0xa8]
push edx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.004c81e0
add esp, 0x14
jmp 0x4c5014
mov edx, dword [str.host_]
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4ee0
sub eax, ebp
push eax
push esi
push edx
call fcn.0041ca68
add esp, 0xc
test eax, eax
jne 0x4c4e73
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4f04
mov ebp, dword [esp + 0x2b0]
sub eax, edx
add esi, eax
jmp 0x4c4f5b
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.00418878
add esp, 0x29c
ret
cmp dword [esp + 0x1c], 0
je 0x4c4f5b
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.004c8260
add esp, 0xc
jmp 0x4c523f
cmp dword [esp + 0x1c], 0
jne 0x4c50b0
mov eax, dword [esp + 0xc]
mov bl, byte [eax + 0x100]
cmp ebp, 2
jne 0x4c4f75
mov ecx, eax
mov byte [ecx + 0x100], 1
jmp 0x4c4f83
cmp ebp, 0x17
jne 0x4c4f83
mov edx, eax
mov byte [edx + 0x100], 2
lea eax, [esp + 0x10]
push eax
push 0
push 0
push esi
push edi
call fcn.004c4840
add esp, 0x14
cmp eax, 1
jne 0x4c4fa9
lea ecx, [esp + 0x10]
push ecx
push edi
call fcn.004c9320
add esp, 8
mov edx, dword [esp + 0xc]
mov byte [edx + 0x100], bl
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4c50b0
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0xa8]
push ecx
push edx
call fcn.004c3a50
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0xb4]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.004c81e0
mov ecx, dword [esp + 0x34]
push ecx
push edi
call fcn.004c4af0
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
add esp, 0x2c
cmp ebp, dword [eax + 4]
jne 0x4c4f18
mov ebx, dword [esp + 0x18]
cmp ebp, 0x17
jne 0x4c5084
lea ecx, [esp + 0xa4]
push 0x25
push ecx
call fcn.0041cb40
mov esi, eax
add esp, 8
test esi, esi
je 0x4c5035
mov byte [esi], 0
inc esi
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0xa8]
push eax
push 0x17
call fcn.004e99f0
add esp, 0xc
test eax, eax
jle 0x4c5077
mov ecx, 0x17
push ebx
mov word [esp + 0x28], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
test esi, esi
je 0x4c5077
push esi
call fcn.0041c227
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], 0x1c
jmp 0x4c5110
cmp ebp, 2
jne 0x4c5110
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xa8]
push eax
push ebp
call fcn.004e99f0
add esp, 0xc
test eax, eax
jle 0x4c5110
mov ecx, ebp
mov word [esp + 0x24], cx
jmp 0x4c50fc
push esi
push str.Couldnt_bind_to__s
push edi
mov dword [edi + 0xe68], 0
call fcn.004c8260
add esp, 0xc
jmp 0x4c523f
mov eax, dword [esp + 0x2b0]
cmp eax, 0x17
jne 0x4c50f2
mov edx, eax
push ebx
mov word [esp + 0x28], dx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x1c
jmp 0x4c510b
cmp eax, 2
jne 0x4c5110
mov word [esp + 0x24], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x10
mov word [esp + 0x26], ax
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x2ac]
push ecx
lea edx, [esp + 0x28]
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x4c5173
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jle 0x4c520e
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.004c81e0
add esp, 0xc
inc ebx
push ebx
call ebp
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
push esi
mov word [esp + 0x32], ax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4c5132
push 0x80
lea eax, [esp + 0xa8]
push 0
push eax
mov dword [esp + 0x24], 0x80
call fcn.00422f70
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xa8]
push edx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x4c51d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x100
lea eax, [esp + 0x1a8]
push eax
push esi
mov dword [edi + 0xa94], esi
call fcn.004aa910
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c5236
movzx ecx, bx
push ecx
push str.Local_port:__hu
push edi
call fcn.004c81e0
mov edx, dword [esp + 0x18]
add esp, 0xc
mov dword [edx + 0x2dc], 1
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.00418878
add esp, 0x29c
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x100
lea eax, [esp + 0x1a8]
push eax
push esi
mov dword [edi + 0xa94], esi
call fcn.004aa910
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.004c8260
add esp, 0x1c
mov ecx, dword [esp + 0x2a4]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0x2d
call fcn.00418878
add esp, 0x29c
ret