Function at 0x140031d60
Capabilities:
Resolve dns

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x940
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov qword [rsp + 0x990], rbx
mov rax, qword [0x1401043b8]
xor rax, rsp
mov qword [rsp + 0x930], rax
movzx r12d, r8w
mov rdi, rdx
mov rsi, rcx
mov qword [rsp + 0x118], rcx
xor r13d, r13d
mov dword [rsp + 0x40], r13d
mov r8b, 2
mov dl, 1
call fcn.140040770
mov dword [rsi + 0xc], r13d
mov word [rsi + 8], r13w
mov dword [rsp + 0x40], 1
lea rax, vtable.StringStorage.0
mov qword [rsp + 0x48], rax
lea ecx, [r13 + 8]
call fcn.1400797fc
test rax, rax
je 0x140031df2
lea rcx, [rsp + 0x50]
mov qword [rax], rcx
jmp 0x140031df5
mov rax, r13
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x78], r13
lea rbp, [0x1400d1b20]
test rdi, rdi
cmovne rbp, rdi
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
mov rdx, rcx
xor r8d, r8d
lea rcx, [rsp + 0x50]
call fcn.14002bfc0
mov rdx, qword [rsp + 0x70]
mov rbx, rdx
mov rdi, qword [rsp + 0x68]
sub rbx, rdi
sar rbx, 1
add rbx, rbx
cmp rdi, rdx
jbe 0x140031e56
call fcn.1400796a8
mov rax, qword [rsp + 0x50]
test rax, rax
jne 0x140031e6a
call fcn.1400796a8
mov rdx, r13
jmp 0x140031e6d
mov rdx, qword [rax]
cmp rdi, qword [rdx + 0x20]
jb 0x140031e78
call fcn.1400796a8
mov r8, rbx
mov rdx, rbp
mov rcx, rdi
call fcn.14007ad70
nop
lea rax, vtable.AutoLock.0
mov qword [rsp + 0xb8], rax
lea r14, vtable.LocalMutex.0
mov qword [rsp + 0xc0], r14
mov rcx, r14
mov rax, qword [vtable.LocalMutex.0]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea r15, vtable.AnsiStringStorage.0
mov qword [rsp + 0x80], r15
mov ecx, 8
call fcn.1400797fc
test rax, rax
je 0x140031ede
lea rcx, [rsp + 0x88]
mov qword [rax], rcx
jmp 0x140031ee1
mov rax, r13
mov qword [rsp + 0x88], rax
mov qword [rsp + 0xa0], r13
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0xb0], r13
mov rdi, qword [rsp + 0x70]
sub rdi, qword [rsp + 0x68]
sar rdi, 1
movsxd rdx, edi
xor r8d, r8d
lea rcx, [rsp + 0x88]
call fcn.14002f760
mov rbp, qword [rsp + 0xa0]
cmp rbp, qword [rsp + 0xa8]
jbe 0x140031f38
call fcn.1400796a8
mov rax, qword [rsp + 0x88]
test rax, rax
jne 0x140031f4f
call fcn.1400796a8
mov r11, r13
jmp 0x140031f52
mov r11, qword [rax]
cmp rbp, qword [r11 + 0x20]
jb 0x140031f5d
call fcn.1400796a8
mov rbx, qword [rsp + 0x68]
cmp rbx, qword [rsp + 0x70]
jbe 0x140031f6e
call fcn.1400796a8
mov rax, qword [rsp + 0x50]
test rax, rax
jne 0x140031f82
call fcn.1400796a8
mov r11, r13
jmp 0x140031f85
mov r11, qword [rax]
cmp rbx, qword [r11 + 0x20]
jb 0x140031f90
call fcn.1400796a8
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbp
mov r9d, edi
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
nop
mov rdi, qword [rsp + 0xa0]
cmp rdi, qword [rsp + 0xa8]
jbe 0x140031fcb
call fcn.1400796a8
mov rax, qword [rsp + 0x88]
test rax, rax
jne 0x140031fe2
call fcn.1400796a8
mov rdx, r13
jmp 0x140031fe5
mov rdx, qword [rax]
cmp rdi, qword [rdx + 0x20]
jb 0x140031ff0
call fcn.1400796a8
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
jne 0x1400320b7
lea rax, vtable.Exception.0
mov qword [rsp + 0xd0], rax
lea rcx, [rsp + 0xd8]
call fcn.14002e130
nop
lea rdx, [0x1400d1b20]
lea rcx, [rsp + 0xd8]
mov rax, qword [rsp + 0xd8]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rax, vtable.SocketException.0
mov qword [rsp + 0xd0], rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x110], eax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x800
lea rcx, [rsp + 0x120]
mov qword [rsp + 0x20], rcx
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x1200
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0xd8]
mov rax, qword [rsp + 0xd8]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rdx, [0x140101ce8]
lea rcx, [rsp + 0xd0]
call fcn.14007c4b0
int3
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov ecx, dword [rcx]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rsi + 0xc], eax
mov qword [rsp + 0x80], r15
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x1400320e3
call fcn.140078e60
mov qword [rsp + 0xa0], r13
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0xb0], r13
mov rcx, qword [rsp + 0x88]
call fcn.140078e60
nop
mov rcx, r14
mov rax, qword [vtable.LocalMutex.0]
call qword [rax + reloc.WS2_32.dll_recv]
mov word [rsi + 8], r12w
lea rax, vtable.StringStorage.0
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140032136
call fcn.140078e60
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x78], r13
mov rcx, qword [rsp + 0x50]
call fcn.140078e60
mov rax, rsi
mov rcx, qword [rsp + 0x930]
xor rcx, rsp
call fcn.140078e40
mov rbx, qword [rsp + 0x990]
add rsp, 0x940
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret