	.file	"extr_lookup.c_LsapLookupBuiltinDomainSids.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"SamrConnect failed (Status %08lx)\n"
	.align 8
.LC1:
	.string	"SamOpenDomain failed (Status %08lx)\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Mapping SID: %S\n"
.LC3:
	.string	"Found builtin domain!\n"
.LC4:
	.string	"Mapped to: %wZ\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"Found builtin domain account!\n"
	.text
	.p2align 4
	.type	LsapLookupBuiltinDomainSids, @function
LsapLookupBuiltinDomainSids:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	xor	edi, edi
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	DWORD PTR [rsp], edx
	lea	rsi, 32[rsp]
	mov	edx, DWORD PTR SAM_SERVER_CONNECT[rip]
	mov	QWORD PTR 8[rsp], rcx
	or	edx, DWORD PTR SAM_SERVER_LOOKUP_DOMAIN[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 24[rsp], rsi
	mov	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 80[rsp], 0
	mov	QWORD PTR 112[rsp], 0
	mov	QWORD PTR 48[rsp], 0
	movaps	XMMWORD PTR 64[rsp], xmm0
	movaps	XMMWORD PTR 96[rsp], xmm0
	call	SamrConnect@PLT
	mov	rdi, rax
	mov	r12, rax
	call	NT_SUCCESS@PLT
	test	rax, rax
	je	.L33
	mov	rdi, QWORD PTR 32[rsp]
	mov	edx, DWORD PTR BuiltinDomainSid[rip]
	lea	rcx, 40[rsp]
	mov	esi, DWORD PTR DOMAIN_LOOKUP[rip]
	call	SamrOpenDomain@PLT
	mov	rdi, rax
	mov	r12, rax
	call	NT_SUCCESS@PLT
	test	rax, rax
	je	.L4
	xor	r15d, r15d
	cmp	QWORD PTR [rbx], 0
	lea	r14, 48[rsp]
	jne	.L10
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	add	r15, 1
	add	rbp, 40
	cmp	QWORD PTR [rbx], r15
	jbe	.L3
.L10:
	mov	rax, QWORD PTR SidTypeUnknown[rip]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L6
	mov	rax, QWORD PTR 8[rbx]
	mov	rsi, r14
	lea	r13, 0[0+r15*4]
	mov	edi, DWORD PTR [rax+r15*4]
	call	ConvertSidToStringSidW@PLT
	mov	rsi, QWORD PTR 48[rsp]
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	rdi, QWORD PTR 48[rsp]
	call	LocalFree@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR BuiltinDomainSid[rip]
	mov	QWORD PTR 48[rsp], 0
	mov	esi, DWORD PTR [rax+r15*4]
	call	RtlEqualSid@PLT
	test	rax, rax
	je	.L7
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	rax, QWORD PTR SidTypeDomain[rip]
	mov	QWORD PTR 32[rbp], 0
	mov	QWORD PTR 0[rbp], rax
	mov	eax, DWORD PTR BuiltinDomainName[rip+8]
	mov	DWORD PTR 28[rbp], eax
	mov	edi, DWORD PTR BuiltinDomainName[rip]
	mov	DWORD PTR 24[rbp], edi
	call	MIDL_user_allocate@PLT
	mov	QWORD PTR 16[rbp], rax
	mov	rdi, rax
	test	rax, rax
	je	.L30
	mov	edx, DWORD PTR BuiltinDomainName[rip]
	mov	esi, DWORD PTR BuiltinDomainName[rip+4]
	call	RtlCopyMemory@PLT
.L31:
	mov	edi, DWORD PTR [rsp]
	mov	edx, DWORD PTR BuiltinDomainSid[rip]
	lea	rcx, 56[rsp]
	lea	rsi, BuiltinDomainName[rip]
	call	LsapAddDomainToDomainsList@PLT
	mov	rdi, rax
	mov	r12, rax
	call	NT_SUCCESS@PLT
	test	rax, rax
	je	.L3
	mov	rax, QWORD PTR 56[rsp]
	lea	rsi, 16[rbp]
	add	r15, 1
	add	rbp, 40
	lea	rdi, .LC4[rip]
	mov	QWORD PTR -32[rbp], rax
	xor	eax, eax
	call	TRACE@PLT
	mov	rax, QWORD PTR 8[rsp]
	add	DWORD PTR [rax], 1
	cmp	QWORD PTR [rbx], r15
	ja	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	QWORD PTR 40[rsp], 0
	je	.L11
	lea	rdi, 40[rsp]
	call	SamrCloseHandle@PLT
.L11:
	cmp	QWORD PTR 32[rsp], 0
	je	.L1
	mov	rdi, QWORD PTR 24[rsp]
	call	SamrCloseHandle@PLT
.L1:
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR BuiltinDomainSid[rip]
	mov	esi, DWORD PTR [rax+r15*4]
	call	LsapIsPrefixSid@PLT
	test	rax, rax
	je	.L6
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rax+r13]
	lea	r13, 64[rsp]
	call	LsapGetRelativeIdFromSid@PLT
	mov	rdi, QWORD PTR 40[rsp]
	lea	r8, 96[rsp]
	mov	rcx, r13
	lea	rdx, 128[rsp]
	mov	esi, 1
	mov	QWORD PTR 16[rsp], r8
	mov	QWORD PTR 128[rsp], rax
	call	SamrLookupIdsInDomain@PLT
	mov	rdi, rax
	mov	r12, rax
	call	NT_SUCCESS@PLT
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR 96[rsp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 32[rbp], 0
	mov	QWORD PTR 0[rbp], rax
	mov	rax, QWORD PTR 64[rsp]
	mov	edx, DWORD PTR 8[rax]
	mov	DWORD PTR 28[rbp], edx
	mov	edi, DWORD PTR [rax]
	mov	DWORD PTR 24[rbp], edi
	call	MIDL_user_allocate@PLT
	mov	r8, QWORD PTR 16[rsp]
	test	rax, rax
	mov	QWORD PTR 16[rbp], rax
	mov	rdi, rax
	je	.L35
	mov	rax, QWORD PTR 64[rsp]
	mov	QWORD PTR 16[rsp], r8
	mov	esi, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rax]
	call	RtlCopyMemory@PLT
	mov	rdi, r13
	call	SamIFree_SAMPR_RETURNED_USTRING_ARRAY@PLT
	mov	r8, QWORD PTR 16[rsp]
	mov	rdi, r8
	call	SamIFree_SAMPR_ULONG_ARRAY@PLT
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	call	TRACE@PLT
	jmp	.L3
.L4:
	mov	rsi, r12
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	TRACE@PLT
	jmp	.L3
.L35:
	mov	rdi, r13
	mov	QWORD PTR [rsp], r8
	call	SamIFree_SAMPR_RETURNED_USTRING_ARRAY@PLT
	mov	r8, QWORD PTR [rsp]
	mov	rdi, r8
	call	SamIFree_SAMPR_ULONG_ARRAY@PLT
.L30:
	mov	r12, QWORD PTR STATUS_INSUFFICIENT_RESOURCES[rip]
	jmp	.L3
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	LsapLookupBuiltinDomainSids, .-LsapLookupBuiltinDomainSids
	.comm	SidTypeUnknown,8,8
	.comm	SidTypeDomain,8,8
	.comm	STATUS_SUCCESS,8,8
	.comm	STATUS_INSUFFICIENT_RESOURCES,8,8
	.comm	SAM_SERVER_LOOKUP_DOMAIN,4,4
	.comm	SAM_SERVER_CONNECT,4,4
	.comm	DOMAIN_LOOKUP,4,4
	.comm	BuiltinDomainSid,4,4
	.comm	BuiltinDomainName,12,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_lookup.c_LsapLookupBuiltinDomainSids.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SamrConnect failed (Status %08lx)\012\000"
	.align	2
.LC1:
	.ascii	"SamOpenDomain failed (Status %08lx)\012\000"
	.align	2
.LC2:
	.ascii	"Mapping SID: %S\012\000"
	.align	2
.LC3:
	.ascii	"Found builtin domain!\012\000"
	.align	2
.LC4:
	.ascii	"Mapped to: %wZ\012\000"
	.align	2
.LC5:
	.ascii	"Found builtin domain account!\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	LsapLookupBuiltinDomainSids, %function
LsapLookupBuiltinDomainSids:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	ip, r2
	mov	r4, #0
	mov	r5, r1
	ldr	r2, .L42
	ldr	r1, .L42+4
	sub	sp, sp, #84
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r3, [sp, #28]
	ldr	r3, .L42+8
	orr	r2, r1, r2
	str	ip, [sp, #24]
	add	r1, sp, #32
	mov	r6, r0
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #76]
	mov	r3,#0
	str	r4, [sp, #32]
	str	r4, [sp, #36]
	str	r4, [sp, #48]
	str	r4, [sp, #60]
	str	r4, [sp, #40]
	str	r4, [sp, #52]
	str	r4, [sp, #56]
	str	r4, [sp, #64]
	str	r4, [sp, #68]
	bl	SamrConnect
	str	r0, [sp, #12]
	bl	NT_SUCCESS
	cmp	r0, r4
	beq	.L39
	ldr	r3, .L42+12
	ldr	r7, .L42+16
	ldr	r1, [r3]
	ldr	r2, [r7]
	add	r3, sp, #36
	ldr	r0, [sp, #32]
	bl	SamrOpenDomain
	str	r0, [sp, #12]
	bl	NT_SUCCESS
	cmp	r0, #0
	beq	.L4
	ldr	r1, [r6]
	cmp	r1, #0
	beq	.L3
	mov	r10, r6
	ldr	r8, .L42+20
	ldr	fp, .L42+24
	ldr	r9, .L42+28
	add	r5, r5, #8
	b	.L10
.L6:
	add	r4, r4, #1
	cmp	r1, r4
	add	r5, r5, #24
	bls	.L3
.L10:
	ldr	r2, [r5, #-8]
	ldr	r3, [r8]
	cmp	r2, r3
	bne	.L6
	mov	r6, #0
	ldr	r3, [r10, #4]
	add	r1, sp, #40
	ldr	r0, [r3, r4, lsl #2]
	bl	ConvertSidToStringSidW
	ldr	r1, [sp, #40]
	mov	r0, fp
	bl	TRACE
	ldr	r0, [sp, #40]
	bl	LocalFree
	ldr	r3, [r10, #4]
	ldr	r0, [r7]
	ldr	r1, [r3, r4, lsl #2]
	str	r6, [sp, #40]
	bl	RtlEqualSid
	subs	r3, r0, #0
	str	r3, [sp, #16]
	lsl	r3, r4, #2
	str	r3, [sp, #20]
	beq	.L7
	ldr	r0, .L42+32
	bl	TRACE
	ldr	r2, [r9, #8]
	ldr	r3, .L42+36
	ldr	r3, [r3]
	str	r2, [r5, #8]
	ldr	r0, [r9]
	str	r3, [r5, #-8]
	str	r6, [r5, #12]
	str	r0, [r5, #4]
	bl	MIDL_user_allocate
	cmp	r0, r6
	str	r0, [r5]
	beq	.L36
	ldr	r2, [r9]
	ldr	r1, [r9, #4]
	bl	RtlCopyMemory
.L37:
	mov	r1, r9
	ldr	r2, [r7]
	add	r3, sp, #44
	ldr	r0, [sp, #24]
	bl	LsapAddDomainToDomainsList
	str	r0, [sp, #12]
	bl	NT_SUCCESS
	cmp	r0, #0
	beq	.L3
	ldr	r3, [sp, #44]
	mov	r1, r5
	str	r3, [r5, #-4]
	ldr	r0, .L42+40
	bl	TRACE
	ldr	r2, [sp, #28]
	ldr	r1, [r10]
	ldr	r3, [r2]
	add	r4, r4, #1
	add	r3, r3, #1
	cmp	r1, r4
	str	r3, [r2]
	add	r5, r5, #24
	bhi	.L10
.L3:
	ldr	r3, [sp, #36]
	cmp	r3, #0
	beq	.L11
	add	r0, sp, #36
	bl	SamrCloseHandle
.L11:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	beq	.L1
	add	r0, sp, #32
	bl	SamrCloseHandle
.L1:
	ldr	r3, .L42+8
	ldr	r2, [r3]
	ldr	r3, [sp, #76]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	ldr	r0, [sp, #12]
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r3, [r10, #4]
	ldr	r0, [r7]
	ldr	r1, [r3, r4, lsl #2]
	bl	LsapIsPrefixSid
	cmp	r0, #0
	bne	.L31
.L34:
	ldr	r1, [r10]
	b	.L6
.L31:
	ldr	r0, .L42+44
	bl	TRACE
	ldr	r3, [r10, #4]
	lsl	r2, r4, #2
	ldr	r0, [r3, r2]
	bl	LsapGetRelativeIdFromSid
	mov	ip, r0
	add	r3, sp, #60
	mov	r1, #1
	str	r3, [sp]
	add	r2, sp, #72
	add	r3, sp, #48
	ldr	r0, [sp, #36]
	str	ip, [sp, #72]
	bl	SamrLookupIdsInDomain
	str	r0, [sp, #12]
	bl	NT_SUCCESS
	cmp	r0, #0
	beq	.L34
	ldr	r3, [sp, #48]
	ldr	r2, [sp, #60]
	ldr	r1, [r3, #8]
	ldr	r2, [r2]
	str	r1, [r5, #8]
	ldr	r0, [r3]
	ldr	r3, [sp, #16]
	str	r2, [r5, #-8]
	str	r0, [r5, #4]
	str	r3, [r5, #12]
	bl	MIDL_user_allocate
	cmp	r0, #0
	str	r0, [r5]
	beq	.L41
	ldr	r3, [sp, #48]
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	bl	RtlCopyMemory
	add	r0, sp, #48
	bl	SamIFree_SAMPR_RETURNED_USTRING_ARRAY
	add	r0, sp, #60
	bl	SamIFree_SAMPR_ULONG_ARRAY
	b	.L37
.L39:
	ldr	r1, [sp, #12]
	ldr	r0, .L42+48
	bl	TRACE
	b	.L3
.L4:
	ldr	r1, [sp, #12]
	ldr	r0, .L42+52
	bl	TRACE
	b	.L3
.L41:
	add	r0, sp, #48
	bl	SamIFree_SAMPR_RETURNED_USTRING_ARRAY
	add	r0, sp, #60
	bl	SamIFree_SAMPR_ULONG_ARRAY
.L36:
	ldr	r3, .L42+56
	ldr	r3, [r3]
	str	r3, [sp, #12]
	b	.L3
.L40:
	bl	__stack_chk_fail
.L43:
	.align	2
.L42:
	.word	SAM_SERVER_LOOKUP_DOMAIN
	.word	SAM_SERVER_CONNECT
	.word	.LC6
	.word	DOMAIN_LOOKUP
	.word	BuiltinDomainSid
	.word	SidTypeUnknown
	.word	.LC2
	.word	BuiltinDomainName
	.word	.LC3
	.word	SidTypeDomain
	.word	.LC4
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	STATUS_INSUFFICIENT_RESOURCES
	.size	LsapLookupBuiltinDomainSids, .-LsapLookupBuiltinDomainSids
	.comm	SidTypeUnknown,4,4
	.comm	SidTypeDomain,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INSUFFICIENT_RESOURCES,4,4
	.comm	SAM_SERVER_LOOKUP_DOMAIN,4,4
	.comm	SAM_SERVER_CONNECT,4,4
	.comm	DOMAIN_LOOKUP,4,4
	.comm	BuiltinDomainSid,4,4
	.comm	BuiltinDomainName,12,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
