joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003848
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor ebx, ebx
mov r15, r9
mov esi, r8d
mov r14, rdx
mov edi, ecx
cmp ecx, 0x8000
jne 0x1400038e1
cmp dword [rbp + 0x40], 4
jne 0x1400039c3
lea rdx, [rbp - 0x20]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x1400039c3
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x1400039c3
mov rax, qword [rbp - 0x20]
mov r8, r14
mov rcx, qword [rbp - 0x10]
mov edx, esi
call qword [rax + reloc.ODBC32.dll_SQLAllocHandle]
mov rax, qword [rbp - 0x20]
mov rdx, r15
mov rcx, qword [rbp - 0x10]
call qword [rax + 0x20]
test eax, eax
lea rcx, [rbp - 0x10]
mov rax, qword [rbp - 0x20]
setns bl
call qword [rax + Ordinal_41]
jmp 0x1400039c3
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
lea rcx, [rbp - 8]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400039c3
mov rcx, qword [rbp - 8]
lea rax, [rbp - 0x18]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1400039b7
mov rcx, qword [rbp - 0x18]
xor r9d, r9d
mov r8d, esi
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x1400039ad
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
xor r8d, r8d
mov dword [rsp + 0x20], ebx
lea esi, [r8 + 2]
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1400039ad
mov edx, dword [rbp + 0x20]
lea ecx, [rsi + 0x3e]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400039ad
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov dword [rsp + 0x20], ebx
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [rbp + 0x40]
mov rdx, rdi
cmp dword [rbp + 0x20], ecx
mov ebx, eax
cmovb ecx, dword [rbp + 0x20]
mov r8d, ecx
mov rcx, r15
call fcn.1400c5f00
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rbp - 8]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x50]
mov eax, ebx
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1400039e0
Capabilities:
Encrypt data using des via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
mov esi, r9d
mov r12, rcx
xor ebx, ebx
mov ecx, 0x6603
mov r14, r8
mov r15d, edx
lea ebp, [rsi + 0xc]
cmp edx, ecx
je 0x140003a77
mov edx, ebp
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003aa5
mov r8d, esi
mov dword [rax], 0x208
lea rcx, [rax + 0xc]
mov dword [rax + 4], r15d
mov rdx, r14
mov dword [rax + 8], esi
call fcn.1400c5f00
mov rax, qword [rsp + 0x78]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8d, ebp
mov eax, dword [rsp + 0x70]
mov rdx, rdi
mov rcx, r12
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140003aa5
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x140003aa5
mov r9d, dword [rsp + 0x70]
mov r8d, esi
mov qword [rsp + 0x28], rax
mov rdx, r14
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
call fcn.1400044ec
mov ebx, eax
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret

Function at 0x140003ac8
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push r12
push r14
push r15
sub rsp, 0x150
xor esi, esi
mov ebx, r8d
cmp r8d, dword [rsp + 0x190]
mov rbp, r9
mov r14, rdx
mov r15d, ecx
setae sil
jb 0x140003b0d
mov r8d, dword [rsp + 0x190]
jmp 0x140003bc5
mov r12d, Ordinal_69
lea rcx, [rsp + 0x30]
mov r8d, r12d
lea edx, [r12 - 0xa]
call fcn.1400c5810
mov r8d, r12d
lea edx, [r12 + 0x1c]
lea rcx, [rsp + 0x70]
call fcn.1400c5810
test ebx, ebx
je 0x140003b63
lea rax, [rsp + 0x30]
mov r8, rbx
sub r14, rax
xor edx, edx
lea rax, [rsp + 0x30]
add rax, rdx
mov cl, byte [r14 + rax]
xor byte [rsp + rdx + 0x70], cl
inc rdx
xor byte [rax], cl
sub r8, 1
jne 0x140003b48
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], ebx
mov r8d, r12d
lea rdx, [rsp + 0x30]
mov ecx, r15d
call fcn.140003848
test eax, eax
je 0x140003bcd
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], ebx
add r9, rbx
lea rdx, [rsp + 0x70]
mov r8d, r12d
mov ecx, r15d
call fcn.140003848
mov esi, eax
test eax, eax
je 0x140003bcd
lea ecx, [rbx + rbx]
cmp dword [rsp + 0x190], ecx
lea rdx, [rsp + 0xb0]
cmovb ecx, dword [rsp + 0x190]
mov r8d, ecx
mov rcx, rbp
call fcn.1400c5f00
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140003cb8
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
xor ebx, ebx
mov dword [rbp - 0x28], ecx
mov r14, r9
mov qword [rbp - 0x20], rbx
mov edi, r8d
mov dword [rbp - 0x18], ebx
mov rsi, rdx
mov qword [rbp - 0x10], rbx
lea r9d, [rbx + 0x18]
mov dword [rbp - 8], ebx
xor r8d, r8d
mov dword [rsp + 0x20], 0xf0000000
xor edx, edx
lea rcx, [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140003e29
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rbx
mov r9d, edi
mov qword [rsp + 0x28], rax
mov r8, rsi
mov edx, 0x6602
mov dword [rsp + 0x20], 0x100
call fcn.1400039e0
test eax, eax
je 0x140003e1d
mov r8, qword [rbp - 0x30]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
xor r9d, r9d
mov edx, 0x8009
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140003e13
mov rcx, qword [rbp - 0x40]
lea r8, [rbp - 0x28]
xor r9d, r9d
lea edx, [rbx + 5]
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x140003e09
mov r8d, dword [rbp + 0x40]
xor r9d, r9d
mov rcx, qword [rbp - 0x40]
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140003e09
mov rcx, qword [rbp - 0x40]
lea esi, [rbx + 2]
mov edx, esi
mov dword [rsp + 0x20], ebx
lea r9, [rbp + 0x20]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140003e09
mov edx, dword [rbp + 0x20]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003e09
mov rcx, qword [rbp - 0x40]
lea r9, [rbp + 0x20]
mov r8, rax
mov dword [rsp + 0x20], ebx
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [rbp + 0x50]
mov rdx, rdi
cmp dword [rbp + 0x20], ecx
mov ebx, eax
cmovb ecx, dword [rbp + 0x20]
mov r8d, ecx
mov rcx, qword [rbp + 0x48]
call fcn.1400c5f00
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x80]
mov eax, ebx
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x140004090
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
xor r15d, r15d
mov rdi, r9
mov ebx, r8d
mov r12, rdx
mov r14, rcx
lea r13d, [r15 + 0x10]
cmp r8d, r13d
jbe 0x140004230
lea r9, [rbp - 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x140004255
xor r9d, r9d
lea edx, [r15 + 1]
mov r8, rdi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004224
lea esi, [rbx + 0xf]
shr esi, 4
and ebx, 0xf
mov edi, esi
cmovne r13d, ebx
shl edi, 4
cmp esi, 2
jbe 0x140004141
lea eax, [rdi - 0x20]
xor r9d, r9d
mov dword [rbp + 0x40], eax
xor r8d, r8d
lea rax, [rbp + 0x40]
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, r14
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004224
lea eax, [r13 + 0x10]
add esi, 0xfffffffe
shl esi, 4
lea rcx, [rbp - 0x28]
add rsi, r12
mov r8d, eax
mov rdx, rsi
mov ebx, eax
call fcn.1400c5f00
mov eax, 0x10
lea rcx, [rbp - 0x28]
sub eax, r13d
add rcx, rbx
mov r8d, eax
mov qword [rbp - 0x38], rax
xor edx, edx
mov qword [rbp - 0x30], rcx
call fcn.1400c5810
mov rcx, qword [rbp - 0x40]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x28]
mov dword [rbp + 0x40], 0x10
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004224
movdqu xmm1, xmmword [rbp - 0x28]
mov r8, qword [rbp - 0x38]
lea rdx, [rbp - 0x28]
movdqu xmm0, xmmword [rbp - 0x18]
mov rcx, qword [rbp - 0x30]
mov ebx, r13d
pxor xmm1, xmm0
add rdx, rbx
movdqu xmmword [rbp - 0x28], xmm1
call fcn.1400c5f00
lea rax, [rbp + 0x40]
mov dword [rbp + 0x40], 0x10
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x18]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r15d, eax
test eax, eax
je 0x140004224
movups xmm0, xmmword [rbp - 0x18]
lea ecx, [rdi - 0x10]
mov r8d, ebx
add rcx, r12
lea rdx, [rbp - 0x28]
movdqu xmmword [rsi], xmm0
call fcn.1400c5f00
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004255
jne 0x140004255
lea rax, [rbp + 0x40]
mov dword [rbp + 0x40], r13d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r12
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r15d, eax
lea r11, [rsp + 0x70]
mov eax, r15d
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x140004278
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r13d, r13d
mov rax, r9
mov ebx, r8d
mov r15, rdx
mov r12, rcx
lea esi, [r13 + 0x10]
cmp r8d, esi
jbe 0x1400043ac
xor r9d, r9d
lea edx, [rsi - 0xf]
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400043dc
lea ebp, [rbx + 0xf]
mov r14d, esi
shr ebp, 4
and ebx, 0xf
mov edi, ebp
cmovne r14d, ebx
shl edi, 4
cmp ebp, 2
jbe 0x14000431a
lea eax, [rdi - 0x20]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor r8d, r8d
mov dword [rsp + 0xa0], eax
xor edx, edx
lea rax, [rsp + 0xa0]
mov rcx, r12
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1400043dc
lea eax, [r14 + 0x10]
add ebp, 0xfffffffe
shl ebp, 4
lea rcx, [rsp + 0x40]
add rbp, r15
mov r8d, eax
mov rdx, rbp
mov ebx, eax
call fcn.1400c5f00
lea rcx, [rsp + 0x40]
sub esi, r14d
add rcx, rbx
mov r8d, esi
xor edx, edx
call fcn.1400c5810
mov eax, Ordinal_36
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor r8d, r8d
mov dword [rsp + 0xa0], eax
xor edx, edx
lea rax, [rsp + 0xa0]
mov rcx, r12
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r13d, eax
test eax, eax
je 0x1400043dc
movups xmm0, xmmword [rsp + 0x50]
lea ecx, [rdi - 0x10]
mov r8d, r14d
add rcx, r15
lea rdx, [rsp + 0x40]
movdqu xmmword [rbp], xmm0
call fcn.1400c5f00
jmp 0x1400043dc
jne 0x1400043dc
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r15
xor edx, edx
mov dword [rsp + 0xa0], esi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r13d, eax
lea r11, [rsp + 0x60]
mov eax, r13d
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140004400
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov dword [rax + 8], ecx
push rdi
sub rsp, 0x50
mov rbp, r9
mov dword [rax + 8], 1
mov edi, r8d
mov dword [rax - 0x38], 0xf0000000
mov rsi, rdx
lea rcx, [rax - 0x10]
xor ebx, ebx
xor r8d, r8d
xor edx, edx
lea r9d, [rbx + 0x18]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400044d4
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rbx
lea r9d, [rbx + 0x10]
mov qword [rsp + 0x28], rax
mov r8, rbp
mov edx, 0x660e
mov dword [rsp + 0x20], ebx
call fcn.1400039e0
test eax, eax
je 0x1400044c7
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x60]
xor r9d, r9d
lea edx, [rbx + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400044bc
mov r8d, edi
mov r9, qword [rsp + 0x88]
mov rdx, rsi
mov rcx, qword [rsp + 0x40]
cmp dword [rsp + 0x90], ebx
je 0x1400044b5
call fcn.140004278
jmp 0x1400044ba
call fcn.140004090
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbp, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x14000479c
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push rbx
sub rsp, 0x30
and dword [rsp + 0x48], 0
mov ebx, ecx
lea rcx, [rsp + 0x58]
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004820
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140004813
mov rcx, qword [rsp + 0x50]
lea r9, [rsp + 0x48]
and dword [rsp + 0x20], 0
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x58]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x48]
add rsp, 0x30
pop rbx
ret

Function at 0x14000482c
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x40
and dword [rax + 0x10], 0
mov ebx, ecx
lea rcx, [rax - 0x18]
mov dword [rax + 0x18], 4
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
mov dword [rax - 0x28], 0xf0000000
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400048b1
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x68]
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x1400048a4
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x60]
and dword [rsp + 0x20], 0
lea r8, [rsp + 0x58]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x58]
shr eax, 3
add rsp, 0x40
pop rbx
ret

Function at 0x1400048c0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x40
and dword [rax + 0x10], 0
mov ebx, ecx
lea rcx, [rax - 0x18]
mov dword [rax + 0x18], 4
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
mov dword [rax - 0x28], 0xf0000000
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004945
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x68]
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140004938
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x60]
and dword [rsp + 0x20], 0
lea r8, [rsp + 0x58]
mov edx, 9
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x58]
shr eax, 3
add rsp, 0x40
pop rbx
ret
Function at 0x140004a70
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x60
xor ebp, ebp
mov r15d, r9d
mov r12, r8
mov dword [rax - 0x58], 0xf0000000
mov rdi, rdx
mov rbx, rcx
xor r8d, r8d
lea rcx, [rax - 0x28]
lea esi, [rbp + 1]
xor edx, edx
lea r9d, [rbp + 0x18]
mov dword [rax - 0x38], esi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004c04
and qword [rsp + 0x30], rbp
lea rax, [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
lea r9d, [rbp + 0x10]
mov qword [rsp + 0x28], rax
mov r8, rbx
and dword [rsp + 0x20], ebp
mov edx, 0x660e
call fcn.1400039e0
test eax, eax
je 0x140004be1
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x40]
xor r9d, r9d
lea edx, [rbp + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004bc0
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
mov r8, rdi
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004bb1
mov edx, r15d
lea ecx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, qword [rsp + 0xa0]
mov rdi, rax
mov qword [rbx], rax
test rax, rax
je 0x140004bd4
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r12
mov rcx, rax
mov dword [r14], r15d
call fcn.1400c5f00
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], r14
mov r8d, esi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebp, eax
test eax, eax
jne 0x140004bd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
call fcn.14000bda8
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x140004bd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x140004bcd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__MODE___0x_08x__n
mov edx, eax
call fcn.14000bda8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004bf5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___kull_m_crypto_hkey__0x_08x__n
call fcn.14000bda8
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x140004c18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
call fcn.14000bda8
lea r11, [rsp + 0x60]
mov eax, ebp
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140004d00
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
xor ebx, ebx
mov qword [rbp - 0x20], 1
lea rax, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rax
mov r14d, r9d
mov dword [rbp - 0x18], ebx
mov r15, r8
mov qword [rbp - 0x10], rbx
mov edi, edx
mov rsi, rcx
mov dword [rbp - 8], 1
call fcn.140012ccc
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140004e05
mov r9d, dword [rbp - 0x20]
lea rcx, [rbp - 0x40]
mov r8, qword [rbp - 0x28]
mov rdx, rax
mov dword [rsp + 0x20], 8
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004de7
mov rcx, qword [rbp - 0x40]
lea rax, [rbp - 0x38]
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8d, r14d
mov dword [rsp + 0x20], 1
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140004dc8
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, rsi
call fcn.140004e24
mov rcx, qword [rbp - 0x38]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004ddc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
call fcn.14000bda8
mov rcx, qword [rbp - 0x40]
call fcn.140003bf0
jmp 0x140004dfb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
call fcn.14000bda8
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x70]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140005740
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov dword [rax + 0x18], r8d
push rdi
sub rsp, 0x40
mov rdi, qword [rsp + 0x70]
mov rbx, r9
mov rbp, rdx
xor esi, esi
and qword [r9], rsi
xor edx, edx
lea r9, [rax + 0x28]
mov dword [rdi], r8d
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x140005814
and dword [rsp + 0x30], esi
lea r8d, [rsi + 1]
mov rcx, qword [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor edx, edx
and qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140005809
mov edx, dword [rdi]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x140005809
mov r8d, dword [rsp + 0x60]
mov rdx, rbp
mov rcx, rax
call fcn.1400c5f00
mov eax, dword [rdi]
lea r8d, [rsi + 1]
mov rcx, qword [rsp + 0x70]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor edx, edx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov rax, qword [rbx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
test eax, eax
jne 0x140005809
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rbx, qword [rsp + 0x50]
mov eax, esi
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x14000582c
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x30
mov r14, qword [rsp + 0x60]
mov rbx, r9
mov esi, r8d
mov rbp, rdx
xor edi, edi
xor r8d, r8d
and qword [r9], rdi
xor edx, edx
lea r9, [rax + 0x28]
mov dword [r14], esi
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x1400058cd
mov edx, esi
lea ecx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400058c2
mov r8d, esi
mov rdx, rbp
mov rcx, rax
call fcn.1400c5f00
mov rax, qword [rbx]
lea r8d, [rdi + 1]
mov rcx, qword [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x28], r14
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edi, eax
test eax, eax
jne 0x1400058c2
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop r14
ret