Function at 0x18003e6d8
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xd8
xor ebx, ebx
mov byte [rbp + 0xf], 1
lea rax, str.1.2.840.113556.1.4.529
mov dword [rbp + 0x67], ebx
mov qword [rbp - 9], rax
lea rcx, str.wldap32.dll
lea rax, str.rootDomainNamingContext
mov qword [rbp - 0x39], rbx
mov qword [rbp - 0x29], rax
mov r15d, ebx
lea rax, [rbp - 9]
mov qword [rbp - 0x51], rbx
mov qword [rbp - 0x19], rax
mov r13d, ebx
mov r14d, ebx
mov qword [rbp + 0x7f], rbx
mov edi, ebx
mov dword [rbp - 1], ebx
mov esi, ebx
mov qword [rbp + 7], rbx
mov qword [rbp - 0x21], rbx
mov qword [rbp - 0x11], rbx
mov qword [rbp - 0x59], rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rbp - 0x31], rax
mov r12, rax
test rax, rax
je 0x18003e905
lea rdx, str.ldap_initA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_set_option
mov rcx, r12
mov qword [rbp + 0x6f], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_bind_sA
mov rcx, r12
mov qword [rbp - 0x49], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_unbind
mov rcx, r12
mov qword [rbp - 0x41], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_search_ext_sA
mov rcx, r12
mov r14, rax
mov qword [rbp - 0x39], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_first_entry
mov rcx, r12
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_get_valuesA
mov rcx, r12
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_msgfree
mov rcx, r12
mov rbx, rax
mov qword [rbp + 0x77], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ldap_value_freeA
mov rcx, r12
mov qword [rbp - 0x51], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.LdapMapErrorToWin32
mov rcx, r12
mov qword [rbp + 0x7f], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
xor ecx, ecx
mov rax, qword [rbp + 0x6f]
test rax, rax
je 0x18003e902
cmp qword [rbp - 0x49], rcx
je 0x18003e902
cmp qword [rbp - 0x41], rcx
je 0x18003e902
test r14, r14
je 0x18003e902
test r15, r15
je 0x18003e902
test r13, r13
je 0x18003e902
test rbx, rbx
je 0x18003e902
cmp qword [rbp - 0x51], rcx
je 0x18003e902
cmp qword [rbp + 0x7f], rcx
je 0x18003e902
test rdi, rdi
je 0x18003e902
mov edx, 0x185
call qword [0x18006e698]
mov rsi, rax
test rax, rax
jne 0x18003e8a5
mov ebx, 0x200f
jmp 0x18003eac9
mov rax, qword [rbp - 0x49]
lea r8, [rbp + 0x6f]
mov edx, 0x96
mov dword [rbp + 0x6f], 1
mov rcx, rsi
call qword [0x18006e698]
mov ecx, eax
mov rax, rdi
call qword [0x18006e698]
mov ebx, eax
test eax, eax
jne 0x18003eab2
mov rax, qword [rbp - 0x41]
mov r9d, 0x486
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [0x18006e698]
mov ecx, eax
mov rax, rdi
call qword [0x18006e698]
mov r14, qword [rbp + 0x77]
mov ebx, eax
jmp 0x18003e90a
mov r14, rbx
mov ebx, 0x7f
test ebx, ebx
jne 0x18003eab2
xor ebx, ebx
lea rax, [rbp - 0x59]
mov qword [rsp + 0x50], rax
lea r9, str._objectClass_
mov dword [rsp + 0x48], 0x2710
lea rax, [rbp - 0x19]
mov qword [rsp + 0x40], rbx
lea rdx, [0x180071e4e]
mov qword [rsp + 0x38], rbx
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov rcx, rsi
lea rax, [rbp - 0x29]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov rax, r15
call qword [0x18006e698]
mov ebx, eax
test eax, eax
jne 0x18003eab2
mov rdx, qword [rbp - 0x59]
test rdx, rdx
je 0x18003eab2
mov rcx, rsi
mov rax, r13
call qword [0x18006e698]
test rax, rax
je 0x18003e9a5
mov r8, qword [rbp - 0x29]
mov rdx, rax
mov rax, r14
mov rcx, rsi
call qword [0x18006e698]
mov r13, rax
test rax, rax
jne 0x18003e9b8
mov ecx, dword [rsi + 0x74]
mov rax, rdi
call qword [0x18006e698]
mov ebx, eax
jmp 0x18003eaa4
mov rcx, qword [rax]
test rcx, rcx
je 0x18003ea9f
cmp byte [rcx], bl
je 0x18003ea9f
lea rdx, str._SID
call qword [sym.imp.msvcrt.dll_strstr]
mov r14, rax
test rax, rax
je 0x18003ea8b
mov edx, 0x3e
mov rcx, rax
call qword [sym.imp.msvcrt.dll_strchr]
mov rdi, rax
test rax, rax
je 0x18003ea8b
call fcn.18003e644
lea rax, [rdi - 1]
add r14, 5
lea r15, [0x180095d40]
cmp r14, rax
jae 0x18003ea73
mov r12, rax
mov dil, byte [r14]
lea eax, [rdi - 0x30]
cmp al, 9
ja 0x18003ea2b
sub dil, 0x30
jmp 0x18003ea3b
movsx ecx, dil
call qword [sym.imp.msvcrt.dll_tolower]
mov edi, eax
add dil, 9
mov cl, byte [r14 + 1]
shl dil, 4
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x18003ea52
sub cl, 0x30
add dil, cl
jmp 0x18003ea60
movsx ecx, cl
call qword [sym.imp.msvcrt.dll_tolower]
sub al, 0x57
add dil, al
mov byte [r15], dil
add r14, 2
inc r15
cmp r14, r12
jb 0x18003ea1b
mov r12, qword [rbp - 0x31]
mov dword [0x1800969c0], 1
call fcn.180006f10
mov dword [rbp + 0x67], 1
jmp 0x18003ea90
mov ebx, 0x10d8
mov rax, qword [rbp + 0x7f]
mov rcx, r13
call qword [0x18006e698]
jmp 0x18003eaa4
mov ebx, 0x10d8
mov rcx, qword [rbp - 0x59]
mov rax, qword [rbp - 0x51]
call qword [0x18006e698]
test rsi, rsi
je 0x18003eac9
mov rax, qword [rbp - 0x39]
test rax, rax
je 0x18003eac9
mov rcx, rsi
call qword [0x18006e698]
test r12, r12
je 0x18003ead7
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rbp + 0x67]
add rsp, 0xd8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret