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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x38]
sub rsp, 0x138
mov rax, qword [0x1400ec780]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r15, r8
mov r12, rdx
mov rdi, rcx
mov qword [rsp + 0x60], rcx
xor r13d, r13d
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r13
mov dword [rbp], r13d
lea esi, [r9 - 0xf]
xorps xmm0, xmm0
mov r14d, r9d
movdqu xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], r13
test r9d, r9d
je 0x1400043b8
cmp r14, 0x1000
jb 0x140004393
lea rcx, [r14 + 0x27]
cmp rcx, r14
jbe 0x140004927
call fcn.140084d88
mov rcx, rax
test rax, rax
je 0x140004921
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x14000439b
mov rcx, r14
call fcn.140084d88
mov qword [rbp + 8], rax
lea rbx, [rax + r14]
mov qword [rbp + 0x18], rbx
mov r8, r14
xor edx, edx
mov rcx, rax
call fcn.1400b7960
mov qword [rbp + 0x10], rbx
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov qword [rbp - 0x20], r13
movdqu xmmword [rbp - 0x18], xmm1
mov qword [rbp - 8], r13
mov ecx, recv
call fcn.140084d88
mov rcx, rax
mov qword [rbp - 0x18], rax
add rax, 0xc
mov qword [rbp - 8], rax
xor edx, edx
mov qword [rcx], rdx
mov dword [rcx + 8], edx
mov qword [rbp - 0x10], rax
lea rdx, [r12 + 3]
mov r8d, recv
mov rcx, qword [rbp - 0x18]
call fcn.1400b72c0
lea r8, [r12 + r14]
lea rdx, [r12 + 0xf]
sub r8, rdx
mov rcx, qword [rbp + 8]
call fcn.1400b72c0
mov r9, qword [rbp + 0x10]
mov rcx, r9
mov rdx, qword [rbp + 8]
sub rcx, rdx
cmp rsi, rcx
jae 0x140004438
lea rax, [rsi + rdx]
mov qword [rbp + 0x10], rax
jmp 0x14000446c
jbe 0x14000446c
mov rax, qword [rbp + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140004454
mov rdx, rsi
lea rcx, [rbp + 8]
call fcn.1400198b0
jmp 0x14000446c
mov r8, rsi
sub r8, rcx
lea rbx, [r8 + r9]
xor edx, edx
mov rcx, r9
call fcn.1400b7960
mov qword [rbp + 0x10], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1400db3a8]
lea rcx, [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jns 0x140004596
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], r13
xor r8d, r8d
lea rdx, [0x1400db1e0]
mov rcx, rdi
call fcn.1400037e0
nop
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1400044f3
mov rdx, qword [rbp - 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400044e2
mov rcx, qword [rcx - 8]
sub rax, rcx
add rdx, 0x27
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004939
call fcn.140084d80
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], r13
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x140004539
mov rdx, qword [rbp - 0x20]
sub rdx, rcx
cmp rdx, 0x1000
mov rax, rcx
jb 0x140004528
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004915
call fcn.140084d80
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], r13
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140004573
mov rdx, qword [rbp + 0x18]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000456e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004921
call fcn.140084d80
mov rax, rdi
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140084d60
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov dword [rsp + 0x20], r13d
mov r9d, 0x20
lea r8, str.ChainingModeGCM
lea rdx, str.ChainingMode
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov rcx, qword [rsp + 0x58]
test eax, eax
jns 0x1400045d0
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x14000448c
mov dword [rsp + 0x30], r13d
mov eax, dword [r15]
mov dword [rsp + 0x28], eax
mov rax, qword [r15 + 8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jns 0x14000460c
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x14000448c
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rax
mov dword [rsp + 0x70], 0x58
mov dword [rsp + 0x74], 1
sub rsi, 0x10
mov rax, qword [rbp - 0x18]
mov qword [rsp + 0x78], rax
mov dword [rbp - 0x80], select
mov rdx, qword [rbp + 8]
lea rax, [rdx + rsi]
mov qword [rbp - 0x68], rax
mov dword [rbp - 0x60], reloc.WS2_32.dll_recv
mov dword [rsp + 0x48], r13d
lea rax, [rbp]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x70]
mov r8d, esi
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x14000448c
mov r8d, dword [rbp]
mov r9, qword [rbp - 0x28]
mov rdx, r9
mov rcx, qword [rbp - 0x30]
sub rdx, rcx
cmp r8, rdx
jae 0x1400046bf
lea rax, [rcx + r8]
mov qword [rbp - 0x28], rax
jmp 0x1400046f4
jbe 0x1400046f4
mov rax, qword [rbp - 0x20]
sub rax, rcx
cmp r8, rax
jbe 0x1400046db
mov rdx, r8
lea rcx, [rbp - 0x30]
call fcn.1400198b0
jmp 0x1400046f0
sub r8, rdx
lea rbx, [r8 + r9]
xor edx, edx
mov rcx, r9
call fcn.1400b7960
mov qword [rbp - 0x28], rbx
mov rcx, qword [rbp - 0x30]
mov dword [rsp + 0x48], r13d
lea rax, [rbp]
mov qword [rsp + 0x40], rax
mov eax, dword [rbp]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x70]
mov r8d, esi
mov rdx, qword [rbp + 8]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x14000448c
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov r14, qword [rbp - 0x28]
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov rbx, qword [rbp - 0x30]
cmp rbx, r14
jne 0x14000476b
mov byte [rdi], 0
jmp 0x14000484c
mov rax, r14
sub rax, rbx
movabs rsi, 0x7fffffffffffffff
cmp rax, rsi
ja 0x14000492d
cmp rax, 0xf
jbe 0x140004804
or rax, 0xf
cmp rax, rsi
jbe 0x1400047c3
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140084d88
mov rcx, rax
test rax, rax
je 0x140004933
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x1400047fd
mov rsi, rax
mov ecx, socket
cmp rax, rcx
cmovb rsi, rcx
lea rcx, [rsi + 1]
cmp rcx, 0x1000
jb 0x1400047ee
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000491b
jmp 0x1400047a1
test rcx, rcx
je 0x1400047fa
call fcn.140084d88
jmp 0x1400047fd
mov rax, r13
mov qword [rdi], rax
mov qword [rdi + 0x18], rsi
cmp rbx, r14
je 0x140004833
nop dword [rax]
mov rdx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x14000481d
mov rdx, qword [rdi]
movzx ecx, byte [rbx]
mov rax, qword [rdi + 0x10]
mov byte [rdx + rax], cl
inc qword [rdi + 0x10]
inc rbx
cmp rbx, r14
jne 0x140004810
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140004840
mov rcx, qword [rdi]
mov rax, qword [rdi + 0x10]
mov byte [rcx + rax], 0
mov rbx, qword [rbp - 0x30]
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140004896
mov rdx, qword [rbp - 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004881
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004939
call fcn.140084d80
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], r13
mov rbx, qword [rbp - 0x30]
test rbx, rbx
je 0x1400048d7
mov rdx, qword [rbp - 0x20]
sub rdx, rbx
mov rax, rbx
cmp rdx, 0x1000
jb 0x1400048c3
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004915
mov rcx, rbx
call fcn.140084d80
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], r13
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140004573
mov rdx, qword [rbp + 0x18]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000456e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004921
jmp 0x14000456e
call fcn.14008e520
nop
call fcn.140001ba0
nop
call fcn.14008e520
int3
call fcn.140001ba0
nop
call fcn.140001c40
int3
call fcn.14008e520
nop
call fcn.14008e520
int3