Function at 0x14004b640
Capabilities:
Convert ip address from string

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x5f0
lea rdi, [rsp + 0x30]
mov ecx, 0x170
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x600]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0x5e8], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov dword [rsp + 0xd0], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0xd8], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0xf8], 0
mov rax, qword [rsp + 0x600]
movzx eax, word [rax + 0x238]
mov word [rsp + 0x104], ax
mov rax, qword [rsp + 0x600]
movzx eax, word [rax + 0x23a]
mov dword [rsp + 0x108], eax
mov eax, 8
imul rax, rax, 0x1e
mov rcx, qword [rsp + 0x600]
mov rax, qword [rcx + rax + 0x718]
mov qword [rsp + 0x110], rax
mov eax, 8
imul rax, rax, 0x1f
mov rcx, qword [rsp + 0x600]
mov rax, qword [rcx + rax + 0x718]
mov qword [rsp + 0x118], rax
mov eax, 8
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x600]
mov rax, qword [rcx + rax + 0x718]
mov qword [rsp + 0x120], rax
cmp qword [rsp + 0x118], 0
je 0x14004b772
mov rax, qword [rsp + 0x118]
mov qword [rsp + 0x5d0], rax
jmp 0x14004b782
mov rax, qword [rsp + 0x110]
mov qword [rsp + 0x5d0], rax
mov rax, qword [rsp + 0x5d0]
mov qword [rsp + 0x128], rax
cmp qword [rsp + 0x120], 0
je 0x14004b7af
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0x5d8], rax
jmp 0x14004b7bf
mov rax, qword [rsp + 0x110]
mov qword [rsp + 0x5d8], rax
mov rax, qword [rsp + 0x5d8]
mov qword [rsp + 0x130], rax
cmp qword [rsp + 0x128], 0
jne 0x14004b7f8
cmp qword [rsp + 0x130], 0
jne 0x14004b7f8
movzx eax, word [rsp + 0x104]
test eax, eax
jne 0x14004b7f8
xor eax, eax
jmp 0x14004bf3c
mov r8d, 0x80
xor edx, edx
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
cmp qword [rsp + 0x128], 0
je 0x14004bd55
mov rcx, qword [rsp + 0x128]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
cmp rax, 0xff
jae 0x14004bd55
movzx eax, byte [0x14013c01c]
mov byte [rsp + 0x150], al
lea rax, [rsp + 0x151]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
mov dword [rsp + 0x254], 0
mov dword [rsp + 0x258], 0
cmp qword [rsp + 0x120], 0
jne 0x14004b8bc
mov qword [rsp + 0x28], pe_nt_image_headers64
lea rax, [rsp + 0x150]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x128]
mov rax, qword [rsp + 0x608]
mov r8d, dword [rax + 0x7d4]
mov edx, dword [rsp + 0x620]
mov ecx, dword [rsp + 0x618]
call fcn.1400b1d40
mov dword [rsp + 0x258], eax
mov eax, dword [rsp + 0x258]
mov dword [rsp + 0x5e0], eax
cmp dword [rsp + 0x5e0], 0
je 0x14004b8f5
cmp dword [rsp + 0x5e0], 1
je 0x14004b97c
cmp dword [rsp + 0x5e0], 2
je 0x14004b986
jmp 0x14004b9d0
cmp qword [rsp + 0x118], 0
je 0x14004b97a
cmp qword [rsp + 0x120], 0
jne 0x14004b97a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x138], eax
mov rax, qword [rsp + 0x600]
mov ecx, dword [rsp + 0x138]
mov dword [rax + 0xca4], ecx
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x270]
mov ecx, dword [rsp + 0x138]
call fcn.1400684f0
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x138]
mov r8, qword [rsp + 0x128]
lea rdx, str.Couldnt_bind_to_interface__s_with_errno__d:__s
mov rcx, qword [rsp + 0x600]
call fcn.14003ce90
mov eax, 0x2d
jmp 0x14004bf3c
jmp 0x14004b9d0
mov eax, 1
jmp 0x14004bf3c
lea rax, [rsp + 0x150]
mov qword [rsp + 0x130], rax
mov eax, dword [rsp + 0x618]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x130]
mov r8, qword [rsp + 0x128]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
mov rcx, qword [rsp + 0x600]
call fcn.14003d050
mov dword [rsp + 0x254], 1
cmp qword [rsp + 0x118], 0
je 0x14004b9ea
cmp qword [rsp + 0x120], 0
je 0x14004bb5a
mov rax, qword [rsp + 0x608]
movzx eax, byte [rax + 0x7df]
mov byte [rsp + 0x374], al
cmp dword [rsp + 0x618], 2
jne 0x14004ba1b
mov rax, qword [rsp + 0x608]
mov byte [rax + 0x7df], 1
jmp 0x14004ba34
cmp dword [rsp + 0x618], 0x17
jne 0x14004ba34
mov rax, qword [rsp + 0x608]
mov byte [rax + 0x7df], 2
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x50
mov rdx, qword [rsp + 0x130]
mov rcx, qword [rsp + 0x600]
call fcn.140055430
mov dword [rsp + 0x378], eax
cmp dword [rsp + 0x378], 1
jne 0x14004ba86
lea rdx, [rsp + 0xf8]
mov rcx, qword [rsp + 0x600]
call fcn.14001da20
nop
mov rax, qword [rsp + 0x608]
movzx ecx, byte [rsp + 0x374]
mov byte [rax + 0x7df], cl
cmp qword [rsp + 0xf8], 0
je 0x14004bb4f
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x150]
mov rax, qword [rsp + 0xf8]
mov rcx, qword [rax]
call fcn.140055e40
mov rax, qword [rsp + 0xf8]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x618]
mov r8, qword [rsp + 0x130]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov rcx, qword [rsp + 0x600]
call fcn.14003d050
mov rdx, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0x600]
call fcn.140055bd0
mov rax, qword [rsp + 0xf8]
mov rax, qword [rax]
mov eax, dword [rax + 4]
cmp dword [rsp + 0x618], eax
je 0x14004bb42
mov eax, 1
jmp 0x14004bf3c
mov dword [rsp + 0x254], 1
jmp 0x14004bb5a
mov dword [rsp + 0x254], 0xffffffff
cmp dword [rsp + 0x254], 0
jle 0x14004bcc8
cmp dword [rsp + 0x618], 0x17
jne 0x14004bc63
mov edx, 0x25
lea rcx, [rsp + 0x150]
call sub.VCRUNTIME140.dll_strchr
mov qword [rsp + 0x380], rax
cmp qword [rsp + 0x380], 0
je 0x14004bbb9
mov rax, qword [rsp + 0x380]
mov byte [rax], 0
mov rax, qword [rsp + 0x380]
inc rax
mov qword [rsp + 0x380], rax
mov rax, qword [rsp + 0xe0]
add rax, 8
mov r8, rax
lea rdx, [rsp + 0x150]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x14004bc56
mov eax, reloc.WS2_32.dll_socket
mov rcx, qword [rsp + 0xe0]
mov word [rcx], ax
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0xe0]
mov word [rcx + 2], ax
cmp qword [rsp + 0x380], 0
je 0x14004bc56
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x380]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
mov dword [rsp + 0x388], eax
cmp dword [rsp + 0x388], 0xffffffff
jbe 0x14004bc44
mov eax, 1
jmp 0x14004bf3c
mov rax, qword [rsp + 0xe0]
mov ecx, dword [rsp + 0x388]
mov dword [rax + 0x18], ecx
mov dword [rsp + 0xd0], 0x1c
jmp 0x14004bcc8
cmp dword [rsp + 0x618], 2
jne 0x14004bcc8
mov rax, qword [rsp + 0xd8]
add rax, 4
mov r8, rax
lea rdx, [rsp + 0x150]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x14004bcc8
mov eax, 2
mov rcx, qword [rsp + 0xd8]
mov word [rcx], ax
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0xd8]
mov word [rcx + 2], ax
mov dword [rsp + 0xd0], reloc.WS2_32.dll_recv
cmp dword [rsp + 0x254], 1
jge 0x14004bd50
mov rax, qword [rsp + 0x600]
mov byte [rax + 0x12b0], 0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x138], eax
mov rax, qword [rsp + 0x600]
mov ecx, dword [rsp + 0x138]
mov dword [rax + 0xca4], ecx
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x3a0]
mov ecx, dword [rsp + 0x138]
call fcn.1400684f0
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x138]
mov r8, qword [rsp + 0x130]
lea rdx, str.Couldnt_bind_to__s_with_errno__d:__s
mov rcx, qword [rsp + 0x600]
call fcn.14003ce90
mov eax, 0x2d
jmp 0x14004bf3c
jmp 0x14004bdd5
cmp dword [rsp + 0x618], 0x17
jne 0x14004bd96
mov eax, reloc.WS2_32.dll_socket
mov rcx, qword [rsp + 0xe0]
mov word [rcx], ax
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0xe0]
mov word [rcx + 2], ax
mov dword [rsp + 0xd0], 0x1c
jmp 0x14004bdd5
cmp dword [rsp + 0x618], 2
jne 0x14004bdd5
mov eax, 2
mov rcx, qword [rsp + 0xd8]
mov word [rcx], ax
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0xd8]
mov word [rcx + 2], ax
mov dword [rsp + 0xd0], reloc.WS2_32.dll_recv
mov r8d, dword [rsp + 0xd0]
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x610]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x14004be2c
movzx eax, word [rsp + 0x104]
mov r8d, eax
lea rdx, str.Local_port:__hu
mov rcx, qword [rsp + 0x600]
call fcn.14003d050
mov rax, qword [rsp + 0x608]
mov byte [rax + 0x3b5], 1
xor eax, eax
jmp 0x14004bf3c
mov eax, dword [rsp + 0x108]
dec eax
mov dword [rsp + 0x108], eax
cmp dword [rsp + 0x108], 0
jle 0x14004bed4
movzx eax, word [rsp + 0x104]
inc ax
mov word [rsp + 0x104], ax
movzx eax, word [rsp + 0x104]
test eax, eax
jne 0x14004be6b
jmp 0x14004bedb
movzx eax, word [rsp + 0x104]
dec eax
mov r8d, eax
lea rdx, str.Bind_to_local_port__d_failed__trying_next
mov rcx, qword [rsp + 0x600]
call fcn.14003d050
mov rax, qword [rsp + 0xc8]
movzx eax, word [rax]
cmp eax, 2
jne 0x14004beb8
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_ntohs]
mov rcx, qword [rsp + 0xd8]
mov word [rcx + 2], ax
jmp 0x14004bed2
movzx ecx, word [rsp + 0x104]
call qword [sym.imp.WS2_32.dll_ntohs]
mov rcx, qword [rsp + 0xe0]
mov word [rcx + 2], ax
jmp 0x14004bed6
jmp 0x14004bedb
jmp 0x14004bdd5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x138], eax
mov rax, qword [rsp + 0x600]
mov ecx, dword [rsp + 0x138]
mov dword [rax + 0xca4], ecx
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x4c0]
mov ecx, dword [rsp + 0x138]
call fcn.1400684f0
mov r9, rax
mov r8d, dword [rsp + 0x138]
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, qword [rsp + 0x600]
call fcn.14003ce90
nop
mov eax, 0x2d
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_getsockname
call fcn.1400d050c
mov rax, rdi
mov rcx, qword [rsp + 0x5e8]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x5f0
pop rdi
ret