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

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov qword [rsp + 0x70], 0
mov edx, 0x338
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140003a72
mov rax, qword [rsp + 0x70]
mov dword [rax + 8], 0x4000000
mov rax, qword [rsp + 0x70]
mov dword [rax + 0xc], 0x4000000
mov eax, SQLGetData
mov rcx, qword [rsp + 0x70]
mov word [rcx + 0x28], ax
mov rax, qword [rsp + 0x70]
mov dword [rax + 0x1c], 0
mov rax, qword [rsp + 0x70]
mov dword [rax + 0x20], 0
mov rax, qword [rsp + 0x70]
add rax, 8
mov r8, qword [rsp + 0x90]
xor edx, edx
mov rcx, rax
call fcn.140003650
test eax, eax
je 0x140003a4b
mov rax, qword [rsp + 0x70]
add rax, 0x22a
mov rdx, rax
mov ecx, 0x100
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x140003a49
mov rax, qword [rsp + 0x70]
add rax, 0x22a
lea r8, [0x14017db78]
mov edx, 0x100
mov rcx, rax
call fcn.140002e70
test eax, eax
jl 0x140003a49
mov rax, qword [rsp + 0x70]
add rax, 8
mov rcx, qword [rsp + 0x70]
add rcx, 0x32c
mov rdx, qword [rsp + 0x90]
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], rax
lea rax, [0x1400035a0]
mov qword [rsp + 0x50], rax
lea rax, [0x140003550]
mov qword [rsp + 0x48], rax
lea rax, [0x1400034f0]
mov qword [rsp + 0x40], rax
lea rax, [fcn.1400034a0]
mov qword [rsp + 0x38], rax
lea rax, [0x140003440]
mov qword [rsp + 0x30], rax
lea rax, [0x1400033e0]
mov qword [rsp + 0x28], rax
lea rax, [fcn.140003320]
mov qword [rsp + 0x20], rax
lea r9, [0x140003300]
lea r8, [0x1400032e0]
lea rdx, [0x1400032c0]
call qword [sym.imp.Cabinet.dll_FCICreate]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
mov qword [rax], rcx
cmp qword [rsp + 0x78], 0
jne 0x140003a49
mov rax, qword [rsp + 0x70]
mov ecx, dword [rax + 0x32c]
call fcn.1400037e0
mov r8, rax
mov rax, qword [rsp + 0x70]
mov edx, dword [rax + 0x32c]
lea rcx, str.ERROR_kull_m_cabinet_create___FCICreate_failed_with_error_code__d:__S_n
call fcn.140013fd0
jmp 0x140003a57
lea rcx, str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.140013fd0
mov rax, qword [rsp + 0x70]
cmp qword [rax], 0
jne 0x140003a72
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
add rsp, 0x88
ret
Function at 0x1400064b0
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x78
mov dword [rsp + 0x34], 0
cmp dword [rsp + 0x80], 0x8000
jne 0x140006579
mov eax, dword [rsp + 0xa0]
cmp rax, 4
jne 0x140006574
lea rdx, [rsp + 0x40]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
jl 0x140006574
lea rdx, [rsp + 0x58]
xor ecx, ecx
mov rax, qword [rsp + 0x40]
call qword [rax + 0x10]
test eax, eax
jl 0x140006574
mov r8, qword [rsp + 0x88]
mov edx, dword [rsp + 0x90]
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x40]
call qword [rax + reloc.ODBC32.dll_SQLAllocHandle]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x40]
call qword [rax + 0x20]
test eax, eax
jl 0x140006557
mov dword [rsp + 0x38], 1
jmp 0x14000655f
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x34], eax
lea rcx, [rsp + 0x58]
mov rax, qword [rsp + 0x40]
call qword [rax + Ordinal_41]
jmp 0x1400066b9
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400066b9
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1400066ac
xor r9d, r9d
mov r8d, dword [rsp + 0x90]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x1400066a1
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
xor r8d, r8d
mov edx, 2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1400066a1
mov eax, dword [rsp + 0x30]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x1400066a1
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
mov r8, qword [rsp + 0x48]
mov edx, 2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0xa0]
cmp dword [rsp + 0x30], eax
jae 0x140006672
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x3c], eax
jmp 0x14000667d
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
mov r8d, eax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x98]
call fcn.140161160
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x34]
add rsp, 0x78
ret
Function at 0x1400066d0
Capabilities:
Encrypt data using des via winapi

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov dword [rsp + 0x30], 0
mov eax, dword [rsp + 0x68]
add rax, 0xc
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x58], 0x6603
je 0x1400067b8
mov eax, dword [rsp + 0x34]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x1400067b6
mov rax, qword [rsp + 0x38]
mov byte [rax], 8
mov rax, qword [rsp + 0x38]
mov byte [rax + 1], 2
xor eax, eax
mov rcx, qword [rsp + 0x38]
mov word [rcx + 2], ax
mov rax, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x58]
mov dword [rax + 4], ecx
mov rax, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x68]
mov dword [rax + 8], ecx
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 8]
mov rcx, qword [rsp + 0x38]
add rcx, 0xc
mov r8d, eax
mov rdx, qword [rsp + 0x60]
call fcn.140161160
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov dword [rsp + 0x30], eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400067f6
cmp qword [rsp + 0x80], 0
je 0x1400067f6
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x70]
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x58]
call fcn.140007670
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x30]
add rsp, 0x48
ret
Function at 0x140006800
Capabilities:
Authenticate hmac

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x168
mov dword [rsp + 0x34], 0
mov eax, dword [rsp + 0x190]
cmp dword [rsp + 0x180], eax
jb 0x14000683c
mov dword [rsp + 0x38], 1
jmp 0x140006844
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140006877
mov eax, dword [rsp + 0x190]
mov r8d, eax
mov rdx, qword [rsp + 0x178]
mov rcx, qword [rsp + 0x188]
call fcn.140161160
jmp 0x1400069cf
mov r8d, Ordinal_69
mov edx, reloc.WLDAP32.dll_Ordinal_54
lea rcx, [rsp + 0x40]
call fcn.140161800
mov r8d, Ordinal_69
mov edx, Ordinal_96
lea rcx, [rsp + 0x80]
call fcn.140161800
mov dword [rsp + 0x30], 0
jmp 0x1400068b8
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x180]
cmp dword [rsp + 0x30], eax
jae 0x140006913
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x178]
movzx ecx, byte [rdx + rcx]
movzx eax, byte [rsp + rax + 0x40]
xor eax, ecx
mov ecx, dword [rsp + 0x30]
mov byte [rsp + rcx + 0x40], al
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x178]
movzx ecx, byte [rdx + rcx]
movzx eax, byte [rsp + rax + 0x80]
xor eax, ecx
mov ecx, dword [rsp + 0x30]
mov byte [rsp + rcx + 0x80], al
jmp 0x1400068ae
mov eax, dword [rsp + 0x180]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xc0]
mov r8d, Ordinal_69
lea rdx, [rsp + 0x40]
mov ecx, dword [rsp + 0x170]
call fcn.1400064b0
test eax, eax
je 0x1400069cf
mov eax, dword [rsp + 0x180]
lea rax, [rsp + rax + 0xc0]
mov ecx, dword [rsp + 0x180]
mov dword [rsp + 0x20], ecx
mov r9, rax
mov r8d, Ordinal_69
lea rdx, [rsp + 0x80]
mov ecx, dword [rsp + 0x170]
call fcn.1400064b0
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x1400069cf
mov eax, dword [rsp + 0x180]
shl eax, 1
cmp dword [rsp + 0x190], eax
jae 0x1400069a6
mov eax, dword [rsp + 0x190]
mov dword [rsp + 0x3c], eax
jmp 0x1400069b3
mov eax, dword [rsp + 0x180]
shl eax, 1
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
mov r8d, eax
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x188]
call fcn.140161160
mov eax, dword [rsp + 0x34]
add rsp, 0x168
ret
Function at 0x140006af0
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0xa8
mov dword [rsp + 0x48], 0
mov eax, dword [rsp + 0xb0]
mov dword [rsp + 0x70], eax
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x90], 0
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140006cf5
mov qword [rsp + 0x30], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x100
mov r9d, dword [rsp + 0xc0]
mov r8, qword [rsp + 0xb8]
mov edx, 0x6602
mov rcx, qword [rsp + 0x60]
call fcn.1400066d0
test eax, eax
je 0x140006ce8
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x68]
mov edx, 0x8009
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140006cdd
xor r9d, r9d
lea r8, [rsp + 0x70]
mov edx, 5
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x140006cd2
xor r9d, r9d
mov r8d, dword [rsp + 0xd0]
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140006cd2
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
xor r8d, r8d
mov edx, 2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140006cd2
mov eax, dword [rsp + 0x40]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x140006cd2
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8, qword [rsp + 0x58]
mov edx, 2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0xe0]
cmp dword [rsp + 0x40], eax
jae 0x140006ca3
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x44], eax
jmp 0x140006cae
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
mov r8d, eax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xd8]
call fcn.140161160
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x48]
add rsp, 0xa8
ret
Function at 0x140007060
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
imul eax, dword [rsp + 0x70], 0x10
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x78], 0
je 0x1400070bd
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [rsp + 0x40], eax
jmp 0x1400070e8
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
add rsp, 0x58
ret

Function at 0x140007540
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x68
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14000765c
mov qword [rsp + 0x30], 0
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x90]
mov r8, qword [rsp + 0x88]
mov edx, dword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call fcn.1400066d0
test eax, eax
je 0x14000764f
xor r9d, r9d
lea r8, [rsp + 0x48]
mov edx, 4
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140007644
cmp dword [rsp + 0xa0], 0
je 0x140007619
mov r9, qword [rsp + 0x98]
mov r8d, dword [rsp + 0x80]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
call fcn.140007390
mov dword [rsp + 0x40], eax
jmp 0x14000763c
mov r9, qword [rsp + 0x98]
mov r8d, dword [rsp + 0x80]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
call fcn.140007100
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x44], eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x44]
add rsp, 0x68
ret
Function at 0x140007ab0
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x58
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140007b3d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140007b30
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
xor r8d, r8d
mov edx, 2
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x30]
add rsp, 0x58
ret

Function at 0x140007b50
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x58
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140007bdf
lea r9, [rsp + 0x38]
xor r8d, r8d
mov edx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140007bd2
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
lea r8, [rsp + 0x30]
mov edx, 8
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor edx, edx
mov eax, dword [rsp + 0x30]
mov ecx, 8
div ecx
add rsp, 0x58
ret

Function at 0x140007c00
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x58
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140007c8f
lea r9, [rsp + 0x38]
xor r8d, r8d
mov edx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140007c82
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x34]
lea r8, [rsp + 0x30]
mov edx, 9
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor edx, edx
mov eax, dword [rsp + 0x30]
mov ecx, 8
div ecx
add rsp, 0x58
ret
Function at 0x140007e20
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 1
mov dword [rsp + 0x20], 0xf0000000
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140008027
mov qword [rsp + 0x30], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, 0x10
mov r8, qword [rsp + 0x70]
mov edx, 0x660e
mov rcx, qword [rsp + 0x50]
call fcn.1400066d0
test eax, eax
je 0x140008004
xor r9d, r9d
lea r8, [rsp + 0x44]
mov edx, 4
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140007fe3
xor r9d, r9d
mov r8, qword [rsp + 0x78]
mov edx, 1
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140007fcd
mov eax, dword [rsp + 0x88]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0x90]
mov qword [rcx], rax
mov rax, qword [rsp + 0x90]
cmp qword [rax], 0
je 0x140007fcb
mov rax, qword [rsp + 0x98]
mov ecx, dword [rsp + 0x88]
mov dword [rax], ecx
mov eax, dword [rsp + 0x88]
mov r8d, eax
mov rdx, qword [rsp + 0x80]
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call fcn.140161160
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x90]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140007fcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
call fcn.140013fd0
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x90]
mov qword [rcx], rax
mov rax, qword [rsp + 0x98]
mov dword [rax], 0
jmp 0x140007fe1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
call fcn.140013fd0
jmp 0x140007ff7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__MODE___0x_08x__n
call fcn.140013fd0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140008018
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.140013fd0
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14000803b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
call fcn.140013fd0
mov eax, dword [rsp + 0x40]
add rsp, 0x68
ret
Function at 0x140008130
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x48], 0
lea rax, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], 1
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x70], 1
call fcn.140020790
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140008275
mov dword [rsp + 0x20], 8
mov r9d, dword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140008256
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
xor r9d, r9d
mov r8d, dword [rsp + 0xa8]
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140008236
mov r9, qword [rsp + 0xb8]
lea r8, [rsp + 0x48]
mov edx, dword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
call fcn.140008290
mov dword [rsp + 0x30], eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x14000824a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
call fcn.140013fd0
mov rcx, qword [rsp + 0x38]
call fcn.1400069e0
jmp 0x14000826a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
call fcn.140013fd0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x30]
add rsp, 0x88
ret
Function at 0x140009610
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov dword [rsp + 0x40], 0
mov rax, qword [rsp + 0x78]
mov qword [rax], 0
mov rax, qword [rsp + 0x80]
mov ecx, dword [rsp + 0x70]
mov dword [rax], ecx
lea r9, [rsp + 0x48]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x14000974d
mov dword [rsp + 0x30], 0
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140009742
mov rax, qword [rsp + 0x80]
mov eax, dword [rax]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0x78]
mov qword [rcx], rax
mov rax, qword [rsp + 0x78]
cmp qword [rax], 0
je 0x140009742
mov eax, dword [rsp + 0x70]
mov r8d, eax
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x78]
mov rcx, qword [rax]
call fcn.140161160
mov rax, qword [rsp + 0x80]
mov eax, dword [rax]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140009742
mov rax, qword [rsp + 0x78]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x78]
mov qword [rcx], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [rsp + 0x40]
add rsp, 0x58
ret