joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004b44
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.140003aac
test eax, eax
je 0x140004c95
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 0x140004c74
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 0x140004c65
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 0x140004c88
mov r14, qword [rsp + 0xa8]
mov r8d, r15d
mov rdx, r13
mov rcx, rax
mov dword [r14], r15d
call fcn.1400c5d20
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 0x140004c88
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
and dword [r14], ebp
mov qword [rbx], rax
jmp 0x140004c88
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_genericAES128Decrypt___CryptSetKeyParam__IV___0x_08x__n
jmp 0x140004c81
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.14000bf0c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004ca9
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.14000bf0c
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 0x140004d9c
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.140012d94
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140004ec8
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 0x140004eaa
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 0x140004e8b
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 0x140004e7f
mov r9, qword [rbp + 0x48]
lea r8, [rbp - 0x30]
mov edx, edi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140004ee4
mov ebx, eax
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004e9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptImportKey__0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, qword [rbp - 0x40]
call fcn.140003cbc
jmp 0x140004ebe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_crypto_DerAndKeyToPfx___CryptAcquireContext__0x_08x__n
mov edx, eax
call fcn.14000bf0c
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 0x1400057c8
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
mov rbp, rcx
and dword [rax - 0x28], esi
mov rcx, qword [rdi]
mov qword [rax - 0x30], r9
and qword [rax - 0x38], rsi
mov rbx, r8
mov r14, r9
lea r8d, [rsi + 1]
xor r9d, r9d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140005873
mov edx, dword [r14]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x140005873
mov r8d, dword [rsp + 0x68]
mov rdx, rbp
mov rcx, rax
call fcn.1400c5d20
mov eax, dword [r14]
mov rcx, qword [rdi]
mov dword [rsp + 0x30], eax
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 0x140005873
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 r14
pop rdi
pop rsi
ret

Function at 0x140005894
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
lea ecx, [rdi + 0x40]
mov edx, edx
mov r14, r9
mov rbx, r8
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, qword [rsp + 0x70]
mov qword [rbx], rax
test rax, rax
je 0x140005910
mov r8d, ebp
mov rdx, r15
mov rcx, rax
call fcn.1400c5d20
mov rax, qword [rbx]
mov rcx, qword [rsi]
lea r8d, [rdi + 1]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edi, eax
test eax, eax
jne 0x140005910
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 r15
pop r14
pop rdi
ret
Function at 0x140005ee4
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 0x140006039
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 0x14000601c
mov edx, dword [rsp + 0xa8]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x14000602a
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 0x140006003
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]
test eax, eax
setns bl
mov dword [rsp + 0x40], ebx
test ebx, ebx
jne 0x140005ff6
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptFinishHash:_0x_08x_n
call fcn.14000bf0c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.bcrypt.dll_BCryptDestroyHash]
jmp 0x140006011
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptCreateHash:_0x_08x_n
call fcn.14000bf0c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000602a
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptGetProperty:_0x_08x_n
call fcn.14000bf0c
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x140006047
mov edx, eax
lea rcx, str.ERROR_kull_m_crypto_ngc_signature_derived___BCryptOpenAlgorithmProvider:_0x_08x_n
call fcn.14000bf0c
jmp 0x140006059
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 0x1400080c0
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 edi, edi
mov esi, edx
mov rbx, rcx
mov r15, r8
lea r12d, [rdi + 0x40]
lea rcx, [rbp - 0x71]
lea edx, [rdi + 0x36]
mov r8d, r12d
mov r14d, r9d
call fcn.1400c8410
lea edx, [rdi + 0x5c]
lea rcx, [rbp - 0x31]
mov r8d, r12d
call fcn.1400c8410
test esi, esi
je 0x140008137
lea rcx, [rbp - 0x71]
lea rdx, [rbp - 0x31]
mov r8d, esi
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 0x140008127
lea rdx, [r14 + 0x40]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x1400082ab
mov rax, qword [rbp - 0x71]
lea rcx, [rsi + 0x40]
mov r8, r14
mov qword [rsi], rax
mov rax, qword [rbp - 0x69]
mov rdx, r15
mov qword [rsi + 8], rax
mov rax, qword [rbp - 0x61]
mov qword [rsi + 0x10], rax
mov rax, qword [rbp - 0x59]
mov qword [rsi + 0x18], rax
mov rax, qword [rbp - 0x51]
mov qword [rsi + 0x20], rax
mov rax, qword [rbp - 0x49]
mov qword [rsi + 0x28], rax
mov rax, qword [rbp - 0x41]
mov qword [rsi + 0x30], rax
mov rax, qword [rbp - 0x39]
mov qword [rsi + 0x38], rax
call fcn.1400c5d20
lea r8d, [r14 + 0x40]
lea r9, [rsp + 0x30]
mov rdx, rsi
mov ecx, 0x8004
mov dword [rsp + 0x20], Ordinal_26
call fcn.140003914
test eax, eax
je 0x1400082a2
mov r15d, dword [rbp + 0x77]
mov r14d, dword [rbp + 0x67]
mov ecx, r12d
lea rdx, [r15 + 0x54]
add rdx, r14
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x1400082a2
mov rax, qword [rbp - 0x31]
mov rdx, qword [rbp + 0x5f]
mov qword [rbx], rax
mov rax, qword [rbp - 0x29]
mov qword [rbx + 8], rax
mov rax, qword [rbp - 0x21]
mov qword [rbx + 0x10], rax
mov rax, qword [rbp - 0x19]
mov qword [rbx + 0x18], rax
mov rax, qword [rbp - 0x11]
mov qword [rbx + 0x20], rax
mov rax, qword [rbp - 9]
mov qword [rbx + 0x28], rax
mov rax, qword [rbp - 1]
mov qword [rbx + 0x30], rax
mov rax, qword [rbp + 7]
mov qword [rbx + 0x38], rax
mov rax, qword [rsp + 0x30]
mov qword [rbx + 0x40], rax
mov rax, qword [rsp + 0x38]
mov qword [rbx + 0x48], rax
mov eax, dword [rsp + 0x40]
mov dword [rbx + 0x50], eax
test rdx, rdx
je 0x14000825a
test r14d, r14d
je 0x14000825a
lea rcx, [rbx + 0x54]
mov r8d, r14d
call fcn.1400c5d20
mov rdx, qword [rbp + 0x6f]
test rdx, rdx
je 0x140008277
test r15d, r15d
je 0x140008277
lea rcx, [r14 + 0x54]
mov r8, r15
add rcx, rbx
call fcn.1400c5d20
mov r9, qword [rbp + 0x7f]
lea r8d, [r15 + 0x54]
mov rdx, rbx
mov ecx, 0x8004
add r8d, r14d
mov dword [rsp + 0x20], Ordinal_26
call fcn.140003914
mov rcx, rbx
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0xd0]
mov eax, edi
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 0x14000872c
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 0x140008822
cmp dword [rsp + 0xd0], edi
je 0x140008822
call fcn.140006ca8
mov rbx, rax
test rax, rax
je 0x1400088a6
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, r14
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xd8]
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
call fcn.140008484
mov edi, eax
test eax, eax
je 0x140008815
test rsi, rsi
je 0x140008815
cmp qword [rbx + 0x30], 0
je 0x140008815
cmp dword [rbx + 0x2c], 0
je 0x140008815
mov edx, dword [rbx + 0x2c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x140008815
mov r8d, dword [rbx + 0x2c]
mov rdx, qword [rbx + 0x30]
mov rcx, rax
call fcn.1400c5d20
mov rcx, rbx
call fcn.140006e28
jmp 0x1400088a6
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 0x1400088a6
mov eax, dword [rsp + 0x40]
mov rbx, qword [rsp + 0xc0]
mov ecx, 0x40
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 0x14000889b
mov r8d, dword [rbx]
mov rdx, qword [rsp + 0x48]
mov rcx, rax
call fcn.1400c5d20
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 0x1400097ec
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 edi, dword [rcx + 0x1c]
mov eax, 0x8004
mov rbp, rcx
xor esi, esi
cmp edi, 0x8009
mov r13, rdx
cmove edi, eax
mov ecx, edi
call fcn.140004884
mov ecx, dword [rbp + 0x28]
call fcn.1400049a8
mov ecx, dword [rbp + 0x28]
mov ebx, eax
call fcn.140004914
lea ecx, [rsi + 0x40]
lea r15d, [rax + rbx]
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x140009a02
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x30], rax
mov eax, dword [rbp + 0x20]
lea r15d, [rsi + 0x14]
lea r12d, [rsi + 0x10]
mov dword [rsp + 0x28], eax
lea r9, [rbp + 0x34]
mov r8d, r15d
mov rdx, r13
mov ecx, edi
mov dword [rsp + 0x20], r12d
call fcn.140003f10
test eax, eax
je 0x1400099f9
mov ecx, dword [rbp + 0x28]
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xa0]
mov r8d, ebx
mov rdx, r14
mov qword [rsp + 0x20], rax
call fcn.1400045d4
test eax, eax
je 0x1400099e5
mov rcx, qword [rsp + 0xa0]
lea r8, [r14 + rbx]
lea edx, [rsi + 1]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400099ba
mov eax, dword [rbp + 0x54]
lea ecx, [rsi + 0x40]
mov edx, eax
mov dword [rsp + 0xb0], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400099ba
mov r8d, dword [rsp + 0xb0]
mov rdx, qword [rbp + 0x4c]
mov rcx, rax
call fcn.1400c5d20
mov rcx, qword [rsp + 0xa0]
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x1400099b1
cmp dword [rbp + 0x2c], r15d
mov rcx, qword [rsp + 0xc0]
mov rdx, rdi
cmovb r15d, dword [rbp + 0x2c]
mov r8d, r15d
call fcn.1400c5d20
mov ebx, dword [rbp + 0x30]
mov ebp, dword [rbp + 0x2c]
mov rcx, qword [rsp + 0xb8]
cmp ebx, r12d
cmovb r12d, ebx
add rbp, rdi
mov rdx, rbp
mov r8d, r12d
call fcn.1400c5d20
mov esi, 1
add ebx, 0xfffffff0
je 0x1400099b1
xor edx, edx
test ebx, ebx
je 0x1400099b1
lea rcx, [rbp + 0x10]
test esi, esi
je 0x1400099b1
xor eax, eax
cmp byte [rcx], al
sete al
inc edx
inc rcx
and esi, eax
cmp edx, ebx
jb 0x14000999b
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.140003cbc
test eax, eax
jne 0x1400099f9
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 0x1400099f2
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.14000bf0c
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140009a6c
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]
lea ecx, [rbx + 0x40]
mov edx, eax
mov edi, eax
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x140009aca
test edi, edi
je 0x140009ac1
mov rdx, rax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, eax
lea eax, [rdi - 1]
cmp ecx, eax
jne 0x140009ac1
mov ebx, 1
jmp 0x140009aca
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 0x140009bbc
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
mov ebp, r8d
cmp dword [0x14014f018], ebx
mov r14, rdx
mov r15, rcx
mov esi, ebx
mov dword [rax + 0x20], ebx
je 0x140009c97
lea rax, [rax + 0x20]
lea r8d, [rbx + 1]
mov edx, ebp
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
je 0x140009cfa
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 0x140009cfa
lea rax, [rsp + 0x78]
lea r8d, [rbx + 1]
mov r9, rdi
mov edx, ebp
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
mov esi, eax
test eax, eax
je 0x140009c8c
lea rcx, str._n_nBase64_of_file_:__s_n_n
mov rdx, r15
call fcn.14000bf0c
cmp dword [rsp + 0x78], ebx
jbe 0x140009c80
mov ecx, ebx
movzx edx, word [rdi + rcx*2]
lea rcx, [0x1400f5160]
call fcn.14000bf0c
inc ebx
cmp ebx, dword [rsp + 0x78]
jb 0x140009c66
lea rcx, str._n
call fcn.14000bf0c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140009cfa
mov qword [rsp + 0x30], rbx
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [rax - 1]
mov rdi, rax
cmp rcx, 0xfffffffffffffffd
ja 0x140009cfa
lea r9, [rsp + 0x78]
mov r8d, ebp
mov rdx, r14
mov rcx, rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140009cf1
cmp ebp, dword [rsp + 0x78]
jne 0x140009cf1
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 rbp, qword [rsp + 0x68]
mov eax, esi
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140009d18
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
mov r14, rdx
cmp dword [0x14014f01c], ebx
je 0x140009d65
call fcn.1400132cc
mov ebx, eax
test eax, eax
jne 0x140009e07
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_file_readGeneric___kull_m_string_quick_base64_to_Binary__0x_08x__n
mov edx, eax
call fcn.14000bf0c
jmp 0x140009e07
and qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], r9d
mov r8d, 3
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x20], r8d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140009e07
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140009dfe
cmp dword [rsp + 0x4c], ebx
jne 0x140009dfe
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 0x140009dfe
mov r8d, dword [rdi]
and qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140009df5
mov eax, dword [rsp + 0x40]
cmp dword [rdi], eax
jne 0x140009df5
mov ebx, 1
jmp 0x140009dfe
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 rdi, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop r14
ret
Function at 0x14000b2f8
Capabilities:
Get domain controller name

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
push rdi
sub rsp, 0x30
or edx, 0x40020000
lea rax, [r11 + 0x20]
mov rsi, r8
mov qword [r11 - 0x10], rax
mov dword [rsp + 0x20], edx
mov rdx, rcx
xor ebx, ebx
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov qword [r11 + 0x20], rbx
call qword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
jne 0x14000b395
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax]
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2 + 4], bx
jne 0x14000b344
lea eax, [rax*2 + 2]
mov ecx, 0x40
mov edx, eax
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, rax
mov qword [rsi], rax
test rax, rax
je 0x14000b388
mov rax, qword [rsp + 0x58]
mov r8d, edi
mov ebx, 1
mov rdx, qword [rax]
add rdx, 4
call fcn.1400c5d20
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.NETAPI32.dll_NetApiBufferFree]
jmp 0x14000b3a3
lea rcx, str.ERROR_kull_m_net_getDC___DsGetDcName:__u_n
mov edx, eax
call fcn.14000bf0c
mov rsi, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x14000b3b8
Capabilities:
Get hostname

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
neg ecx
mov rsi, rdx
sbb edi, edi
and dword [rax + 8], ebx
lea r8, [rax + 8]
and edi, 3
xor edx, edx
lea ecx, [rdi + 4]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x14000b445
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14000b445
mov edx, dword [rsp + 0x30]
lea ecx, [rbx + 0x40]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsi], rax
test rax, rax
je 0x14000b459
lea r8, [rsp + 0x30]
lea ecx, [rdi + 4]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
mov ebx, eax
test eax, eax
jne 0x14000b459
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_net_getComputerName___GetComputerNameEx_data___0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000b459
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_net_getComputerName___GetComputerNameEx_init___0x_08x__n
mov edx, eax
call fcn.14000bf0c
mov rsi, qword [rsp + 0x40]
mov eax, ebx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret