joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002060
Capabilities:
Get common file path

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, 0x70
mov rbp, rcx
mov edx, 0x338
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140002229
and dword [rbx + 0x1c], 0
and dword [rbx + 0x20], 0
lea r14, [rax + 8]
mov eax, 0x4000000
mov r8, rbp
xor edx, edx
mov dword [r14], eax
mov dword [rbx + 0xc], eax
mov eax, SQLGetData
mov rcx, r14
mov word [rbx + 0x28], ax
call fcn.140001ef0
test eax, eax
je 0x14000220b
lea rsi, [rbx + 0x22a]
mov edi, 0x100
mov rdx, rsi
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x140002217
mov eax, edi
mov rcx, rsi
cmp byte [rcx], 0
je 0x1400020fe
inc rcx
dec rax
jne 0x1400020f1
test rax, rax
je 0x140002217
mov rcx, rdi
mov r9d, 0
sub rcx, rax
lea rax, [rcx + rsi]
sub rdi, rcx
je 0x140002151
lea rdx, [rcx + 0x7ffffeff]
lea rcx, [0x1400eea48]
add rdx, rdi
sub rcx, rax
test rdx, rdx
je 0x14000214c
mov r8b, byte [rcx + rax]
test r8b, r8b
je 0x14000214c
mov byte [rax], r8b
dec rdx
inc rax
dec rdi
jne 0x140002130
test rdi, rdi
jne 0x14000215a
dec rax
mov r9d, 0x8007007a
mov byte [rax], 0
test r9d, r9d
js 0x140002217
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x58], r14
lea rax, [0x140001e18]
mov qword [rsp + 0x50], rax
lea rax, [0x140001de4]
lea rdi, [rbx + 0x32c]
mov qword [rsp + 0x48], rax
lea rax, [0x140001dac]
lea r9, [0x140001c7c]
mov qword [rsp + 0x40], rax
lea rax, [fcn.140001d78]
lea r8, [0x140001c6c]
mov qword [rsp + 0x38], rax
lea rax, [0x140001d40]
lea rdx, [fcn.140001c68]
mov qword [rsp + 0x30], rax
lea rax, [0x140001d08]
mov rcx, rdi
mov qword [rsp + 0x28], rax
lea rax, [fcn.140001c84]
mov qword [rsp + 0x20], rax
call qword [sym.imp.Cabinet.dll_FCICreate]
mov qword [rbx], rax
test rax, rax
jne 0x140002229
mov ecx, dword [rdi]
call fcn.140001fec
mov edx, dword [rdi]
lea rcx, str.ERROR_kull_m_cabinet_create___FCICreate_failed_with_error_code__d:__S_n
mov r8, rax
call fcn.14000bce4
jmp 0x140002217
lea rcx, str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.14000bce4
cmp qword [rbx], 0
jne 0x140002229
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, rax
lea r11, [rsp + 0x70]
mov rax, rbx
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x140003884
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 0x14000391d
cmp dword [rbp + 0x40], 4
jne 0x1400039ff
lea rdx, [rbp - 0x20]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x1400039ff
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x1400039ff
mov rax, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov r8, r14
mov edx, esi
call qword [rax + reloc.ODBC32.dll_SQLAllocHandle]
mov rax, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rdx, r15
call qword [rax + 0x20]
lea rcx, [rbp - 0x10]
test eax, eax
mov rax, qword [rbp - 0x20]
setns bl
call qword [rax + Ordinal_41]
jmp 0x1400039ff
lea rcx, [rbp - 8]
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400039ff
mov rcx, qword [rbp - 8]
lea rax, [rbp - 0x18]
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1400039f3
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 0x1400039e9
mov rcx, qword [rbp - 0x18]
xor r8d, r8d
lea r9, [rbp + 0x20]
lea esi, [r8 + 2]
mov dword [rsp + 0x20], ebx
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1400039e9
mov edx, dword [rbp + 0x20]
lea ecx, [rsi + 0x3e]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400039e9
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov edx, esi
mov dword [rsp + 0x20], ebx
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.1400c3ee0
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 0x140003a1c
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 r12, rcx
mov esi, r9d
mov ecx, 0x6603
xor ebx, ebx
mov r14, r8
mov r15d, edx
lea ebp, [rsi + 0xc]
cmp edx, ecx
je 0x140003ab3
lea ecx, [rbx + 0x40]
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003ae1
lea rcx, [rax + 0xc]
mov r8d, esi
mov rdx, r14
mov dword [rax], 0x208
mov dword [rax + 4], r15d
mov dword [rax + 8], esi
call fcn.1400c3ee0
mov rax, qword [rsp + 0x78]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x70]
mov r8d, ebp
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 0x140003ae1
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x140003ae1
mov r9d, dword [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
mov r8d, esi
mov rdx, r14
mov qword [rsp + 0x20], rax
call fcn.140004544
mov ebx, eax
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret

Function at 0x140003b04
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r12
push r14
push r15
sub rsp, 0x150
xor esi, esi
cmp r8d, dword [rsp + 0x190]
mov r14, r9
setae sil
mov edi, r8d
mov rbx, rdx
mov r15d, ecx
test esi, esi
je 0x140003b4e
mov r8d, dword [rsp + 0x190]
mov rcx, r9
jmp 0x140003c04
mov r12d, Ordinal_69
lea rcx, [rsp + 0x70]
lea edx, [r12 - 0xa]
mov r8d, r12d
call fcn.1400c6610
lea edx, [r12 + 0x1c]
lea rcx, [rsp + 0x30]
mov r8d, r12d
call fcn.1400c6610
test edi, edi
je 0x140003b9f
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x30]
mov r8, rdi
sub rcx, rbx
sub rdx, rbx
mov al, byte [rbx]
xor byte [rcx + rbx], al
xor byte [rdx + rbx], al
inc rbx
dec r8
jne 0x140003b8f
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x70]
mov r8d, r12d
mov ecx, r15d
mov dword [rsp + 0x20], edi
call fcn.140003884
test eax, eax
je 0x140003c09
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x30]
mov r8d, r12d
mov ecx, r15d
add r9, rdi
mov dword [rsp + 0x20], edi
call fcn.140003884
mov esi, eax
test eax, eax
je 0x140003c09
lea ecx, [rdi + rdi]
lea rdx, [rsp + 0xb0]
cmp dword [rsp + 0x190], ecx
cmovb ecx, dword [rsp + 0x190]
mov r8d, ecx
mov rcx, r14
call fcn.1400c3ee0
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140003cf4
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 r14, r9
mov dword [rbp - 0x28], ecx
mov edi, r8d
mov rsi, rdx
lea rcx, [rbp - 0x38]
lea r9d, [rbx + 0x18]
xor r8d, r8d
xor edx, edx
mov qword [rbp - 0x20], rbx
mov dword [rbp - 0x18], ebx
mov qword [rbp - 0x10], rbx
mov dword [rbp - 8], ebx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140003e65
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
mov r9d, edi
mov r8, rsi
mov edx, 0x6602
mov dword [rsp + 0x20], 0x100
call fcn.140003a1c
test eax, eax
je 0x140003e59
mov r8, qword [rbp - 0x30]
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
xor r9d, r9d
mov edx, 0x8009
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140003e4f
mov rcx, qword [rbp - 0x40]
lea r8, [rbp - 0x28]
lea edx, [rbx + 5]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x140003e45
mov r8d, dword [rbp + 0x40]
mov rcx, qword [rbp - 0x40]
xor r9d, r9d
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140003e45
mov rcx, qword [rbp - 0x40]
lea esi, [rbx + 2]
lea r9, [rbp + 0x20]
mov edx, esi
xor r8d, r8d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140003e45
mov edx, dword [rbp + 0x20]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003e45
mov rcx, qword [rbp - 0x40]
lea r9, [rbp + 0x20]
mov r8, rax
mov edx, esi
mov dword [rsp + 0x20], ebx
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.1400c3ee0
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 0x1400040cc
Capabilities:
Encode data using xor
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 r14d, r14d
mov rdi, r9
mov ebx, r8d
mov r15, rdx
mov rsi, rcx
cmp r8d, 0x10
jbe 0x14000427f
lea r9, [rbp - 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x1400042a6
lea edx, [r14 + 1]
xor r9d, r9d
mov r8, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004273
lea edi, [rbx + 0xf]
lea r13d, [r14 + 0x10]
shr edi, 4
and ebx, 0xf
cmovne r13d, ebx
cmp edi, 2
jbe 0x14000417c
lea eax, [rdi - 2]
xor r9d, r9d
xor r8d, r8d
shl eax, 4
xor edx, edx
mov rcx, rsi
mov dword [rbp + 0x40], eax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004273
lea eax, [r13 + 0x10]
lea r12d, [rdi - 2]
lea rcx, [rbp - 0x28]
shl r12d, 4
mov r8d, eax
mov ebx, eax
add r12, r15
mov rdx, r12
call fcn.1400c3ee0
mov eax, 0x10
lea rcx, [rbp - 0x28]
sub eax, r13d
add rcx, rbx
xor edx, edx
mov r8d, eax
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x38], rax
call fcn.1400c6610
mov rcx, qword [rbp - 0x40]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x28]
mov ebx, 0x10
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x40], ebx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004273
lea rdx, [rbp - 0x28]
lea r9, [rbp - 0x18]
mov r10d, ebx
mov al, byte [r9]
inc r9
xor byte [rdx], al
inc rdx
dec r10
jne 0x1400041fc
mov r8, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x30]
lea rdx, [rbp - 0x28]
mov ebx, r13d
add rdx, rbx
call fcn.1400c3ee0
lea rax, [rbp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x18]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov dword [rbp + 0x40], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r14d, eax
test eax, eax
je 0x140004273
movups xmm0, xmmword [rbp - 0x18]
shl edi, 4
lea rdx, [rbp - 0x28]
lea ecx, [rdi - 0x10]
mov r8d, ebx
add rcx, r15
movdqu xmmword [r12], xmm0
call fcn.1400c3ee0
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1400042a6
cmp ebx, 0x10
jne 0x1400042a6
lea rax, [rbp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor edx, edx
mov dword [rbp + 0x40], ebx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r14d, eax
lea r11, [rsp + 0x70]
mov eax, r14d
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 0x1400042c8
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 r15d, r15d
mov rax, r9
mov ebx, r8d
lea r13d, [r15 + 0x10]
mov r14, rdx
mov rbp, rcx
cmp r8d, r13d
jbe 0x140004401
lea edx, [r15 + 1]
xor r9d, r9d
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004436
lea edi, [rbx + 0xf]
mov esi, r13d
shr edi, 4
and ebx, 0xf
cmovne esi, ebx
cmp edi, 2
jbe 0x140004368
lea eax, [rdi - 2]
xor r9d, r9d
xor r8d, r8d
shl eax, 4
xor edx, edx
mov rcx, rbp
mov dword [rsp + 0x30], eax
mov dword [rsp + 0xa0], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140004436
lea eax, [rsi + 0x10]
lea r12d, [rdi - 2]
lea rcx, [rsp + 0x40]
shl r12d, 4
mov r8d, eax
mov ebx, eax
add r12, r14
mov rdx, r12
call fcn.1400c3ee0
mov r8d, r13d
lea rcx, [rsp + 0x40]
sub r8d, esi
xor edx, edx
add rcx, rbx
call fcn.1400c6610
mov eax, Ordinal_36
xor r9d, r9d
mov dword [rsp + 0x30], eax
mov dword [rsp + 0xa0], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r15d, eax
test eax, eax
je 0x140004436
movups xmm0, xmmword [rsp + 0x50]
shl edi, 4
lea rdx, [rsp + 0x40]
sub edi, r13d
mov r8d, esi
mov ecx, edi
add rcx, r14
movdqu xmmword [r12], xmm0
call fcn.1400c3ee0
jmp 0x140004436
cmp ebx, r13d
jne 0x140004436
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], r13d
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0xa0], r13d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r15d, eax
lea r11, [rsp + 0x60]
mov eax, r15d
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 0x140004458
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 edi, r8d
mov rsi, rdx
xor ebx, ebx
lea rcx, [rax - 0x10]
xor r8d, r8d
lea r9d, [rbx + 0x18]
xor edx, edx
mov dword [rax + 8], 1
mov dword [rax - 0x38], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14000452c
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
lea r9d, [rbx + 0x10]
mov r8, rbp
mov edx, 0x660e
mov dword [rsp + 0x20], ebx
call fcn.140003a1c
test eax, eax
je 0x14000451f
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x60]
lea edx, [rbx + 4]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004514
mov r9, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x40]
mov r8d, edi
mov rdx, rsi
cmp dword [rsp + 0x90], ebx
je 0x14000450d
call fcn.1400042c8
jmp 0x140004512
call fcn.1400040cc
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 rsi, qword [rsp + 0x78]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x1400047f4
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 r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004878
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov edx, ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x14000486b
mov rcx, qword [rsp + 0x50]
and dword [rsp + 0x20], 0
xor r8d, r8d
lea edx, [r8 + 2]
lea r9, [rsp + 0x48]
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 0x140004884
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 r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rax + 0x18], 4
mov dword [rax - 0x28], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004909
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 0x1400048fc
mov rcx, qword [rsp + 0x68]
and dword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
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 0x140004918
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 r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rax + 0x18], 4
mov dword [rax - 0x28], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14000499d
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 0x140004990
mov rcx, qword [rsp + 0x68]
and dword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
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 0x140004ab4
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
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r12, qword [rsp + 0xb0]
xor ebp, ebp
mov r13, r8
and qword [rax - 0x48], rbp
lea rax, [rax - 0x30]
mov r8, rcx
mov rcx, qword [r12]
mov r15d, r9d
mov rbx, rdx
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], ebp
lea edi, [rbp + 1]
mov dword [rax - 8], edi
lea r9d, [rbp + 0x10]
mov edx, 0x660e
call fcn.140003a1c
test eax, eax
je 0x140004c05
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x40]
lea edx, [rbp + 4]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004be4
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
mov r8, rbx
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004bd5
lea ecx, [rbp + 0x40]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, qword [rsp + 0xa0]
mov qword [rbx], rax
mov rdi, rax
test rax, rax
je 0x140004bf8
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r13
mov rcx, rax
mov dword [r14], r15d
call fcn.1400c3ee0
mov rcx, qword [rsp + 0x48]
lea r8d, [rbp + 1]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebp, eax
test eax, eax
jne 0x140004bf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000bce4
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x140004bf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x140004bf1
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.14000bce4
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004c19
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___kull_m_crypto_hkey__0x_08x__n
mov edx, eax
call fcn.14000bce4
mov rcx, qword [r12]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x50]
mov eax, ebp
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140004d0c
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
lea rax, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov r14d, r9d
mov r15, r8
mov edi, edx
mov rsi, rcx
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x20], 1
mov dword [rbp - 0x18], ebx
mov qword [rbp - 0x10], rbx
mov dword [rbp - 8], 1
call fcn.140012b0c
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140004e38
mov r9d, dword [rbp - 0x20]
mov r8, qword [rbp - 0x28]
lea rcx, [rbp - 0x40]
mov rdx, rax
mov dword [rsp + 0x20], 8
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004e1a
mov rcx, qword [rbp - 0x40]
lea rax, [rbp - 0x38]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8d, r14d
mov rdx, r15
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140004dfb
lea ecx, [rbx + 2]
mov r9d, 0x2000
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.CRYPT32.dll_CertOpenStore]
test rax, rax
je 0x140004def
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140004e54
mov ebx, eax
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004e0f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
mov edx, eax
call fcn.14000bce4
mov rcx, qword [rbp - 0x40]
call fcn.140003c2c
jmp 0x140004e2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.14000bce4
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