joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001c9c
Capabilities:
Terminate thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x20
and dword [rax + 8], 0
mov esi, edx
mov dword [rax + 0xc], 0x80000000
mov rdi, rcx
mov rbx, rcx
test rcx, rcx
je 0x140001cf3
and dword [rbx + 0x90], 0
mov rcx, qword [rbx + 0x98]
test rcx, rcx
je 0x140001ce7
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_TerminateThread]
and qword [rbx + 0x98], 0
test esi, esi
je 0x140001cf3
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140001cc4
mov r9d, esi
lea rdx, [rsp + 0x30]
mov r8d, 1
mov rcx, rdi
call fcn.140001ac0
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400021b4
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 0x140002377
and dword [rbx + 0x1c], 0
lea r14, [rax + 8]
and dword [rbx + 0x20], 0
mov eax, 0x4000000
mov rcx, r14
mov dword [r14], eax
mov r8, rbp
mov dword [rbx + 0xc], eax
xor edx, edx
mov word [rbx + 0x28], SQLGetData
call fcn.140002040
test eax, eax
je 0x140002359
lea rsi, [rbx + 0x22a]
mov edi, 0x100
mov rdx, rsi
mov ecx, edi
call qword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
test eax, eax
je 0x140002365
mov edx, edi
mov rax, rsi
cmp byte [rax], 0
je 0x140002250
inc rax
sub rdx, 1
jne 0x140002242
mov rcx, rdi
mov rax, rdx
sub rcx, rdx
neg rax
sbb r8, r8
and r8, rcx
test rdx, rdx
je 0x140002365
lea rcx, [r8 + rsi]
sub rdi, r8
je 0x1400022a0
lea rdx, [0x140104358]
mov eax, 0x7ffffffe
sub rdx, rcx
test rax, rax
je 0x1400022a0
mov r8b, byte [rdx + rcx]
test r8b, r8b
je 0x1400022a0
mov byte [rcx], r8b
dec rax
inc rcx
sub rdi, 1
jne 0x140002283
test rdi, rdi
lea rax, [rcx - 1]
cmovne rax, rcx
mov byte [rax], 0
je 0x140002365
mov qword [rsp + 0x60], rbp
lea rax, [0x140001f60]
mov qword [rsp + 0x58], r14
lea rdi, [rbx + 0x32c]
mov qword [rsp + 0x50], rax
lea r9, [0x140001dc4]
lea rax, [0x140001f2c]
mov rcx, rdi
mov qword [rsp + 0x48], rax
lea r8, [0x140001db4]
lea rax, [0x140001ef4]
mov qword [rsp + 0x40], rax
lea rdx, [fcn.140001db0]
lea rax, [fcn.140001ec0]
mov qword [rsp + 0x38], rax
lea rax, [0x140001e88]
mov qword [rsp + 0x30], rax
lea rax, [0x140001e50]
mov qword [rsp + 0x28], rax
lea rax, [fcn.140001dcc]
mov qword [rsp + 0x20], rax
call qword [sym.imp.Cabinet.dll_FCICreate]
mov qword [rbx], rax
test rax, rax
jne 0x140002365
mov ecx, dword [rdi]
call fcn.140002138
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.14000be84
jmp 0x140002365
lea rcx, str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.14000be84
cmp qword [rbx], 0
jne 0x140002377
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 0x14000391c
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 0x1400039b7
cmp dword [rbp + 0x40], 4
jne 0x140003a99
lea rdx, [rbp - 0x20]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x140003a99
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x140003a99
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]
not eax
lea rcx, [rbp - 0x10]
shr eax, 0x1f
mov ebx, eax
mov rax, qword [rbp - 0x20]
call qword [rax + Ordinal_41]
jmp 0x140003a99
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 0x140003a99
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 0x140003a8d
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 0x140003a83
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 0x140003a83
mov edx, dword [rbp + 0x20]
lea ecx, [rsi + 0x3e]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003a83
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.1400c5ce0
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 0x140003ab8
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 0x140003b4f
mov edx, ebp
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003b7d
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.1400c5ce0
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 0x140003b7d
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x140003b7d
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.1400045cc
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 0x140003ba0
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], r12
push r13
push r14
push r15
sub rsp, 0x150
xor esi, esi
mov ebx, r8d
cmp r8d, dword [rsp + 0x190]
mov r15, r9
mov r14, rdx
mov r12d, ecx
setae sil
jb 0x140003be9
mov r8d, dword [rsp + 0x190]
jmp 0x140003c9f
mov r13d, Ordinal_69
lea rcx, [rsp + 0x30]
mov r8d, r13d
lea edx, [r13 - 0xa]
call fcn.1400c58a0
mov r8d, r13d
lea edx, [r13 + 0x1c]
lea rcx, [rsp + 0x70]
call fcn.1400c58a0
test ebx, ebx
je 0x140003c3d
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 0x140003c22
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], ebx
mov r8d, r13d
lea rdx, [rsp + 0x30]
mov ecx, r12d
call fcn.14000391c
test eax, eax
je 0x140003ca7
lea r9, [rsp + 0xb0]
mov dword [rsp + 0x20], ebx
add r9, rbx
lea rdx, [rsp + 0x70]
mov r8d, r13d
mov ecx, r12d
call fcn.14000391c
mov esi, eax
test eax, eax
je 0x140003ca7
lea ecx, [rbx + rbx]
cmp dword [rsp + 0x190], ecx
lea rdx, [rsp + 0xb0]
cmovb ecx, dword [rsp + 0x190]
mov r8d, ecx
mov rcx, r15
call fcn.1400c5ce0
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret
Function at 0x140003d94
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 0x140003f05
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.140003ab8
test eax, eax
je 0x140003ef9
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 0x140003eef
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 0x140003ee5
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 0x140003ee5
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 0x140003ee5
mov edx, dword [rbp + 0x20]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003ee5
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.1400c5ce0
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 0x140004b50
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 0x140004ce4
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.140003ab8
test eax, eax
je 0x140004cc1
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 0x140004ca0
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 0x140004c91
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 0x140004cb4
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r12
mov rcx, rax
mov dword [r14], r15d
call fcn.1400c5ce0
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 0x140004cb4
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
call fcn.14000be84
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.DLL_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x140004cb4
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x140004cad
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.14000be84
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004cd5
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.14000be84
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x140004cf8
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptAcquireContext__0x_08x__n
call fcn.14000be84
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 0x140004de0
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.140012da0
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140004ee5
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 0x140004ec7
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 0x140004ea8
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, rsi
call fcn.140004f04
mov rcx, qword [rbp - 0x38]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004ebc
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
call fcn.14000be84
mov rcx, qword [rbp - 0x40]
call fcn.140003ccc
jmp 0x140004edb
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
call fcn.14000be84
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 0x14000582c
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 0x140005900
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 0x1400058f5
mov edx, dword [rdi]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400058f5
mov r8d, dword [rsp + 0x60]
mov rdx, rbp
mov rcx, rax
call fcn.1400c5ce0
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 0x1400058f5
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 0x140005918
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 0x1400059b9
mov edx, esi
lea ecx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400059ae
mov r8d, esi
mov rdx, rbp
mov rcx, rax
call fcn.1400c5ce0
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 0x1400059ae
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
Function at 0x140005fdc
Capabilities:
Hash data via bcrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push r12
push r14
push r15
sub rsp, 0x60
mov r15d, r9d
mov r12, r8
mov esi, edx
mov r14, rcx
xor ebx, ebx
mov dword [rax - 0x38], ebx
lea r9d, [rbx + 8]
lea r8, str.Microsoft_Primitive_Provider
lea rdx, str.SHA256
lea rcx, [rax - 0x28]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x140006133
and dword [rsp + 0x28], ebx
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 4]
lea r8, [rsp + 0xa8]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x140006116
mov edx, dword [rsp + 0xa8]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140006124
and dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r14
mov r9d, dword [rsp + 0xa8]
mov r8, rax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.bcrypt.dll_BCryptCreateHash]
test eax, eax
js 0x1400060fd
xor r9d, r9d
mov r8d, r15d
mov rdx, r12
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.bcrypt.dll_BCryptHashData]
xor r9d, r9d
lea r8d, [rbx + 0x20]
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.bcrypt.dll_BCryptFinishHash]
mov ebx, eax
mov edx, eax
not ebx
shr ebx, 0x1f
mov dword [rsp + 0x40], ebx
test ebx, ebx
jne 0x1400060f0
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptFinishHash:_0x_08x_n
call fcn.14000be84
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.bcrypt.dll_BCryptDestroyHash]
jmp 0x14000610b
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptCreateHash:_0x_08x_n
call fcn.14000be84
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_LocalFree]
jmp 0x140006124
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptGetProperty:_0x_08x_n
call fcn.14000be84
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x140006141
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptOpenAlgorithmProvider:_0x_08x_n
call fcn.14000be84
jmp 0x140006153
mov eax, ebx
lea r11, [rsp + 0x60]
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 0x140008084
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x37]
sub rsp, 0xd0
xor ebx, ebx
mov esi, edx
mov r15, r8
mov r14d, r9d
mov rdi, rcx
lea rcx, [rbp - 0x71]
lea r12d, [rbx + 0x40]
mov r8d, r12d
lea edx, [rbx + 0x36]
call fcn.1400c58a0
mov r8d, r12d
lea edx, [rbx + 0x5c]
lea rcx, [rbp - 0x31]
call fcn.1400c58a0
test esi, esi
je 0x1400080ff
lea rax, [rbp - 0x71]
mov edx, ebx
sub rdi, rax
mov r8d, esi
lea rax, [rbp - 0x71]
add rax, rdx
mov cl, byte [rdi + rax]
xor byte [rbp + rdx - 0x31], cl
inc rdx
xor byte [rax], cl
sub r8, 1
jne 0x1400080e6
lea rdx, [r14 + 0x40]
mov ecx, r12d
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x14000822a
movaps xmm0, xmmword [rbp - 0x71]
lea rcx, [rax + 0x40]
movaps xmm1, xmmword [rbp - 0x61]
mov r8, r14
movups xmmword [rax], xmm0
mov rdx, r15
movaps xmm0, xmmword [rbp - 0x51]
movups xmmword [rax + 0x10], xmm1
movaps xmm1, xmmword [rbp - 0x41]
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm1
call fcn.1400c5ce0
lea r8d, [r14 + 0x40]
mov dword [rsp + 0x20], Ordinal_26
lea r9, [rsp + 0x30]
mov rdx, rsi
mov ecx, 0x8004
call fcn.14000391c
test eax, eax
je 0x140008221
mov r15d, dword [rbp + 0x77]
mov ecx, r12d
mov r14d, dword [rbp + 0x67]
lea rdx, [r15 + 0x54]
add rdx, r14
call qword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140008221
movaps xmm0, xmmword [rbp - 0x31]
movaps xmm1, xmmword [rbp - 0x21]
mov rdx, qword [rbp + 0x5f]
movups xmmword [rax], xmm0
movaps xmm0, xmmword [rbp - 0x11]
movups xmmword [rax + 0x10], xmm1
movaps xmm1, xmmword [rbp - 1]
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm1
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rax + 0x40], xmm0
mov eax, dword [rsp + 0x40]
mov dword [rdi + 0x50], eax
test rdx, rdx
je 0x1400081d9
test r14d, r14d
je 0x1400081d9
lea rcx, [rdi + 0x54]
mov r8d, r14d
call fcn.1400c5ce0
mov rdx, qword [rbp + 0x6f]
test rdx, rdx
je 0x1400081f6
test r15d, r15d
je 0x1400081f6
lea rcx, [r14 + 0x54]
mov r8, r15
add rcx, rdi
call fcn.1400c5ce0
mov r9, qword [rbp + 0x7f]
lea r8d, [r15 + 0x54]
add r8d, r14d
mov dword [rsp + 0x20], Ordinal_26
mov rdx, rdi
mov ecx, 0x8004
call fcn.14000391c
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.DLL_LocalFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_LocalFree]
lea r11, [rsp + 0xd0]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret