Function at 0x1400010d0
Capabilities:
Get domain controller name

Disassembly:
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf60]
mov eax, 0x1060
call fcn.140016fc0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0xf50], rax
xor r12d, r12d
lea rdi, str.SRVVSSKL
mov r15d, r12d
cmp ecx, 1
jle 0x140001119
mov rdi, qword [rdx + 8]
cmp ecx, 2
jle 0x140001122
mov r15, qword [rdx + 0x10]
lea rcx, str.Activeds.dll
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x40], r12
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.ADsOpenObject
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test rax, rax
jne 0x140001161
lea eax, [rsi + 1]
jmp 0x1400017dd
lea rax, [rsp + 0x48]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r12d
xor ecx, ecx
call qword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
je 0x14000119a
lea rcx, str.Failed_to_get_domain_dns_info.
call fcn.140001070
mov eax, 0xffffffff
jmp 0x1400017dd
mov edx, 2
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x140001190
lea rdx, [rbp - 0x30]
mov qword [rsp + 0x1090], rbx
lea rcx, str.FD8256D0_FD15_11CE_ABC4_02608C9E7553
call qword [sym.imp.ole32.dll_IIDFromString]
lea rdx, [rbp - 0x20]
lea rcx, str.E798DE2C_22E4_11D0_84FE_00C04FD8D503
call qword [sym.imp.ole32.dll_IIDFromString]
lea rax, [rsp + 0x38]
mov r9d, 0xc1
mov qword [rsp + 0x28], rax
lea rcx, str.LDAP:__rootDSE
lea rax, [rbp - 0x30]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call rsi
mov ebx, eax
test eax, eax
jns 0x140001213
lea rcx, str.Failed_to_get_rootDSE.
call fcn.140001070
jmp 0x140001772
lea rcx, [rsp + 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x68]
lea rdx, str.defaultNamingContext
mov rax, qword [rcx]
call qword [rax + 0x78]
test eax, eax
jns 0x14000124f
lea rcx, str.Failed_to_get_defaultNamingContext.
call fcn.140001070
mov eax, 0xffffffff
jmp 0x1400017d5
xor edx, edx
lea rcx, [rbp + 0x930]
mov r8d, 0x200
call fcn.140017310
lea r8, str.LDAP:__CNComputers_
mov edx, pe_nt_image_headers64
lea rcx, [rbp + 0x930]
call fcn.14000a1f8
mov r8, qword [rsp + 0x70]
lea rcx, [rbp + 0x930]
mov edx, pe_nt_image_headers64
call fcn.14000a260
lea rax, [rsp + 0x30]
mov r9d, 0xc1
mov qword [rsp + 0x28], rax
lea rcx, [rbp + 0x930]
lea rax, [rbp - 0x20]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call rsi
test eax, eax
jns 0x140001324
lea rdx, str.ADsGetLastError
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea r9, [rbp + 0xb30]
mov dword [rsp + 0x20], 0x104
mov r8d, 0x104
lea rdx, [rbp + 0xd40]
lea rcx, [rbp - 0x38]
call rax
mov edx, dword [rbp - 0x38]
lea rcx, str.ADsOpenObject_failed.__i
call fcn.140001070
mov edx, dword [rbp - 0x38]
lea r9, [rbp + 0xb30]
lea r8, [rbp + 0xd40]
lea rcx, str.Error_Code:__d_n_Error_Text:__ws_n_Provider:__ws_n
call fcn.140001010
mov eax, 0xffffffff
jmp 0x1400017d5
lea rax, str.Computer
mov dword [rbp - 0x80], 3
mov qword [rbp - 0x78], rax
lea rcx, [rbp + 0x330]
lea rax, str.objectClass
mov dword [rbp + 0x18], 2
mov qword [rbp + 0x10], rax
xor edx, edx
lea rax, [rbp - 0x80]
mov dword [rbp + 0x1c], 3
mov r8d, pe_nt_image_headers64
mov qword [rbp + 0x20], rax
mov dword [rbp + 0x28], 1
call fcn.140017310
mov r8, rdi
lea rcx, [rbp + 0x330]
mov edx, 0x80
call fcn.14000a1f8
lea r8, [0x140021700]
mov edx, 0x80
lea rcx, [rbp + 0x330]
call fcn.14000a260
lea rax, [rbp + 0x330]
mov dword [rbp - 0x68], 3
mov qword [rbp - 0x60], rax
lea rcx, [rbp + 0x130]
lea rax, str.sAMAccountName
mov dword [rbp + 0x38], 2
mov qword [rbp + 0x30], rax
xor edx, edx
lea rax, [rbp - 0x68]
mov dword [rbp + 0x3c], 3
mov qword [rbp + 0x40], rax
mov r8d, pe_nt_image_headers64
lea rax, str.userAccountControl
mov dword [rbp + 0x48], 1
mov qword [rbp + 0x50], rax
lea rax, [rbp - 0x10]
mov qword [rbp + 0x60], rax
mov dword [rbp - 0x10], 7
mov dword [rbp - 8], 0x1000
mov dword [rbp + 0x58], 2
mov dword [rbp + 0x5c], 7
mov dword [rbp + 0x68], 1
call fcn.140017310
mov r8, rdi
lea rcx, [rbp + 0x130]
mov edx, 0x80
call fcn.14000a1f8
lea r8, [0x140021750]
mov edx, 0x80
lea rcx, [rbp + 0x130]
call fcn.14000a260
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rcx + 0x28]
call qword [sym.imp.USER32.dll_CharLowerW]
mov edx, 0x80
lea rcx, [rbp + 0x130]
mov r8, rax
call fcn.14000a260
lea rax, [rbp + 0x130]
mov dword [rbp - 0x50], 3
mov qword [rbp - 0x48], rax
lea rcx, [rbp + 0x530]
lea rax, str.dNSHostName
mov dword [rbp + 0x78], 2
mov qword [rbp + 0x70], rax
xor edx, edx
lea rax, [rbp - 0x50]
mov dword [rbp + 0x7c], 3
mov r8d, 0x400
mov qword [rbp + 0x80], rax
mov dword [rbp + 0x88], 1
call fcn.140017310
lea r8, str.HOST_
mov edx, 0x80
lea rcx, [rbp + 0x530]
call fcn.14000a1f8
lea r8, [rbp + 0x130]
mov edx, 0x80
lea rcx, [rbp + 0x530]
call fcn.14000a260
lea r8, str.RestrictedKrbHost_
mov edx, 0x80
lea rcx, [rbp + 0x630]
call fcn.14000a1f8
lea r8, [rbp + 0x130]
mov edx, 0x80
lea rcx, [rbp + 0x630]
call fcn.14000a260
lea r8, str.HOST_
mov edx, 0x80
lea rcx, [rbp + 0x730]
call fcn.14000a1f8
mov r8, rdi
lea rcx, [rbp + 0x730]
mov edx, 0x80
call fcn.14000a260
lea r8, str.RestrictedKrbHost_
mov edx, 0x80
lea rcx, [rbp + 0x830]
call fcn.14000a1f8
mov r8, rdi
lea rcx, [rbp + 0x830]
mov edx, 0x80
call fcn.14000a260
lea rax, [rbp + 0x530]
mov dword [rbp + 0xd0], 3
mov qword [rbp + 0xd8], rax
lea rcx, [rbp + 0x230]
lea rax, [rbp + 0x630]
mov dword [rbp + 0xe8], 3
mov qword [rbp + 0xf0], rax
xor edx, edx
lea rax, [rbp + 0x730]
mov dword [rbp + 0x100], 3
mov qword [rbp + 0x108], rax
mov r8d, pe_nt_image_headers64
lea rax, [rbp + 0x830]
mov dword [rbp + 0x118], 3
mov qword [rbp + 0x120], rax
lea rax, str.servicePrincipalName
mov qword [rbp + 0x90], rax
lea rax, [rbp + 0xd0]
mov qword [rbp + 0xa0], rax
mov dword [rbp + 0x98], 2
mov dword [rbp + 0x9c], 3
mov dword [rbp + 0xa8], 4
call fcn.140017310
test r15, r15
lea rbx, str.GCmtHzw8uI_JnJB
lea r8, [0x1400217f8]
mov edx, 0x80
lea rcx, [rbp + 0x230]
cmovne rbx, r15
call fcn.14000a1f8
mov r8, rbx
lea rcx, [rbp + 0x230]
mov edx, 0x80
call fcn.14000a260
lea r8, [0x1400217f8]
mov edx, 0x80
lea rcx, [rbp + 0x230]
call fcn.14000a260
lea rcx, [rbp + 0x230]
mov dword [rsp + 0x50], 8
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], r12w
jne 0x140001693
add eax, eax
mov dword [rbp + 0xb8], 2
mov dword [rsp + 0x58], eax
lea rcx, [rbp + 0x430]
lea rax, [rbp + 0x230]
mov dword [rbp + 0xc8], 1
mov qword [rsp + 0x60], rax
xor edx, edx
lea rax, str.unicodePwd
mov r8d, pe_nt_image_headers64
mov qword [rbp + 0xb0], rax
lea rax, [rsp + 0x50]
mov qword [rbp + 0xc0], rax
call fcn.140017310
lea r8, [0x140021818]
mov edx, 0x80
lea rcx, [rbp + 0x430]
call fcn.14000a1f8
mov r8, rdi
lea rcx, [rbp + 0x430]
mov edx, 0x80
call fcn.14000a260
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], rdx
lea r8, [rbp + 0x10]
mov r9d, 6
lea rdx, [rbp + 0x430]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
jns 0x14000175c
lea rcx, str.Failed_to_create_Computer_object.
call fcn.140001070
mov eax, 0xffffffff
jmp 0x1400017d5
lea r8, [rbp + 0x230]
mov rdx, rdi
lea rcx, str.___Machine_account__ls__created_with_password:__ls__n
call fcn.140001070
lea rcx, str.Cleanup
call fcn.140001070
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14000178e
call qword [sym.imp.NETAPI32.dll_NetApiBufferFree]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400017a3
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x40], r12
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400017b8
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x30], r12
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400017cd
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rsp + 0x38], r12
call qword [sym.imp.ole32.dll_CoUninitialize]
mov eax, ebx
mov rbx, qword [rsp + 0x1090]
mov rcx, qword [rbp + 0xf50]
xor rcx, rsp
call fcn.140001820
mov rsi, qword [rsp + 0x10a0]
add rsp, 0x1060
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret