joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400019a8
Capabilities:
Write file on windows

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, 0x40
xor r13d, r13d
mov r15, rdx
mov rbx, rcx
lea edx, [r13 + 0x41]
mov r12d, r9d
mov r14d, r8d
lea ecx, [rdx - 1]
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140001ab0
lea ebp, [r13 + 7]
cmp r14d, ebp
jb 0x140001a0a
lea rcx, str.ERROR_kull_m_busylight_request_create___count_u__max_is_7__n
mov edx, r14d
call fcn.14000bf0c
cmp r14d, ebp
cmovb ebp, r14d
mov esi, 1
test ebp, ebp
je 0x140001a67
lea rcx, [r15 + 2]
lea rdx, [rdi + 2]
mov r8d, ebp
mov al, byte [rcx - 2]
test al, 0xf0
movzx eax, al
jne 0x140001a2f
or eax, 0x10
mov byte [rdx - 1], al
mov al, byte [rcx - 1]
mov byte [rdx], al
mov al, byte [rcx]
add rdx, 8
mov byte [rdx - 7], al
mov al, byte [rcx + 1]
add rcx, 8
mov byte [rdx - 6], al
mov al, byte [rcx - 6]
mov byte [rdx - 5], al
mov al, byte [rcx - 5]
mov byte [rdx - 4], al
mov al, byte [rcx - 4]
mov byte [rdx - 3], al
mov al, byte [rcx - 3]
mov byte [rdx - 2], al
sub r8, rsi
jne 0x140001a22
mov dword [rdi + 0x39], 0xff550404
mov word [rdi + 0x3d], 0xffff
movzx ecx, r13w
lea rdx, [rdi + 1]
mov r8d, 0x3e
movzx eax, byte [rdx]
add rdx, rsi
add cx, ax
sub r8, rsi
jne 0x140001a82
movzx eax, cx
shr ax, 8
mov byte [rdi + 0x3f], al
movzx eax, cx
and eax, 0x800000ff
jge 0x140001aad
sub eax, esi
or eax, 0xffffff00
add eax, esi
mov byte [rdi + 0x40], al
test esi, esi
je 0x140001b57
jmp 0x140001b45
mov ebp, r13d
test rbx, rbx
je 0x140001b27
mov rcx, qword [rbx + 0x78]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001b27
movzx r9d, word [rbx + 0x2a]
mov r8d, Ordinal_69
cmp r9d, r8d
jb 0x140001b16
lea r9, [rsp + 0x30]
mov rdx, rdi
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, eax
test eax, eax
jne 0x140001b36
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [rbx + 8]
lea rcx, str.ERROR_kull_m_busylight_device_send_raw____device__u__WriteFile__0x_08x__n
mov r8d, eax
call fcn.14000bf0c
jmp 0x140001b36
mov edx, dword [rbx + 8]
lea rcx, str.ERROR_kull_m_busylight_device_send_raw____device__u__Size_is_not_valide__siz___u__max___u__n
call fcn.14000bf0c
jmp 0x140001b36
mov edx, dword [rbx + 8]
lea rcx, str.ERROR_kull_m_busylight_device_send_raw____device__u__Invalid_Device_Busy_Handle_n
call fcn.14000bf0c
and esi, ebp
test r12d, r12d
je 0x140001b42
mov rbx, qword [rbx]
jmp 0x140001b45
mov rbx, r13
test rbx, rbx
jne 0x140001abd
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x40]
mov eax, esi
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 0x140001b78
Capabilities:
Terminate thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov rdi, rcx
mov dword [rax + 8], 0
mov dword [rax + 0xc], 0x80000000
mov rbx, rcx
test rcx, rcx
je 0x140001bd6
mov rcx, qword [rbx + 0x98]
and dword [rbx + 0x90], 0
test rcx, rcx
je 0x140001bc6
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
and qword [rbx + 0x98], 0
test esi, esi
je 0x140001bcf
mov rbx, qword [rbx]
jmp 0x140001bd1
xor ebx, ebx
test rbx, rbx
jne 0x140001ba3
lea rdx, [rsp + 0x30]
mov r9d, esi
mov r8d, 1
mov rcx, rdi
call fcn.1400019a8
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140002070
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 0x140002239
and dword [rbx + 0x1c], 0
and dword [rbx + 0x20], 0
lea r14, [rax + 8]
mov eax, 0x4000000
mov r8, rbp
xor edx, edx
mov dword [r14], eax
mov dword [rbx + 0xc], eax
mov eax, SQLGetData
mov rcx, r14
mov word [rbx + 0x28], ax
call fcn.140001f00
test eax, eax
je 0x14000221b
lea rsi, [rbx + 0x22a]
mov edi, 0x100
mov rdx, rsi
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x140002227
mov eax, edi
mov rcx, rsi
cmp byte [rcx], 0
je 0x14000210e
inc rcx
dec rax
jne 0x140002101
test rax, rax
je 0x140002227
mov rcx, rdi
mov r9d, 0
sub rcx, rax
lea rax, [rsi + rcx]
sub rdi, rcx
je 0x140002161
lea rdx, [rcx + 0x7ffffefe]
lea rcx, [0x1400ebc08]
add rdx, rdi
sub rcx, rax
test rdx, rdx
je 0x14000215c
mov r8b, byte [rcx + rax]
test r8b, r8b
je 0x14000215c
mov byte [rax], r8b
dec rdx
inc rax
dec rdi
jne 0x140002140
test rdi, rdi
jne 0x14000216a
dec rax
mov r9d, 0x8007007a
mov byte [rax], 0
test r9d, r9d
js 0x140002227
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x58], r14
lea rax, [0x140001e20]
mov qword [rsp + 0x50], rax
lea rax, [0x140001dec]
lea rdi, [rbx + 0x32c]
mov qword [rsp + 0x48], rax
lea rax, [0x140001db4]
lea r9, [0x140001c84]
mov qword [rsp + 0x40], rax
lea rax, [fcn.140001d80]
lea r8, [0x140001c74]
mov qword [rsp + 0x38], rax
lea rax, [0x140001d48]
lea rdx, [fcn.140001c70]
mov qword [rsp + 0x30], rax
lea rax, [0x140001d10]
mov rcx, rdi
mov qword [rsp + 0x28], rax
lea rax, [fcn.140001c8c]
mov qword [rsp + 0x20], rax
call qword [sym.imp.Cabinet.dll_FCICreate]
mov qword [rbx], rax
test rax, rax
jne 0x140002239
mov ecx, dword [rdi]
call fcn.140001ffc
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.14000bf0c
jmp 0x140002227
lea rcx, str.ERROR_kull_m_cabinet_create___Failed_to_initialize_the_cabinet_information_structure._n
call fcn.14000bf0c
cmp qword [rbx], 0
jne 0x140002239
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 0x140003914
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 0x1400039ad
cmp dword [rbp + 0x40], 4
jne 0x140003a8f
lea rdx, [rbp - 0x20]
mov ecx, 0xffffff7c
call qword [sym.imp.cryptdll.dll_CDLocateCheckSum]
test eax, eax
js 0x140003a8f
mov rax, qword [rbp - 0x20]
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [rax + 0x10]
test eax, eax
js 0x140003a8f
mov rax, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov r8, r14
mov edx, esi
call qword [rax + reloc.ODBC32.dll_SQLAllocHandle]
mov rax, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rdx, r15
call qword [rax + 0x20]
lea rcx, [rbp - 0x10]
test eax, eax
mov rax, qword [rbp - 0x20]
setns bl
call qword [rax + Ordinal_41]
jmp 0x140003a8f
lea rcx, [rbp - 8]
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140003a8f
mov rcx, qword [rbp - 8]
lea rax, [rbp - 0x18]
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140003a83
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 0x140003a79
mov rcx, qword [rbp - 0x18]
xor r8d, r8d
lea r9, [rbp + 0x20]
lea esi, [r8 + 2]
mov dword [rsp + 0x20], ebx
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140003a79
mov edx, dword [rbp + 0x20]
lea ecx, [rsi + 0x3e]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003a79
mov rcx, qword [rbp - 0x18]
lea r9, [rbp + 0x20]
mov r8, rax
mov edx, esi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [rbp + 0x40]
mov rdx, rdi
cmp dword [rbp + 0x20], ecx
mov ebx, eax
cmovb ecx, dword [rbp + 0x20]
mov r8d, ecx
mov rcx, r15
call fcn.1400c5d20
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 0x140003aac
Capabilities:
Encrypt data using des via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
mov r12, rcx
mov esi, r9d
mov ecx, 0x6603
xor ebx, ebx
mov r14, r8
mov r15d, edx
lea ebp, [rsi + 0xc]
cmp edx, ecx
je 0x140003b43
lea ecx, [rbx + 0x40]
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003b71
lea rcx, [rax + 0xc]
mov r8d, esi
mov rdx, r14
mov dword [rax], 0x208
mov dword [rax + 4], r15d
mov dword [rax + 8], esi
call fcn.1400c5d20
mov rax, qword [rsp + 0x78]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x70]
mov r8d, ebp
mov rdx, rdi
mov rcx, r12
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140003b71
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x140003b71
mov r9d, dword [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x78]
mov r8d, esi
mov rdx, r14
mov qword [rsp + 0x20], rax
call fcn.1400045d4
mov ebx, eax
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret

Function at 0x140003b94
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r12
push r14
push r15
sub rsp, 0x150
xor esi, esi
cmp r8d, dword [rsp + 0x190]
mov r14, r9
setae sil
mov edi, r8d
mov rbx, rdx
mov r15d, ecx
test esi, esi
je 0x140003bde
mov r8d, dword [rsp + 0x190]
mov rcx, r9
jmp 0x140003c94
mov r12d, Ordinal_69
lea rcx, [rsp + 0x70]
lea edx, [r12 - 0xa]
mov r8d, r12d
call fcn.1400c8410
lea edx, [r12 + 0x1c]
lea rcx, [rsp + 0x30]
mov r8d, r12d
call fcn.1400c8410
test edi, edi
je 0x140003c2f
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x30]
mov r8, rdi
sub rcx, rbx
sub rdx, rbx
mov al, byte [rbx]
xor byte [rcx + rbx], al
xor byte [rdx + rbx], al
inc rbx
dec r8
jne 0x140003c1f
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x70]
mov r8d, r12d
mov ecx, r15d
mov dword [rsp + 0x20], edi
call fcn.140003914
test eax, eax
je 0x140003c99
lea r9, [rsp + 0xb0]
lea rdx, [rsp + 0x30]
mov r8d, r12d
mov ecx, r15d
add r9, rdi
mov dword [rsp + 0x20], edi
call fcn.140003914
mov esi, eax
test eax, eax
je 0x140003c99
lea ecx, [rdi + rdi]
lea rdx, [rsp + 0xb0]
cmp dword [rsp + 0x190], ecx
cmovb ecx, dword [rsp + 0x190]
mov r8d, ecx
mov rcx, r14
call fcn.1400c5d20
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r12
ret
Function at 0x140003d84
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
xor ebx, ebx
mov r14, r9
mov dword [rbp - 0x28], ecx
mov edi, r8d
mov rsi, rdx
lea rcx, [rbp - 0x38]
lea r9d, [rbx + 0x18]
xor r8d, r8d
xor edx, edx
mov qword [rbp - 0x20], rbx
mov dword [rbp - 0x18], ebx
mov qword [rbp - 0x10], rbx
mov dword [rbp - 8], ebx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140003ef5
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
mov r9d, edi
mov r8, rsi
mov edx, 0x6602
mov dword [rsp + 0x20], 0x100
call fcn.140003aac
test eax, eax
je 0x140003ee9
mov r8, qword [rbp - 0x30]
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
xor r9d, r9d
mov edx, 0x8009
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140003edf
mov rcx, qword [rbp - 0x40]
lea r8, [rbp - 0x28]
lea edx, [rbx + 5]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x140003ed5
mov r8d, dword [rbp + 0x40]
mov rcx, qword [rbp - 0x40]
xor r9d, r9d
mov rdx, r14
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140003ed5
mov rcx, qword [rbp - 0x40]
lea esi, [rbx + 2]
lea r9, [rbp + 0x20]
mov edx, esi
xor r8d, r8d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140003ed5
mov edx, dword [rbp + 0x20]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140003ed5
mov rcx, qword [rbp - 0x40]
lea r9, [rbp + 0x20]
mov r8, rax
mov edx, esi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [rbp + 0x50]
mov rdx, rdi
cmp dword [rbp + 0x20], ecx
mov ebx, eax
cmovb ecx, dword [rbp + 0x20]
mov r8d, ecx
mov rcx, qword [rbp + 0x48]
call fcn.1400c5d20
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 0x14000415c
Capabilities:
Encode data using xor
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
xor r14d, r14d
mov rdi, r9
mov ebx, r8d
mov r15, rdx
mov rsi, rcx
cmp r8d, 0x10
jbe 0x14000430f
lea r9, [rbp - 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x140004336
lea edx, [r14 + 1]
xor r9d, r9d
mov r8, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x140004303
lea edi, [rbx + 0xf]
lea r13d, [r14 + 0x10]
shr edi, 4
and ebx, 0xf
cmovne r13d, ebx
cmp edi, 2
jbe 0x14000420c
lea eax, [rdi - 2]
xor r9d, r9d
xor r8d, r8d
shl eax, 4
xor edx, edx
mov rcx, rsi
mov dword [rbp + 0x40], eax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004303
lea eax, [r13 + 0x10]
lea r12d, [rdi - 2]
lea rcx, [rbp - 0x28]
shl r12d, 4
mov r8d, eax
mov ebx, eax
add r12, r15
mov rdx, r12
call fcn.1400c5d20
mov eax, 0x10
lea rcx, [rbp - 0x28]
sub eax, r13d
add rcx, rbx
xor edx, edx
mov r8d, eax
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x38], rax
call fcn.1400c8410
mov rcx, qword [rbp - 0x40]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x28]
mov ebx, 0x10
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x40], ebx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140004303
lea rdx, [rbp - 0x28]
lea r9, [rbp - 0x18]
mov r10d, ebx
mov al, byte [r9]
inc r9
xor byte [rdx], al
inc rdx
dec r10
jne 0x14000428c
mov r8, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x30]
lea rdx, [rbp - 0x28]
mov ebx, r13d
add rdx, rbx
call fcn.1400c5d20
lea rax, [rbp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x18]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov dword [rbp + 0x40], 0x10
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r14d, eax
test eax, eax
je 0x140004303
movups xmm0, xmmword [rbp - 0x18]
shl edi, 4
lea rdx, [rbp - 0x28]
lea ecx, [rdi - 0x10]
mov r8d, ebx
add rcx, r15
movdqu xmmword [r12], xmm0
call fcn.1400c5d20
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140004336
cmp ebx, 0x10
jne 0x140004336
lea rax, [rbp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor edx, edx
mov dword [rbp + 0x40], ebx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov r14d, eax
lea r11, [rsp + 0x70]
mov eax, r14d
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x140004358
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r15d, r15d
mov rax, r9
mov ebx, r8d
lea r13d, [r15 + 0x10]
mov r14, rdx
mov rbp, rcx
cmp r8d, r13d
jbe 0x140004491
lea edx, [r15 + 1]
xor r9d, r9d
mov r8, rax
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400044c6
lea edi, [rbx + 0xf]
mov esi, r13d
shr edi, 4
and ebx, 0xf
cmovne esi, ebx
cmp edi, 2
jbe 0x1400043f8
lea eax, [rdi - 2]
xor r9d, r9d
xor r8d, r8d
shl eax, 4
xor edx, edx
mov rcx, rbp
mov dword [rsp + 0x30], eax
mov dword [rsp + 0xa0], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1400044c6
lea eax, [rsi + 0x10]
lea r12d, [rdi - 2]
lea rcx, [rsp + 0x40]
shl r12d, 4
mov r8d, eax
mov ebx, eax
add r12, r14
mov rdx, r12
call fcn.1400c5d20
mov r8d, r13d
lea rcx, [rsp + 0x40]
sub r8d, esi
xor edx, edx
add rcx, rbx
call fcn.1400c8410
mov eax, Ordinal_36
xor r9d, r9d
mov dword [rsp + 0x30], eax
mov dword [rsp + 0xa0], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r15d, eax
test eax, eax
je 0x1400044c6
movups xmm0, xmmword [rsp + 0x50]
shl edi, 4
lea rdx, [rsp + 0x40]
sub edi, r13d
mov r8d, esi
mov ecx, edi
add rcx, r14
movdqu xmmword [r12], xmm0
call fcn.1400c5d20
jmp 0x1400044c6
cmp ebx, r13d
jne 0x1400044c6
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x30], r13d
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0xa0], r13d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r15d, eax
lea r11, [rsp + 0x60]
mov eax, r15d
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1400044e8
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov dword [rax + 8], ecx
push rdi
sub rsp, 0x50
mov rbp, r9
mov edi, r8d
mov rsi, rdx
xor ebx, ebx
lea rcx, [rax - 0x10]
xor r8d, r8d
lea r9d, [rbx + 0x18]
xor edx, edx
mov dword [rax + 8], 1
mov dword [rax - 0x38], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400045bc
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
lea r9d, [rbx + 0x10]
mov r8, rbp
mov edx, 0x660e
mov dword [rsp + 0x20], ebx
call fcn.140003aac
test eax, eax
je 0x1400045af
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x60]
lea edx, [rbx + 4]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400045a4
mov r9, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x40]
mov r8d, edi
mov rdx, rsi
cmp dword [rsp + 0x90], ebx
je 0x14000459d
call fcn.140004358
jmp 0x1400045a2
call fcn.14000415c
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x140004884
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push rbx
sub rsp, 0x30
and dword [rsp + 0x48], 0
mov ebx, ecx
lea rcx, [rsp + 0x58]
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004908
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 0x1400048fb
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 0x140004914
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x40
and dword [rax + 0x10], 0
mov ebx, ecx
lea rcx, [rax - 0x18]
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rax + 0x18], 4
mov dword [rax - 0x28], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004999
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 0x14000498c
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 0x1400049a8
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x40
and dword [rax + 0x10], 0
mov ebx, ecx
lea rcx, [rax - 0x18]
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
xor edx, edx
mov dword [rax + 0x18], 4
mov dword [rax - 0x28], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140004a2d
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 0x140004a20
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