joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000868c
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov dword [rbp - 4], 0xffffffff
mov edx, 0x30
mov ecx, 1
call sub.msvcrt.dll_calloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x1400086e9
mov edx, 0x30
mov rcx, qword [rbp + 0x20]
call fcn.14000cce0
jmp 0x1400088a3
mov rax, qword [rbp - 0x20]
mov dword [rax + 0x10], 0
mov rax, qword [rbp + 0x28]
mov r8d, 0
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.140008e21
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x14000889c
mov rax, qword [rbp - 0x10]
mov edx, 0x8000
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 0xffffffff
je 0x14000889f
lea rdx, [rbp - 0x60]
mov eax, dword [rbp - 4]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__fstat64]
call rax
cmp eax, 0xffffffff
jne 0x140008777
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov rdx, qword [rbp - 0x10]
mov r9, rdx
lea r8, [0x1400fbe17]
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x1400088a3
mov rax, qword [rbp - 0x48]
cmp rax, 7
jle 0x14000878f
mov rbx, qword [rbp - 0x48]
call fcn.14000276b
cmp rbx, rax
jle 0x1400087cf
mov rax, qword [rbp - 0x48]
cmp rax, 7
jg 0x1400087a2
lea rax, str.small
jmp 0x1400087a9
lea rax, str.large
mov rdx, qword [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9, rdx
lea r8, str.file___s_is_too__s
mov edx, 0
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x1400088a3
mov rax, qword [rbp - 0x48]
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x20]
mov dword [rax + 0x10], 1
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov rcx, rax
call sub.msvcrt.dll_malloc
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov qword [rax], rdx
mov rax, qword [rbp - 0x20]
mov rax, qword [rax]
test rax, rax
jne 0x140008825
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.14000cce0
jmp 0x1400088a3
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
mov ecx, eax
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax]
mov eax, dword [rbp - 4]
mov r8d, ecx
mov ecx, eax
call sub.msvcrt.dll__read_1
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
cmp rdx, rax
je 0x14000885e
mov rcx, qword [rbp + 0x20]
call fcn.14000cd4b
jmp 0x1400088a3
mov eax, dword [rbp - 4]
mov ecx, eax
call sub.msvcrt.dll__close
mov dword [rbp - 4], 0xffffffff
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.1400088d9
test eax, eax
jne 0x1400088a2
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp - 0x20]
jmp 0x1400088cf
nop
jmp 0x1400088a3
nop
jmp 0x1400088a3
nop
cmp dword [rbp - 4], 0xffffffff
je 0x1400088b3
mov eax, dword [rbp - 4]
mov ecx, eax
call sub.msvcrt.dll__close
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.140002f0c
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sub.msvcrt.dll_free
mov rax, qword [rbp - 0x18]
add rsp, 0x98
pop rbx
pop rbp
ret
Function at 0x140022fa0
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov rax, qword [rbp + 0x28]
mov r8d, 0
mov rdx, rax
mov ecx, dword [rbp + 0x10]
call fcn.140036f00
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0xffffffffffffffff
jne 0x140022fe0
mov rax, 0xffffffffffffffff
jmp 0x140023036
mov rax, qword [rbp + 0x20]
mov edx, eax
mov rax, qword [rbp + 0x18]
mov r8d, edx
mov rdx, rax
mov ecx, dword [rbp + 0x10]
call sub.msvcrt.dll__read_1
cdqe
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x14002300e
mov rax, 0xffffffffffffffff
jmp 0x140023036
mov rax, qword [rbp - 8]
mov r8d, 0
mov rdx, rax
mov ecx, dword [rbp + 0x10]
call fcn.140036f00
cmp rax, 0xffffffffffffffff
jne 0x140023032
mov rax, 0xffffffffffffffff
jmp 0x140023036
mov rax, qword [rbp - 0x10]
add rsp, 0x30
pop rbp
ret
Function at 0x140031730
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140031842
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14003181a
add rax, 1
cmp rax, 0x6b
je 0x140031837
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x140031810
cmp edx, 0x6a
je 0x140031837
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14003182b

Function at 0x140031be0
Capabilities:
Allocate thread local storage

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
lea rsi, [0x140224220]
mov rcx, rsi
call fcn.1400314a0
lea r13, [rax + 8]
mov r12, rax
mov rcx, r13
call fcn.140030000
mov ebx, dword [0x140224220]
test ebx, ebx
jne 0x140031c50
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400f3e78], eax
cmp eax, 0xffffffff
je 0x1400cb786
mov dword [0x140224220], 1
mov rcx, r13
call fcn.140030320
test r12, r12
je 0x140031c82
mov rcx, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
jmp fcn.140031860
cmp ebx, 1
je 0x140031c31
mov ecx, 2
call qword [fcn.140043590]
mov r9d, ebx
mov r8, rsi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov rcx, r13
call fcn.140030320
test r12, r12
jne 0x140031c3e
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
call sub.msvcrt.dll_abort
nop
Function at 0x140034bb0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140043590
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.140043590
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x140034c20
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14022cf54]
mov r12, rcx
test ebx, ebx
jle 0x140034d50
mov rax, qword [0x14022cf58]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140034c6b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140034cf5
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140034c50
mov rcx, r12
call fcn.1400356a0
mov rsi, rax
test rax, rax
je 0x140034d72
mov rax, qword [0x14022cf58]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.1400357d0
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14022cf58]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140034d57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140034cee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140034d00
add dword [0x14022cf54], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x14022cf58]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140034cee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140034bb0
nop dword [rax]
xor ebx, ebx
jmp 0x140034c78
mov rax, qword [0x14022cf58]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140034bb0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140034bb0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400352f0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x14022cfc0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14022cfa0]
test rbx, rbx
je 0x14003534c
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140035343
test r12, r12
je 0x140035343
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140035328
mov rcx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400356a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14021b2e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400356c0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400356c8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400356c0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140035715
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14003570c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400356c0
add rax, 0x28
cmp rax, r9
jne 0x1400356f8
xor eax, eax
ret

Function at 0x140035720
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14021b2e0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140035740
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140035748
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x140035740
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x1400357d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14021b2e0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x1400357f0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x1400357f8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140035fc0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x130
mov r12, rcx
call sub.msvcrt.dll__errno
mov dword [rax], 0
test r12, r12
je 0x140036178
cmp byte [r12], 0
je 0x140036150
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140036190
test al, 0x10
je 0x140036150
lea rsi, [rsp + 0x20]
mov rdx, r12
mov r8d, 0x104
mov rcx, rsi
call sub.msvcrt.dll__fullpath
mov rcx, rsi
call sub.msvcrt.dll_strlen
lea rcx, [rax + 0x24b]
mov rbx, rax
mov rbp, rax
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x1400361bf
lea rdx, [rax + 0x244]
lea rax, [rbx + 1]
cmp eax, 8
jb 0x140036118
mov rcx, qword [rsp + 0x20]
lea rdi, [r12 + 0x24c]
and rdi, 0xfffffffffffffff8
mov qword [r12 + 0x244], rcx
mov ecx, eax
mov r8, qword [rsi + rcx - 8]
mov qword [rdx + rcx - 8], r8
mov rcx, rdx
sub rcx, rdi
sub rsi, rcx
add ecx, eax
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
cmp byte [r12 + 0x244], 0
je 0x1400360b8
movzx ecx, byte [r12 + rbx + 0x243]
cmp cl, 0x5c
je 0x1400360b8
cmp cl, 0x2f
jne 0x140036160
nop dword [rax]
mov eax, 0x2a
mov ecx, 0x20
mov word [rdx + rbp], ax
lea rdx, [r12 + 0x130]
xor eax, eax
mov qword [r12 + 0x238], 0xffffffffffffffff
mov rdi, rdx
mov dword [r12 + 0x240], 0
mov qword [r12 + 0x128], 0
rep stosq qword [rdi], rax
mov dword [rdi], 0
mov rax, r12
add rsp, 0x130
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
test al, 4
jne 0x1400361a8
test eax, eax
je 0x14003608f
movzx ecx, byte [rsp + 0x20]
mov byte [rdx], cl
test al, 2
je 0x14003608f
mov ecx, eax
movzx r8d, word [rsi + rcx - 2]
mov word [rdx + rcx - 2], r8w
jmp 0x14003608f
call sub.msvcrt.dll__errno
xor r12d, r12d
mov dword [rax], 0x14
jmp 0x140036100
mov ecx, 0x5c
mov rbp, rax
mov word [rdx + rbx], cx
jmp 0x1400360b8
call sub.msvcrt.dll__errno
mov dword [rax], 0xe
jmp 0x140036100
call sub.msvcrt.dll__errno
xor r12d, r12d
mov dword [rax], 2
jmp 0x140036100
mov ecx, dword [rsp + 0x20]
mov dword [rdx], ecx
mov ecx, eax
mov r8d, dword [rsi + rcx - 4]
mov dword [rdx + rcx - 4], r8d
jmp 0x14003608f
call sub.msvcrt.dll__errno
mov dword [rax], 0xc
jmp 0x140036100
Function at 0x14004fe80
Capabilities:
Encode data using xor

Disassembly:
push r15
mov r10, rdx
mov r11, rcx
xor edx, edx
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rbx, r8
mov qword [r8], 0
mov qword [r8 + 8], 0
mov qword [r8 + 0x10], 0
mov qword [r8 + 0x18], 0
mov r8d, 0xc004
nop dword [rax]
mov eax, dword [r11 + rdx*4]
mov edi, dword [r10 + rdx*4 + 0xc00]
lea esi, [rax*8]
mov eax, dword [r10 + rdx*4]
lea eax, [rdi + rax*2]
imul eax, eax, 0x3001
sub esi, eax
mov eax, dword [r11 + rdx*4 + 0x400]
mov ebp, esi
mov r12d, esi
lea ecx, [rax*8]
mov eax, dword [r10 + rdx*4 + 0x400]
sar ebp, 0x1f
xor r12d, ebp
lea eax, [rdi + rax*2]
sub r12d, ebp
and ebp, 0xfffffff0
imul eax, eax, 0x3001
xor ebp, 0xfffe7ff8
sub ecx, eax
mov eax, dword [r11 + rdx*4 + 0x800]
lea r9d, [rax*8]
mov eax, dword [r10 + rdx*4 + 0x800]
lea eax, [rdi + rax*2]
imul eax, eax, 0x3001
imul edi, edi, 0x3001
sub r9d, eax
mov eax, dword [r11 + rdx*4 + 0xc00]
shl eax, 3
sub eax, edi
mov edi, r8d
sub edi, r12d
mov r12d, ecx
mov r15d, eax
sar edi, 0x1f
and edi, ebp
mov ebp, ecx
sar ebp, 0x1f
add edi, esi
mov esi, r8d
xor r12d, ebp
mov r14d, edi
sub r12d, ebp
and ebp, 0xfffffff0
sar r14d, 0x1f
sub esi, r12d
xor ebp, 0xfffe7ff8
mov r12d, r9d
sar esi, 0x1f
and esi, ebp
mov ebp, r9d
sar ebp, 0x1f
add esi, ecx
mov ecx, r8d
xor r12d, ebp
mov r13d, esi
sub r12d, ebp
sar r13d, 0x1f
sub ecx, r12d
and ebp, 0xfffffff0
xor edi, r14d
xor esi, r13d
xor ebp, 0xfffe7ff8
sar ecx, 0x1f
and ecx, ebp
mov ebp, r8d
add ecx, r9d
mov r9d, eax
sar r9d, 0x1f
mov r12d, ecx
xor r15d, r9d
sar r12d, 0x1f
sub r15d, r9d
and r9d, 0xfffffff0
xor ecx, r12d
sub ebp, r15d
xor r9d, 0xfffe7ff8
sar ebp, 0x1f
and ebp, r9d
mov r9d, edx
add ebp, eax
shr r9d, 3
mov r15d, ebp
sar r15d, 0x1f
lea eax, [r14 + r15 + 0x18008]
xor ebp, r15d
add eax, r13d
add eax, r12d
sub eax, ebp
sub eax, edi
sub eax, esi
sub eax, ecx
mov ecx, edx
shr eax, 0x1f
and ecx, 7
xor eax, 1
shl eax, cl
or byte [rbx + r9], al
add rdx, 1
cmp rdx, 0x100
jne 0x14004fec0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400552d0
Capabilities:
Encode data using xor

Disassembly:
push r13
push r12
push rbp
mov rbp, r8
push rdi
push rsi
mov rsi, rcx
push rbx
mov ebx, edx
sub rsp, 0x28
mov edi, dword [r8 + 4]
lea rcx, [rdi + rdi]
mov r13, rdi
call sub.msvcrt.dll_malloc
xor edx, edx
mov r10, rax
test edi, edi
je 0x14005531f
nop dword [rax]
mov rax, qword [rsi + rdx*8]
mov rcx, rax
sar rcx, 0x3f
xor rax, rcx
sub rax, rcx
mov word [r10 + rdx*2], ax
add rdx, 1
cmp rdi, rdx
jne 0x140055300
mov ebp, dword [rbp + 0x38]
xor edi, edi
xor r11d, r11d
lea r12, [r10 + 4]
test ebp, ebp
je 0x1400553d0
nop dword [rax + rax]
mov esi, r13d
sub esi, 1
je 0x1400553c8
lea edx, [r13 - 2]
movzx ecx, word [r10]
lea rax, [r10 + 2]
lea r9, [r12 + rdx*2]
nop dword [rax]
movsx edx, word [rax]
movsx r13d, cx
add rax, 2
mov r8d, edx
sub edx, r13d
mov r13d, r8d
sar edx, 0xf
xor r13d, ecx
and edx, r13d
xor ecx, edx
mov r13d, ecx
mov ecx, r8d
xor ecx, edx
mov word [rax - 4], r13w
mov word [rax - 2], cx
cmp rax, r9
jne 0x140055358
mov eax, esi
mov r13d, esi
lea rax, [r10 + rax*2]
movsx eax, word [rax]
add r11d, 1
add edi, eax
cmp r11d, ebp
jne 0x140055338
xor r12d, r12d
cmp edi, ebx
seta r12b
mov rcx, r10
call sub.msvcrt.dll_free
add rsp, 0x28
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rax, r10
xor r13d, r13d
jmp 0x140055396
xor r12d, r12d
jmp 0x1400553ad
Function at 0x14005a7c0
Capabilities:
Encode data using xor

Disassembly:
push rbx
mov rbx, rcx
sub rsp, 0x30
call fcn.14005afd0
test rax, rax
je 0x14005a7e0
add rsp, 0x30
mov rcx, rax
pop rbx
jmp fcn.14005a360
lea rax, str.Cant_find___s__certificate_to_delete_it
mov qword [rsp + 0x28], rbx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov r9d, 5
lea r8, str.dap_cert
call fcn.140052d40
add rsp, 0x30
pop rbx
ret

Function at 0x14005ad70
Capabilities:
Read file on windows

Disassembly:
push r14
lea rdx, [0x1401007e0]
push r13
xor r13d, r13d
push r12
sub rsp, 0x30
call sub.msvcrt.dll_fopen
test rax, rax
je 0x14005adff
mov r12, rax
mov r8d, 2
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_fseek
mov rcx, r12
xor r14d, r14d
call sub.msvcrt.dll_ftell
mov rcx, r12
movsxd r13, eax
call sub.msvcrt.dll_rewind
test r13, r13
jne 0x14005ae10
mov r9, r12
mov r8, r13
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fread
cmp rax, r13
jne 0x14005ae20
mov rdx, r13
mov rcx, r14
call fcn.14005b870
mov r13, rax
test rax, rax
je 0x14005adef
mov rcx, rax
call fcn.1400596f0
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_fclose
add rsp, 0x30
mov rax, r13
pop r12
pop r13
pop r14
ret
mov rcx, r13
call sub.msvcrt.dll_malloc
mov r14, rax
jmp 0x14005adbc
lea rax, str.Cant_read__llu_bytes_from_the_disk_
mov qword [rsp + 0x28], r13
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov r9d, 7
lea r8, str.dap_cert_file
xor r13d, r13d
call fcn.140052d40
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x14005adf7
Function at 0x14005ae60
Capabilities:
Write file on windows

Disassembly:
push r14
mov r14, rcx
mov rcx, rdx
push r13
mov r13, rdx
push r12
sub rsp, 0x50
call fcn.140067220
mov r12, rax
mov rcx, rax
call fcn.140066830
mov rcx, r12
call sub.msvcrt.dll_free
lea rdx, [0x1401005cc]
mov rcx, r13
call sub.msvcrt.dll_fopen
test rax, rax
je 0x14005af8a
lea rdx, [rsp + 0x4c]
mov rcx, r14
mov dword [rsp + 0x4c], 0
mov r12, rax
call fcn.14005bb10
mov r13, rax
test rax, rax
je 0x14005af50
mov r8d, dword [rsp + 0x4c]
mov rcx, rax
mov r9, r12
mov edx, 1
call sub.msvcrt.dll_fwrite
mov ecx, dword [rsp + 0x4c]
cmp rcx, rax
je 0x14005af30
mov qword [rsp + 0x30], rax
lea rax, str.Cant_write__u_bytes_on_disk__processed_only__zu__
mov r9d, 7
xor edx, edx
mov dword [rsp + 0x28], ecx
lea r8, str.dap_cert_file
xor ecx, ecx
mov qword [rsp + 0x20], rax
call fcn.140052d40
mov rcx, r12
call sub.msvcrt.dll_fclose
mov eax, 0xfffffffd
add rsp, 0x50
pop r12
pop r13
pop r14
ret
mov rcx, r12
call sub.msvcrt.dll_fclose
mov rcx, r13
call sub.msvcrt.dll_free
add rsp, 0x50
xor eax, eax
pop r12
pop r13
pop r14
ret
lea rax, str.Cant_serialize_certificate_in_memory
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.dap_cert_file
call fcn.140052d40
mov rcx, r12
call sub.msvcrt.dll_fclose
add rsp, 0x50
mov eax, 0xfffffffc
pop r12
pop r13
pop r14
ret
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov qword [rsp + 0x28], r13
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x30], rax
lea rax, str.Cant_open_file__s_for_write:__s
mov r9d, 7
lea r8, str.dap_cert_file
mov qword [rsp + 0x20], rax
call fcn.140052d40
mov eax, 0xfffffffe
jmp 0x14005af1d
Function at 0x14005f960
Capabilities:
Check if file exists
Get file attributes

Disassembly:
test rcx, rcx
je 0x14005f990
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14005f980
shr eax, 4
add rsp, 0x28
and eax, 1
ret
xor eax, eax
add rsp, 0x28
ret
xor eax, eax
ret

Function at 0x140061800
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rax, r8
mov rbp, rsp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
and rsp, 0xfffffffffffffff0
sub rsp, 0x160
and eax, 0xf
mov qword [rbp + 0x28], r9
mov qword [rsp + 0x48], rax
jne 0x140061934
mov r12, r8
cmp r8, qword [rbp + 0x30]
ja 0x140061910
mov rdi, rdx
mov rdx, qword [rcx + 8]
lea r13, [rsp + 0x50]
mov rax, qword [rcx + 0x98]
lea r15, [rsp + 0x70]
mov rcx, r13
movdqu xmm0, xmmword [rdx]
mov rsi, qword [rax]
mov r14, qword [rax + 8]
movaps xmmword [rsp + 0x50], xmm0
movdqu xmm1, xmmword [rdx + 0x10]
mov edx, 8
movaps xmmword [rsp + 0x60], xmm1
call fcn.1400b26f0
mov rcx, r13
mov rdx, r15
mov r13, r12
call fcn.14004b610
shr r13, 4
je 0x1400618da
mov rbx, qword [rbp + 0x28]
shl r13, 4
add r13, rbx
nop word [rax + rax]
mov rdx, rbx
mov rcx, rdi
mov r8, r15
add rdi, 0x10
call fcn.140043fa0
mov rax, r14
xor dword [rbx], esi
shr rsi, 0x20
xor dword [rbx + 8], r14d
shr rax, 0x20
xor dword [rbx + 4], esi
xor dword [rbx + 0xc], eax
add rbx, 0x10
mov rsi, qword [rdi - 0x10]
mov r14, qword [rdi - 8]
cmp r13, rbx
jne 0x1400618a0
mov rax, qword [rbp + 0x28]
movzx eax, byte [rax + r12 - 1]
cmp r12, rax
jb 0x140061961
sub r12, rax
mov qword [rsp + 0x48], r12
mov rax, qword [rsp + 0x48]
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rax, str.buf_out_size___a_in_size
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.dap_enc_aes
call fcn.140052d40
jmp 0x1400618f1
lea rax, str.Bad_in_size
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.dap_enc_aes
call fcn.140052d40
mov qword [rsp + 0x48], 0
jmp 0x1400618f1
mov qword [rsp + 0x28], rax
lea rax, str.Padding_size_is__zu_while_whole_message_is_just__zu
mov r9d, 8
lea r8, str.dap_enc_aes
mov qword [rsp + 0x30], r12
mov edx, 0x85
lea rcx, str.dap_enc_iaes256_cbc_decrypt_fast
mov qword [rsp + 0x20], rax
call fcn.140052d40
jmp 0x1400618f1