Function at 0x420ed0
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x2a8
mov eax, dword [0x4764c0]
xor eax, esp
mov dword [esp + 0x2a4], eax
mov eax, dword [esp + 0x2b0]
push ebx
mov ebx, dword [esp + 0x2b0]
push ebp
push esi
mov dword [esp + 0x20], eax
mov edx, dword [ebx + 0x560]
test edx, edx
mov eax, dword [ebx + 0x55c]
mov esi, eax
mov ecx, dword [ebx + 0x564]
cmovne esi, edx
movzx ebp, word [ebx + 0x18a]
test ecx, ecx
push edi
movzx edi, word [ebx + 0x188]
cmovne eax, ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], eax
test esi, esi
jne 0x420f57
test eax, eax
jne 0x420f57
test di, di
je 0x42132d
push 0x80
lea eax, [esp + 0x38]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test esi, esi
je 0x42125f
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x420f78
sub ecx, edx
cmp ecx, 0xff
jae 0x42125f
push 0xff
mov byte [esp + 0xb8], al
lea eax, [esp + 0xb9]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [esp + 0x2d4]
xor eax, eax
mov dword [esp + 0x28], eax
add esp, 0xc
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x42104b
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0xb4]
push 0x100
push eax
push dword [esp + 0x34]
push dword [ecx + 0x50c]
push dword [esp + 0x2dc]
push esi
call fcn.0040cfd0
add esp, 0x18
sub eax, 0
je 0x421047
sub eax, 1
je 0x42114e
sub eax, 1
jne 0x421029
push esi
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 ebx
call fcn.00419fb0
add esp, 0x14
mov dword [esp + 0x1c], 1
cmp dword [esp + 0x30], 0
je 0x421095
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x421095
cmp dword [esp + 0x1c], eax
jbe 0x42120e
jmp 0x421167
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x30], 0
je 0x421095
test eax, eax
jne 0x421095
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1b4]
push 0x100
push eax
push esi
mov dword [ebx + 0x8c8], esi
call fcn.00430050
push eax
push esi
push dword [esp + 0x40]
push str.Couldnt_bind_to_interface__s_with_errno__d:__s
push ebx
call fcn.00419ee0
add esp, 0x20
mov eax, 0x2d
jmp 0x42132f
mov ecx, dword [esp + 0x24]
mov al, byte [ecx + 0x517]
mov byte [esp + 0x13], al
cmp esi, 2
jne 0x4210b1
mov byte [ecx + 0x517], 1
jmp 0x4210bd
cmp esi, 0x17
jne 0x4210bd
mov byte [ecx + 0x517], 2
lea eax, [esp + 0x18]
push eax
push 0
push 0x50
push dword [esp + 0x2c]
push ebx
call fcn.00426a80
add esp, 0x14
cmp eax, 1
jne 0x4210e6
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040d1c0
add esp, 8
mov ecx, dword [esp + 0x24]
mov al, byte [esp + 0x13]
mov byte [ecx + 0x517], al
mov eax, dword [esp + 0x18]
test eax, eax
je 0x421219
mov eax, dword [eax]
lea ecx, [esp + 0xb4]
push 0x100
push ecx
push eax
mov esi, dword [eax + 4]
call fcn.00426a30
push esi
lea eax, [esp + 0xc4]
push eax
push dword [esp + 0x2dc]
push dword [esp + 0x38]
push str.Name__s_family__i_resolved_to__s_family__i
push ebx
call fcn.00419fb0
lea eax, [esp + 0x3c]
push eax
push ebx
call fcn.00426fe0
add esp, 0x2c
cmp dword [esp + 0x2c8], esi
je 0x421158
mov eax, 1
jmp 0x42132f
mov esi, dword [esp + 0x2c8]
mov dword [esp + 0x1c], 1
cmp esi, 0x17
jne 0x4211d6
lea eax, [esp + 0xb4]
push 0x25
push eax
call sub.VCRUNTIME140.dll_strchr
mov esi, eax
add esp, 8
test esi, esi
je 0x421188
mov byte [esi], 0
inc esi
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 0x4211cc
mov eax, 0x17
push edi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
test esi, esi
je 0x4211cc
push 0xa
push 0
push esi
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
add esp, 0xc
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], 0x1c
jmp 0x42120e
cmp esi, 2
jne 0x42120e
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xb8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x42120e
mov eax, esi
push edi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov dword [esp + 0x14], 0x10
cmp dword [esp + 0x1c], 1
jae 0x4212a8
mov byte [ebx + 0xd0b], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1b4]
push 0x100
push eax
push esi
mov dword [ebx + 0x8c8], esi
call fcn.00430050
push eax
push esi
push dword [esp + 0x34]
push str.Couldnt_bind_to__s_with_errno__d:__s
push ebx
call fcn.00419ee0
add esp, 0x20
mov eax, 0x2d
jmp 0x42132f
mov eax, dword [esp + 0x2c8]
cmp eax, 0x17
jne 0x421287
push edi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov eax, 0x1c
mov dword [esp + 0x14], eax
jmp 0x4212b0
cmp eax, 2
jne 0x4212ae
push edi
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov eax, 0x10
mov dword [esp + 0x14], eax
jmp 0x4212b0
mov eax, dword [esp + 0x14]
jmp 0x4212b0
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 0x421310
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
nop dword [eax]
dec ebp
test ebp, ebp
jle 0x421348
inc edi
test di, di
je 0x421348
movzx eax, di
dec eax
push eax
push str.Bind_to_local_port__d_failed__trying_next
push ebx
call fcn.00419fb0
add esp, 0xc
push edi
call esi
push dword [esp + 0x14]
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 0x4212d0
movzx eax, di
push eax
push str.Local_port:__hu
push ebx
call fcn.00419fb0
mov eax, dword [esp + 0x30]
add esp, 0xc
mov byte [eax + 0x2a4], 1
xor eax, eax
mov ecx, dword [esp + 0x2b4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045fb12
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 [ebx + 0x8c8], esi
call fcn.00430050
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.00419ee0
add esp, 0x1c
mov eax, 0x2d
jmp 0x42132f