Function at 0x100a318
Capabilities:
Get domain controller name
List user accounts

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push edi
xor edi, edi
cmp dword [ebp + 0x18], 4
push 0x10
pop eax
push 0x20
pop ecx
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x30], edi
mov ebx, ecx
jne 0x100a367
push 0x57
pop eax
jmp 0x100a72c
push esi
mov esi, dword [ebp + 0x14]
cmp esi, edi
jne 0x100a3e1
push 3
pop esi
cmp dword [ebp + 0x18], esi
jne 0x100a37c
mov ebx, 0xa0
cmp dword [0x1012ca8], edi
je 0x100a393
push dword [ebp + 0xc]
push 0x2ee1
call fcn.0100371a
pop ecx
pop ecx
lea eax, [ebp - 0x14]
push eax
push ebx
push edi
push edi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
cmp eax, edi
mov dword [ebp + 0x14], eax
jne 0x100a72b
cmp dword [ebp + 0x18], esi
jne 0x100a3d7
push dword [ebp + 0x1c]
call fcn.0100371a
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
pop ecx
push 1
push esi
push esi
push dword [ebp + 0x10]
add eax, 4
push eax
call fcn.0100a20d
jmp 0x100a71b
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 4], eax
jmp 0x100a43f
cmp word [esi], 0x5c
jne 0x100a408
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 3
pop ecx
jb 0x100a400
cmp word [esi + 2], 0x5c
jne 0x100a400
mov dword [ebp - 4], esi
jmp 0x100a43f
push 0x57
pop eax
jmp 0x100a72b
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 6]
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
cmp eax, edi
jne 0x100a72b
push esi
push 0x10016cc
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov dword [ebp - 0x24], 1
cmp dword [0x1012ca8], edi
je 0x100a456
push dword [ebp - 4]
push 0x2ee4
call fcn.0100371a
pop ecx
pop ecx
mov ebx, dword [ebp + 0x10]
xor esi, esi
inc esi
push esi
push dword [ebx + 4]
push dword [ebx]
push dword [ebp - 4]
call fcn.0100d0d6
cmp eax, edi
mov dword [ebp + 0x14], eax
jne 0x100a6fb
push dword [ebp + 0x1c]
call fcn.0100371a
cmp dword [ebp + 0x18], 2
pop ecx
jne 0x100a5c1
mov eax, dword [ebx]
cmp eax, edi
je 0x100a4bd
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
cmp eax, edi
pop ecx
pop ecx
je 0x100a4b2
mov word [eax], di
inc eax
inc eax
cmp word [eax], di
je 0x100a400
mov ecx, dword [ebx]
mov dword [ebp - 0x1c], ecx
jmp 0x100a4c0
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp + 0x1c]
push ecx
push dword [ebx + 4]
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.NTDSAPI.dll_DsMakePasswordCredentialsW]
cmp eax, edi
mov dword [ebp + 0x14], eax
jne 0x100a6d8
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x1c]
push edi
push dword [ebp - 4]
call dword [sym.imp.NTDSAPI.dll_DsBindWithCredW]
push dword [ebp + 0x1c]
mov dword [ebp + 0x14], eax
call dword [sym.imp.NTDSAPI.dll_DsFreePasswordCredentials]
cmp dword [ebp + 0x14], edi
jne 0x100a5b4
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0xc]
push dword [ebp - 0x20]
call dword [sym.imp.NTDSAPI.dll_DsGetDomainControllerInfoW]
mov dword [ebp + 0x14], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.NTDSAPI.dll_DsUnBindW]
cmp dword [ebp + 0x14], edi
jne 0x100a6d8
cmp dword [ebp - 0xc], edi
mov dword [ebp - 0x28], esi
mov dword [ebp + 0x18], edi
jbe 0x100a6d8
xor esi, esi
mov eax, dword [ebp + 8]
sub eax, edi
je 0x100a58f
dec eax
je 0x100a578
dec eax
jne 0x100a5a1
mov eax, dword [ebp - 0x10]
push edi
push 0x1f68
push ebx
push edi
push dword [esi + eax]
push dword [ebp + 0xc]
call fcn.01004d93
cmp eax, edi
je 0x100a5a1
mov ecx, dword [ebp - 0x10]
push dword [esi + ecx]
push eax
push 0x1f69
call fcn.01003766
jmp 0x100a5a1
mov eax, dword [ebp - 0x10]
push edi
push 0x1f68
push ebx
push dword [esi + eax]
push dword [ebp + 0xc]
call fcn.0100519c
jmp 0x100a561
mov eax, dword [ebp - 0x10]
push 1
push 2
push 2
push ebx
push dword [esi + eax]
call fcn.0100a20d
inc dword [ebp + 0x18]
mov eax, dword [ebp + 0x18]
add esi, 0x1c
cmp eax, dword [ebp - 0xc]
jb 0x100a53e
jmp 0x100a6d8
cmp dword [ebp + 0x14], 0x6d9
jne 0x100a6d8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0xc]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0x18]
push dword [ebp + eax*4 - 0x44]
push edi
push dword [ebp - 4]
call sub.NETAPI32.dll_NetUserEnum
cmp eax, edi
mov dword [ebp + 0x14], eax
je 0x100a5f5
cmp eax, 0xea
jne 0x100a6d8
xor esi, esi
cmp dword [ebp - 0xc], edi
jbe 0x100a6c3
mov eax, dword [ebp + 8]
sub eax, edi
je 0x100a732
dec eax
je 0x100a668
dec eax
jne 0x100a6b9
mov eax, dword [ebp - 8]
push 0x24
push dword [eax + esi*4]
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, edi
pop ecx
pop ecx
mov dword [ebp + 0x1c], eax
je 0x100a62f
mov word [eax], di
mov eax, dword [ebp - 8]
push edi
push 0x1f68
push ebx
push edi
push dword [eax + esi*4]
push dword [ebp + 0xc]
call fcn.01004d93
cmp eax, edi
je 0x100a65a
mov ecx, dword [ebp - 8]
push dword [ecx + esi*4]
push eax
push 0x1f69
call fcn.01003766
mov eax, dword [ebp + 0x1c]
cmp eax, edi
je 0x100a6b9
mov word [eax], 0x24
jmp 0x100a6b9
mov eax, dword [ebp - 8]
push 0x24
push dword [eax + esi*4]
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov ebx, eax
cmp ebx, edi
pop ecx
pop ecx
je 0x100a681
mov word [ebx], di
mov eax, dword [ebp - 8]
push edi
push 0x1f68
push dword [ebp + 0x10]
push dword [eax + esi*4]
push dword [ebp + 0xc]
call fcn.0100519c
cmp eax, edi
je 0x100a6ad
mov ecx, dword [ebp - 8]
push dword [ecx + esi*4]
push eax
push 0x1f69
call fcn.01003766
cmp ebx, edi
je 0x100a6b6
mov word [ebx], 0x24
mov ebx, dword [ebp + 0x10]
inc esi
cmp esi, dword [ebp - 0xc]
jb 0x100a600
push dword [ebp - 8]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp + 0x14], 0xea
je 0x100a5c1
cmp dword [0x1012ca8], edi
je 0x100a6ef
push dword [ebp - 4]
push 0x2ee5
call fcn.0100371a
pop ecx
pop ecx
push 2
push edi
push edi
push dword [ebp - 4]
call fcn.0100d0d6
cmp dword [ebp - 0x24], edi
je 0x100a708
push dword [ebp - 4]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0x28], edi
je 0x100a71b
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 1
call dword [sym.imp.NTDSAPI.dll_DsFreeDomainControllerInfoW]
cmp dword [ebp - 0x14], edi
je 0x100a728
push dword [ebp - 0x14]
call sub.NETAPI32.dll_NetApiBufferFree
mov eax, dword [ebp + 0x14]
pop esi
pop edi
pop ebx
leave
ret 0x18
mov eax, dword [ebp - 8]
push 1
push 4
push dword [ebp + 0x18]
push ebx
push dword [eax + esi*4]
call fcn.0100a20d
jmp 0x100a6b9