Function at 0x4c2d54
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x250
mov edi, edx
mov dword [esp + 0x2c], ecx
mov ebx, dword [ecx + 8]
lea esi, [esp + 0xc0]
push esi
call fcn.004bd0ac
add esp, 4
movups xmm0, xmmword [esi]
movups xmmword [ebx + 0x128], xmm0
lea esi, [ebx + 0x98]
lea edx, [ebx + 8]
mov dword [esp + 0xc], edi
mov ecx, edi
mov edi, edx
push esi
call fcn.004c17bd
add esp, 4
test eax, eax
mov dword [esp + 0x10], esi
jne 0x4c2ff2
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 8]
lea eax, [esi + 0xec]
lea ecx, [esi + 0xbc]
lea edx, [esi + 0x18]
push eax
push ecx
push dword [esi + 0x14]
push edx
call fcn.004bba59
add esp, 0x10
test al, al
je 0x4c2fa5
mov eax, str.__Trying__s:_d...
mov ebx, dword [esp + 0x24]
cmp dword [ebx], 0x17
jne 0x4c2e19
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0xc0], 0
push 4
lea ecx, [esp + 0xc4]
push ecx
push 0x1b
push 0x29
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, str.__Trying___s_:_d...
mov edi, dword [esp + 0xc]
test edi, edi
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
je 0x4c2e4d
cmp byte [edi + 0x68b], 0
je 0x4c2e4d
lea ecx, [esi + 0xbc]
push dword [esi + 0xec]
push ecx
push eax
push edi
call fcn.004abf96
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov eax, dword [ebx]
cmp eax, 0x17
je 0x4c2e5d
cmp eax, 2
jne 0x4c3062
cmp dword [esi + 0xc], 1
jne 0x4c3062
cmp byte [edi + 0x690], 0
je 0x4c2ec4
mov eax, dword [ecx]
xor ecx, ecx
inc ecx
lea edx, [esp + 0x40]
mov dword [edx], ecx
push 4
push edx
push ecx
push 6
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4c2ec0
cmp byte [edi + 0x68b], 0
je 0x4c2ec0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea ecx, [esp + 0xc4]
push ecx
push eax
call fcn.004d6673
add esp, 0xc
push eax
push str.Could_not_set_TCP_NODELAY:__s
push edi
call fcn.004abf96
add esp, 0xc
mov ecx, dword [esp + 0x10]
push dword [ecx]
call fcn.004c18bd
add esp, 4
mov ebx, edi
movzx eax, byte [edi + 0x696]
test eax, eax
je 0x4c3097
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx]
lea ecx, [esp + 0x40]
mov dword [ecx], eax
push 4
push ecx
push 8
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x4c3070
mov dword [esp + 0xc0], 1
mov edi, dword [esp + 0xc]
push dword [edi + 0x644]
call fcn.004b6c56
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x40], eax
mov dword [esp + 0xc4], eax
push dword [edi + 0x648]
call fcn.004b6c56
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x40], eax
mov dword [esp + 0xc8], eax
xor eax, eax
lea ecx, [esp + 0x1c0]
push eax
push eax
push ecx
push eax
push eax
push 0xc
lea eax, [esp + 0xd8]
push eax
push 0x98000004
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4c308f
cmp byte [edi + 0x68b], 0
je 0x4c308f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push edi
call fcn.004abf96
add esp, 0x10
jmp 0x4c308f
call fcn.0070acc3
mov eax, dword [eax]
mov dword [esi + 0x158], eax
call fcn.0070acc3
push 0x100
lea ecx, [esp + 0xc4]
push ecx
push dword [eax]
call fcn.004d6673
add esp, 0xc
mov esi, eax
call fcn.0070acc3
push esi
push dword [eax]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [esp + 0x18]
call fcn.004abf08
add esp, 0x10
mov eax, 2
mov esi, dword [esp + 0x10]
mov edi, dword [esi]
cmp edi, 0xffffffff
mov edx, dword [esp + 0x2c]
mov ecx, esi
mov esi, dword [esp + 0xc]
je 0x4c3029
mov dword [esp + 0x20], eax
mov ebx, edx
mov edx, dword [edx + 0xc]
mov ecx, esi
push edi
push 1
call fcn.004c185c
mov edx, ebx
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
add esp, 8
mov dword [ecx], 0xffffffff
test esi, esi
je 0x4c305a
test edx, edx
je 0x4c305a
cmp byte [esi + 0x68b], 0
je 0x4c305a
mov edi, edx
mov edx, dword [edx]
cmp dword [edx + 8], 0
jle 0x4c305a
push dword [ecx]
push eax
push str.cf_socket_open_______d__fd_d
push edi
push esi
mov esi, eax
call fcn.004abff5
mov eax, esi
add esp, 0x14
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push dword [ecx]
call fcn.004c18bd
add esp, 4
mov ebx, edi
jmp 0x4c3097
mov eax, dword [esp + 0xc]
cmp byte [eax + 0x68b], 0
je 0x4c308f
push esi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push dword [esp + 0x14]
call fcn.004abf96
add esp, 0xc
mov ebx, dword [esp + 0xc]
mov esi, dword [esp + 0x20]
cmp dword [ebx + 0x1b4], 0
je 0x4c30f3
push 1
push ebx
call fcn.004b6203
add esp, 8
xor edi, edi
push edi
mov eax, dword [esp + 0x14]
push dword [eax]
push dword [ebx + 0x1b8]
call dword [ebx + 0x1b4]
add esp, 0xc
mov esi, eax
push edi
push ebx
call fcn.004b6203
add esp, 8
cmp esi, 2
je 0x4c30fb
mov eax, 0x2a
test esi, esi
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
jne 0x4c2ff2
mov cl, 1
mov dword [esp + 0x34], ecx
mov esi, edx
jmp 0x4c3107
mov al, 1
mov dword [esp + 0x34], eax
jmp 0x4c3107
mov dword [esp + 0x34], 0
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
cmp eax, 0x17
mov ebx, dword [esp + 0x2c]
je 0x4c311f
cmp eax, 2
jne 0x4c351f
lea eax, [esi + 0x18]
push eax
call fcn.004e0dcc
add esp, 4
mov edi, eax
mov edx, dword [esi + 8]
mov eax, dword [esi + 0x98]
mov dword [esp + 0x24], eax
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0xc]
movzx esi, word [eax + 0x190]
movzx ebx, word [eax + 0x192]
mov eax, dword [eax + 0x4f0]
test eax, eax
jne 0x4c316a
test si, si
je 0x4c3517
mov dword [esp + 0x30], edi
mov dword [esp + 0x1c], ecx
movzx edi, si
xorps xmm0, xmm0
movaps xmmword [esp + 0xb0], xmm0
movaps xmmword [esp + 0xa0], xmm0
movaps xmmword [esp + 0x90], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
test eax, eax
je 0x4c3229
push eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
call fcn.007149b0
mov edx, dword [esp + 0x18]
add esp, 4
cmp eax, 0xfe
ja 0x4c3229
push 0x100
push 0
lea eax, [esp + 0xc8]
push eax
call fcn.006fba50
add esp, 0xc
push 3
push dword [esp + 0x1c]
push 0x79a37d
call fcn.00714b80
add esp, 0xc
mov dword [esp + 0x38], eax
test eax, eax
je 0x4c325a
push 5
push dword [esp + 0x1c]
push str.host_
call fcn.00714b80
add esp, 0xc
test eax, eax
jne 0x4c325f
mov eax, dword [esp + 0x18]
add eax, 5
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
jmp 0x4c330e
cmp edx, 2
je 0x4c3472
xor ecx, ecx
cmp edx, 0x17
jne 0x4c348a
mov word [esp + 0x40], 0x17
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x42], ax
mov ecx, 0x1c
jmp 0x4c348a
add dword [esp + 0x18], 3
lea eax, [esp + 0xc0]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push 0x100
push eax
push dword [esp + 0x20]
push dword [ecx + 0x284]
push dword [esp + 0x40]
push edx
call fcn.004e0e93
add esp, 0x18
cmp eax, 2
je 0x4c32bf
cmp eax, 1
mov edx, dword [esp + 0x14]
je 0x4c3428
test eax, eax
jne 0x4c32fb
cmp dword [esp + 0x38], 0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
jne 0x4c330e
push eax
push str.Couldnt_bind_to_interface__s
push dword [esp + 0x14]
jmp 0x4c344a
mov eax, dword [esp + 0xc]
cmp byte [eax + 0x68b], 0
mov eax, dword [esp + 0x14]
je 0x4c33ef
push eax
lea eax, [esp + 0xc4]
push eax
push dword [esp + 0x20]
push str.Local_Interface__s_is_ip__s_using_address_family__i
push dword [esp + 0x1c]
call fcn.004abf96
mov eax, dword [esp + 0x28]
add esp, 0x14
jmp 0x4c33ef
cmp dword [esp + 0x38], 0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
je 0x4c3436
mov cl, byte [ecx + 0x290]
mov byte [esp + 0x30], cl
cmp edx, 2
je 0x4c3328
cmp edx, 0x17
jne 0x4c3338
mov edx, eax
mov al, 2
jmp 0x4c332c
mov edx, eax
mov al, 1
mov ecx, dword [esp + 0x1c]
mov byte [ecx + 0x290], al
mov eax, edx
lea ecx, [esp + 0x28]
push ecx
push 0
push 0x50
mov dword [esp + 0x24], eax
push eax
push dword [esp + 0x1c]
call fcn.004cc2f2
add esp, 0x14
cmp eax, 1
jne 0x4c3368
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x10]
call fcn.004ae2da
add esp, 8
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 0x30]
mov byte [eax + 0x290], cl
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4c3432
push 0x100
lea ecx, [esp + 0xc4]
push ecx
push dword [eax]
call fcn.004cbd60
add esp, 0xc
mov ecx, dword [esp + 0xc]
cmp byte [ecx + 0x68b], 0
je 0x4c33d1
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0xc4]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x24]
push str.Name__s_family__i_resolved_to__s_family__i
push ecx
call fcn.004abf96
mov ecx, dword [esp + 0x24]
add esp, 0x18
push dword [esp + 0x28]
push ecx
call fcn.004cc78a
add esp, 8
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
mov ecx, dword [esp + 0x14]
cmp dword [eax + 4], ecx
mov eax, ecx
jne 0x4c3428
xor ecx, ecx
cmp eax, 2
je 0x4c3457
cmp eax, 0x17
jne 0x4c348a
push 0x25
lea eax, [esp + 0xc4]
push eax
call fcn.006fbbb0
add esp, 8
test eax, eax
je 0x4c3658
mov ecx, eax
inc ecx
mov dword [esp + 0x14], ecx
mov byte [eax], 0
jmp 0x4c3660
mov eax, 7
jmp 0x4c2fee
mov eax, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [esp + 0xc]
mov byte [eax + 0xd13], 0
push ecx
push str.Couldnt_bind_to__s
push eax
call fcn.004abf08
add esp, 0xc
jmp 0x4c364e
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0xc4]
push eax
push 2
call dword [0x72f664]
xor ecx, ecx
test eax, eax
jle 0x4c348a
mov word [esp + 0x40], 2
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x42], ax
mov ecx, 0x10
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x40]
push ecx
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4c3588
lea eax, [esp + 0x3c]
mov dword [eax], 0x80
xorps xmm0, xmm0
lea ecx, [esp + 0x1c0]
movaps xmmword [ecx], xmm0
movaps xmmword [ecx + 0x10], xmm0
movaps xmmword [ecx + 0x20], xmm0
movaps xmmword [ecx + 0x30], xmm0
movaps xmmword [ecx + 0x40], xmm0
movaps xmmword [ecx + 0x50], xmm0
movaps xmmword [ecx + 0x60], xmm0
movaps xmmword [ecx + 0x70], xmm0
push eax
push ecx
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x4c35e5
mov edi, dword [esp + 0xc]
cmp byte [edi + 0x68b], 0
je 0x4c350c
movzx eax, si
push eax
push str.Local_port:__hu
push edi
call fcn.004abf96
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x1da], 1
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
push 1
mov eax, dword [esp + 0x14]
push dword [eax]
call fcn.004e0da8
add esp, 8
xor eax, eax
cmp byte [esp + 0x34], 0
je 0x4c3547
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
mov edx, ebx
jmp 0x4c302d
mov edi, ebx
mov ecx, ebx
mov ebx, dword [esp + 0xc]
mov edx, ebx
call fcn.004c29f0
lea eax, [esp + 0xc0]
push eax
call fcn.004bd0ac
mov edx, edi
xor eax, eax
add esp, 4
movups xmm0, xmmword [esp + 0xc0]
movups xmmword [esi + 0x138], xmm0
mov esi, ebx
mov byte [edi + 0x14], 1
mov ecx, dword [esp + 0x10]
jmp 0x4c302d
inc edi
cmp ebx, 2
jl 0x4c3616
test di, di
je 0x4c3616
mov ecx, dword [esp + 0xc]
cmp byte [ecx + 0x68b], 0
je 0x4c35b7
movzx eax, di
dec eax
push eax
push str.Bind_to_local_port__d_failed__trying_next
push ecx
call fcn.004abf96
add esp, 0xc
movzx eax, di
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x42], ax
push dword [esp + 0x14]
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_bind]
inc edi
inc esi
dec ebx
test eax, eax
js 0x4c3589
jmp 0x4c34a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov edi, dword [esp + 0xc]
mov dword [edi + 0x8ec], eax
push 0x100
lea eax, [esp + 0xc4]
push eax
push esi
call fcn.004d6673
add esp, 0xc
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4c3645
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov edi, dword [esp + 0xc]
mov dword [edi + 0x8ec], eax
push 0x100
lea eax, [esp + 0xc4]
push eax
push esi
call fcn.004d6673
add esp, 0xc
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.004abf08
add esp, 0x10
mov eax, 0x2d
jmp 0x4c2fee
mov dword [esp + 0x14], 0
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0xc4]
push eax
push 0x17
call dword [0x72f664]
mov ecx, 0x1c
test eax, eax
jle 0x4c348a
mov word [esp + 0x40], 0x17
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x42], ax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4c3250
push 0xa
push 0
push eax
call fcn.00715801
add esp, 0xc
mov dword [esp + 0x58], eax
jmp 0x4c3250