Function at 0x1004af8
Capabilities:
Get domain information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x1009024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x4c], eax
mov al, byte [ebp + 8]
mov cl, al
and cl, 4
push ebx
xor ebx, ebx
mov byte [ebp - 0x18], cl
mov cl, al
and al, 2
push esi
mov esi, dword [ebp + 0x10]
push edi
mov byte [ebp - 0x16], al
xor eax, eax
mov dword [ebp - 0x14], ebx
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and cl, 1
mov dword [ebp - 0x50], edx
mov byte [ebp - 0x15], cl
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x17], bl
stosd dword es:[edi], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x30], ebx
mov dword [esi], ebx
cmp edx, ebx
je 0x1004b73
mov dword [edx], ebx
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
je 0x1004b7c
mov dword [eax], ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.RPCRT4.dll_UuidCreate]
cmp eax, ebx
je 0x1004b9d
cmp eax, 0x720
je 0x1004b9d
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1004d20
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
cmp eax, ebx
jne 0x1004b91
mov eax, dword [ebp - 0x20]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1004bb5
sub eax, edx
sar eax, 1
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.01001b24
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jne 0x1004bda
push 8
jmp 0x1004b92
push dword [ebp - 0x20]
inc edi
push edi
push eax
call fcn.01001b6a
cmp byte [ebp - 0x15], bl
je 0x1004c04
lea eax, [ebp - 0x34]
push eax
movzx eax, byte [ebp - 0x16]
push eax
call sub.EFSUTIL.dll_EfsUtilGetSmartcardProviderName
cmp eax, ebx
jne 0x1004b91
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
jmp 0x1004c17
mov dword [ebp - 0x44], 0x10015c8
cmp byte [ebp - 0x16], bl
jne 0x1004c17
mov dword [ebp - 0x44], 0x1001568
mov eax, dword [ebp - 0x44]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1004c1d
sub eax, edx
sar eax, 1
mov edi, eax
lea eax, [edi + edi + 2]
push eax
call fcn.01001b24
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x1004bd6
push dword [ebp - 0x44]
inc edi
push edi
push eax
call fcn.01001b6a
cmp byte [ebp - 0x18], bl
je 0x1004c55
mov dword [ebp - 0x3c], 6
cmp byte [ebp - 0x16], bl
je 0x1004c6c
cmp byte [ebp - 0x15], bl
jne 0x1004c66
mov dword [ebp - 0x2c], 1
or dword [ebp - 0x3c], 1
jmp 0x1004c7f
mov dword [ebp - 0x2c], 0x8000000
cmp byte [ebp - 0x15], bl
jne 0x1004c7f
mov dword [ebp - 0x2c], 0x8000001
lea eax, [ebp - 0x38]
push eax
push 1
push ebx
call sub.NETAPI32.dll_DsRoleGetPrimaryDomainInformation
cmp eax, ebx
jne 0x1004b91
mov eax, dword [ebp - 0x38]
mov eax, dword [eax]
cmp eax, 1
je 0x1004cac
cmp eax, 2
jle 0x1004ca7
cmp eax, 5
jle 0x1004cac
mov byte [ebp - 0x15], bl
jmp 0x1004cb0
mov byte [ebp - 0x15], 1
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.EFSUTIL.dll_EfsUtilGetCurrentUserInformation
cmp eax, ebx
jne 0x1004b91
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x28]
push eax
movzx eax, byte [ebp - 0x15]
push ebx
push dword [ebp - 0x48]
push dword [ebp - 0x40]
push dword [ebp - 0x30]
push eax
push dword [ebp - 0x54]
push dword [ebp - 0x2c]
push dword [ebp - 0x3c]
push dword [ebp - 0x1c]
push edi
call sub.EFSUTIL.dll_EfsUtilCreateSelfSignedCertificate
cmp eax, ebx
jne 0x1004b91
mov eax, dword [ebp - 0x28]
mov dword [esi], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x28], ebx
cmp eax, ebx
je 0x1004d0d
mov dword [eax], edi
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x50]
cmp eax, ebx
je 0x1004d1c
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x17], 1
cmp dword [ebp - 0x28], ebx
je 0x1004d2e
push dword [ebp - 0x28]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp dword [ebp - 0x38], ebx
je 0x1004d3b
push dword [ebp - 0x38]
call sub.NETAPI32.dll_DsRoleFreeMemory
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x40], ebx
je 0x1004d4b
push dword [ebp - 0x40]
call edi
cmp dword [ebp - 0x48], ebx
je 0x1004d55
push dword [ebp - 0x48]
call edi
cmp dword [ebp - 0x30], ebx
je 0x1004d5f
push dword [ebp - 0x30]
call edi
cmp dword [ebp - 0x34], ebx
je 0x1004d69
push dword [ebp - 0x34]
call edi
cmp dword [ebp - 0x24], ebx
je 0x1004d76
push dword [ebp - 0x24]
call fcn.01001b44
cmp dword [ebp - 0x1c], ebx
je 0x1004d83
push dword [ebp - 0x1c]
call fcn.01001b44
cmp dword [ebp - 0x20], ebx
pop edi
pop esi
pop ebx
je 0x1004d95
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeW]
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x17]
xor ecx, ebp
call fcn.0100741c
leave
ret 0x14