Function at 0x4ded20
Capabilities:
Convert ip address from string
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 esi, edx
mov eax, dword [0x7a9040]
xor eax, ebp
mov dword [esp + 0x248], eax
mov dword [esp + 0x14], ecx
mov edi, dword [ecx + 8]
lea ebx, [esp + 0xc0]
push ebx
call fcn.0050a160
add esp, 4
movups xmm0, xmmword [ebx]
movups xmmword [edi + 0x128], xmm0
lea ebx, [edi + 8]
cmp dword [esi + 0x1b4], 0
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ebx
je 0x4deedc
push 1
push esi
call fcn.004fda90
add esp, 8
mov ecx, dword [esi + 0x1b4]
mov eax, dword [esp + 0xc]
mov esi, dword [eax + 0x1b8]
call dword [0x7a29f4]
xor edi, edi
push ebx
push edi
push esi
call ecx
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x98], eax
push edi
mov edi, dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.004fda90
add esp, 8
mov eax, dword [edi + 0x98]
mov esi, 7
cmp eax, 0xffffffff
mov ebx, dword [esp + 0x14]
je 0x4dee83
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x18]
mov eax, dword [eax + 0x3b0]
test eax, eax
je 0x4dedf7
mov ecx, dword [esp + 0x18]
cmp dword [ecx], 0x17
jne 0x4dedf7
mov dword [edi + 0x30], eax
mov edi, dword [ebx + 8]
lea eax, [edi + 0xec]
lea ecx, [edi + 0xbc]
lea edx, [edi + 0x18]
push eax
push ecx
push dword [edi + 0x14]
push edx
call fcn.004e1400
add esp, 0x10
test al, al
jne 0x4def6a
mov esi, 0x100
push esi
push 0xff
lea eax, [esp + 0xc8]
push eax
call fcn.006547d0
add esp, 0xc
call fcn.006628ae
mov eax, dword [eax]
mov dword [edi + 0x158], eax
call fcn.006628ae
push esi
lea ecx, [esp + 0xc4]
push ecx
push dword [eax]
call fcn.00509320
add esp, 0xc
mov edi, eax
call fcn.006628ae
push edi
push dword [eax]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [esp + 0x18]
call fcn.004e7570
add esp, 0x10
mov esi, 2
mov edi, dword [esp + 0x10]
mov edi, dword [edi + 0x98]
cmp edi, 0xffffffff
je 0x4deef6
mov dword [esp + 0x18], esi
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x4deefc
mov ebx, dword [esi + 0x30]
push edi
push dword [esp + 0x10]
call fcn.004fd6d0
add esp, 8
test ebx, ebx
je 0x4deefc
push 1
mov ebx, dword [esp + 0x10]
push ebx
call fcn.004fda90
add esp, 8
mov ecx, dword [esi + 0x30]
mov esi, dword [esi + 0x34]
call dword [0x7a29f4]
push edi
push esi
call ecx
add esp, 8
push 0
push ebx
call fcn.004fda90
add esp, 8
jmp 0x4def03
push dword [edi + 0x10]
push dword [edi + 0xc]
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x98], eax
jmp 0x4dedc8
mov edi, dword [esp + 0x10]
jmp 0x4def19
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [esp + 0x10]
mov dword [edi + 0x98], 0xffffffff
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
cmp dword [esp + 0xc], 0
je 0x4def52
test ebx, ebx
je 0x4def52
mov eax, dword [esp + 0xc]
cmp byte [eax + 0x683], 0
je 0x4def52
mov eax, dword [ebx]
cmp dword [eax + 8], 0
jle 0x4def52
push dword [edi + 0x98]
push esi
push str.cf_socket_open_______d__fd_d
push ebx
push dword [esp + 0x1c]
call fcn.004e76d0
add esp, 0x14
mov ecx, dword [esp + 0x248]
xor ecx, ebp
call fcn.00650d60
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, str.__Trying__s:_d...
mov ecx, dword [esp + 0x18]
cmp dword [ecx], 0x17
mov edi, dword [esp + 0x10]
jne 0x4defa7
mov eax, dword [edi + 0x98]
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...
test esi, esi
je 0x4defcb
cmp byte [esi + 0x683], 1
jne 0x4defcb
lea ecx, [edi + 0xbc]
push dword [edi + 0xec]
push ecx
push eax
push esi
call fcn.004e7630
add esp, 0x10
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
cmp eax, 0x17
je 0x4defdf
cmp eax, 2
jne 0x4df176
cmp dword [edi + 0xc], 1
jne 0x4df176
cmp byte [esi + 0x688], 1
jne 0x4df06f
mov esi, dword [edi + 0x98]
xor edi, edi
inc edi
lea ebx, [esp + 0x1c0]
mov dword [ebx], edi
push 0x100
push 0xff
lea eax, [esp + 0xc8]
push eax
call fcn.006547d0
add esp, 0xc
push 4
push ebx
push edi
push 6
push esi
mov esi, dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_setsockopt]
test esi, esi
je 0x4df06b
test eax, eax
jns 0x4df06b
cmp byte [esi + 0x683], 1
jne 0x4df06b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea ecx, [esp + 0xc4]
push ecx
push eax
call fcn.00509320
add esp, 0xc
push eax
push str.Could_not_set_TCP_NODELAY:__s
push esi
call fcn.004e7630
add esp, 0xc
mov edi, dword [esp + 0x10]
push dword [edi + 0x98]
call fcn.004dd630
add esp, 4
movzx eax, byte [esi + 0x68f]
cmp eax, 1
jne 0x4df184
mov edi, dword [edi + 0x98]
lea ecx, [esp + 0x1c0]
mov dword [ecx], eax
push 4
push ecx
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x4df158
lea ebx, [esp + 0x40]
mov dword [ebx], 0xffffffff
mov dword [esp + 0xc0], 1
push dword [esi + 0x63c]
call fcn.0051ed30
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x1c0], eax
mov dword [esp + 0xc4], eax
push dword [esi + 0x640]
call fcn.0051ed30
add esp, 4
imul eax, eax, 0x3e8
mov dword [esp + 0x1c0], eax
mov dword [esp + 0xc8], eax
xor eax, eax
push eax
push eax
push ebx
push eax
push eax
push 0xc
lea eax, [esp + 0xd8]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test esi, esi
je 0x4df152
test eax, eax
je 0x4df152
cmp byte [esi + 0x683], 1
jne 0x4df152
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push esi
call fcn.004e7630
add esp, 0x10
mov edi, dword [esp + 0x10]
jmp 0x4df184
test esi, esi
je 0x4df152
cmp byte [esi + 0x683], 1
jne 0x4df152
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push esi
call fcn.004e7630
add esp, 0xc
jmp 0x4df152
push dword [edi + 0x98]
call fcn.004dd630
add esp, 4
xor ebx, ebx
cmp dword [esi + 0x1ac], 0
je 0x4df1fa
push 1
push esi
call fcn.004fda90
add esp, 8
mov esi, dword [edi + 0x98]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x1ac]
mov eax, dword [esp + 0xc]
mov edi, dword [eax + 0x1b0]
call dword [0x7a29f4]
push ebx
push esi
mov esi, dword [esp + 0x14]
push edi
call ecx
add esp, 0xc
mov edi, eax
push ebx
push esi
call fcn.004fda90
add esp, 8
cmp edi, 2
je 0x4df1f4
mov esi, 0x2a
test edi, edi
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
jne 0x4dee83
xor ebx, ebx
mov esi, dword [esp + 0xc]
jmp 0x4df1fa
mov bl, 1
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
cmp eax, 0x17
je 0x4df20a
cmp eax, 2
jne 0x4df255
mov dword [esp + 0x30], ebx
lea eax, [edi + 0x18]
push eax
call fcn.004f5710
add esp, 4
mov dword [esp + 0x28], eax
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x98]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x3c], 0
movzx edi, word [esi + 0x188]
mov ebx, dword [esi + 0x4e8]
mov eax, ebx
or eax, edi
jne 0x4df2ad
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x30]
push 1
push dword [edi + 0x98]
call fcn.004fe470
add esp, 8
xor esi, esi
test bl, bl
jne 0x4df274
mov ebx, dword [esp + 0x14]
jmp 0x4def19
mov ebx, dword [esp + 0x14]
mov ecx, ebx
mov edx, dword [esp + 0xc]
call fcn.004debf0
lea eax, [esp + 0xc0]
push eax
call fcn.0050a160
xor esi, esi
add esp, 4
movups xmm0, xmmword [esp + 0xc0]
movups xmmword [edi + 0x138], xmm0
mov byte [ebx + 0x14], 1
jmp 0x4def19
mov dword [esp + 0x24], ecx
movzx eax, word [esi + 0x18a]
mov dword [esp + 0x18], eax
xorps xmm0, xmm0
movaps xmmword [esp + 0x230], xmm0
movaps xmmword [esp + 0x220], xmm0
movaps xmmword [esp + 0x210], xmm0
movaps xmmword [esp + 0x200], xmm0
movaps xmmword [esp + 0x1f0], xmm0
movaps xmmword [esp + 0x1e0], xmm0
movaps xmmword [esp + 0x1d0], xmm0
movaps xmmword [esp + 0x1c0], xmm0
test ebx, ebx
je 0x4df31f
push ebx
mov dword [esp + 0x24], edx
call fcn.0066e590
mov edx, dword [esp + 0x24]
add esp, 4
cmp eax, 0xfe
jbe 0x4df519
cmp edx, 2
je 0x4df367
xor ebx, ebx
cmp edx, 0x17
jne 0x4df385
mov word [esp + 0x1c0], 0x17
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1c2], ax
mov ebx, 0x1c
jmp 0x4df385
lea eax, [esp + 0x1c4]
push eax
lea eax, [esp + 0xc4]
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4df385
mov word [esp + 0x1c0], 2
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1c2], ax
mov ebx, 0x10
inc edi
jmp 0x4df3b2
movzx eax, di
dec eax
push eax
push str.Bind_to_local_port__d_failed__trying_next
push esi
call fcn.004e7630
add esp, 0xc
movzx eax, di
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x1c2], ax
inc edi
dec dword [esp + 0x18]
push ebx
lea eax, [esp + 0x1c4]
push eax
push dword [esp + 0x3c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4df43d
cmp dword [esp + 0x18], 2
jl 0x4df3e4
test di, di
je 0x4df3e4
test esi, esi
je 0x4df39b
cmp byte [esi + 0x683], 1
jne 0x4df39b
jmp 0x4df388
mov esi, 0x100
push esi
push 0xff
lea ebx, [esp + 0xc8]
push ebx
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [esp + 0xc]
mov dword [eax + 0x8d8], edi
push esi
push ebx
push edi
call fcn.00509320
add esp, 0xc
push eax
push edi
push str.bind_failed_with_errno__d:__s
push dword [esp + 0x18]
call fcn.004e7570
add esp, 0x10
mov esi, 0x2d
mov ebx, dword [esp + 0x14]
jmp 0x4dee7f
lea eax, [esp + 0x38]
mov dword [eax], 0x80
xorps xmm0, xmm0
lea ecx, [esp + 0x40]
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 + 0x3c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
mov ebx, dword [esp + 0x14]
js 0x4df5d2
test esi, esi
je 0x4df4a2
cmp byte [esi + 0x683], 1
jne 0x4df4a2
dec edi
push edi
push str.Local_port:__hu
push esi
call fcn.004e7630
add esp, 0xc
mov eax, dword [esp + 0x24]
mov byte [eax + 0x1da], 1
jmp 0x4df24d
add ebx, 3
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push 0x100
lea eax, [esp + 0xc4]
push eax
mov dword [esp + 0x24], ebx
push ebx
push dword [ecx + 0x3b0]
push dword [esp + 0x38]
push edx
call fcn.0047c600
add esp, 0x18
cmp eax, 2
je 0x4df652
cmp eax, 1
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
je 0x4df747
test eax, eax
jne 0x4df5ad
cmp dword [esp + 0x2c], 0
mov ecx, dword [esp + 0x24]
je 0x4df5be
mov ebx, dword [esp + 0x1c]
jmp 0x4df58a
push 0x100
push 0
lea eax, [esp + 0xc8]
push eax
call fcn.006547d0
add esp, 0xc
movzx ecx, byte [ebx]
sub ecx, 0x69
jne 0x4df54e
movzx ecx, byte [ebx + 1]
sub ecx, 0x66
jne 0x4df54e
movzx eax, byte [ebx + 2]
mov ecx, 0x21
sub ecx, eax
jmp 0x4df550
neg ecx
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x4df4b2
push 5
push ebx
push str.host_
call fcn.0066e620
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
lea ecx, [ecx + ecx*4]
add ecx, ebx
mov ebx, ecx
test eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
jne 0x4df4bd
mov dword [esp + 0x1c], ebx
mov bl, byte [ecx + 0x3bc]
cmp edx, 2
je 0x4df68f
cmp edx, 0x17
jne 0x4df697
mov al, 2
jmp 0x4df691
cmp dword [esp + 0x2c], 0
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
jne 0x4df58a
jmp 0x4df636
push dword [esp + 0x1c]
push str.Couldnt_bind_to_interface__s
push esi
call fcn.004e7570
add esp, 0xc
jmp 0x4df624
mov esi, 0x100
push esi
push 0xff
lea eax, [esp + 0xc8]
push eax
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov eax, dword [esp + 0xc]
mov dword [eax + 0x8d8], edi
push esi
lea eax, [esp + 0xc4]
push eax
push edi
call fcn.00509320
add esp, 0xc
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push dword [esp + 0x18]
call fcn.004e7570
add esp, 0x10
mov esi, 0x2d
jmp 0x4dee7f
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x1c]
mov byte [esi + 0xce3], 0
push ebx
push str.Couldnt_bind_to__s
push esi
call fcn.004e7570
add esp, 0xc
mov ebx, dword [esp + 0x14]
jmp 0x4df624
test esi, esi
mov ecx, dword [esp + 0x20]
je 0x4df75b
cmp byte [esi + 0x683], 1
jne 0x4df75b
push ecx
lea eax, [esp + 0xc4]
push eax
push dword [esp + 0x24]
push str.Local_Interface__s_is_ip__s_using_address_family__i
push esi
call fcn.004e7630
mov ecx, dword [esp + 0x34]
add esp, 0x14
jmp 0x4df75b
mov al, 1
mov byte [ecx + 0x3bc], al
lea esi, [esp + 0x3c]
push esi
push 0
push 0x50
push dword [esp + 0x28]
push dword [esp + 0x1c]
call fcn.004ec240
add esp, 0x14
cmp eax, 1
jne 0x4df6c2
push esi
push dword [esp + 0x10]
call fcn.004d9a60
add esp, 8
mov eax, dword [esp + 0x24]
mov byte [eax + 0x3bc], bl
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4df62e
push 0x100
lea ecx, [esp + 0xc4]
push ecx
push dword [eax]
call fcn.004ebad0
add esp, 0xc
mov esi, dword [esp + 0xc]
test esi, esi
mov ebx, dword [esp + 0x14]
je 0x4df72b
cmp byte [esi + 0x683], 1
jne 0x4df72b
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0xc4]
push eax
push dword [esp + 0x28]
push dword [esp + 0x28]
push str.Name__s_family__i_resolved_to__s_family__i
push esi
call fcn.004e7630
add esp, 0x18
push dword [esp + 0x3c]
push esi
call fcn.004ec7a0
add esp, 8
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
mov ecx, dword [esp + 0x20]
cmp dword [eax + 4], ecx
je 0x4df75b
mov esi, 7
jmp 0x4dee7f
mov dword [esp + 0x28], 0
jmp 0x4df78f
xor ebx, ebx
cmp ecx, 2
je 0x4df34b
cmp ecx, 0x17
jne 0x4df385
push 0x25
lea eax, [esp + 0xc4]
push eax
call fcn.00654930
add esp, 8
test eax, eax
je 0x4df751
mov ecx, eax
inc ecx
mov dword [esp + 0x28], ecx
mov byte [eax], 0
lea eax, [esp + 0x1c8]
push eax
lea eax, [esp + 0xc4]
push eax
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
mov ebx, 0x1c
test eax, eax
jle 0x4df385
mov word [esp + 0x1c0], 0x17
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1c2], ax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4df385
push 0xa
push 0
push eax
call fcn.00667589
add esp, 0xc
mov dword [esp + 0x1d8], eax
jmp 0x4df385