joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800041b4
Capabilities:
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 r15d, r15d
mov rdi, r9
mov ebx, r8d
mov r12, rdx
mov rsi, rcx
lea r13d, [r15 + 0x10]
cmp r8d, r13d
jbe 0x18000435b
lea r9, [rbp - 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x180004380
xor r9d, r9d
lea edx, [r15 + 1]
mov r8, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x18000434f
lea r14d, [rbx + 0xf]
shr r14d, 4
and ebx, 0xf
mov edi, r14d
cmovne r13d, ebx
shl edi, 4
cmp r14d, 2
jbe 0x180004269
lea eax, [rdi - 0x20]
xor r9d, r9d
mov dword [rbp + 0x40], eax
xor r8d, r8d
lea rax, [rbp + 0x40]
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x18000434f
lea eax, [r13 + 0x10]
add r14d, 0xfffffffe
shl r14d, 4
lea rcx, [rbp - 0x28]
add r14, r12
mov r8d, eax
mov rdx, r14
mov ebx, eax
call fcn.1800c4cd0
mov eax, 0x10
lea rcx, [rbp - 0x28]
sub eax, r13d
add rcx, rbx
mov r8d, eax
mov qword [rbp - 0x38], rax
xor edx, edx
mov qword [rbp - 0x30], rcx
call fcn.1800c4400
mov rcx, qword [rbp - 0x40]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x28]
mov dword [rbp + 0x40], 0x10
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x18000434f
movdqu xmm1, xmmword [rbp - 0x28]
mov r8, qword [rbp - 0x38]
lea rdx, [rbp - 0x28]
movdqu xmm0, xmmword [rbp - 0x18]
mov rcx, qword [rbp - 0x30]
mov ebx, r13d
pxor xmm1, xmm0
add rdx, rbx
movdqu xmmword [rbp - 0x28], xmm1
call fcn.1800c4cd0
lea rax, [rbp + 0x40]
mov dword [rbp + 0x40], 0x10
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x18]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r15d, eax
test eax, eax
je 0x18000434f
movups xmm0, xmmword [rbp - 0x18]
lea ecx, [rdi - 0x10]
mov r8d, ebx
add rcx, r12
lea rdx, [rbp - 0x28]
movdqu xmmword [r14], xmm0
call fcn.1800c4cd0
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x180004380
jne 0x180004380
lea rax, [rbp + 0x40]
mov dword [rbp + 0x40], r13d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r12
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r15d, eax
lea r11, [rsp + 0x70]
mov eax, r15d
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 0x1800043a4
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 r12d, r12d
mov rax, r9
mov ebx, r8d
mov r14, rdx
mov r15, rcx
lea edi, [r12 + 0x10]
cmp r8d, edi
jbe 0x1800044d9
xor r9d, r9d
lea edx, [rdi - 0xf]
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x180004509
lea ebp, [rbx + 0xf]
mov r13d, edi
shr ebp, 4
and ebx, 0xf
mov esi, ebp
cmovne r13d, ebx
shl esi, 4
cmp ebp, 2
jbe 0x180004447
lea eax, [rsi - 0x20]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor r8d, r8d
mov dword [rsp + 0xa0], eax
xor edx, edx
lea rax, [rsp + 0xa0]
mov rcx, r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x180004509
lea eax, [r13 + 0x10]
add ebp, 0xfffffffe
shl ebp, 4
lea rcx, [rsp + 0x40]
add rbp, r14
mov r8d, eax
mov rdx, rbp
mov ebx, eax
call fcn.1800c4cd0
lea rcx, [rsp + 0x40]
sub edi, r13d
add rcx, rbx
mov r8d, edi
xor edx, edx
call fcn.1800c4400
mov eax, Ordinal_36
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor r8d, r8d
mov dword [rsp + 0xa0], eax
xor edx, edx
lea rax, [rsp + 0xa0]
mov rcx, r15
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r12d, eax
test eax, eax
je 0x180004509
movups xmm0, xmmword [rsp + 0x50]
lea ecx, [rsi - 0x10]
mov r8d, r13d
add rcx, r14
lea rdx, [rsp + 0x40]
movdqu xmmword [rbp], xmm0
call fcn.1800c4cd0
jmp 0x180004509
jne 0x180004509
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
mov dword [rsp + 0xa0], edi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r12d, eax
lea r11, [rsp + 0x60]
mov eax, r12d
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 0x180004b88
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]
lea rax, [rax - 0x30]
xor ebp, ebp
mov r15d, r9d
and qword [rax - 0x18], rbp
mov r13, r8
mov rbx, rdx
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], ebp
mov r8, rcx
mov rcx, qword [r12]
lea edi, [rbp + 1]
mov dword [rax - 8], edi
lea r9d, [rbp + 0x10]
mov edx, 0x660e
call fcn.180003b04
test eax, eax
je 0x180004cd9
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 0x180004cb8
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 0x180004ca9
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 0x180004ccc
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r13
mov rcx, rax
mov dword [r14], r15d
call fcn.1800c4cd0
mov rcx, qword [rsp + 0x48]
lea r8d, [rbp + 1]
xor r9d, r9d
mov qword [rsp + 0x28], r14
xor edx, edx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebp, eax
test eax, eax
jne 0x180004ccc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
call fcn.18000bdb4
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x180004ccc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x180004cc5
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.18000bdb4
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x180004ced
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.18000bdb4
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 0x180004de0
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.180012c24
mov qword [rbp - 0x30], rax
test rax, rax
je 0x180004f0c
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 0x180004eee
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 0x180004ecf
mov r9d, 0x2000
mov qword [rsp + 0x20], rbx
xor r8d, r8d
lea ecx, [rbx + 2]
xor edx, edx
call qword [sym.imp.CRYPT32.dll_CertOpenStore]
test rax, rax
je 0x180004ec3
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov qword [rsp + 0x20], rax
mov rcx, rsi
call fcn.180004f28
mov ebx, eax
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x180004ee3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
call fcn.18000bdb4
mov rcx, qword [rbp - 0x40]
call fcn.180003d14
jmp 0x180004f02
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
call fcn.18000bdb4
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 0x18000580c
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 r14
sub rsp, 0x40
mov rdi, qword [rsp + 0x80]
xor esi, esi
and dword [rax - 0x28], esi
mov r14, r9
mov qword [rax - 0x30], r9
mov rbx, r8
and qword [rax - 0x38], rsi
mov rbp, rcx
mov rcx, qword [rdi]
lea r8d, [rsi + 1]
xor r9d, r9d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1800058b7
mov edx, dword [r14]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x1800058b7
mov r8d, dword [rsp + 0x68]
mov rdx, rbp
mov rcx, rax
call fcn.1800c4cd0
mov eax, dword [r14]
lea r8d, [rsi + 1]
mov rcx, qword [rdi]
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor edx, edx
lea rax, [rsp + 0x68]
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 0x1800058b7
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 eax, esi
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret

Function at 0x1800058d8
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 r14
push r15
sub rsp, 0x30
mov r15, rcx
mov ebp, edx
xor edi, edi
mov edx, edx
mov r14, r9
mov rbx, r8
lea ecx, [rdi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, qword [rsp + 0x70]
mov qword [rbx], rax
test rax, rax
je 0x180005954
mov r8d, ebp
mov rdx, r15
mov rcx, rax
call fcn.1800c4cd0
mov rax, qword [rbx]
lea r8d, [rdi + 1]
mov rcx, qword [rsi]
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 0x180005954
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 eax, edi
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x180008028
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.1800c4400
mov r8d, r12d
lea edx, [rbx + 0x5c]
lea rcx, [rbp - 0x31]
call fcn.1800c4400
test esi, esi
je 0x1800080a3
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 0x18000808a
lea rdx, [r14 + 0x40]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x1800081ce
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.1800c4cd0
lea r8d, [r14 + 0x40]
mov dword [rsp + 0x20], SQLAllocHandle
lea r9, [rsp + 0x30]
mov rdx, rsi
mov ecx, 0x8004
call fcn.18000396c
test eax, eax
je 0x1800081c5
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 0x1800081c5
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 0x18000817d
test r14d, r14d
je 0x18000817d
lea rcx, [rdi + 0x54]
mov r8d, r14d
call fcn.1800c4cd0
mov rdx, qword [rbp + 0x6f]
test rdx, rdx
je 0x18000819a
test r15d, r15d
je 0x18000819a
lea rcx, [r14 + 0x54]
mov r8, r15
add rcx, rdi
call fcn.1800c4cd0
mov r9, qword [rbp + 0x7f]
lea r8d, [r15 + 0x54]
add r8d, r14d
mov dword [rsp + 0x20], SQLAllocHandle
mov rdx, rdi
mov ecx, 0x8004
call fcn.18000396c
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
Function at 0x180008668
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], r14
push r15
sub rsp, 0x70
mov r15d, dword [rsp + 0xa0]
xor edi, edi
mov r14, r9
mov rsi, r8
mov dword [rax - 0x18], edx
mov qword [rax - 0x10], rcx
mov dword [rax - 0x28], r15d
mov qword [rax - 0x20], r9
cmp qword [rsp + 0xc8], rdi
je 0x18000875e
cmp dword [rsp + 0xd0], edi
je 0x18000875e
call fcn.180006d24
mov rbx, rax
test rax, rax
je 0x1800087e2
mov rax, qword [rsp + 0xc0]
mov r9, r14
mov r8d, dword [rsp + 0xd0]
mov rcx, rbx
mov rdx, qword [rsp + 0xc8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
call fcn.1800083a8
mov edi, eax
test eax, eax
je 0x180008751
test rsi, rsi
je 0x180008751
cmp qword [rbx + 0x30], 0
je 0x180008751
cmp dword [rbx + 0x2c], 0
je 0x180008751
mov edx, dword [rbx + 0x2c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x180008751
mov r8d, dword [rbx + 0x2c]
mov rcx, rax
mov rdx, qword [rbx + 0x30]
call fcn.1800c4cd0
mov rcx, rbx
call fcn.180006e78
jmp 0x1800087e2
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x50]
mov eax, dword [rsp + 0xb0]
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov rdx, rsi
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
mov edi, eax
test eax, eax
je 0x1800087e2
mov eax, dword [rsp + 0x40]
mov ecx, 0x40
mov rbx, qword [rsp + 0xc0]
mov edx, eax
mov dword [rbx], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0xb8]
mov qword [rcx], rax
test rax, rax
je 0x1800087d7
mov r8d, dword [rbx]
mov rcx, rax
mov rdx, qword [rsp + 0x48]
call fcn.1800c4cd0
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 r14, qword [r11 + 0x28]
mov rsp, r11
pop r15
ret
Function at 0x180009728
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov r14d, dword [rcx + 0x1c]
mov eax, 0x8004
mov rbx, rcx
xor esi, esi
cmp r14d, 0x8009
mov r13, rdx
cmove r14d, eax
mov ecx, r14d
call fcn.1800048c8
mov ecx, dword [rbx + 0x28]
call fcn.1800049ec
mov ecx, dword [rbx + 0x28]
mov edi, eax
call fcn.180004958
lea ecx, [rsi + 0x40]
lea r15d, [rax + rdi]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbp, rax
test rax, rax
je 0x180009941
mov dword [rsp + 0x40], 1
lea r12d, [rsi + 0x10]
mov dword [rsp + 0x38], r15d
lea r9, [rbx + 0x34]
mov qword [rsp + 0x30], rax
lea r15d, [rsi + 0x14]
mov eax, dword [rbx + 0x20]
mov r8d, r15d
mov dword [rsp + 0x28], eax
mov rdx, r13
mov ecx, r14d
mov dword [rsp + 0x20], r12d
call fcn.180003f68
test eax, eax
je 0x180009938
mov ecx, dword [rbx + 0x28]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0xa0]
mov r8d, edi
mov rdx, rbp
mov qword [rsp + 0x20], rax
call fcn.180004618
test eax, eax
je 0x180009924
mov rcx, qword [rsp + 0xa0]
lea r13d, [rsi + 1]
mov edx, r13d
lea r8, [rdi + rbp]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1800098f9
mov edx, dword [rbx + 0x54]
lea ecx, [rsi + 0x40]
mov dword [rsp + 0xb0], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1800098f9
mov r8d, dword [rsp + 0xb0]
mov rcx, rax
mov rdx, qword [rbx + 0x4c]
call fcn.1800c4cd0
mov rcx, qword [rsp + 0xa0]
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x1800098f0
mov r14d, dword [rbx + 0x2c]
mov rdx, rdi
mov rcx, qword [rsp + 0xc0]
cmp r14d, r15d
cmovb r15d, r14d
mov r8d, r15d
call fcn.1800c4cd0
mov ebx, dword [rbx + 0x30]
lea rdx, [r14 + rdi]
mov rcx, qword [rsp + 0xb8]
cmp ebx, r12d
cmovb r12d, ebx
mov r8d, r12d
call fcn.1800c4cd0
mov esi, r13d
add ebx, 0xfffffff0
je 0x1800098f0
xor edx, edx
test ebx, ebx
je 0x1800098f0
test esi, esi
je 0x1800098f0
xor ecx, ecx
mov eax, edx
add rax, r14
cmp byte [rax + rdi + 0x10], cl
cmove ecx, esi
add edx, r13d
mov esi, ecx
cmp edx, ebx
jb 0x1800098d5
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x50]
call fcn.180003d14
test eax, eax
jne 0x180009938
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x180009931
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_credhist_entry_with_shaDerivedkey___kull_m_crypto_hkey_session__0x_08x__n
mov edx, eax
call fcn.18000bdb4
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0xa8]
mov eax, esi
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1800099ac
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
xor edx, edx
xor ecx, ecx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edx, eax
lea ecx, [rbx + 0x40]
add rdx, rdx
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x180009a0a
test edi, edi
je 0x180009a01
mov rdx, rax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, eax
lea eax, [rdi - 1]
cmp ecx, eax
jne 0x180009a01
mov ebx, 1
jmp 0x180009a0a
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, qword [rsp + 0x38]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x180009afc
Capabilities:
Encode data using base64 via winapi
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor ebx, ebx
xor r9d, r9d
cmp dword [0x18015d948], ebx
mov ebp, r8d
mov r14, rdx
mov dword [rax + 0x20], ebx
mov r15, rcx
mov esi, ebx
je 0x180009bd7
lea rax, [rax + 0x20]
mov edx, ebp
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rax
mov rcx, r14
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
je 0x180009c3a
mov edx, dword [rsp + 0x78]
lea ecx, [rbx + 0x40]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x180009c3a
lea rax, [rsp + 0x78]
mov r9, rdi
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, r14
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
mov esi, eax
test eax, eax
je 0x180009bcc
mov rdx, r15
lea rcx, str._n_nBase64_of_file_:__s_n_n
call fcn.18000bdb4
cmp dword [rsp + 0x78], ebx
jbe 0x180009bc0
mov ecx, ebx
movzx edx, word [rdi + rcx*2]
lea rcx, [0x180104ed0]
call fcn.18000bdb4
inc ebx
cmp ebx, dword [rsp + 0x78]
jb 0x180009ba6
lea rcx, str._n
call fcn.18000bdb4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x180009c3a
mov qword [rsp + 0x30], rbx
xor r8d, r8d
mov dword [rsp + 0x28], ebx
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x180009c3a
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], rbx
mov r8d, ebp
mov rdx, r14
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180009c31
cmp ebp, dword [rsp + 0x78]
jne 0x180009c31
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov esi, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
mov eax, esi
mov rsi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x180009c58
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x50
xor ebx, ebx
mov rdi, r8
cmp dword [0x18015d94c], ebx
mov r14, rdx
je 0x180009ca5
call fcn.180013154
mov ebx, eax
test eax, eax
jne 0x180009d47
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_file_readGeneric___kull_m_string_quick_base64_to_Binary__0x_08x__n
call fcn.18000bdb4
jmp 0x180009d47
and qword [rsp + 0x30], rbx
mov r8d, 3
mov dword [rsp + 0x28], r9d
mov edx, 0x80000000
xor r9d, r9d
mov dword [rsp + 0x20], r8d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x180009d47
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180009d3e
cmp dword [rsp + 0x4c], ebx
jne 0x180009d3e
mov rax, qword [rsp + 0x48]
mov ecx, 0x40
mov edx, eax
mov dword [rdi], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r14], rax
test rax, rax
je 0x180009d3e
mov r8d, dword [rdi]
lea r9, [rsp + 0x40]
and qword [rsp + 0x20], rbx
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180009d35
mov eax, dword [rsp + 0x40]
cmp dword [rdi], eax
jne 0x180009d35
mov ebx, 1
jmp 0x180009d3e
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x70]
add rsp, 0x50
pop r14
ret