Function at 0x41ee70
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x2a8
mov eax, dword [0x46f440]
xor eax, esp
mov dword [esp + 0x2a4], eax
mov eax, dword [esp + 0x2b0]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2bc]
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov edx, dword [edi + 0x550]
test edx, edx
mov eax, dword [edi + 0x54c]
mov ebx, eax
mov ecx, dword [edi + 0x554]
cmovne ebx, edx
movzx esi, word [edi + 0x178]
test ecx, ecx
movzx ebp, word [edi + 0x17a]
cmovne eax, ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], eax
test ebx, ebx
jne 0x41eef7
test eax, eax
jne 0x41eef7
test si, si
je 0x41f2c2
push 0x80
lea eax, [esp + 0x38]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test ebx, ebx
je 0x41f1f7
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41ef18
sub ecx, edx
cmp ecx, 0xff
jae 0x41f1f7
push 0xff
mov byte [esp + 0xb8], al
lea eax, [esp + 0xb9]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [esp + 0x2d4]
xor eax, eax
mov dword [esp + 0x28], eax
add esp, 0xc
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x41efeb
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0xb4]
push 0x100
push eax
push dword [esp + 0x34]
push dword [ecx + 0x508]
push dword [esp + 0x2dc]
push ebx
call fcn.0040b2c0
add esp, 0x18
sub eax, 0
je 0x41efe7
sub eax, 1
je 0x41f0ed
sub eax, 1
jne 0x41efc9
push ebx
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x34]
mov dword [esp + 0x2c], eax
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.00417f00
add esp, 0x14
mov dword [esp + 0x1c], 1
cmp dword [esp + 0x30], 0
je 0x41f035
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x41f035
cmp dword [esp + 0x1c], eax
jbe 0x41f1a6
jmp 0x41f0ff
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x30], 0
je 0x41f035
test eax, eax
jne 0x41f035
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1b4]
push 0x100
push eax
push esi
mov dword [edi + 0x8b0], esi
call fcn.0042e270
push eax
push esi
push dword [esp + 0x40]
push str.Couldnt_bind_to_interface__s_with_errno__d:__s
push edi
call fcn.00417e30
add esp, 0x20
mov eax, 0x2d
jmp 0x41f2c4
mov ecx, dword [esp + 0x24]
mov al, byte [ecx + 0x513]
mov byte [esp + 0x13], al
cmp ebx, 2
jne 0x41f051
mov byte [ecx + 0x513], 1
jmp 0x41f05d
cmp ebx, 0x17
jne 0x41f05d
mov byte [ecx + 0x513], 2
lea eax, [esp + 0x14]
push eax
push 0
push 0x50
push dword [esp + 0x2c]
push edi
call fcn.00424c80
add esp, 0x14
cmp eax, 1
jne 0x41f086
lea eax, [esp + 0x14]
push eax
push edi
call fcn.0040b500
add esp, 8
mov ecx, dword [esp + 0x24]
mov al, byte [esp + 0x13]
mov byte [ecx + 0x513], al
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41f1b1
push 0x100
lea ecx, [esp + 0xb8]
push ecx
push dword [eax]
call fcn.00424c30
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [esp + 0xc4]
push eax
push ebx
push dword [esp + 0x38]
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.00417f00
push dword [esp + 0x38]
push edi
call fcn.004251f0
mov eax, dword [esp + 0x40]
add esp, 0x2c
mov eax, dword [eax]
cmp ebx, dword [eax + 4]
je 0x41f0f7
mov eax, 1
jmp 0x41f2c4
mov dword [esp + 0x1c], 1
cmp ebx, 0x17
jne 0x41f16e
lea eax, [esp + 0xb4]
push 0x25
push eax
call sub.VCRUNTIME140.dll_strchr
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41f120
mov byte [ebx], 0
inc ebx
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0xb8]
push eax
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x41f164
mov eax, 0x17
push esi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
test ebx, ebx
je 0x41f164
push 0xa
push 0
push ebx
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
add esp, 0xc
mov dword [esp + 0x4c], eax
mov dword [esp + 0x18], 0x1c
jmp 0x41f1a6
cmp ebx, 2
jne 0x41f1a6
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xb8]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x41f1a6
mov eax, ebx
push esi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov dword [esp + 0x18], 0x10
cmp dword [esp + 0x1c], 1
jae 0x41f240
mov byte [edi + 0xcf3], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1b4]
push 0x100
push eax
push esi
mov dword [edi + 0x8b0], esi
call fcn.0042e270
push eax
push esi
push dword [esp + 0x34]
push str.Couldnt_bind_to__s_with_errno__d:__s
push edi
call fcn.00417e30
add esp, 0x20
mov eax, 0x2d
jmp 0x41f2c4
mov eax, dword [esp + 0x2c8]
cmp eax, 0x17
jne 0x41f21f
push esi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov eax, 0x1c
mov dword [esp + 0x18], eax
jmp 0x41f248
cmp eax, 2
jne 0x41f246
push esi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov eax, 0x10
mov dword [esp + 0x18], eax
jmp 0x41f248
mov eax, dword [esp + 0x18]
jmp 0x41f248
xor eax, eax
push eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x2cc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x41f2a5
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
dec ebp
test ebp, ebp
jle 0x41f2dd
inc esi
test si, si
je 0x41f2dd
movzx eax, si
dec eax
push eax
push str.Bind_to_local_port__d_failed__trying_next
push edi
call fcn.00417f00
add esp, 0xc
push esi
call ebx
push dword [esp + 0x18]
mov word [esp + 0x3a], ax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x2cc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x41f265
movzx eax, si
push eax
push str.Local_port:__hu
push edi
call fcn.00417f00
mov eax, dword [esp + 0x30]
add esp, 0xc
mov byte [eax + 0x29d], 1
xor eax, eax
mov ecx, dword [esp + 0x2b4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045ac79
add esp, 0x2a8
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1b4]
push 0x100
push eax
push esi
mov dword [edi + 0x8b0], esi
call fcn.0042e270
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.00417e30
add esp, 0x1c
mov eax, 0x2d
jmp 0x41f2c4