joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401bc92c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor esi, esi
lea rbx, [rcx + 0x20]
mov rdi, rcx
test edx, edx
je 0x1401bc97a
cmp dword [rbx], esi
jne 0x1401bc97a
mov rcx, qword [rcx + 8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401bc965
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rdi + 8], 0xffffffffffffffff
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1401bc9cf
mov rdx, qword [rdi + 0x10]
jmp 0x1401bc9ca
mov rdx, qword [rcx + 8]
lea rax, [rdx + 1]
test rax, 0xfffffffffffffffe
je 0x1401bc9cf
cmp dword [rcx], esi
jne 0x1401bc9a5
cmp dword [rcx + 0x20], esi
jne 0x1401bc9a5
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, esi
test eax, eax
sete cl
mov dword [rdi], ecx
mov rcx, qword [rdi + 8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401bc9be
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rdi + 8], 0xffffffffffffffff
cmp dword [rbx], esi
jne 0x1401bc9cf
cmp dword [rdi], esi
jne 0x1401bc974
mov rdx, qword [rdi + 0x18]
call fcn.1401bcba8
mov rsi, qword [rsp + 0x38]
mov dword [rbx], 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1401bc9ec
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov esi, r8d
mov r14, rdx
mov rdi, rcx
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
mov r9d, dword [0x14045df10]
xor r15d, r15d
cmp dword [rdi + 0x78], r15d
mov ebp, eax
mov dword [rdi + 0x78], 1
mov ebx, r15d
mov rdx, qword [rdi + 8]
cmove r9d, eax
mov dword [0x14045df10], r9d
lea rcx, [rdx + 1]
test rcx, 0xfffffffffffffffe
jne 0x1401bca50
mov ebx, 0x80004005
jmp 0x1401bca92
mov rcx, rdx
mov qword [rsp + 0x20], r15
mov rdx, r14
lea r9, [rsp + 0x50]
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1401bca87
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1401bca49
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1401bca92
cmp dword [rsp + 0x50], esi
je 0x1401bca99
mov ebx, 0x8004e10a
mov ecx, ebx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
test ebx, ebx
jns 0x1401bcaad
mov ecx, ebx
call fcn.14007ac40
jmp 0x1401bcaf5
mov rdx, qword [rdi + 0x70]
test rdx, rdx
je 0x1401bcaf5
sub ebp, dword [0x14045df10]
mov ecx, 0x1d4c0
mov eax, ecx
mov r8d, 0x4e20
sub eax, ebp
mov r9d, 0xfffffffe
cmp ebp, ecx
sbb ecx, ecx
and ecx, eax
cmp ecx, r8d
cmovb r8d, ecx
mov rcx, qword [0x14045c768]
call qword [sym.imp.KERNEL32.dll_ChangeTimerQueueTimer]
xor ecx, ecx
call fcn.14007ace8
mov ebx, r15d
mov ecx, ebx
call fcn.14007ace8
mov rbp, qword [rsp + 0x60]
mov eax, ebx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x1401bcba8
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rcx, rdx
mov rdi, rdx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1401bcc09
mov rdx, rdi
call fcn.1401bced8
mov ebx, eax
test eax, eax
jns 0x1401bcbd6
mov ecx, eax
jmp 0x1401bcc04
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1401bcc09
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401bcbf4
mov ebx, 0x80004005
jmp 0x1401bcc02
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov ecx, ebx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1401bcca8
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
push rdi
sub rsp, 0x50
mov r10d, dword [rsp + 0x80]
xorps xmm0, xmm0
mov edi, r8d
xor ebx, ebx
mov r8, qword [rcx + 8]
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
lea rax, [r8 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401bcd35
neg r9d
mov dword [r11 - 0x18], r10d
lea rcx, [r11 - 0x28]
sbb rax, rax
lea r9, [r11 + 8]
and rax, rcx
mov rcx, r8
mov r8d, edi
mov qword [r11 - 0x38], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1401bcd28
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401bcd16
mov ebx, 0x80004005
jmp 0x1401bcd24
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov ecx, ebx
jmp 0x1401bcd3c
cmp dword [rsp + 0x60], edi
je 0x1401bcd41
mov ecx, 0x8004e109
jmp 0x1401bcd3a
mov ecx, 0x80004005
mov ebx, ecx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret

Function at 0x1401bce58
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
xor ebx, ebx
mov rdx, qword [rcx + 8]
lea rax, [rdx + 1]
test rax, 0xfffffffffffffffe
jne 0x1401bce85
mov ecx, 0x80004005
mov ebx, ecx
call fcn.14007ac40
jmp 0x1401bceba
mov rcx, rdx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x1401bceb8
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401bcea6
mov ebx, 0x80004005
jmp 0x1401bceb4
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov ecx, ebx
jmp 0x1401bce7e
mov dword [rdi], eax
mov ecx, ebx
call fcn.14007ace8
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1401bced8
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x1401bcf53
xor ebx, ebx
test rdi, rdi
je 0x1401bcf3e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1401bcf26
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401bcf16
mov ebx, 0x80004005
jmp 0x1401bcf43
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1401bcf43
test al, 1
je 0x1401bcf4a
and eax, 0xfffffffe
mov rcx, rdi
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1401bcf4a
jmp 0x1401bcf05
mov ebx, 0x80070057
mov ecx, ebx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
jmp 0x1401bcf6c
test eax, eax
jne 0x1401bcf5e
mov ebx, 0x80004005
jmp 0x1401bcf70
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jns 0x1401bcf77
mov ecx, ebx
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1401c2b40
Capabilities:
Check if file exists
Copy file
Get file attributes
Move file
Set file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
xor ebp, ebp
mov rdi, rcx
cmp dword [rcx + 0x20], ebp
jne 0x1401c2b65
mov ebx, ebp
jmp 0x1401c2cbf
lea rdx, [rsp + 0x30]
call fcn.1401bcf94
mov ebx, eax
test eax, eax
jns 0x1401c2b7c
mov esi, eax
jmp 0x1401c2ca2
mov rdx, qword [rdi + 8]
lea rax, [rdx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401c2bd6
cmp dword [rdi], ebp
jne 0x1401c2ba5
cmp dword [rdi + 0x20], ebp
jne 0x1401c2ba5
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, ebp
test eax, eax
sete cl
mov dword [rdi], ecx
mov rcx, qword [rdi + 8]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401c2bbe
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rdi + 8], 0xffffffffffffffff
cmp dword [rdi + 0x20], ebp
jne 0x1401c2bd6
cmp dword [rdi], ebp
je 0x1401c2bcd
mov rdx, qword [rdi + 0x10]
jmp 0x1401c2bd1
mov rdx, qword [rdi + 0x18]
call fcn.1401bcba8
mov dword [rdi + 0x20], 1
mov rdx, qword [rdi + 0x18]
call fcn.1401bcba8
mov rdx, qword [rdi + 0x18]
xor r8d, r8d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1401c2c21
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401c2c0c
mov ebx, 0x80004005
jmp 0x1401c2c1a
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov esi, ebx
jmp 0x1401c2ca2
mov rdx, qword [rdi + 0x10]
xor r8d, r8d
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1401c2bfb
mov rbx, qword [rdi + 0x10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1401c2c57
bts eax, 0xd
mov rcx, rbx
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov r9, qword [rdi + 0x10]
mov edx, 0xc0000000
mov r8d, 4
mov rcx, rdi
call fcn.1401c3cd0
mov ebx, eax
mov esi, eax
test eax, eax
jns 0x1401c2c7d
mov ecx, eax
call fcn.14007ac40
mov ecx, ebx
call fcn.14007ace8
test ebx, ebx
js 0x1401c2ca2
mov edx, dword [rsp + 0x30]
xor r8d, r8d
mov rcx, rdi
mov dword [rdi + 0x20], ebp
call fcn.1401bcd5c
mov ebx, eax
mov esi, eax
test eax, eax
jns 0x1401c2cbf
mov ecx, esi
call fcn.14007ac40
test ebx, ebx
jns 0x1401c2cbf
xor r9d, r9d
mov r8d, ebx
mov rcx, rdi
lea edx, [r9 + 3]
call fcn.1401bcc24
mov ecx, ebx
call fcn.14007ace8
mov rbp, qword [rsp + 0x40]
mov eax, ebx
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x1403007e4
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140451b38]
xor rax, rsp
mov qword [rsp + 0x18], rax
mov rax, qword [rcx + 0x148]
xor r9d, r9d
shr rcx, 4
mov r8d, r9d
mov qword [rsp], rcx
mov ecx, r9d
mov rdx, qword [rax + 8]
movups xmm0, xmmword [rdx - 0x10]
movdqu xmmword [rsp + 8], xmm0
movzx eax, byte [rsp + rcx + 8]
inc rcx
add eax, r8d
imul r8d, eax, 0x401
mov eax, r8d
shr eax, 6
xor r8d, eax
cmp rcx, 0x10
jb 0x14030081d
movzx eax, byte [rsp + r9]
inc r9
add eax, r8d
imul r8d, eax, 0x401
mov eax, r8d
shr eax, 6
xor r8d, eax
cmp r9, 8
jb 0x14030083e
lea eax, [r8 + r8*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
mov eax, 0x6fd91d85
imul r8d, ecx, 0x8001
mul r8d
shr edx, 0x12
imul ecx, edx, 0x927c0
sub r8d, ecx
lea eax, [r8 + 0x927c0]
mov rcx, qword [rsp + 0x18]
xor rcx, rsp
call fcn.140388a50
add rsp, 0x28
ret
Function at 0x140305f20
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov r14, qword [rbp + 0x77]
mov r12, r9
and qword [rbp - 0x21], 0
mov r15d, r8d
and dword [rbp + 0x67], 0
mov rdi, rdx
and dword [rbp - 0x39], 0
mov rsi, rcx
cmp dword [r14], r8d
jae 0x140305f6a
mov edi, 0x80049e19
jmp 0x1403060e0
mov rax, qword [rdx]
and qword [rbp - 0x31], 0
and qword [rbp - 0x29], 0
and qword [rbp - 0x19], 0
mov rbx, qword [rax]
mov rax, qword [0x1403d25b8]
mov rcx, rbx
call rax
mov rax, rbx
lea r8, [rbp - 0x29]
lea rdx, [0x140424f00]
mov rcx, rdi
call rax
test eax, eax
je 0x140305fac
mov edi, 0x80049e2f
jmp 0x14030603a
mov rdi, qword [rbp - 0x29]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x30]
mov rax, qword [0x1403d25b8]
mov rcx, rbx
call rax
mov rax, rbx
lea rdx, [rbp - 0x31]
mov rcx, rdi
call rax
mov edi, eax
test eax, eax
js 0x14030603a
mov rdx, qword [rbp - 0x31]
lea r8, [rbp - 0x19]
mov rcx, rsi
call fcn.14030569c
mov edi, eax
test eax, eax
js 0x14030603a
lea rax, [0x14000fadc]
mov qword [rbp - 0x11], 3
mov qword [rbp - 9], rax
lea rdx, [rbp - 0x11]
lea rax, [rbp + 0x77]
mov qword [rbp + 7], rsi
mov qword [rbp - 1], rax
xor r9d, r9d
mov rax, qword [rbp - 0x29]
mov ecx, 0xb9
mov qword [rbp + 0xf], rax
mov rax, qword [rbp - 0x19]
mov qword [rbp + 0x17], rax
lea r8d, [r9 + 0x38]
lea rax, [rbp - 0x21]
mov qword [rbp + 0x1f], rax
call sub.ntdll.dll_NtQuerySystemInformation
mov edi, dword [rbp + 0x77]
mov rsi, qword [rbp - 0x31]
test rsi, rsi
je 0x140306063
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rax, qword [0x1403d25b8]
mov rcx, rbx
call rax
mov rax, rbx
mov rcx, rsi
call rax
and qword [rbp - 0x31], 0
mov rsi, qword [rbp - 0x29]
test rsi, rsi
je 0x140306087
mov rax, qword [rsi]
mov rbx, qword [rax + 0x10]
mov rax, qword [0x1403d25b8]
mov rcx, rbx
call rax
mov rax, rbx
mov rcx, rsi
call rax
test edi, edi
js 0x1403060e0
mov eax, dword [r14]
mov r8d, r15d
mov r9, qword [rbp + 0x7f]
mov rdx, r12
mov rcx, qword [rbp - 0x21]
mov dword [rbp + 0x67], eax
lea rax, [rbp + 0x67]
mov qword [rsp + 0x28], rax
call fcn.1401701dc
mov edi, eax
test eax, eax
js 0x1403060e0
mov eax, dword [r14]
lea r9, [rbp - 0x39]
mov r8d, dword [rbp + 0x67]
sub eax, r8d
mov rdx, qword [rbp + 0x7f]
mov rcx, qword [rbp - 0x21]
mov dword [rbp - 0x39], eax
call fcn.140170570
mov edi, eax
test eax, eax
js 0x1403060e0
mov ecx, dword [rbp + 0x67]
add ecx, dword [rbp - 0x39]
mov dword [r14], ecx
mov rcx, qword [rbp - 0x21]
call fcn.14016f54c
lea r11, [rsp + 0x90]
mov eax, edi
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140386018
Capabilities:
Create new key via cryptacquirecontext

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 rsi, r8
mov ebp, edx
mov rdi, rcx
test r8, r8
je 0x1403861b3
cmp edx, 0x14
jbe 0x1403861b3
mov rbx, qword [rcx + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x20], 0
mov rbx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x10], 0
lea r15, [rdi + 0x30]
mov rcx, qword [r15]
and dword [rdi + 0x18], 0
test rcx, rcx
je 0x14038609e
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
and qword [r15], 0
mov ecx, dword [rsi + 0xc]
shr ecx, 3
mov dword [rdi + 0x28], ecx
mov eax, dword [rsi + 0x10]
mov dword [rdi + 0x2c], eax
mov eax, ecx
shr eax, 1
add eax, 4
lea eax, [rax + rax*4]
lea ecx, [rax + rcx*2]
cmp ebp, ecx
jne 0x1403861b3
mov rbx, qword [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
and qword [rdi + 0x20], 0
mov ebx, dword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rdi + 0x20], rax
test rax, rax
jne 0x140386109
mov ebx, 0x8007000e
jmp 0x1403861b8
mov r8d, dword [rdi + 0x28]
lea rdx, [rsi + 0x14]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov r8d, 4
lea rdx, [rdi + 0x2c]
call fcn.140387028
mov ebx, eax
test eax, eax
jne 0x1403861b8
mov r8d, dword [rdi + 0x28]
mov rdx, qword [rdi + 0x20]
call fcn.140387028
mov ebx, eax
test eax, eax
jne 0x1403861b8
lea r14, [rdi + 0x38]
cmp qword [r14], 0
jne 0x140386187
lea r9d, [rax + 0x18]
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140386187
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1403861b8
mov rcx, qword [r14]
xor r9d, r9d
mov qword [rsp + 0x28], r15
mov r8d, ebp
mov rdx, rsi
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140386171
mov dword [rdi + 0xc], 4
jmp 0x1403861b8
mov ebx, 0x80070057
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x140387574
Capabilities:
Encrypt or decrypt via wincrypt
Generate random numbers via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov r12, r9
mov dword [rax + 0x10], r15d
mov ebp, r8d
mov rsi, rdx
mov rbx, rcx
mov edi, r15d
test rdx, rdx
je 0x14038778f
test r9, r9
je 0x14038778f
mov r14, qword [rsp + 0xa0]
test r14, r14
je 0x14038778f
cmp qword [rcx + 0x30], r15
jne 0x1403875d7
mov ebx, 0x80049e51
jmp 0x140387794
mov r13d, dword [r14]
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rsi
mov dword [r14], r15d
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387603
cmp dword [rbx + 0xc], 1
lea esi, [rax + 0x10]
je 0x14038763f
mov ebx, 0x80049e2e
jmp 0x140387794
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x14038761f
cmp dword [rbx + 0xc], 2
lea esi, [rax + 0x18]
jmp 0x1403875f7
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rsi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387788
cmp dword [rbx + 0xc], 3
lea esi, [rax + 0x20]
jmp 0x1403875f7
mov rcx, qword [rbx + 0x30]
lea r15d, [rsi + rbp]
xor r9d, r9d
mov dword [rsp + 0x30], r15d
lea rax, [rsp + 0x88]
mov dword [rsp + 0x88], r15d
mov qword [rsp + 0x28], rax
xor edx, edx
and qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x140387692
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140387794
mov ebp, dword [rsp + 0x88]
mov dword [r14], ebp
mov r14, qword [rsp + 0xa8]
test r14, r14
je 0x140387784
cmp r13d, ebp
jae 0x1403876bc
mov ebx, 0x80049e19
jmp 0x140387794
mov dword [rsp + 0x88], r15d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x1403876ea
mov ebx, 0x8007000e
jmp 0x140387794
mov r8, rbp
xor edx, edx
mov rcx, rdi
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x90]
mov rdx, r12
mov ecx, esi
add rcx, rdi
call sub.msvcrt.dll_memcpy
mov r15d, 2
mov r8d, esi
mov r9d, r15d
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
je 0x140387740
mov r9d, r15d
mov r8d, esi
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov ebx, eax
bts ebx, 0x1c
jmp 0x140387794
mov rcx, qword [rbx + 0x30]
lea rax, [rsp + 0x88]
xor r9d, r9d
mov dword [rsp + 0x30], ebp
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x140387679
mov r8d, dword [rsp + 0x88]
mov rdx, rdi
mov rcx, r14
call sub.msvcrt.dll_memcpy
xor ebx, ebx
jmp 0x140387794
mov ebx, 0x80049e5b
jmp 0x140387794
mov ebx, 0x80070057
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1403877cc
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor edi, edi
mov r12d, r8d
mov dword [rax + 0x10], edi
mov r15, r9
mov rbp, rdx
mov rsi, rcx
mov ebx, edi
test rdx, rdx
je 0x14038793c
test r9, r9
je 0x14038793c
mov r14, qword [rsp + 0x80]
test r14, r14
je 0x14038793c
cmp qword [rcx + 0x30], rdi
jne 0x14038782e
mov edi, 0x80049e51
jmp 0x140387941
mov r13d, dword [r14]
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes128_cbc
mov rcx, rbp
mov dword [r14], edi
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387857
cmp dword [rsi + 0xc], 1
je 0x14038788d
mov edi, 0x80049e2e
jmp 0x140387941
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes192_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387870
cmp dword [rsi + 0xc], 2
jmp 0x14038784b
lea rdx, str.http:__www.w3.org_2001_04_xmlencaes256_cbc
mov rcx, rbp
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140387935
cmp dword [rsi + 0xc], 3
jmp 0x14038784b
mov dword [rsp + 0x68], r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1403878b8
mov edi, 0x8007000e
jmp 0x140387941
mov r8d, dword [rsp + 0x68]
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsi + 0x30]
lea rax, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rbx
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x140387904
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x140387941
mov eax, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x88]
add eax, 0xfffffff0
mov dword [r14], eax
test rcx, rcx
je 0x140387941
cmp r13d, eax
jae 0x140387927
mov edi, 0x80049e19
jmp 0x140387941
mov r8d, eax
lea rdx, [rbx + 0x10]
call sub.msvcrt.dll_memcpy
jmp 0x140387941
mov edi, 0x80049e5b
jmp 0x140387941
mov edi, 0x80070057
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x60]
mov eax, edi
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140388f8c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x18
xor edx, edx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140388fd8
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140388fd0
cmp dword [rcx + 0x3c], edx
jl 0x140388fd0
cmp dword [rcx + 0x3c], 0x10000000
jae 0x140388fd0
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
mov qword [rsp], rax
cmp dword [rax], 0x4550
cmovne rax, rdx
mov rdx, rax
mov qword [rsp], rax
jmp 0x140388fd8
mov rax, rdx
add rsp, 0x18
ret

Function at 0x140389100
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140389128
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140389128
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret