joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5d2790
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x0064a734]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x5d2938
mov rax, qword [0x0064a738]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x5d27dc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x5d2867
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x5d27c0
mov rcx, r12
call fcn.005d34f0
mov rbp, rax
test rax, rax
je 0x5d2972
mov rax, qword [0x0064a738]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.005d3620
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0064a738]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x5d2981
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x5d2860
sub eax, 4
and eax, 0xfffffffb
jne 0x5d28f0
add dword [0x0064a734], 1
cmp ebx, 8
jae 0x5d2898
test bl, 4
jne 0x5d2940
test ebx, ebx
je 0x5d2889
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x5d2960
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x5d2889
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x5d28ca
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x0064a738]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x5d2860
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.005d2720
nop dword [rax]
xor edi, edi
jmp 0x5d27e7
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x5d2889
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x5d2889
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.005d2720
mov rax, qword [0x0064a738]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.005d2720
nop
nop dword [rax]
Function at 0x5d3160
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0064aa20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0064aa00]
test rbx, rbx
je 0x5d31b4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x5d31ab
test r12, r12
je 0x5d31ab
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x5d3190
lea rcx, [0x0064aa20]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x5d34f0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00635d80]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x5d3569
mov rcx, r10
call fcn.005d33c0
test eax, eax
je 0x5d3569
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x5d3566
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x5d355d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x5d3569
add r8, 0x28
cmp r8, r9
jne 0x5d3548
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret
Function at 0x180001790
Capabilities:
Get token membership

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
and dword [rbp + 0x20], 0
lea rax, [rbp + 0x28]
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x20]
and dword [rsp + 0x48], 0
mov r9d, 0x220
and dword [rsp + 0x40], 0
mov r8d, 0x20
and dword [rsp + 0x38], 0
mov dl, 2
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov word [rbp + 0x24], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rbp + 0x18], eax
test eax, eax
je 0x18000180d
mov rdx, qword [rbp + 0x28]
lea r8, [rbp + 0x18]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and dword [rbp + 0x18], ecx
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rbp + 0x18]
add rsp, 0x60
pop rbp
ret

Function at 0x180003448
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rcx, rdx
mov rdi, r8
call fcn.180003978
mov edx, 0x200
mov rcx, rdi
mov ebx, eax
call fcn.1800040dc
mov edx, ebx
mov dword [rdi + 0x18], 0x16
mov rcx, rdi
call fcn.18000406c
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ebx, eax
call fcn.180002f94
mov byte [rsp + 0x40], al
call fcn.180002f54
mov byte [rsp + 0x41], al
lea rdx, [rsp + 0x40]
xor eax, eax
mov r8d, ebx
mov rcx, rdi
mov dword [rsp + 0x42], eax
mov word [rsp + 0x46], ax
call fcn.180003f38
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x180004768
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor edx, edx
mov r14, rcx
lea ecx, [rdx + 2]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
or rdi, 0xffffffffffffffff
mov rsi, rax
cmp rax, rdi
je 0x1800048ef
mov r15d, 0x130
mov ecx, r15d
call fcn.180012b48
mov rbx, rax
test rax, rax
je 0x1800047c3
mov r8d, r15d
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
jmp 0x1800047c5
xor ebx, ebx
mov r8, r15
xor edx, edx
mov rcx, rbx
call sub.msvcrt.dll_memset
mov rdx, rbx
mov dword [rbx], r15d
mov rcx, rsi
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x1800048db
mov ebp, dword [rsp + 0x90]
lea r13, [rbx + 0x2c]
mov rcx, qword [0x18001e168]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov r8d, dword [rbx + 8]
cmp al, 6
sbb ecx, ecx
xor edx, edx
and ecx, 0xfffff400
add ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, 0x400
mov rdi, rax
call sub.msvcrt.dll_malloc
xor r12b, r12b
mov r15, rax
test rdi, rdi
je 0x18000486e
mov rdx, rdi
mov rcx, r14
call fcn.180004668
mov ecx, dword [rbx + 8]
lea rdx, [rsp + 0x90]
mov r12b, al
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov ebp, dword [rsp + 0x90]
mov r9d, 0x400
mov r8, r15
mov rdx, rdi
mov rcx, r14
call fcn.180004504
mov rcx, qword [rsp + 0x88]
test rdi, rdi
mov eax, dword [rbx + 0x20]
mov r8d, ebp
mov r9d, dword [rbx + 8]
setne dl
mov qword [rsp + 0x38], r15
mov r10, qword [rcx]
mov qword [rsp + 0x30], r13
mov byte [rsp + 0x28], r12b
mov dword [rsp + 0x20], eax
call qword [r10]
mov rcx, r15
call fcn.180008f7e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15d, 0x130
xor edx, edx
mov r8d, r15d
mov rcx, rbx
call sub.msvcrt.dll_memset
mov rdx, rbx
mov dword [rbx], r15d
mov rcx, rsi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x1800047f3
xor edi, edi
mov rdx, r15
mov rcx, rbx
call fcn.180012b40
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x80]
mov eax, edi
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x180005264
Capabilities:
Get common file path

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x18000527b
mov rdx, rcx
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
add rsp, 0x28
ret
Function at 0x180005290
Capabilities:
Enumerate files on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f8]
sub rsp, 0x6d0
mov r15b, r8b
mov rsi, rdx
mov r12, rcx
mov r13d, 0x104
mov r8d, r13d
lea rcx, [rbp + 0x2b0]
xor edx, edx
mov r14, r9
call sub.msvcrt.dll_memset
test rsi, rsi
je 0x18000522b
lea ebx, [r13 - 1]
xor edx, edx
mov r8d, ebx
lea rcx, [rbp + 0x1a1]
call sub.msvcrt.dll_memset
call fcn.180005250
lea r8, [rbp + 0x1a0]
mov byte [rbp + 0x1a0], al
mov rdx, rsi
lea rcx, [rbp + 0x2b0]
call qword [sym.imp.SHLWAPI.dll_PathCombineA]
test rax, rax
je 0x180005225
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180005225
mov r8d, ebx
lea rcx, [rbp + 0x3c1]
xor edx, edx
call sub.msvcrt.dll_memset
mov r8d, r13d
lea rcx, [rbp + 0x4c4]
xor edx, edx
call sub.msvcrt.dll_memset
call fcn.18000525c
mov byte [rbp + 0x3c0], al
call fcn.18000525c
mov byte [rbp + 0x4c4], al
call fcn.18000525c
mov r8d, r13d
mov byte [rbp + 0x4c5], al
xor edx, edx
lea rcx, [rbp + 0x90]
call sub.msvcrt.dll_memset
xor ebx, ebx
mov eax, ebx
lea rdx, [rbp + 0x3c0]
imul rcx, rax, 0x104
add rdx, rcx
lea rcx, [rsp + 0x7c]
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x180005201
inc ebx
cmp ebx, 2
jl 0x1800050df
mov r8, r13
lea rcx, [rbp + 0x90]
xor edx, edx
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x7c]
mov rdx, rsi
lea rcx, [rbp + 0x90]
call qword [sym.imp.SHLWAPI.dll_PathCombineA]
test rax, rax
je 0x180005201
mov ebx, dword [rsp + 0x50]
shr ebx, 4
and bl, 1
je 0x180005160
test r15b, r15b
je 0x180005160
mov r9, r14
lea rdx, [rbp + 0x90]
mov r8b, 1
mov rcx, r12
call 0x180004fd8
xor edx, edx
lea rcx, [rsp + 0x30]
lea r8d, [rdx + 0x10]
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x64]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
cmp eax, 1
jne 0x180005221
xor edx, edx
lea r8d, [rax + 0xf]
lea rcx, [rsp + 0x40]
call sub.msvcrt.dll_memset
lea r8, [rsp + 0x40]
xor ecx, ecx
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
cmp eax, 1
jne 0x180005221
xor edx, edx
lea r8d, [rax + 7]
lea rcx, [rbp + 0x608]
call sub.msvcrt.dll_memset
mov eax, dword [rsp + 0x70]
lea r8, [rsp + 0x7c]
mov r10, qword [r14]
mov r9b, bl
mov dword [rbp + 0x608], eax
mov rdx, rsi
mov eax, dword [rsp + 0x6c]
mov rcx, r14
mov dword [rbp + 0x60c], eax
mov rax, qword [rbp + 0x608]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [r10 + reloc.WS2_32.dll_htonl]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, 1
je 0x1800050dd
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x18000522e
call qword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0xffffffff
lea r11, [rsp + 0x6d0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov r9, r8
xor r8d, r8d
jmp 0x180004fd8
Function at 0x18000529c
Capabilities:
Create directory

Disassembly:
sub rsp, 0x28
test rcx, rcx
jne 0x1800052aa
or eax, 0xffffffff
jmp 0x1800052b8
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
dec eax
neg eax
sbb eax, eax
add rsp, 0x28
ret

Function at 0x1800052c0
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
test rcx, rcx
jne 0x1800052ce
or eax, 0xffffffff
jmp 0x1800052da
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
dec eax
neg eax
sbb eax, eax
add rsp, 0x28
ret

Function at 0x1800052e0
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
lea rcx, [rsp + 0x40]
call fcn.180004b48
nop
mov r8, rax
mov rdx, rdi
mov rcx, rbx
call fcn.18000533c
nop
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.1800052c0

Function at 0x18000531c
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
test rcx, rcx
jne 0x18000532a
or eax, 0xffffffff
jmp 0x180005336
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
dec eax
neg eax
sbb eax, eax
add rsp, 0x28
ret

Function at 0x18000533c
Capabilities:
Enumerate files on windows

Disassembly:
mov r9, r8
mov r8b, 1
jmp 0x180004fd8

Function at 0x180006770
Capabilities:
Create process on windows

Disassembly:
mov r11, rsp
sub rsp, 0x68
mov r10, qword [0x18001d218]
test r10, r10
je 0x1800067d6
cmp dword [rcx + 0x24], 0
jne 0x1800067d6
mov rax, qword [rcx + 0x18]
xor r9d, r9d
mov r8, qword [rcx]
xor edx, edx
mov qword [r11 - 0x18], rax
mov rax, qword [rcx + 0x10]
mov qword [r11 - 0x20], rax
and qword [r11 - 0x28], 0
and qword [r11 - 0x30], 0
mov eax, dword [rcx + 0x20]
mov rcx, r10
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 1
and qword [r11 - 0x48], 0
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x180006816
mov eax, 1
add rsp, 0x68
ret
mov rax, qword [rcx + 0x18]
xor r9d, r9d
mov rdx, qword [rcx]
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x40], rax
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov eax, dword [rcx + 0x20]
xor ecx, ecx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
jmp 0x1800067c8
xor eax, eax
jmp 0x1800067d1

Function at 0x180006a54
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rbp, rdx
xor r8d, r8d
xor edx, edx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebx, eax
test eax, eax
je 0x180006aa9
lea r9d, [rax + 1]
cmp r9d, edi
jae 0x180006aa9
mov r8d, edi
xor edx, edx
mov rcx, rbp
call sub.msvcrt.dll_memset
mov r8d, ebx
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x180006aab
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180006ac0
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0x20]
mov rdi, rcx
test al, 4
jne 0x180006af3
or eax, 4
mov dword [rcx + 0x20], eax
call fcn.180006770
mov rcx, qword [rdi + 0x18]
mov ebx, eax
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, ebx
jmp 0x180006af8
call fcn.180006770
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1800083ac
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
lea rbx, [rcx + 8]
mov rdi, rcx
mov rax, qword [rbx]
test rax, rax
jne 0x180008414
mov eax, dword [rcx + 4]
xor r8d, r8d
mov r9d, dword [rcx]
xor edx, edx
mov rcx, rbx
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008411
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x18000840b
mov r9d, dword [rdi]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 8
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x180008411
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [rbx]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x180008454
Capabilities:
Encrypt or decrypt via wincrypt

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 rbp
mov rbp, rsp
sub rsp, 0x50
and qword [rbp - 8], 0
mov rdi, rcx
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x10], 0x18
mov rsi, r9
mov dword [rbp - 0xc], 0xf0000000
mov r14, rdx
call fcn.1800083ac
test rax, rax
jne 0x1800084a6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x18000855e
mov r9d, dword [rdi + 8]
lea rdx, [rbp - 0x10]
mov r8, qword [rdi]
lea rcx, [rbp - 0x18]
and qword [rbp - 0x18], 0
call fcn.180008d70
test eax, eax
jne 0x180008542
mov rcx, qword [rbp - 0x18]
xor ebx, ebx
mov dword [rbp - 0x20], 1
test rcx, rcx
je 0x1800084e7
xor r9d, r9d
lea r8, [rbp - 0x20]
lea edx, [rax + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 1
jne 0x180008542
mov rcx, qword [rbp - 0x18]
xor ebx, ebx
test rcx, rcx
je 0x18000850f
mov r8, qword [rdi + 0x10]
lea edx, [rbx + 1]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 1
jne 0x180008542
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x180008542
lea rax, [rbp - 0x1c]
mov dword [rbp - 0x1c], esi
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r14
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x18]
mov ebx, eax
test rcx, rcx
je 0x18000855e
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x18], 0
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x18000856f
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rsi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
add rsp, 0x50
pop rbp
ret
Function at 0x18000858c
Capabilities:
Encrypt or decrypt via wincrypt

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, 0x60
and qword [rbp - 8], 0
mov rdi, rcx
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x10], 0x18
mov rsi, r9
mov dword [rbp - 0xc], 0xf0000000
mov r14, r8
mov r15, rdx
call fcn.1800083ac
test rax, rax
jne 0x1800085e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800086ac
mov r9d, dword [rdi + 8]
lea rdx, [rbp - 0x10]
mov r8, qword [rdi]
lea rcx, [rbp - 0x18]
and qword [rbp - 0x18], 0
call fcn.180008d70
test eax, eax
jne 0x180008690
mov rcx, qword [rbp - 0x18]
xor ebx, ebx
mov dword [rbp - 0x1c], 1
test rcx, rcx
je 0x180008626
xor r9d, r9d
lea r8, [rbp - 0x1c]
lea edx, [rax + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 1
jne 0x180008690
mov rcx, qword [rbp - 0x18]
xor ebx, ebx
test rcx, rcx
je 0x18000864e
mov r8, qword [rdi + 0x10]
lea edx, [rbx + 1]
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 1
jne 0x180008690
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x180008690
lea rax, [rbp - 0x20]
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r15
xor edx, edx
mov dword [rbp - 0x20], esi
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov rax, qword [rbp + 0x40]
mov ecx, dword [rbp - 0x20]
mov qword [rax], rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x18]
mov ebx, eax
test rcx, rcx
je 0x1800086ac
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x18], 0
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1800086bd
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x60]
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 0x1800086dc
Capabilities:
Encrypt or decrypt via wincrypt

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, 0x60
and dword [rbp - 0xc], 0
mov rsi, rcx
and qword [rbp - 8], 0
lea rcx, [rbp - 0x10]
mov ebx, 1
mov r14, r9
mov dword [rbp - 0x10], ebx
mov r15, r8
mov rdi, rdx
call fcn.1800083ac
test rax, rax
jne 0x18000872f
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
jmp 0x1800087cb
mov r9d, dword [rsi + 8]
lea rdx, [rbp - 0x10]
mov r8, qword [rsi]
lea rcx, [rbp - 0x18]
and qword [rbp - 0x18], 0
call fcn.180008e30
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1800087af
lea rax, [rbp - 0x20]
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8d, ebx
mov qword [rsp + 0x20], rdi
xor edx, edx
mov dword [rbp - 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x1800087af
mov eax, dword [rbp - 0x20]
mov rcx, qword [rbp + 0x40]
mov qword [rcx], rax
sub eax, ebx
movsxd rdx, eax
test eax, eax
jle 0x1800087b7
mov r8, rdi
mov al, byte [rdx + rdi]
mov cl, byte [r8]
mov byte [r8], al
add r8, rbx
mov rax, r8
mov byte [rdx + rdi], cl
sub rax, rdi
sub rdx, rbx
cmp rax, rdx
jl 0x180008790
jmp 0x1800087b7
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1800087cb
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [rbp - 0x18], 0
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1800087dc
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r11, [rsp + 0x60]
mov al, bl
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 0x180008954
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x50
and qword [rax - 0x18], 0
mov rbx, rcx
lea rcx, [rax - 0x20]
mov dword [rax - 0x20], 0x18
mov ebp, r9d
mov dword [rax - 0x1c], 0xf0000000
mov edi, r8d
mov rsi, rdx
call fcn.1800083ac
test rax, rax
je 0x1800089d5
lea rcx, [rsp + 0x38]
call fcn.1800083ac
mov rcx, rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
mov edx, ebp
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x1800089cf
mov rcx, qword [rbx]
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x180008a01
call qword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1800089ea
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
mov eax, dword [rsp + 0x88]
xor edx, edx
mov rcx, qword [rsp + 0x80]
mov r8d, eax
mov dword [rsp + 0x30], eax
call sub.msvcrt.dll_memset
mov r8, qword [rsp + 0x80]
lea r9, [rsp + 0x30]
mov rcx, qword [rbx]
mov edx, 2
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x1800089cf
xor ebx, ebx
jmp 0x1800089d8