joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800016ac
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 0x180001875
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.18000153c
test eax, eax
je 0x180001857
lea rsi, [rbx + 0x22a]
mov edi, 0x100
mov rdx, rsi
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x180001863
mov eax, edi
mov rcx, rsi
cmp byte [rcx], 0
je 0x18000174a
inc rcx
dec rax
jne 0x18000173d
test rax, rax
je 0x180001863
mov rcx, rdi
mov r9d, 0
sub rcx, rax
lea rax, [rsi + rcx]
sub rdi, rcx
je 0x18000179d
lea rdx, [rcx + 0x7ffffeff]
lea rcx, [0x180071978]
add rdx, rdi
sub rcx, rax
test rdx, rdx
je 0x180001798
mov r8b, byte [rcx + rax]
test r8b, r8b
je 0x180001798
mov byte [rax], r8b
dec rdx
inc rax
dec rdi
jne 0x18000177c
test rdi, rdi
jne 0x1800017a6
dec rax
mov r9d, 0x8007007a
mov byte [rax], 0
test r9d, r9d
js 0x180001863
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x58], r14
lea rax, [0x180001464]
mov qword [rsp + 0x50], rax
lea rax, [0x180001430]
lea rdi, [rbx + 0x32c]
mov qword [rsp + 0x48], rax
lea rax, [0x1800013f8]
lea r9, [0x1800012c8]
mov qword [rsp + 0x40], rax
lea rax, [fcn.1800013c4]
lea r8, [0x1800012b8]
mov qword [rsp + 0x38], rax
lea rax, [0x18000138c]
lea rdx, [fcn.1800012b4]
mov qword [rsp + 0x30], rax
lea rax, [0x180001354]
mov rcx, rdi
mov qword [rsp + 0x28], rax
lea rax, [fcn.1800012d0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.Cabinet.dll_FCICreate]
mov qword [rbx], rax
test rax, rax
jne 0x180001875
mov ecx, dword [rdi]
call fcn.180001638
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.18000af2c
jmp 0x180001863
lea rcx, str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.18000af2c
cmp qword [rbx], 0
jne 0x180001875
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 0x180002f50
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 0x180002fe9
cmp dword [rbp + 0x40], 4
jne 0x1800030cb
lea rdx, [rbp - 0x20]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x1800030cb
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x1800030cb
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 0x1800030cb
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 0x1800030cb
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 0x1800030bf
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 0x1800030b5
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 0x1800030b5
mov edx, dword [rbp + 0x20]
lea ecx, [rsi + 0x3e]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1800030b5
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.18005bdd0
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 0x1800030e8
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 0x18000317f
lea ecx, [rbx + 0x40]
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1800031ad
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.18005bdd0
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 0x1800031ad
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x1800031ad
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.180003c10
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 0x1800031d0
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 0x18000321a
mov r8d, dword [rsp + 0x190]
mov rcx, r9
jmp 0x1800032d0
mov r12d, Ordinal_69
lea rcx, [rsp + 0x70]
lea edx, [r12 - 0xa]
mov r8d, r12d
call fcn.180051c00
lea edx, [r12 + 0x1c]
lea rcx, [rsp + 0x30]
mov r8d, r12d
call fcn.180051c00
test edi, edi
je 0x18000326b
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 0x18000325b
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x70]
mov r8d, r12d
mov ecx, r15d
mov dword [rsp + 0x20], edi
call fcn.180002f50
test eax, eax
je 0x1800032d5
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x30]
mov r8d, r12d
mov ecx, r15d
add r9, rdi
mov dword [rsp + 0x20], edi
call fcn.180002f50
mov esi, eax
test eax, eax
je 0x1800032d5
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.18005bdd0
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 0x1800033c0
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 0x180003531
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.1800030e8
test eax, eax
je 0x180003525
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 0x18000351b
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 0x180003511
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 0x180003511
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 0x180003511
mov edx, dword [rbp + 0x20]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x180003511
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.18005bdd0
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 0x180003798
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 0x18000394b
lea r9, [rbp - 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x180003972
lea edx, [r14 + 1]
xor r9d, r9d
mov r8, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x18000393f
lea edi, [rbx + 0xf]
lea r13d, [r14 + 0x10]
shr edi, 4
and ebx, 0xf
cmovne r13d, ebx
cmp edi, 2
jbe 0x180003848
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 0x18000393f
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.18005bdd0
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.180051c00
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 0x18000393f
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 0x1800038c8
mov r8, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x30]
lea rdx, [rbp - 0x28]
mov ebx, r13d
add rdx, rbx
call fcn.18005bdd0
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 0x18000393f
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.18005bdd0
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x180003972
cmp ebx, 0x10
jne 0x180003972
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 0x180003994
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 0x180003acd
lea edx, [r15 + 1]
xor r9d, r9d
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x180003b02
lea edi, [rbx + 0xf]
mov esi, r13d
shr edi, 4
and ebx, 0xf
cmovne esi, ebx
cmp edi, 2
jbe 0x180003a34
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 0x180003b02
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.18005bdd0
mov r8d, r13d
lea rcx, [rsp + 0x40]
sub r8d, esi
xor edx, edx
add rcx, rbx
call fcn.180051c00
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 0x180003b02
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.18005bdd0
jmp 0x180003b02
cmp ebx, r13d
jne 0x180003b02
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 0x180003b24
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 0x180003bf8
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.1800030e8
test eax, eax
je 0x180003beb
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 0x180003be0
mov r9, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x40]
mov r8d, edi
mov rdx, rsi
cmp dword [rsp + 0x90], ebx
je 0x180003bd9
call fcn.180003994
jmp 0x180003bde
call fcn.180003798
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 0x180003ec0
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 0x180003f44
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 0x180003f37
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 0x180003f50
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 0x180003fd5
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 0x180003fc8
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 0x180003fe4
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 0x180004069
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 0x18000405c
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 0x180004180
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.1800030e8
test eax, eax
je 0x1800042d1
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 0x1800042b0
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 0x1800042a1
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 0x1800042c4
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r13
mov rcx, rax
mov dword [r14], r15d
call fcn.18005bdd0
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 0x1800042c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.18000af2c
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x1800042c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x1800042bd
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.18000af2c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1800042e5
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.18000af2c
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 0x1800043d8
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.180010acc
mov qword [rbp - 0x30], rax
test rax, rax
je 0x180004504
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 0x1800044e6
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 0x1800044c7
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 0x1800044bb
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.180004520
mov ebx, eax
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1800044db
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
mov edx, eax
call fcn.18000af2c
mov rcx, qword [rbp - 0x40]
call fcn.1800032f8
jmp 0x1800044fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.18000af2c
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