Function at 0x180021970
Capabilities:
Get domain controller name
Get domain information
Send data
Send data on socket

Disassembly:
push rbp
push r12
push r13
lea rbp, [rsp - 0xb50]
sub rsp, 0xc50
mov rax, qword [0x1800990e0]
xor rax, rsp
mov qword [rbp + 0xb30], rax
mov r12, rcx
lea rcx, [rbp + 0x531]
xor edx, edx
mov r8d, 0x3ff
mov byte [rbp + 0x530], 0
call fcn.1800292e0
xor r13d, r13d
lea rcx, [rbp + 0x331]
xor edx, edx
mov r8d, 0xff
mov qword [rsp + 0x68], r13
mov byte [rbp + 0x330], r13b
call fcn.1800292e0
cmp dword [0x18009caf4], 5
jl 0x1800219ec
lea rcx, str.ShowDomainGroupMembers
call fcn.1800169b0
lea r8, [rsp + 0x68]
xor edx, edx
xor ecx, ecx
call sub.NETAPI32.dll_NetGetDCName
test eax, eax
jne 0x1800224d7
lea rcx, [rbp + 0x11]
xor edx, edx
mov r8d, 0xff
mov byte [rbp + 0x10], r13b
call fcn.1800292e0
lea rcx, [rbp + 0x121]
xor edx, edx
mov r8d, 0xff
mov byte [rbp + 0x120], r13b
call fcn.1800292e0
mov r8, qword [rsp + 0x68]
test r8, r8
je 0x1800224e6
mov qword [rsp + 0xc78], rbx
mov qword [rsp + 0xc88], rdi
or rdi, 0xffffffffffffffff
lea rcx, [rbp + 0x930]
mov edx, 0xff
mov r9, rdi
call fcn.18002bfb0
lea r8, [rsp + 0x40]
lea edx, [rdi + 2]
xor ecx, ecx
mov qword [rsp + 0x40], r13
call sub.NETAPI32.dll_DsRoleGetPrimaryDomainInformation
test eax, eax
jne 0x180021ab3
mov r8, qword [rsp + 0x40]
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x10]
mov r8, qword [r8 + 8]
mov qword [rsp + 0x30], r13
mov r9d, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x180021aca
cmp dword [0x18009caf4], 6
jl 0x180021aca
lea rcx, str.Could_not_retrieve_DC_Role_info:__d
mov edx, eax
call fcn.1800169b0
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180021ad9
call sub.NETAPI32.dll_DsRoleFreeMemory
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x330]
mov qword [rsp + 0x30], r13
lea r8, [rbp + 0x930]
mov r9d, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x100
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, [rbp + 0x10]
mov rax, rdi
inc rax
cmp byte [rcx + rax], r13b
jne 0x180021b12
test rax, rax
jne 0x180021b38
lea r8, [rbp + 0x330]
lea rcx, [rbp + 0x10]
mov r9, rdi
mov edx, 0x100
call fcn.18002a5b4
lea rax, [rbp + 0x10]
lea r9, str.SERVER:__s_n
lea rcx, [rbp + 0x120]
mov r8, rdi
mov edx, 0x100
mov qword [rsp + 0x20], rax
call fcn.180029e64
lea rax, [rbp + 0x120]
mov r8, rdi
inc r8
cmp byte [rax + r8], r13b
jne 0x180021b66
lea rdx, [rbp + 0x120]
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x180021b91
call sub.NETAPI32.dll_NetApiBufferFree
lea rcx, [rbp + 0x431]
xor edx, edx
mov r8d, 0xff
mov byte [rbp + 0x430], r13b
call fcn.1800292e0
lea rcx, [rbp + 0x231]
xor edx, edx
mov r8d, 0xff
mov byte [rbp + 0x230], r13b
call fcn.1800292e0
cmp dword [0x18009caf4], 5
mov ebx, r13d
jl 0x180021bf4
lea rcx, str.Checking_version
call fcn.1800169b0
cmp dword [0x18009caf4], 5
jl 0x180021bf4
lea rcx, str.Version_is_5
call fcn.1800169b0
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
cmp dword [0x18009caf4], 5
jl 0x180021c11
lea rcx, str.Checking_for_mixed_mode
call fcn.1800169b0
mov qword [rsp + 0xc80], rsi
mov qword [rsp + 0xc48], r14
mov qword [rsp + 0xc40], r15
call fcn.1800240d0
test eax, eax
je 0x180022215
cmp dword [0x18009caf4], 5
jl 0x180021c4b
lea rcx, str.domain_is_mixed_mode
call fcn.1800169b0
mov ecx, 0x208
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
call fcn.180027e84
lea rcx, [0x180074490]
mov r9d, 1
mov rsi, rax
lea rax, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea rax, [0x18007f5c0]
xor edx, edx
mov qword [rsp + 0x20], rax
mov r14d, r13d
call sub.ACTIVEDS.dll_ADsOpenObject
mov rcx, qword [rsp + 0x40]
test eax, eax
jns 0x180021cbb
test rcx, rcx
je 0x180021ca6
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, rsi
call fcn.180027f2c
call qword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x1800221a4
mov rax, qword [rcx]
lea r8, [rsp + 0x70]
lea rdx, [0x180074548]
call qword [rax + 0x78]
test eax, eax
js 0x180022156
lea r8, [0x180074590]
mov edx, 0x104
mov rcx, rsi
call fcn.18002caec
mov r8, qword [rsp + 0x78]
mov rax, rdi
inc rax
cmp word [r8 + rax*2], bx
jne 0x180021cf1
cmp rax, 0x104
jae 0x1800221e8
mov edx, 0x104
mov rcx, rsi
call fcn.18002ca64
lea rax, [rsp + 0x48]
mov r9d, 1
mov qword [rsp + 0x28], rax
lea rax, [0x18007f5d0]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call sub.ACTIVEDS.dll_ADsOpenObject
test eax, eax
js 0x180022126
mov rcx, qword [rsp + 0x48]
mov dword [rbp - 0x40], 5
mov dword [rbp - 0x38], 7
mov dword [rbp - 0x30], 2
mov dword [rbp - 0x18], 7
mov dword [rbp - 0x10], 7
mov dword [rbp - 8], 0x3e8
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x50], r13
mov rax, qword [rcx]
lea rdx, [rbp - 0x40]
mov r8d, 2
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
test eax, eax
jns 0x180021dc3
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180021da2
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, rsi
call fcn.180027f2c
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180022200
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x180022200
lea rax, str.samaccountname
lea rcx, [rbp + 0x11]
xor edx, edx
mov qword [rbp - 0x78], rax
lea rax, str.description
mov r8d, 0x103
mov qword [rbp - 0x70], rax
mov byte [rbp + 0x10], bl
call fcn.1800292e0
lea rcx, [rbp + 0x121]
xor edx, edx
mov r8d, 0x103
mov byte [rbp + 0x120], bl
call fcn.1800292e0
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
lea rdx, [rsp + 0x50]
lea r8, [rbp - 0x78]
mov qword [rsp + 0x20], rdx
lea rdx, [0x1800747d0]
mov r9d, 2
call qword [rax + 0x20]
mov ebx, eax
test eax, eax
js 0x1800220f3
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x30]
lea r15, [0x180074888]
lea r13, [0x180074930]
mov ebx, eax
test eax, eax
jne 0x1800220be
nop
lea r8, [0x18007016d]
lea rcx, [rbp + 0x10]
mov r9, rdi
mov edx, 0x104
inc r14d
call fcn.18002a5b4
lea r8, [0x180072f6c]
lea rcx, [rbp + 0x120]
mov r9, rdi
mov edx, 0x104
call fcn.18002a5b4
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
lea r8, [rsp + 0x58]
call qword [rax + 0x48]
test eax, eax
jne 0x180022036
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
lea r9, [rbp - 0x68]
call qword [rax + 0x50]
test eax, eax
js 0x18002200f
mov rdx, qword [rsp + 0x58]
mov rcx, rdi
nop dword [rax]
movzx eax, word [r15 + rcx*2 + 2]
cmp ax, word [rdx + rcx*2 + 2]
jne 0x180021f6d
add rcx, 2
cmp rcx, 0xf
je 0x180021f14
movzx eax, word [r15 + rcx*2]
cmp ax, word [rdx + rcx*2]
je 0x180021ef0
jmp 0x180021f6d
mov r8, qword [rbp - 0x58]
xor eax, eax
mov r9d, edi
mov r8, qword [r8 + 8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x10]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x103
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x180021f6d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x180021f6d
lea r8, [0x18007016f]
lea rcx, [rbp + 0x10]
mov r9, rdi
mov edx, 1
call fcn.18002a5b4
mov rdx, qword [rsp + 0x58]
xor r8d, r8d
mov eax, r8d
nop dword [rax + rax]
movzx ecx, word [r13 + rax*2]
cmp cx, word [rdx + rax*2]
jne 0x180022000
movzx ecx, word [r13 + rax*2 + 2]
cmp cx, word [rdx + rax*2 + 2]
jne 0x180022000
add rax, 2
cmp rax, 0xc
jne 0x180021f80
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], r8
mov r8, qword [rbp - 0x58]
mov r8, qword [r8 + 8]
lea rax, [rbp + 0x120]
mov r9d, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x103
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x180022000
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x180022000
lea r8, [0x180072fe4]
lea rcx, [rbp + 0x120]
mov r9, rdi
mov edx, 2
call fcn.18002a5b4
mov rcx, qword [rsp + 0x48]
lea rdx, [rbp - 0x68]
mov rax, qword [rcx]
call qword [rax + 0x58]
mov rcx, qword [rsp + 0x58]
call sub.ACTIVEDS.dll_FreeADsMem
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
lea r8, [rsp + 0x58]
call qword [rax + 0x48]
test eax, eax
je 0x180021ec0
lea rax, [rbp + 0x120]
lea r9, str._s_t_s
lea rcx, [rbp + 0x530]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x10]
mov r8, rdi
mov edx, 0x400
mov qword [rsp + 0x20], rax
call fcn.180029e64
lea rax, [rbp + 0x530]
mov r8, rdi
inc r8
cmp byte [rax + r8], 0
jne 0x180022070
lea rdx, [rbp + 0x530]
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
xor r9d, r9d
lea rdx, [0x180073024]
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x38]
mov ebx, eax
test eax, eax
je 0x180021e60
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x1800220d3
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x60]
test ebx, ebx
js 0x1800220f3
test r14d, r14d
je 0x1800220e1
cmp ebx, 1
jne 0x18002213b
cmp dword [0x18009caf4], 6
jl 0x18002213b
lea rcx, [0x180074ac0]
jmp 0x180022136
cmp ebx, 0x8007203e
jne 0x18002210d
cmp dword [0x18009caf4], 6
jl 0x18002213b
lea rcx, [0x180074b08]
jmp 0x180022136
cmp dword [0x18009caf4], 6
jl 0x18002213b
lea rcx, [0x180074b90]
mov edx, ebx
call fcn.1800169b0
jmp 0x18002213b
cmp dword [0x18009caf4], 6
jl 0x18002213b
lea rcx, [0x180074bf8]
call fcn.1800169b0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18002214b
mov rax, qword [rcx]
call qword [rax + 0x10]
lea rcx, [rsp + 0x70]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180022166
mov rax, qword [rcx]
call qword [rax + 0x10]
test rsi, rsi
je 0x180022173
mov rcx, rsi
call fcn.180027f2c
xor r9d, r9d
lea rdx, str._n__n_n
mov rcx, r12
lea r8d, [r9 + 4]
call qword [sym.imp.WS2_32.dll_send]
lea rdx, [rbp + 0x330]
mov rcx, r12
call fcn.1800226d0
call qword [sym.imp.ole32.dll_CoUninitialize]
mov eax, 1
mov r14, qword [rsp + 0xc48]
mov rsi, qword [rsp + 0xc80]
mov r15, qword [rsp + 0xc40]
mov rbx, qword [rsp + 0xc78]
mov rdi, qword [rsp + 0xc88]
mov rcx, qword [rbp + 0xb30]
xor rcx, rsp
call fcn.1800292b0
add rsp, 0xc50
pop r13
pop r12
pop rbp
ret
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1800221f8
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, rsi
call fcn.180027f2c
lea rcx, [rsp + 0x70]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
call qword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x1800221a4
cmp dword [0x18009caf4], 5
jl 0x18002222a
lea rcx, str.domain_is_NOT_mixed_mode
call fcn.1800169b0
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [0x18009caf4], 5
mov qword [rsp + 0x40], r13
jl 0x18002224a
lea rcx, str.Starting_native_check
call fcn.1800169b0
lea rax, [rsp + 0x40]
lea rcx, [rbp + 0x930]
mov r9d, 0x3e8
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x60]
mov r8d, ebx
mov qword [rsp + 0x28], rax
mov edx, 3
mov dword [rsp + 0x20], 0xffffffff
call sub.NETAPI32.dll_NetQueryDisplayInformation
mov r15d, eax
cmp eax, 5
je 0x18002243e
mov rsi, qword [rsp + 0x40]
mov r14d, r13d
cmp dword [rsp + 0x60], r13d
jbe 0x18002241f
nop
mov r8, qword [rsi]
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x430]
mov qword [rsp + 0x30], r13
mov r9d, edi
mov edx, 0x200
xor ecx, ecx
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rax, [rbp + 0x430]
lea r9, [0x180073344]
lea rcx, [rbp + 0x530]
mov r8, rdi
mov edx, 0x400
mov qword [rsp + 0x20], rax
call fcn.180029e64
lea rax, [rbp + 0x530]
mov r8, rdi
inc r8
cmp byte [rax + r8], r13b
jne 0x180022302
lea rdx, [rbp + 0x530]
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov r8, qword [rsi + 8]
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x230]
mov qword [rsp + 0x30], r13
mov r9d, edi
mov edx, 0x200
xor ecx, ecx
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, [rbp + 0x230]
mov rax, rdi
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], r13b
jne 0x180022360
test rax, rax
jne 0x180022389
lea r8, [0x180073444]
lea rcx, [rbp + 0x230]
mov r9, rdi
mov edx, 0x100
call fcn.18002a5b4
lea rax, [rbp + 0x230]
lea r9, [0x1800734d4]
lea rcx, [rbp + 0x530]
mov r8, rdi
mov edx, 0x400
mov qword [rsp + 0x20], rax
call fcn.180029e64
lea rax, [rbp + 0x530]
mov r8, rdi
nop word [rax + rax]
inc r8
cmp byte [rax + r8], r13b
jne 0x1800223c0
lea rdx, [rbp + 0x530]
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsi]
lea rdx, [rbp + 0x930]
mov r8, r12
call fcn.180022500
xor r9d, r9d
lea rdx, [0x1800734ec]
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov ebx, dword [rsi + 0x18]
inc r14d
add rsi, 0x20
cmp r14d, dword [rsp + 0x60]
jb 0x1800222a0
mov rsi, qword [rsp + 0x40]
test rsi, rsi
je 0x18002242c
mov rcx, rsi
call sub.NETAPI32.dll_NetApiBufferFree
cmp r15d, 0xea
je 0x180022230
jmp 0x18002219f
movaps xmm0, xmmword [str.Access_Denied._Cannot_query_domain_groups_while_SNARE_is_running_with_the_privileges_of_the_local_administrator]
movaps xmm1, xmmword [0x180074e40]
lea rcx, [rbp + 0x80]
xor edx, edx
mov r8d, 0x90
movaps xmmword [rbp + 0x10], xmm0
movaps xmm0, xmmword [0x180074e50]
movaps xmmword [rbp + 0x20], xmm1
movaps xmm1, xmmword [0x180074e60]
movaps xmmword [rbp + 0x30], xmm0
movaps xmm0, xmmword [0x180074e70]
movaps xmmword [rbp + 0x50], xmm0
movaps xmm0, xmmword [0x180074e90]
movaps xmmword [rbp + 0x40], xmm1
movaps xmm1, xmmword [0x180074e80]
movaps xmmword [rbp + 0x70], xmm0
movaps xmmword [rbp + 0x60], xmm1
call fcn.1800292e0
lea rax, [rbp + 0x10]
inc rdi
cmp byte [rax + rdi], r13b
jne 0x1800224a3
lea rdx, [rbp + 0x10]
mov r8, rdi
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18002219f
call sub.NETAPI32.dll_NetApiBufferFree
jmp 0x18002219f
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1800224e6
call sub.NETAPI32.dll_NetApiBufferFree
xor eax, eax
jmp 0x1800221cc