Function at 0x140036d10
Capabilities:
Encrypt or decrypt data via bcrypt
Print debug messages

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x2d0], rbx
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov r13, rcx
mov dword [rsp + 0x60], edx
xor edi, edi
mov r14d, edi
lea r15, [rcx + 8]
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
cmp qword [rax], rdi
je 0x140037097
lea rcx, [r13 + 0xf8]
lea rdx, [rsp + 0x60]
call fcn.140037ff0
mov dword [rax], 1
mov ecx, 0x80
call fcn.14003d970
mov rsi, rax
mov qword [rsp + 0x58], rax
xor edx, edx
mov r8d, 0x80
mov rcx, rax
call fcn.140080170
mov dword [rsi + 0x28], edi
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_InitializeCriticalSection]
mov qword [rsi + 0x38], rdi
mov qword [rsi + 0x40], rdi
mov qword [rsi + 0x48], rdi
mov qword [rsi + 0x58], rdi
mov qword [rsi + 0x60], rdi
mov qword [rsi + 0x68], rdi
mov qword [rsi + 0x70], rdi
mov dword [rsi + 0x78], edi
mov byte [rsi + 0x30], 1
mov rbx, rsi
mov qword [rsp + 0x58], rbx
lea r12, [r13 + 0x138]
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140037e50
lea rcx, [rsp + 0x58]
cmp rax, rcx
je 0x140036e14
mov ebx, edi
mov rdx, qword [rax]
mov qword [rax], rsi
test rdx, rdx
je 0x140036e14
call fcn.1400382e0
nop
test rbx, rbx
je 0x140036e21
mov rdx, rbx
call fcn.1400382e0
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140037e50
mov rcx, qword [rax]
call fcn.1400015c0
test eax, eax
je 0x140037097
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140037e50
mov rcx, qword [rax]
mov ebx, dword [rcx + 0x50]
mov rsi, qword [rcx + 0x48]
test rsi, rsi
je 0x140037097
test ebx, ebx
je 0x140037097
mov word [rsp + 0x68], 0x1fa
mov dword [rsp + 0x6a], ebx
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
mov r8d, 6
lea rdx, [rsp + 0x68]
mov rcx, qword [rax]
call fcn.140034240
test eax, eax
je 0x140037097
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
mov r8d, ebx
mov rdx, rsi
mov rcx, qword [rax]
call fcn.140034240
test eax, eax
je 0x140037097
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
mov r8d, 6
lea rdx, [rsp + 0x68]
mov rcx, qword [rax]
call fcn.1400342d0
test eax, eax
je 0x140037097
cmp byte [rsp + 0x68], 0xfa
jne 0x140037097
cmp byte [rsp + 0x69], 1
jne 0x140037097
movsxd r13, dword [rsp + 0x6a]
test r13d, r13d
jle 0x140037097
lea eax, [r13 + 1]
movsxd rbx, eax
mov rcx, rbx
call fcn.14003dc68
mov rsi, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.140080170
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
mov r8d, r13d
mov rdx, rsi
mov rcx, qword [rax]
call fcn.1400342d0
test eax, eax
je 0x140037071
mov ecx, reloc.WS2_32.dll_recv
call fcn.14003dc68
mov r14, rax
xor eax, eax
mov qword [r14], rax
mov qword [r14 + 8], rax
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140038140
mov r8d, reloc.WS2_32.dll_recv
mov rdx, r14
mov rcx, qword [rax]
call fcn.1400342d0
test eax, eax
je 0x140037071
lea rdx, [rsp + 0x60]
mov rcx, r12
call fcn.140037e50
mov rbx, qword [rax]
mov dword [rsp + 0x58], edi
xor edx, edx
mov r8d, 0x200
lea rcx, [rsp + 0x70]
call fcn.140080170
lea rdx, [rsi + r13]
mov rcx, rsi
call fcn.14003eb74
mov dword [rsp + 0x48], 2
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
mov r8d, r13d
mov rdx, rsi
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x140036ffb
mov r9d, 0xa0
jmp 0x14003704c
mov ecx, dword [rsp + 0x58]
call fcn.14003dc68
mov r15, rax
mov dword [rsp + 0x48], 2
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
mov r8d, r13d
mov rdx, rsi
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jns 0x1400370c3
mov r9d, 0xa8
mov dword [rsp + 0x20], eax
lea r8, str.__d_ACS___BCryptDecrypt_Error_:_0x_08x._r_n
mov edx, 0x100
lea rcx, [rsp + 0x70]
call fcn.140001490
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
mov r12d, 1
test rsi, rsi
je 0x140037087
mov rdx, r12
mov rcx, rsi
call fcn.14003dc60
test r14, r14
je 0x140037097
mov rdx, r12
mov rcx, r14
call fcn.14003dc60
mov eax, edi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.14003d6b0
mov rbx, qword [rsp + 0x2d0]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test r15, r15
je 0x140037071
mov r9, r14
mov r8d, dword [rsp + 0x58]
mov rdx, r15
mov rcx, rbx
call fcn.1400017b0
mov ebx, eax
mov r12d, 1
mov edx, r12d
mov rcx, r15
call fcn.14003dc60
test ebx, ebx
cmovne edi, r12d
jmp 0x140037077