joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004488
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r13d, r13d
mov rax, r9
mov ebx, r8d
lea r15d, [r13 + 0x10]
mov r12, rdx
mov rsi, rcx
cmp r8d, r15d
jbe 0x1400045c1
lea edx, [r13 + 1]
xor r9d, r9d
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400045f6
lea edi, [rbx + 0xf]
mov ebp, r15d
shr edi, 4
and ebx, 0xf
cmovne ebp, ebx
cmp edi, 2
jbe 0x140004528
lea eax, [rdi - 2]
xor r9d, r9d
xor r8d, r8d
shl eax, 4
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x30], eax
mov dword [rsp + 0xa0], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1400045f6
lea eax, [rbp + 0x10]
lea r14d, [rdi - 2]
lea rcx, [rsp + 0x40]
shl r14d, 4
mov r8d, eax
mov ebx, eax
add r14, r12
mov rdx, r14
call sub.msvcrt.dll_memcpy
mov r8d, r15d
lea rcx, [rsp + rbx + 0x40]
sub r8d, ebp
xor edx, edx
call sub.msvcrt.dll_memset
mov r11d, 0x20
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], r11d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0xa0], r11d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r13d, eax
test eax, eax
je 0x1400045f6
movdqu xmm0, xmmword [rsp + 0x50]
shl edi, 4
lea rdx, [rsp + 0x40]
sub edi, r15d
mov r8d, ebp
mov ecx, edi
add rcx, r12
movdqu xmmword [r14], xmm0
call sub.msvcrt.dll_memcpy
jmp 0x1400045f6
cmp ebx, r15d
jne 0x1400045f6
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], r15d
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0xa0], r15d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r13d, eax
lea r11, [rsp + 0x60]
mov eax, r13d
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140004618
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x60
mov rbp, r9
mov edi, r8d
mov rsi, rdx
xor ebx, ebx
lea rcx, [rax - 0x18]
xor r8d, r8d
lea r9d, [rbx + 0x18]
xor edx, edx
mov dword [rax - 0x28], 1
mov dword [rax - 0x48], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp eax, ebx
je 0x1400046e9
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x48]
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.140003b18
cmp eax, ebx
je 0x1400046dc
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x40]
lea edx, [rbx + 4]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
cmp eax, ebx
je 0x1400046d1
mov r9, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x48]
mov r8d, edi
mov rdx, rsi
cmp dword [rsp + 0xa0], ebx
je 0x1400046ca
call fcn.140004488
jmp 0x1400046cf
call fcn.140004270
mov ebx, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x60]
mov eax, ebx
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x1400049d0
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, 0x18
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004a54
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 0x140004a47
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 0x140004a60
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, 0x18
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 0x140004ae5
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 0x140004ad8
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 0x140004af4
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, 0x18
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 0x140004b79
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 0x140004b6c
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 0x140004c90
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r14, qword [rsp + 0xb0]
xor r12d, r12d
mov r15, r8
and qword [r11 - 0x48], r12
lea rax, [r11 - 0x30]
mov r8, rcx
mov rcx, qword [r14]
mov r13d, r9d
mov rbx, rdx
mov qword [r11 - 0x50], rax
and dword [r11 - 0x58], r12d
lea edi, [r12 + 1]
lea r9d, [r12 + 0x10]
mov edx, 0x660e
mov dword [rsp + 0x40], edi
call fcn.140003b18
test eax, eax
je 0x140004de8
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x40]
lea edx, [rdi + 3]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004dc7
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 0x140004db8
lea ecx, [rdi + 0x3f]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, qword [rsp + 0xa0]
mov qword [rbx], rax
mov rdi, rax
test rax, rax
je 0x140004ddb
mov rbp, qword [rsp + 0xa8]
mov r8, r13
mov rdx, r15
mov rcx, rax
mov dword [rbp], r13d
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x48]
lea r8d, [r12 + 1]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r12d, eax
test eax, eax
jne 0x140004ddb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [rbp], r12d
mov qword [rbx], rax
jmp 0x140004ddb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x140004dd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__MODE___0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004dfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_genericAES128Decrypt___kull_m_crypto_hkey__0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, qword [r14]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x50]
mov eax, r12d
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 0x140004eec
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r12
sub rsp, 0x70
xor ebx, ebx
lea rax, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov ebp, r9d
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x38], rbx
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x54], ebx
mov dword [rsp + 0x58], ebx
mov qword [r11 - 0x18], rbx
mov dword [rsp + 0x68], 1
mov r12, r8
mov edi, edx
mov rsi, rcx
call fcn.140013168
mov qword [rsp + 0x40], rax
cmp rax, rbx
je 0x14000502a
mov r9d, dword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
lea rcx, [rsp + 0x30]
mov rdx, rax
mov dword [rsp + 0x20], 8
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp eax, ebx
je 0x14000500b
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8d, ebp
mov rdx, r12
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
cmp eax, ebx
je 0x140004feb
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]
cmp rax, rbx
je 0x140004fde
mov r9, qword [rsp + 0xa8]
lea r8, [rsp + 0x40]
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140005048
mov ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004fff
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, qword [rsp + 0x30]
call fcn.140003d2c
jmp 0x14000501f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x70]
mov eax, ebx
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r12
ret
Function at 0x140005944
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov dword [rax + 0x10], edx
push rsi
push rdi
push r12
sub rsp, 0x40
mov rdi, qword [rsp + 0x80]
xor esi, esi
mov r12, rcx
and dword [rax - 0x28], esi
mov rcx, qword [rdi]
mov qword [rax - 0x30], r9
and qword [rax - 0x38], rsi
mov rbx, r8
mov rbp, r9
lea r8d, [rsi + 1]
xor r9d, r9d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1400059f1
mov edx, dword [rbp]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1400059f1
mov r8d, dword [rsp + 0x68]
mov rdx, r12
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov r11d, dword [rbp]
mov rcx, qword [rdi]
mov dword [rsp + 0x30], r11d
lea rax, [rsp + 0x68]
lea r8d, [rsi + 1]
mov qword [rsp + 0x28], rax
mov rax, qword [rbx]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
test eax, eax
jne 0x1400059f1
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], rax
mov rcx, qword [rdi]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov eax, esi
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret

Function at 0x140005a10
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x30
mov r13, rcx
mov ebp, edx
xor edi, edi
lea ecx, [rdi + 0x40]
mov edx, edx
mov r12, r9
mov rbx, r8
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, qword [rsp + 0x70]
mov qword [rbx], rax
test rax, rax
je 0x140005a8c
mov r8, rbp
mov rdx, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx]
mov rcx, qword [rsi]
lea r8d, [rdi + 1]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edi, eax
test eax, eax
jne 0x140005a8c
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], rax
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov eax, edi
add rsp, 0x30
pop r13
pop r12
pop rdi
ret
Function at 0x140006058
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 r13
push r14
sub rsp, 0x60
mov r13d, r9d
mov r14, r8
mov esi, edx
mov r12, rcx
xor ebx, ebx
mov dword [rax - 0x34], ebx
lea r9d, [rbx + 8]
lea r8, str.Microsoft_Primitive_Provider
lea rdx, str.SHA256
lea rcx, [rax - 0x20]
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x14000619d
and dword [rsp + 0x28], ebx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 4]
lea r8, [rsp + 0x40]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x140006181
mov edx, dword [rsp + 0x40]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x14000618f
and dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r12
mov r9d, dword [rsp + 0x40]
mov r8, rax
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptCreateHash
test eax, eax
js 0x140006168
xor r9d, r9d
mov r8d, r13d
mov rdx, r14
mov rcx, qword [rsp + 0x50]
call sub.bcrypt.dll_BCryptHashData
xor r9d, r9d
lea r8d, [rbx + 0x20]
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x50]
call sub.bcrypt.dll_BCryptFinishHash
test eax, eax
setns bl
mov dword [rsp + 0x44], ebx
test ebx, ebx
jne 0x14000615c
mov edx, eax
lea rcx, str.PA7LB_kull_m_crypto_ngc_signature_derived___BCryptFinishHash:_0x_08x_n
call fcn.14000c030
mov rcx, qword [rsp + 0x50]
call sub.bcrypt.dll_BCryptDestroyHash
jmp 0x140006176
mov edx, eax
lea rcx, str.PA7LB_kull_m_crypto_ngc_signature_derived___BCryptCreateHash:_0x_08x_n
call fcn.14000c030
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000618f
mov edx, eax
lea rcx, str.PA7LB_kull_m_crypto_ngc_signature_derived___BCryptGetProperty:_0x_08x_n
call fcn.14000c030
xor edx, edx
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
jmp 0x1400061ab
mov edx, eax
lea rcx, str.PA7LB_kull_m_crypto_ngc_signature_derived___BCryptOpenAlgorithmProvider:_0x_08x_n
call fcn.14000c030
jmp 0x1400061bd
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 r14
pop r13
pop r12
ret
Function at 0x14000811c
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
xor ebx, ebx
mov esi, edx
mov rdi, rcx
mov r12, r8
lea r15d, [rbx + 0x40]
lea rcx, [rsp + 0x50]
lea edx, [rbx + 0x36]
mov r8, r15
mov ebp, r9d
call sub.msvcrt.dll_memset
lea edx, [rbx + 0x5c]
lea rcx, [rsp + 0x90]
mov r8, r15
call sub.msvcrt.dll_memset
cmp esi, ebx
jbe 0x14000819a
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x90]
mov r8, rsi
sub rcx, rdi
sub rdx, rdi
mov al, byte [rdi]
xor byte [rcx + rdi], al
xor byte [rdx + rdi], al
inc rdi
sub r8, 1
jne 0x140008189
lea rdx, [rbp + 0x40]
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
cmp rax, rbx
je 0x1400082c0
lea rdx, [rsp + 0x50]
mov rcx, rax
mov r8, r15
call sub.msvcrt.dll_memcpy
lea rcx, [rsi + 0x40]
mov r8, rbp
mov rdx, r12
call sub.msvcrt.dll_memcpy
lea r8d, [rbp + 0x40]
lea r9, [rsp + 0x30]
mov rdx, rsi
mov ecx, 0x8004
mov dword [rsp + 0x20], 0x14
call fcn.140003970
cmp eax, ebx
je 0x1400082b7
mov ebp, dword [rsp + 0x128]
mov r12d, dword [rsp + 0x138]
mov ecx, r15d
lea rdx, [r12 + rbp + 0x54]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
cmp rax, rbx
je 0x1400082b7
lea rdx, [rsp + 0x90]
mov rcx, rax
mov r8, r15
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsp + 0x120]
lea rcx, [rsp + 0x30]
mov rax, qword [rcx]
mov qword [rdi + 0x40], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 0x48], rax
mov eax, dword [rcx + 0x10]
mov dword [rdi + 0x50], eax
cmp rdx, rbx
je 0x14000826b
cmp ebp, ebx
je 0x14000826b
lea rcx, [rdi + 0x54]
mov r8, rbp
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsp + 0x130]
cmp rdx, rbx
je 0x14000828a
cmp r12d, ebx
je 0x14000828a
lea rcx, [rbp + rdi + 0x54]
mov r8, r12
call sub.msvcrt.dll_memcpy
mov r9, qword [rsp + 0x140]
lea r8d, [rbp + r12 + 0x54]
mov rdx, rdi
mov ecx, 0x8004
mov dword [rsp + 0x20], 0x14
call fcn.140003970
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 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 0x140008744
Capabilities:
Encrypt data using dpapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push r13
sub rsp, 0x70
mov r13d, dword [rsp + 0xa0]
xor edi, edi
mov r12, r9
mov rsi, r8
mov dword [rax - 0x18], edx
mov qword [rax - 0x10], rcx
mov dword [rax - 0x28], r13d
mov qword [rax - 0x20], r9
cmp qword [rsp + 0xc8], rdi
je 0x14000883a
cmp dword [rsp + 0xd0], edi
je 0x14000883a
call fcn.140006e44
mov rbx, rax
test rax, rax
je 0x1400088bf
mov rax, qword [rsp + 0xc0]
mov r8d, dword [rsp + 0xd0]
mov rdx, qword [rsp + 0xc8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xb8]
mov r9, r12
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xd8]
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r13d
call fcn.140008498
mov edi, eax
test eax, eax
je 0x14000882d
test rsi, rsi
je 0x14000882d
cmp qword [rbx + 0x30], 0
je 0x14000882d
cmp dword [rbx + 0x2c], 0
je 0x14000882d
mov edx, dword [rbx + 0x2c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x14000882d
mov r8d, dword [rbx + 0x2c]
mov rdx, qword [rbx + 0x30]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, rbx
call fcn.140006f80
jmp 0x1400088bf
lea rax, [rsp + 0x40]
lea r8, [rsp + 0x50]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0xb0]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xa8]
mov rdx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
mov edi, eax
test eax, eax
je 0x1400088bf
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0xc0]
mov ecx, 0x40
mov rdx, rax
mov dword [rbx], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0xb8]
mov qword [rcx], rax
test rax, rax
je 0x1400088b4
mov r8d, dword [rbx]
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x70]
mov eax, edi
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r12, qword [r11 + 0x28]
mov rsp, r11
pop r13
ret
Function at 0x140009924
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov esi, dword [rcx + 0x1c]
mov eax, 0x8004
mov rbp, rcx
xor edi, edi
cmp esi, 0x8009
mov r15, rdx
cmove esi, eax
mov ecx, esi
call fcn.1400049d0
mov ecx, dword [rbp + 0x28]
call fcn.140004af4
mov ecx, dword [rbp + 0x28]
mov ebx, eax
call fcn.140004a60
lea ecx, [rdi + 0x40]
lea r13d, [rax + rbx]
mov edx, r13d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
je 0x140009b2a
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x38], r13d
mov qword [rsp + 0x30], rax
mov eax, dword [rbp + 0x20]
lea r13d, [rdi + 0x14]
lea r14d, [rdi + 0x10]
mov dword [rsp + 0x28], eax
lea r9, [rbp + 0x34]
mov r8d, r13d
mov rdx, r15
mov ecx, esi
mov dword [rsp + 0x20], r14d
call fcn.140003fc8
test eax, eax
je 0x140009b21
mov ecx, dword [rbp + 0x28]
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov r8d, ebx
mov rdx, r12
mov qword [rsp + 0x20], rax
call fcn.140004704
test eax, eax
je 0x140009b0d
mov rcx, qword [rsp + 0x50]
lea r8, [r12 + rbx]
lea edx, [rdi + 1]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140009ae5
mov eax, dword [rbp + 0x54]
lea ecx, [rdi + 0x40]
mov rdx, rax
mov dword [rsp + 0xa0], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140009ae5
mov r8d, dword [rsp + 0xa0]
mov rdx, qword [rbp + 0x4c]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x50]
lea r11, [rsp + 0xa0]
mov qword [rsp + 0x28], r11
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140009adc
cmp dword [rbp + 0x2c], r13d
mov rcx, qword [rsp + 0xc0]
mov rdx, rsi
cmovb r13d, dword [rbp + 0x2c]
mov r8d, r13d
call sub.msvcrt.dll_memcpy
mov ebx, dword [rbp + 0x30]
mov ebp, dword [rbp + 0x2c]
mov rcx, qword [rsp + 0xb8]
cmp ebx, r14d
cmovb r14d, ebx
add rbp, rsi
mov rdx, rbp
mov r8d, r14d
call sub.msvcrt.dll_memcpy
add ebx, 0xfffffff0
mov edi, 1
je 0x140009adc
xor edx, edx
test ebx, ebx
je 0x140009adc
lea rcx, [rbp + 0x10]
test edi, edi
je 0x140009adc
xor eax, eax
cmp byte [rcx], al
sete al
inc edx
inc rcx
and edi, eax
cmp edx, ebx
jb 0x140009ac6
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x58]
call fcn.140003d2c
test eax, eax
jne 0x140009b21
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x140009b1a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.PA7LB_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_hkey_session__0x_08x__n
mov edx, eax
call fcn.14000c030
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret