Function at 0x18000f06c
Capabilities:
Encrypt data using rc4 via systemfunction033

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xf0
lea r15, str.1.2.840.113556.1.4.90
mov rdi, rdx
mov r14, rcx
mov rsi, r15
xor ebx, ebx
mov rdx, qword [rsi]
lea r8, [rbp - 0x69]
xor r9d, r9d
lea r8, [r8 + rbx*4]
mov rcx, r14
call fcn.18000f484
test eax, eax
je 0x18000f2fe
inc ebx
add rsi, 8
cmp ebx, 8
jb 0x18000f09a
test rdi, rdi
je 0x18000f2f7
mov rcx, qword [rdi + 0x20]
mov rax, qword [rdi]
mov qword [rbp - 0x79], rax
test rcx, rcx
je 0x18000f2b1
xor r13d, r13d
cmp dword [rdi + 0x18], r13d
jbe 0x18000f2b1
lea r14, [r13*2]
xor edx, edx
lea rax, [rbp - 0x69]
add r14, r13
mov r8d, dword [rcx + r14*8]
cmp dword [rax], r8d
je 0x18000f117
inc edx
add rax, 4
cmp edx, 8
jb 0x18000f102
jmp 0x18000f2a0
cmp qword [rcx + r14*8 + 0x10], 0
je 0x18000f2a0
xor r12d, r12d
cmp dword [rcx + r14*8 + 8], r12d
jbe 0x18000f2a0
mov rsi, qword [rcx + r14*8 + 0x10]
mov ebx, r12d
add rbx, rbx
cmp qword [rsi + rbx*8 + 8], 0
je 0x18000f28e
cmp qword [0x1800c2d38], 0
mov r15, qword [rsi + rbx*8 + 8]
lea rax, [rbp + 0xf]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x10
mov dword [rsp + 0x34], 0x10
je 0x18000f2e9
cmp dword [0x1800c2d30], 0
je 0x18000f2e9
cmp dword [rsi + rbx*8], 0x14
jb 0x18000f2e0
test r15, r15
je 0x18000f2e0
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Init]
mov r8d, dword [0x1800c2d30]
mov rdx, qword [0x1800c2d38]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
mov r8d, 0x10
mov rdx, r15
call qword [sym.imp.cryptdll.dll_MD5Update]
lea rcx, [rbp - 0x49]
call qword [sym.imp.cryptdll.dll_MD5Final]
mov eax, dword [rsi + rbx*8]
lea rdx, [rsp + 0x30]
sub eax, 0x10
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x40], eax
lea rax, [r15 + 0x10]
mov qword [rsp + 0x48], rax
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x18000f2d7
mov eax, dword [rsi + rbx*8]
lea rcx, [r15 + 0x14]
lea r9, [rbp + 0x6f]
sub eax, 0x14
mov qword [rbp + 0x7f], rcx
mov rdx, rcx
mov r8d, eax
mov ecx, 0x8000
mov dword [rbp + 0x77], eax
mov dword [rsp + 0x20], 4
call fcn.180002f50
test eax, eax
je 0x18000f2ce
mov edx, dword [rbp + 0x6f]
cmp edx, dword [r15 + 0x10]
jne 0x18000f2bc
mov rax, qword [rsi + rbx*8 + 8]
mov r15d, dword [rbp + 0x77]
mov ecx, 0x40
mov edx, r15d
mov qword [rbp - 0x71], rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi + rbx*8 + 8], rax
test rax, rax
je 0x18000f30e
mov rdx, qword [rbp + 0x7f]
mov r8d, r15d
mov rcx, rax
call fcn.18005bdd0
mov rax, qword [rbp - 0x71]
mov dword [rsi + rbx*8], r15d
test rax, rax
je 0x18000f28e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rdi + 0x20]
inc r12d
cmp r12d, dword [rcx + r14*8 + 8]
jb 0x18000f131
inc r13d
cmp r13d, dword [rdi + 0x18]
jb 0x18000f0ed
mov rax, qword [rbp - 0x79]
mov rdi, rax
test rax, rax
jmp 0x18000f0c6
mov r8d, dword [r15 + 0x10]
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___Checksums_dont_match__C:0x_08x___R:0x_08x__n
call fcn.18000af2c
jmp 0x18000f30e
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___Unable_to_calculate_CRC32_n
jmp 0x18000f2f0
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___RtlDecryptData2_n
jmp 0x18000f2f0
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___No_valid_data_n
jmp 0x18000f2f0
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply_decrypt___No_Session_Key_n
call fcn.18000af2c
jmp 0x18000f30e
mov eax, 1
jmp 0x18000f310
mov rdx, qword [r15 + rbx*8]
lea rcx, str.ERROR_kull_m_rpc_drsr_ProcessGetNCChangesReply___Unable_to_MakeAttid_for__S_n
call fcn.18000af2c
xor eax, eax
mov rbx, qword [rsp + reloc.WLDAP32.dll_Ordinal_304]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret