Function at 0x5a9c70
Capabilities:
Resolve dns

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x238
mov r15, r8
mov r14, rdx
mov rsi, rcx
lea rcx, [rsp + 0xb8]
call fcn.00452b00
cmp word [rsp + 0xb8], 2
jne 0x5a9d60
mov qword [rsp + 0xb8], r14
mov qword [rsp + 0xc0], r15
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd8], 1
movabs rax, 0x3a0000003a
mov qword [rsp + 0xe0], rax
mov bl, 0x3a
mov rdi, r15
jmp 0x5a9cf9
cmp rdi, r15
ja 0x5a9dd8
mov cl, 0x3a
mov rdx, r14
mov r8, rdi
call fcn.004556e0
cmp rax, 1
jne 0x5a9dd8
mov rdi, rdx
cmp rdx, r15
jae 0x5a9cf0
cmp byte [r14 + rdi], bl
jne 0x5a9cf0
lea r12, [rdi + 1]
lea rcx, str.invalid_port_value
sub r15, r12
je 0x5a9ddf
lea r8, [r14 + rdi]
inc r8
movzx eax, byte [r8]
cmp eax, 0x2d
je 0x5a9dfe
cmp eax, 0x2b
jne 0x5a9e04
dec r15
je 0x5a9ddf
inc r8
jmp 0x5a9e04
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x5a9d8b
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x5aa2e7
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x20
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x5aa2e7
movdqu xmm0, xmmword [rsp + 0xb8]
movdqu xmm1, xmmword [rsp + 0xc8]
movdqu xmmword [rax + 0x10], xmm1
movdqu xmmword [rax], xmm0
mov rcx, rax
add rcx, 0x20
mov qword [rsi], rax
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], rcx
jmp 0x5a9dea
lea rcx, str.invalid_socket_address
mov qword [rsi + 8], rcx
mov qword [rsi], 0
add rsp, 0x238
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp r15, 1
je 0x5a9ddf
cmp r15, 5
jae 0x5a9e9b
xor eax, eax
xor ebx, ebx
nop word cs:[rax + rax]
movzx edx, byte [r8 + rax]
add edx, 0xffffffd0
cmp edx, 9
ja 0x5a9ddf
add ebx, ebx
lea ebx, [rbx + rbx*4]
add ebx, edx
inc rax
cmp r15, rax
jne 0x5a9e20
mov rax, qword [0x009bf108]
cmp rax, 3
jne 0x5aa2b8
cmp rdi, 0x17f
ja 0x5aa2ca
lea r15, [rsp + 0xb8]
mov rcx, r15
mov rdx, r14
mov r8, rdi
call sub.msvcrt.dll_memcpy
mov byte [rsp + rdi + 0xb8], 0
cmp rdi, 0xe
ja 0x5a9ee9
xor ecx, ecx
cmp byte [rsp + rcx + 0xb8], 0
je 0x5a9f91
inc rcx
cmp r12, rcx
jne 0x5a9e80
jmp 0x5a9ff3
xor r9d, r9d
mov r10w, 0xa
xor ebx, ebx
nop word cs:[rax + rax]
cmp r15, r9
je 0x5a9e3c
movzx r11d, byte [r8 + r9]
mov eax, ebx
mul r10w
seto dl
add r11d, 0xffffffd0
cmp r11d, 9
ja 0x5a9ddf
test dl, dl
jne 0x5a9ddf
mov ebx, eax
inc r9
add bx, r11w
jae 0x5a9eb0
jmp 0x5a9ddf
lea rax, [rsp + 0xbf]
and rax, 0xfffffffffffffff8
sub rax, r15
je 0x5a9f1f
je 0x5a9f1f
xor ecx, ecx
cmp byte [rsp + rcx + 0xb8], 0
je 0x5a9f91
inc rcx
cmp rax, rcx
jne 0x5a9efe
lea rcx, [rdi - 0xf]
cmp rax, rcx
jbe 0x5a9f25
jmp 0x5a9f68
lea rcx, [rdi - 0xf]
xor eax, eax
movdqa xmm0, xmmword [0x00873480]
movabs rdx, 0x8080808080808080
movdqu xmm1, xmmword [rsp + rax + 0xb8]
movdqa xmm2, xmm1
paddq xmm2, xmm0
pandn xmm1, xmm2
pshufd xmm2, xmm1, 0xee
por xmm2, xmm1
movq r8, xmm2
test r8, rdx
jne 0x5a9f68
add rax, 0x10
cmp rax, rcx
jbe 0x5a9f37
sub r12, rax
je 0x5a9ff3
lea rdx, [rsp + rax]
add rdx, 0xb8
xor ecx, ecx
cmp byte [rdx + rcx], 0
je 0x5a9f8e
inc rcx
cmp r12, rcx
jne 0x5a9f7e
jmp 0x5a9ff3
add rcx, rax
cmp rcx, rdi
jne 0x5a9ff3
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rsp + 0x90], xmm0
movdqa xmmword [rsp + 0x80], xmm0
mov dword [rsp + 0x78], 1
mov qword [rsp + 0x48], 0
lea rcx, [rsp + 0xb8]
lea r8, [rsp + 0x70]
lea r9, [rsp + 0x48]
xor edx, edx
call sub.WS2_32.dll_getaddrinfo
test eax, eax
je 0x5aa29d
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
jmp 0x5a9ffa
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsp + 0x30], rax
mov eax, 1
test rax, rax
je 0x5aa013
mov rcx, qword [rsp + 0x30]
jmp 0x5a9ddf
movzx eax, word [rsp + 0x40]
mov ecx, dword [rsp + 0x42]
mov dword [rsp + 0x68], ecx
movzx r8d, word [rsp + 0x46]
mov word [rsp + 0x6c], r8w
lea rdx, [rsp + 0x30]
movdqu xmm0, xmmword [rsp + 0x30]
mov word [rsp + 0x26], ax
movdqu xmmword [rsp + 0x30], xmm0
mov word [rsp + 0x40], ax
mov dword [rsp + 0x42], ecx
mov word [rsp + 0x46], r8w
lea rax, [rsp + 0x26]
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0xb8]
call fcn.005a9780
movzx edi, word [rsp + 0xb8]
cmp di, 2
jne 0x5aa08e
mov rcx, qword [rsp + 0x30]
call sub.WS2_32.dll_freeaddrinfo
mov eax, 4
xor ecx, ecx
xor edi, edi
jmp 0x5aa282
mov ebp, dword [rsp + 0xba]
movzx r14d, word [rsp + 0xbe]
mov eax, dword [rsp + 0xd0]
mov dword [rsp + 0x80], eax
movdqu xmm0, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x70], xmm0
movzx r12d, word [rsp + 0xd4]
movzx r15d, word [rsp + 0xd6]
mov rax, qword [rsp + 0x28]
movzx r13d, word [rax]
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x5aa101
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x5aa2f8
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, pe_nt_image_headers64
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x5aa2f8
mov rbx, rax
test di, di
cmovne r12d, r13d
cmove r14d, r13d
mov eax, dword [rsp + 0x80]
mov dword [rbx + 0x18], eax
movaps xmm0, xmmword [rsp + 0x70]
movups xmmword [rbx + 8], xmm0
mov word [rbx], di
mov dword [rbx + 2], ebp
mov word [rbx + 6], r14w
mov word [rbx + 0x1c], r12w
mov word [rbx + 0x1e], r15w
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], 4
mov qword [rsp + 0x58], 1
movdqu xmm0, xmmword [rsp + 0x28]
movdqu xmm1, xmmword [rsp + 0x38]
movdqa xmmword [rsp + 0x80], xmm1
movdqa xmmword [rsp + 0x70], xmm0
mov edi, 1
mov r13d, 0x20
jmp 0x5aa1d4
mov word [rbx + r13], r12w
mov eax, dword [rsp + 0x64]
mov dword [rbx + r13 + 2], eax
mov word [rbx + r13 + 6], bp
movdqa xmm0, xmmword [rsp + 0xa0]
movdqu xmmword [rbx + r13 + 8], xmm0
mov eax, dword [rsp + 0xb0]
mov dword [rbx + r13 + 0x18], eax
mov word [rbx + r13 + 0x1c], r15w
mov word [rbx + r13 + 0x1e], r14w
inc rdi
mov qword [rsp + 0x58], rdi
add r13, 0x20
lea rcx, [rsp + 0xb8]
lea rdx, [rsp + 0x78]
call fcn.005a9780
movzx r12d, word [rsp + 0xb8]
cmp r12w, 2
je 0x5aa26e
mov eax, dword [rsp + 0xba]
mov dword [rsp + 0x64], eax
movzx ebp, word [rsp + 0xbe]
lea rcx, [rsp + 0xc0]
mov eax, dword [rcx + 0x10]
mov dword [rsp + 0xb0], eax
movdqu xmm0, xmmword [rcx]
movdqa xmmword [rsp + 0xa0], xmm0
mov rax, qword [rsp + 0x70]
movzx r15d, word [rax]
test r12w, r12w
jne 0x5aa243
mov ebp, r15d
movzx r15d, word [rsp + 0xd4]
movzx r14d, word [rsp + 0xd6]
cmp rdi, qword [rsp + 0x50]
jne 0x5aa18c
lea rcx, [rsp + 0x48]
mov rdx, rdi
call fcn.005a98f0
mov rbx, qword [rsp + 0x48]
jmp 0x5aa18c
mov rcx, qword [rsp + 0x78]
call sub.WS2_32.dll_freeaddrinfo
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
shl rdi, 5
add rdi, rax
mov qword [rsi], rax
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], rdi
jmp 0x5a9dea
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov word [rsp + 0x40], bx
xor eax, eax
jmp 0x5aa004
call fcn.005a99b0
cmp rdi, 0x17f
jbe 0x5a9e5a
lea rcx, [rsp + 0x28]
mov rdx, r14
mov r8, rdi
mov r9d, ebx
call fcn.005a9a20
mov rax, qword [rsp + 0x28]
jmp 0x5aa004
mov ecx, 4
mov edx, 0x20
call fcn.0044dfd0
ud2
mov ecx, 4
mov edx, pe_nt_image_headers64
call fcn.0044dfd0
ud2