Function at 0x180010d50
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x1a0
mov rax, qword [0x180066008]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov rbp, qword [r9]
mov r15, r9
mov r10, qword [rsp + 0x200]
add rbp, 0x28
test byte [0x180067c73], 8
mov rbx, rdx
mov r14, qword [rsp + 0x208]
mov rdi, rcx
movzx eax, r8b
mov byte [rsp + 0x50], al
mov esi, eax
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x58], r10
mov qword [rsp + 0x60], rbp
je 0x180010df6
lea r9, str.Batch_Recv__u_UDP_datagrams
mov dword [rsp + 0x20], eax
mov edx, 0x80
lea rcx, [rsp + 0x100]
mov r8, 0xffffffffffffffff
call fcn.180042088
lea r9, [rsp + 0x100]
mov r8, rdi
lea rdx, [0x180056c18]
call fcn.180041678
mov r10, qword [rsp + 0x58]
movsxd rax, dword [rbp + 0x28]
mov r13, qword [rdi + rax*8 + 0x810]
test r13, r13
jne 0x180010e1e
lea r8, str.Key_no_longer_accepted__batch_
mov rdx, rbp
mov rcx, rdi
call fcn.18001d760
jmp 0x1800110ee
test byte [rbp + 0x2c], 0x40
mov qword [rsp + 0x198], r12
je 0x180010f85
test byte [rdi + 0xe1], 8
je 0x180010f85
mov r13, qword [r13 + 0x10]
xor r8d, r8d
mov dword [rsp + 0x70], r8d
movzx r12d, sil
cmp dword [r13 + 8], 2
jne 0x180010f0d
mov dword [rsp + 0x74], r8d
mov esi, r8d
mov byte [rsp + 0x78], r8b
mov ebp, r8d
mov dword [r13 + 0x20], shutdown
test r12d, r12d
je 0x180010f9a
lea rdx, [r13 + 0x10]
nop dword [rax]
mov dword [rsp + 0x48], r8d
mov r9, rdx
mov ecx, ebp
lea rdx, [rsp + 0x74]
lea rax, [rcx + r10]
mov qword [r13 + 0x18], rax
lea rax, [rsp + 0x80]
add rax, rcx
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x40], rcx
mov rcx, qword [r13]
mov dword [rsp + 0x38], shutdown
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r8d
mov qword [rsp + 0x20], r8
mov r8d, 5
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test eax, eax
jle 0x180010ee9
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x180010f69
mov r10, qword [rsp + 0x58]
lea rdx, [r13 + 0x10]
inc esi
add ebp, 0x10
mov r8d, 0
cmp esi, r12d
jb 0x180010e80
jmp 0x180010f9a
mov rcx, qword [r13]
lea rax, [rsp + 0x70]
mov dword [rsp + 0x48], r8d
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov rdx, r10
shl r12d, 4
lea rax, [rsp + 0x80]
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r8d
mov qword [rsp + 0x20], r8
mov r8d, r12d
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test eax, eax
jle 0x180010f65
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x180010f9a
jmp 0x180010f6e
mov rbp, qword [rsp + 0x60]
lea r8, str.Failed_to_compute_HP_mask
mov rdx, rbp
mov rcx, rdi
call fcn.18001d760
jmp 0x1800110e6
shl esi, 4
lea rcx, [rsp + 0x80]
mov r8d, esi
xor edx, edx
call fcn.180029d60
movzx ebp, byte [rsp + 0x50]
test bpl, bpl
je 0x1800110e6
lea r12, [rsp + 0x80]
mov r13d, ebp
mov rax, qword [r15]
mov r8, r12
mov rcx, rdi
movzx ebp, byte [rax + 0x1c]
lea rsi, [rax + 0x28]
mov rdx, rsi
and ebp, 3
call fcn.180011110
test al, al
je 0x1800110a4
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call fcn.18000f6b0
test al, al
je 0x1800110a4
mov r9d, ebp
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call fcn.18000d2f0
test al, al
je 0x1800110a4
mov r8, rsi
lea rdx, [rsp + 0x68]
mov rcx, rdi
call fcn.1800113e0
movzx eax, byte [rsi + 0x2d]
mov rbx, qword [rsp + 0x68]
shr al, 1
and al, 1
or byte [r14], al
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x180011070
test byte [rax + 0x10], 1
jne 0x180011070
test byte [rbx + 1], 1
je 0x180011070
test byte [rbx + 2], 2
jne 0x180011070
test byte [rsi + 0x2d], 2
je 0x180011070
mov rax, qword [r15]
xor edx, edx
movzx ecx, word [0x180067d6e]
movzx eax, word [rax + 0x1a]
div ecx
movzx eax, word [r14 + 2]
cmp edx, eax
je 0x180011070
mov word [r14 + 2], dx
mov byte [r14 + 1], 1
or byte [rbx + 2], 2
test byte [rsi + 0x2c], 4
je 0x1800110d4
test byte [rsi + 0x2d], 4
je 0x1800110d4
cmp dword [rdi], 4
mov rax, qword [rsi + 8]
movzx eax, byte [rax]
jne 0x180011095
and byte [rbx + 1], 0xbf
and al, 0x20
add al, al
or byte [rbx + 1], al
jmp 0x1800110d4
and byte [rbx + 1], 0xbf
add al, al
not al
and al, 0x40
or byte [rbx + 1], al
jmp 0x1800110d4
inc qword [rdi + 0xb78]
movzx ecx, byte [rdi + 0xe3]
test cl, cl
jns 0x1800110d4
test byte [rdi + 0xe4], 1
jne 0x1800110d4
mov eax, dword [rdi + 0xbcc]
and cl, 0x7f
mov byte [rdi + 0xe3], cl
mov dword [rdi + 0xaec], eax
add r12, 0x10
add r15, 8
sub r13, 1
jne 0x180010fb3
mov r12, qword [rsp + 0x198]
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.180028c10
add rsp, 0x1a0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret