joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140007f60
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 8], rcx
push rdi
push r14
push r15
sub rsp, 0x60
mov rdi, r8
mov esi, edx
mov rbx, qword [0x1400d70a0]
mov qword [rsp + 0x48], rbx
lea rdx, str.Service_trying_to_start.
mov rcx, qword [rbx + 8]
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogInfo_wchar_t_const____ptr64____ptr64]
mov dword [rsp + 0x80], 0x428
mov dword [rbx + 0x1c], 2
xor r15d, r15d
mov dword [rbx + 0x24], r15d
mov dword [rbx + 0x30], r15d
mov ecx, dword [0x1400d2084]
lea eax, [rcx + 1]
mov dword [0x1400d2084], eax
mov dword [rbx + 0x2c], ecx
lea rdx, [rbx + 0x18]
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov rax, qword [rbx]
mov r8, rdi
mov edx, esi
mov rcx, rbx
call qword [rax + 8]
mov dword [rbx + 0x1c], 4
mov dword [rbx + 0x24], r15d
mov qword [rbx + 0x2c], r15
lea rdx, [rbx + 0x18]
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov rcx, rbx
call fcn.1400084e0
mov qword [rsp + 0x40], r15
lea r8, [rsp + 0x40]
lea rdx, str.SYSTEMCurrentControlSetControlPowerModernSleep
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x140008084
mov dword [rsp + 0x30], 4
mov dword [rsp + 0x98], 4
lea rax, [rsp + 0x98]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.EnabledActions
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
sete byte [0x1400d7098]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx r8d, byte [0x1400d7098]
lea rdx, str.System_Supports_Modern_Standby:__d
mov rcx, qword [rbx + 8]
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogInfo_wchar_t_const____ptr64____ptr64]
cmp byte [0x1400d7098], r15b
je 0x14000812d
lea rax, [0x1400087a0]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x98], r15
lea r9, [rsp + 0x98]
lea r8, [rsp + 0x50]
mov edx, 2
lea rcx, [0x14009bf10]
call qword [sym.imp.api_ms_win_power_setting_l1_1_0.dll_PowerSettingRegisterNotification]
test eax, eax
je 0x1400080fa
mov r8d, eax
lea rdx, str.PowerSettingRegisterNotification_failed:__u
mov rcx, qword [rbx + 8]
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogError_wchar_t_const____ptr64____ptr64]
lea r9, str.CE7DC567_F47B_4A07_8489_C9DEB372B88F
xor r8d, r8d
lea edx, [r8 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x1400d7090], rax
test rax, rax
jne 0x14000812d
lea rdx, str.Failed_to_create_notification_event_for_modern_Standby
mov rcx, qword [rbx + 8]
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogError_wchar_t_const____ptr64____ptr64]
mov dword [rsp + 0x80], r15d
mov eax, r15d
jmp 0x140008141
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
Function at 0x14003fba0
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov dword [rcx + 0x74], 0
mov rbx, rcx
mov edi, 0x7fffffff
mov ebp, 0xfffd
nop word [rax + rax]
movzx ecx, word [rbx + 0x78]
lea eax, [rcx - 0x30]
cmp ax, 9
ja 0x14003fc83
lea r8d, [rcx - 0x30]
cmp r8d, 0xffffffff
je 0x14003fc83
mov r9d, dword [rbx + 0x74]
mov ecx, 0x7fffffff
sub ecx, r8d
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r9d, edx
jg 0x14003fca1
lea eax, [r9 + r9*4]
dec edi
lea ecx, [r8 + rax*2]
mov rax, qword [rbx]
mov dword [rbx + 0x74], ecx
mov rcx, qword [rbx + 0x10]
cmp rax, rcx
je 0x14003fc73
cmp word [rax], 0x5c
jne 0x14003fc6c
lea rdx, [rax + 2]
cmp rdx, rcx
je 0x14003fc6c
mov r8d, dword [rbx + 0x80]
test r8b, 8
jne 0x14003fc57
movzx ecx, word [rdx]
sub cx, 0x28
cmp cx, 1
jbe 0x14003fc69
test r8b, 0x10
jne 0x14003fc6c
movzx ecx, word [rdx]
sub cx, 0x7b
test bp, cx
jne 0x14003fc6c
mov rax, rdx
add rax, 2
mov qword [rbx], rax
mov rcx, rbx
call fcn.1400387c0
test edi, edi
jne 0x14003fbd0
mov rbx, qword [rsp + 0x30]
cmp edi, 0x7fffffff
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
setne al
add rsp, 0x20
pop rdi
ret
mov edx, esi
call fcn.1400387b0
int3
Function at 0x140043e80
Capabilities:
Create directory
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x70
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rsi, r8
mov rbx, rdx
mov qword [rsp + 0x40], rdx
xor ebp, ebp
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
mov qword [rsp + 0x58], rbp
mov edx, 0x105
lea rcx, [rsp + 0x48]
call fcn.14000d9b0
nop
xor edx, edx
mov r8d, 0x20a
mov rcx, qword [rsp + 0x48]
call sub.VCRUNTIME140.dll_memset
cmp qword [rsi + 0x18], 7
jbe 0x140043ee2
mov rsi, qword [rsi]
mov r8d, 0x105
mov rdx, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140043fdc
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140043f20
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140043fb9
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov qword [rbx + 0x18], rbp
mov rdx, qword [rsp + 0x48]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140043f40
mov rcx, rbx
call fcn.1400067e0
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140043f99
mov rdx, qword [rsp + 0x58]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140043f94
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140043f94
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400688bc
mov rax, rbx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140068870
mov rbx, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.CapDataStore::expandPathAndCreateDirectory___failed_to_create_storage_directory
lea rcx, [rsp + 0x28]
call fcn.140007450
lea rdx, [0x1400c82a0]
lea rcx, [rsp + 0x28]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.CapDataStore::expandPathAndCreateDirectory___failed_to_expanded_environment_variable_pointing_to_output_directory
lea rcx, [rsp + 0x28]
call fcn.140007450
lea rdx, [0x1400c82a0]
lea rcx, [rsp + 0x28]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x140044680
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je case.default.0x1400446a1
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x1400446ce
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400446d0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140044731
test ecx, ecx
jle 0x140044709
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140044731
cmp qword [rdi + 0x80], 0
je 0x140044731
lfence
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret
invalid
jns 0x14014d438
rcl byte [rsi + rax*8], 0x1f
sbb dh, dl
xor ecx, ecx
movabs al, byte [0xb99b247ca314278d]
scasb al, byte [rdi]
push rcx
Function at 0x140044750
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov r14, r8
mov rbp, rdx
mov rsi, rcx
test r8, r8
jg 0x140044772
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140044784
lfence
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x1400447a7
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400447a9
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400447e5
mov qword [rsp + 0x20], rdi
cmp rax, r14
mov rdi, r14
mov rcx, rbp
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add rbp, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14004487e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140044820
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14004485e
nop dword [rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add rbp, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14004487e
cmp rbx, rax
ja 0x140044830
test rbx, rbx
je 0x14004487e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub r14, rbx
mov rax, r14
lfence
mov rbx, qword [rsp + 0x28]
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
xlatb
retf 0xbbf9
mov esi, 0xffdf5e41
jl 0x14014d436
cli
jbe 0x14014d3ce
Function at 0x140044ce0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140044d0d
xor eax, eax
jmp 0x140044e6d
mov rdx, qword [rcx + 0x40]
mov rax, qword [rdx]
test rax, rax
je 0x140044d38
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
add r8, rax
cmp rax, r8
jae 0x140044d38
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], dil
mov eax, edi
jmp 0x140044e6d
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140044e60
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x140044d7b
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140044da6
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140044e65
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140044e15
sub eax, 1
je 0x140044e15
cmp eax, 2
jne 0x140044e60
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140044e65
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140044e46
lfence
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140044e60
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140044e65
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140068870
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140045150
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140045226
cmp byte [rcx + 0x71], 0
je 0x140045226
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140045222
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400451e4
sub eax, 1
je 0x1400451e8
cmp eax, 2
jne 0x140045222
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140068870
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140045219
lfence
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140045222
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400451cc
xor al, al
jmp 0x1400451cc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140068870
add rsp, 0x60
pop rbx
ret
Function at 0x140062ba0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
cmp qword [0x1400d7e08], 7
lea r8, [rsp + 0x30]
mov rbx, rdx
mov rdi, rcx
lea rdx, [0x1400d7df0]
mov rcx, 0xffffffff80000002
cmova rdx, qword [0x1400d7df0]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov esi, eax
test eax, eax
jne 0x140062c31
cmp qword [rbx + 0x18], 7
mov eax, dword [rbx + 0x10]
lea ecx, [rax*2 + 2]
mov rax, rbx
jbe 0x140062bfb
mov rax, qword [rbx]
cmp qword [rdi + 0x18], 7
jbe 0x140062c05
mov rdi, qword [rdi]
mov dword [rsp + 0x28], ecx
mov r9d, 1
mov rcx, qword [rsp + 0x30]
mov r8, rdi
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rsp + 0x30]
mov esi, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rbx + 0x18]
cmp rdx, 7
jbe 0x140062c6c
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140062c67
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140062c8f
mov rcx, r8
call fcn.1400688bc
xor eax, eax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rax
mov word [rbx], ax
mov eax, esi
mov rsi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3

Function at 0x1400639a0
Capabilities:
Encrypt data using dpapi

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [rdx + 0x10]
mov rbx, rcx
test rax, rax
je 0x140063a2e
mov r10, qword [r8 + 0x10]
test r10, r10
je 0x140063a2e
add eax, eax
cmp qword [rdx + 0x18], 7
mov dword [rsp + 0x50], eax
jbe 0x1400639cb
mov rdx, qword [rdx]
cmp qword [r8 + 0x18], 7
lea eax, [r10 + r10]
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x58], rdx
jbe 0x1400639e2
mov r8, qword [r8]
mov qword [rsp + 0x30], r9
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x48], r8
xor r9d, r9d
mov dword [rsp + 0x28], 4
lea r8, [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x20], 0
call qword [sym.imp.CRYPT32.dll_CryptProtectData]
test eax, eax
je 0x140063a1e
xor eax, eax
add rsp, 0x60
pop rbx
ret
mov rcx, qword [rbx]
lea rdx, str.Problem_while_protecting_data.
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogWarning_wchar_t_const____ptr64____ptr64]
mov eax, 0x80004005
add rsp, 0x60
pop rbx
ret
Function at 0x140063a40
Capabilities:
Encrypt data using dpapi

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp qword [rdx + 8], 0
mov rsi, r9
mov r10, rdx
mov rdi, rcx
mov ebx, 0x80004005
je 0x140063b56
cmp dword [rdx], 0
jbe 0x140063b56
mov eax, dword [r8 + 0x10]
add eax, eax
cmp qword [r8 + 0x18], 7
mov dword [rsp + 0x50], eax
jbe 0x140063a93
mov r8, qword [r8]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x50]
mov dword [rsp + 0x28], 4
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x20], 0
mov rcx, r10
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
je 0x140063b46
mov r8d, dword [rsp + 0x40]
lea rcx, [rsp + 0x60]
mov rdx, qword [rsp + 0x48]
shr r8, 1
call fcn.14000d710
mov rdx, rax
mov rcx, rsi
call fcn.140009f60
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x140063b42
mov rcx, qword [rsp + 0x60]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140063b3d
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140063b3d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400688bc
xor ebx, ebx
jmp 0x140063b56
mov rcx, qword [rdi]
lea rdx, str.Problem_while_decrypting_the_data.
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogWarning_wchar_t_const____ptr64____ptr64]
mov eax, ebx
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140068870
add rsp, 0x90
pop rdi
pop rsi
pop rbx
ret
Function at 0x140064080
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push rbp
push r14
sub rsp, 0x38
mov r14, r9
mov rbp, rdx
test rdx, rdx
je 0x140064154
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x30], rdi
mov esi, r8d
mov dword [rsp + 0x58], r8d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, esi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
xor ebx, ebx
test rdi, rdi
mov eax, 0x8007000e
cmovne eax, ebx
je 0x14006413d
lfence
test rsi, rsi
je 0x1400640ea
mov r8d, esi
mov rdx, rbp
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
xor r9d, r9d
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
xor edx, edx
mov rcx, r14
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x140064128
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x140064124
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x14006413b
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
mov qword [rax], rdi
mov eax, dword [rsp + 0x58]
mov dword [rcx], eax
mov eax, ebx
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x30]
add rsp, 0x38
pop r14
pop rbp
ret
mov eax, 0x80004005
add rsp, 0x38
pop r14
pop rbp
ret

Function at 0x1400644e0
Capabilities:
Encode data using base64 via winapi

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov ebp, dword [rdx]
mov rdi, rcx
mov rcx, qword [rdx + 8]
mov r15d, r9d
mov dword [rsp + 0x58], 4
mov rsi, r8
mov r14, rdx
test rcx, rcx
je 0x1400645d0
test ebp, ebp
je 0x1400645d0
lea rax, [rsp + 0x58]
xor r9d, r9d
mov r8d, r15d
mov qword [rsp + 0x20], rax
mov edx, ebp
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
je 0x1400645c0
mov qword [rsp + 0x50], rbx
mov ebx, dword [rsp + 0x58]
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
lea rcx, [rsp + 0x58]
mov r8d, r15d
mov qword [rsp + 0x20], rcx
mov r9, rax
mov rcx, qword [r14 + 8]
mov edx, ebp
mov rbx, rax
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
je 0x1400645ac
mov ecx, dword [rsp + 0x58]
mov eax, 1
mov dword [rsi], ecx
mov qword [rsi + 8], rbx
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
mov rcx, qword [rdi]
lea rdx, str.Problem_while_encoding_to_base64.
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogInfo_wchar_t_const____ptr64____ptr64]
xor eax, eax
jmp 0x140064593
mov rcx, qword [rdi]
lea rdx, str.Problem_while_finding_the_count_of_elements_to_encode_in_base64.
call qword [sym.imp.Logging.dll_public:_void___cdecl_Hp::Bridge::Logging::TraceLogger::LogInfo_wchar_t_const____ptr64____ptr64]
xor eax, eax
jmp 0x140064598
Function at 0x140065090
Capabilities:
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
mov qword [r11 + 0x18], rdi
mov qword [r11 + 0x20], r14
push r15
sub rsp, 0x40
mov rsi, r9
mov r15d, r8d
mov rdi, rdx
xor ebx, ebx
mov qword [r11 - 0x18], rbx
mov r14, qword [rsp + 0x78]
mov qword [r14], rbx
lea rax, [r11 - 0x18]
mov qword [r11 - 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8004
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x14006511d
xor r9d, r9d
mov r8d, dword [rsp + 0x70]
mov rdx, rsi
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x14006511d
mov qword [rsp + 0x20], r14
mov esi, 1
mov r9d, esi
mov r8, qword [rsp + 0x30]
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
cmovne ebx, esi
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14006512d
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
add rsp, 0x40
pop r15
ret