Function at 0x100751c
Capabilities:
Get domain trust relationships

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
push edi
mov dword [ebx], esi
mov dword [eax], esi
lea eax, [ebp - 0xc]
push eax
push 0x80000002
push 0x1002e00
push dword [ebp + 8]
mov dword [ebp - 4], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call dword [sym.imp.msvcrt.dll__wcsicmp]
neg eax
pop ecx
sbb eax, eax
and eax, dword [ebp + 8]
pop ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
test eax, eax
jl 0x10076c7
push esi
push 0xf003f
push 0x1002fd8
push dword [ebp - 0xc]
lea ecx, [ebp - 0x3c]
call fcn.01005692
test eax, eax
jne 0x10076c7
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
mov edi, 0x1002fac
push edi
push dword [eax]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], esi
call fcn.010056cf
test eax, eax
jne 0x100760d
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp eax, esi
je 0x1007615
mov ecx, dword [ebp - 4]
lea ecx, [ecx + ecx + 2]
push ecx
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
push edi
push dword [eax]
lea ecx, [ebp - 0x3c]
call fcn.010056cf
test eax, eax
jne 0x10076c7
lea ecx, [ebp - 0x3c]
call fcn.01005674
push esi
push 0xf003f
push 0x1002f40
push dword [ebp - 0xc]
lea ecx, [ebp - 0x3c]
call fcn.01005692
test eax, eax
jne 0x1007741
lea eax, [ebp - 4]
push eax
push 0x1002f1c
push esi
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], esi
call fcn.010056cf
test eax, eax
jne 0x1007737
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
mov dword [ebp - 8], edi
cmp edi, esi
je 0x10076bf
mov eax, dword [ebp - 4]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 0x1002f1c
push edi
lea ecx, [ebp - 0x3c]
call fcn.010056cf
lea ecx, [ebp - 0x3c]
test eax, eax
je 0x10076b3
call fcn.01005674
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [ebp - 8], esi
mov dword [ebx], esi
jmp 0x1007749
mov dword [ebx], edi
call fcn.01005674
jmp 0x1007741
lea ecx, [ebp - 0x3c]
call fcn.01005674
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
or dword [ebp - 4], 0xffffffff
cmp eax, esi
je 0x10076dd
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [edi], esi
cmp dword [ebp - 8], esi
je 0x10076eb
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x20], esi
je 0x10076f9
push dword [ebp - 0x20]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x10], esi
je 0x1007709
push dword [ebp - 0x10]
call sub.NETAPI32.dll_NetApiBufferFree
mov dword [ebp - 0x10], esi
cmp dword [ebp - 0xc], esi
je 0x100771a
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_RegCloseKey]
mov dword [ebp - 0xc], esi
lea eax, [ebp - 0x30]
push eax
call fcn.010068b2
mov esi, dword [ebp - 4]
lea ecx, [ebp - 0x3c]
call fcn.01005674
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
lea ecx, [ebp - 0x3c]
call fcn.01005674
mov dword [ebx], esi
cmp dword [ebx], esi
jne 0x10078a2
push esi
push 0xf003f
push 0x1002fd8
push dword [ebp - 0xc]
lea ecx, [ebp - 0x3c]
call fcn.01005692
test eax, eax
jne 0x1007807
lea eax, [ebp - 4]
push eax
push 0x1002ef4
push esi
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], esi
call fcn.010056cf
test eax, eax
jne 0x10077fd
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
mov dword [ebp - 0x20], edi
cmp edi, esi
je 0x10076bf
push dword [ebp - 4]
push esi
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 0x1002ef4
push edi
lea ecx, [ebp - 0x3c]
call fcn.010056cf
test eax, eax
jne 0x10077e7
push 0x1002ef0
push edi
jmp 0x10077d7
push 0x1002ef0
push esi
call dword [sym.imp.msvcrt.dll_wcstok]
pop ecx
pop ecx
test eax, eax
jne 0x10077d1
mov dword [ebx], edi
jmp 0x1007807
lea ecx, [ebp - 0x3c]
call fcn.01005674
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [ebp - 0x20], esi
mov dword [ebx], esi
jmp 0x1007807
lea ecx, [ebp - 0x3c]
mov dword [ebx], esi
call fcn.01005674
cmp dword [ebx], esi
jne 0x10078a2
push esi
push 0xf003f
push 0x1002fd8
push dword [ebp - 0xc]
lea ecx, [ebp - 0x3c]
call fcn.01005692
test eax, eax
jne 0x10078a2
lea eax, [ebp - 4]
push eax
push 0x1002ee0
push dword [ebp - 8]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], esi
call fcn.010056cf
test eax, eax
jne 0x1007898
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
mov dword [ebp - 8], edi
lea ecx, [ebp - 0x3c]
cmp edi, esi
je 0x10076c2
lea eax, [ebp - 4]
push eax
push 0x1002ee0
push edi
call fcn.010056cf
test eax, eax
jne 0x1007884
mov dword [ebx], edi
jmp 0x10078a2
lea ecx, [ebp - 0x3c]
call fcn.01005674
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [ebp - 8], esi
jmp 0x10078a0
lea ecx, [ebp - 0x3c]
call fcn.01005674
mov dword [ebx], esi
mov dword [ebp - 0x18], esi
cmp dword [ebx], esi
jne 0x10076f9
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x23
push dword [ebp + 8]
mov dword [ebp - 4], esi
call dword [sym.imp.NETAPI32.dll_DsEnumerateDomainTrustsW]
test eax, eax
jne 0x10076c7
mov edi, dword [ebp - 0x18]
xor ecx, ecx
push 4
pop edx
mov eax, edi
mul edx
seto cl
mov dword [ebp - 0x30], edi
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x2c], eax
cmp eax, esi
je 0x10076c7
mov ecx, edi
shl ecx, 2
push ecx
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x14], esi
mov dword [ebp + 8], esi
cmp dword [ebp - 0x18], esi
jbe 0x1007a7b
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + eax]
cmp eax, esi
je 0x10079a0
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1007925
sub eax, edx
sar eax, 1
mov edi, eax
xor ecx, ecx
push 2
lea ebx, [edi + 1]
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edx, dword [ebp - 0x14]
pop ecx
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx + edx*4]
mov dword [ebp - 0x28], ecx
mov dword [ecx], eax
cmp eax, esi
je 0x10076c7
lea ecx, [edi + edi + 2]
push ecx
push esi
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
push dword [ecx + eax]
mov eax, dword [ebp - 0x28]
push ebx
push dword [eax]
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [ebp - 4]
lea eax, [edi + ecx + 1]
add esp, 0x18
cmp ecx, eax
ja 0x10076c7
inc dword [ebp - 0x14]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
inc dword [ebp + 8]
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x1c], 0x2c
cmp dword [ebp + 8], eax
jb 0x1007915
cmp eax, esi
jbe 0x1007a7b
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 8], eax
cmp eax, esi
je 0x10076c7
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 8]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call sub.msvcrt.dll_memset
xor eax, eax
add esp, 0xc
mov dword [ebp + 8], eax
cmp dword [ebp - 0x14], esi
jbe 0x1007a7b
mov ecx, dword [ebp - 0x2c]
lea ebx, [ecx + eax*4]
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x24]
push dword [ebx]
inc eax
push eax
push edi
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [ebx]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov bx, word [eax]
inc eax
inc eax
cmp bx, si
jne 0x1007a1e
sub eax, edx
sar eax, 1
lea edi, [edi + eax*2 + 2]
mov eax, ecx
lea edx, [eax + 2]
mov bx, word [eax]
inc eax
inc eax
cmp bx, si
jne 0x1007a35
sub eax, edx
mov edx, dword [ebp - 0x24]
sar eax, 1
lea eax, [eax + edx + 1]
cmp edx, eax
ja 0x10076c7
mov eax, ecx
lea ebx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1007a57
sub eax, ebx
sar eax, 1
lea eax, [edx + eax + 1]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
cmp eax, dword [ebp - 0x14]
jb 0x10079fe
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov dword [ebx], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
jmp 0x10076f9