Function at 0x180001300
Capabilities:
Link many functions at runtime

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbx
push rbp
sub rsp, 0x78
mov qword [rax + 0x10], rsi
lea rcx, str.bcrypt
xor ebx, ebx
mov qword [rax + 0x18], rdi
mov qword [rax - 0x18], r12
mov rsi, rdx
mov qword [rax - 0x20], r14
mov r12, r8
mov r14d, r9d
mov qword [rax - 0x38], rbx
mov qword [rax - 0x30], rbx
mov ebp, ebx
mov dword [rax + 8], ebx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptOpenAlgorithmProvider
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180001373
xor r9d, r9d
lea rdx, [0x18001a7f0]
xor r8d, r8d
lea rcx, [rsp + 0x50]
call rax
test eax, eax
js 0x18000155f
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x18000155f
test rsi, rsi
je 0x1800013b1
pushfq
pop rax
btr rax, 0xa
push rax
popfq
mov rdi, rbp
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
mov rdi, qword [rsp + 0x50]
lea rcx, str.bcrypt
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptSetProperty
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800013fd
mov r9d, 0x20
mov dword [rsp + 0x20], ebx
lea r8, str.ChainingModeCBC
mov rcx, rdi
lea rdx, str.ChainingMode
call rax
test eax, eax
js 0x18000155f
mov rdi, qword [rsp + 0x50]
lea rcx, str.bcrypt
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptGenerateSymmetricKey
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180001454
mov dword [rsp + 0x30], ebx
lea rcx, [0x18001eae0]
mov dword [rsp + 0x28], 0x20
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov rcx, rdi
xor r8d, r8d
call rax
test eax, eax
js 0x18000155f
mov rdi, qword [rsp + 0x58]
lea rcx, str.bcrypt
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptDecrypt
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800014bc
mov dword [rsp + 0x48], 1
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x40], rcx
xor r9d, r9d
mov dword [rsp + 0x38], ebx
mov r8d, r14d
mov qword [rsp + 0x30], rbx
mov rdx, r12
mov dword [rsp + 0x28], 0x10
mov rcx, rdi
mov qword [rsp + 0x20], rbp
call rax
test eax, eax
js 0x18000155f
mov rdi, qword [rsp + 0xb8]
mov esi, dword [rsp + 0x90]
cmp dword [rdi], esi
jae 0x1800014d7
mov dword [rdi], r14d
jmp 0x18000155f
mov qword [rsp + 0x60], r15
lea rcx, str.bcrypt
mov r15, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptDecrypt
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r10, rax
test rax, rax
je 0x18000154c
mov dword [rsp + 0x48], 1
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov rax, qword [rsp + 0xb0]
mov r8d, r14d
mov dword [rsp + 0x38], esi
mov rdx, r12
mov qword [rsp + 0x30], rax
mov rcx, r15
mov dword [rsp + 0x28], 0x10
mov qword [rsp + 0x20], rbp
call r10
test eax, eax
js 0x18000155a
mov eax, dword [rsp + 0x90]
mov ebx, 1
mov dword [rdi], eax
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x98]
test rdi, rdi
je 0x1800015a4
lea rcx, str.bcrypt
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptCloseAlgorithmProvider
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800015a4
xor edx, edx
mov rcx, rdi
call rax
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x1800015d5
lea rcx, str.bcrypt
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.BCryptDestroyKey
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800015d5
mov rcx, rdi
call rax
mov rdi, qword [rsp + 0xa0]
test rbp, rbp
je 0x1800015f6
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
add rsp, 0x78
pop rbp
pop rbx
ret