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, [0x1402c7777]
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 0x140031690
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 0x1400317a2
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14003177a
add rax, 1
cmp rax, 0x6b
je 0x140031797
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x140031770
cmp edx, 0x6a
je 0x140031797
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 0x14003178b

Function at 0x140031b40
Capabilities:
Allocate thread local storage

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
lea rsi, [0x1403f79c0]
mov rcx, rsi
call fcn.140031400
lea r13, [rax + 8]
mov r12, rax
mov rcx, r13
call fcn.14002ff60
mov ebx, dword [0x1403f79c0]
test ebx, ebx
jne 0x140031bb0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x14027b218], eax
cmp eax, 0xffffffff
je 0x140230406
mov dword [0x1403f79c0], 1
mov rcx, r13
call fcn.140030280
test r12, r12
je 0x140031be2
mov rcx, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
jmp fcn.1400317c0
cmp ebx, 1
je 0x140031b91
mov ecx, 2
call qword [fcn.140044040]
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.140030280
test r12, r12
jne 0x140031b9e
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
call sub.msvcrt.dll_abort
nop
Function at 0x140033480
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rdi, rcx
mov rsi, rdx
mov rbx, r8
mov rbp, r9
call fcn.1400318c0
mov r12, rax
test rax, rax
je 0x1400336e9
test rdi, rdi
je 0x1400334ba
mov rax, qword [rax + 0x1d8]
mov qword [rdi], rax
mov r13, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [r12 + 8], rbp
mov dword [r12 + 0x44], 1
mov rbp, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [r12 + 0xbc], 0
mov r14, r13
mov qword [r12 + 0x28], 0xffffffffffffffff
mov qword [r12 + 0x10], rbx
xor ebx, ebx
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call rbp
mov qword [r12 + 0x30], rax
test rax, rax
jne 0x140033527
add ebx, 1
cmp ebx, 1
je 0x140033630
mov ecx, 0x14
call r14
cmp ebx, 5
jne 0x1400334f5
mov qword [r12 + 0x38], 0xffffffffffffffff
lea r14, [r12 + 0x68]
mov rcx, r14
call fcn.140031300
cmp eax, 1
je 0x14003372a
cmp qword [r12 + 0x30], 0
mov qword [r12 + 0x68], 0xffffffffffffffff
mov dword [r12], 0xbab1f00d
mov dword [r12 + 0xc0], 0
mov dword [r12 + 0xb8], 0
je 0x1400336d2
xor edx, edx
test rsi, rsi
je 0x14003359f
mov eax, dword [rsi]
mov edx, dword [rsi + 0x10]
mov dword [r12 + 0x44], eax
test al, 8
jne 0x140033700
mov eax, dword [rsi + 0x18]
mov dword [r12 + 0xc0], eax
lea r8, [0x140031d30]
mov r9, r12
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov r13, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140033690
mov eax, dword [r12 + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jge 0x140033660
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [r12 + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [r12 + 0x44], 4
jne 0x140033640
mov qword [r12 + 0x28], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor ecx, ecx
call r13
jmp 0x1400334f5
mov qword [r12 + 0x28], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14003360f
mov edx, 0xfffffffe
cmp eax, 0xffffffff
jl 0x1400335e5
mov edx, 2
cmp eax, edx
cmovle edx, eax
cmp eax, 0xf
mov eax, 0xf
cmovge edx, eax
jmp 0x1400335e5
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x1400336a0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [r12 + 0x38]
call fcn.140030450
mov rcx, r14
call fcn.140031300
cmp eax, 1
je 0x14003372a
mov qword [r12 + 0x68], 0xffffffffffffffff
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
test rdi, rdi
je 0x1400336de
mov qword [rdi], 0
cmp qword [r12 + 0x1d0], 0
je 0x140033720
mov eax, 0xb
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov dword [rsp + 0x3c], edx
call fcn.140031ee0
mov edx, dword [rsp + 0x3c]
mov eax, dword [rax + 0xc0]
mov dword [r12 + 0xc0], eax
jmp 0x14003359f
mov rcx, r12
call fcn.140031990
jmp 0x1400336e9
call fcn.140031690
nop
Function at 0x140034b40
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.140044040
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.140044040
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 0x140034bb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1404006f4]
mov r12, rcx
test ebx, ebx
jle 0x140034ce0
mov rax, qword [0x1404006f8]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140034bfb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140034c85
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140034be0
mov rcx, r12
call fcn.140035630
mov rsi, rax
test rax, rax
je 0x140034d02
mov rax, qword [0x1404006f8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.140035760
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1404006f8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140034ce7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140034c7e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140034c90
add dword [0x1404006f4], 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 [0x1404006f8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140034c7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140034b40
nop dword [rax]
xor ebx, ebx
jmp 0x140034c08
mov rax, qword [0x1404006f8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140034b40
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140034b40
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140035280
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x140400760]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140400740]
test rbx, rbx
je 0x1400352dc
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 0x1400352d3
test r12, r12
je 0x1400352d3
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400352b8
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 0x140035630
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1403e9880]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140035650
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140035658
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140035650
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x1400356a5
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 0x14003569c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140035650
add rax, 0x28
cmp rax, r9
jne 0x140035688
xor eax, eax
ret

Function at 0x1400356b0
Capabilities:
Parse pe header

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

Function at 0x140035760
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1403e9880]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140035780
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140035788
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140035f50
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 0x140036108
cmp byte [r12], 0
je 0x1400360e0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140036120
test al, 0x10
je 0x1400360e0
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 0x14003614f
lea rdx, [rax + 0x244]
lea rax, [rbx + 1]
cmp eax, 8
jb 0x1400360a8
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 0x140036048
movzx ecx, byte [r12 + rbx + 0x243]
cmp cl, 0x5c
je 0x140036048
cmp cl, 0x2f
jne 0x1400360f0
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 0x140036138
test eax, eax
je 0x14003601f
movzx ecx, byte [rsp + 0x20]
mov byte [rdx], cl
test al, 2
je 0x14003601f
mov ecx, eax
movzx r8d, word [rsi + rcx - 2]
mov word [rdx + rcx - 2], r8w
jmp 0x14003601f
call sub.msvcrt.dll__errno
xor r12d, r12d
mov dword [rax], 0x14
jmp 0x140036090
mov ecx, 0x5c
mov rbp, rax
mov word [rdx + rbx], cx
jmp 0x140036048
call sub.msvcrt.dll__errno
mov dword [rax], 0xe
jmp 0x140036090
call sub.msvcrt.dll__errno
xor r12d, r12d
mov dword [rax], 2
jmp 0x140036090
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 0x14003601f
call sub.msvcrt.dll__errno
mov dword [rax], 0xc
jmp 0x140036090
Function at 0x140052af0
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 0x140052b30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140059d60
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
push r12
mov r12d, ecx
and rsp, 0xfffffffffffffff0
sub rsp, 0x40
mov eax, dword [0x14027b380]
test eax, eax
je 0x140059ec0
cmp eax, 0xffffffff
je 0x140059eea
lea rax, [0x1403e9e60]
lea rcx, [0x1402c2d66]
cmp dword [rax], r12d
jne 0x140059de0
movzx edx, byte [rcx]
mov eax, 7
lea r9, [0x14027b4bf]
mov r8d, 6
test dl, dl
je 0x140059dcc
nop dword [rax]
mov byte [r9 + rax], dl
movsxd r8, eax
add rax, 1
movzx edx, byte [rcx + rax - 7]
test dl, dl
jne 0x140059db8
lea rax, str.ERRNO
mov byte [rax + r8], 0
mov r12, qword [rbp - 8]
leave
ret
mov rcx, qword [rax + 0x18]
add rax, 0x10
test rcx, rcx
jne 0x140059d96
cmp r12d, 9
jle 0x140059ef7
mov edx, 1
lea r11, [rsp + 0x1f]
lea r9, [0x1402c2d84]
mov r10d, 0xcccccccd
nop
mov eax, r12d
mov ecx, r12d
imul rax, r10
shr rax, 0x23
lea r8d, [rax + rax*4]
add r8d, r8d
sub ecx, r8d
mov r8d, edx
movsxd rcx, ecx
movzx ecx, byte [r9 + rcx]
mov byte [r11 + rdx], cl
mov ecx, r12d
add rdx, 1
mov r12d, eax
cmp ecx, 0x63
jg 0x140059e10
movsxd rax, r12d
mov edx, r12d
movsxd rcx, r8d
imul rax, rax, 0x66666667
sar edx, 0x1f
sar rax, 0x22
sub eax, edx
lea rdx, [rsp + rcx + 0x20]
lea eax, [rax + rax*4]
add eax, eax
sub r12d, eax
movsxd rax, r12d
movzx eax, byte [r9 + rax]
mov byte [rsp + rcx + 0x20], al
lea rax, [0x14027b4c6]
lea r9, [rax + 1]
add r9, rcx
nop word cs:[rax + rax]
movzx ecx, byte [rdx]
add rax, 1
sub rdx, 1
mov byte [rax - 1], cl
cmp rax, r9
jne 0x140059e90
lea edx, [r8 + 7]
lea rax, str.ERRNO
movsxd rdx, edx
mov byte [rax + rdx], 0
jmp 0x140059dd8
lea rcx, str._JSON_C_STRERROR_ENABLE
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140059ee0
mov dword [0x14027b380], 1
jmp 0x140059d88
mov dword [0x14027b380], 0xffffffff
mov ecx, r12d
mov r12, qword [rbp - 8]
leave
jmp sub.msvcrt.dll_strerror
xor r8d, r8d
lea r9, [0x1402c2d84]
jmp 0x140059e46
Function at 0x14005d420
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 0x14005d46f
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 0x14005d450
mov ebp, dword [rbp + 0x38]
xor edi, edi
xor r11d, r11d
lea r12, [r10 + 4]
test ebp, ebp
je 0x14005d520
nop dword [rax + rax]
mov esi, r13d
sub esi, 1
je 0x14005d518
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 0x14005d4a8
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 0x14005d488
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 0x14005d4e6
xor r12d, r12d
jmp 0x14005d4fd
Function at 0x140077200
Capabilities:
Read file on windows

Disassembly:
push r14
lea rdx, [0x1402cc260]
push r13
xor r13d, r13d
push r12
sub rsp, 0x30
call sub.msvcrt.dll_fopen
test rax, rax
je 0x14007728f
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 0x1400772a0
mov r9, r12
mov r8, r13
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fread
cmp rax, r13
jne 0x1400772b0
mov rdx, r13
mov rcx, r14
call fcn.140077e80
mov r13, rax
test rax, rax
je 0x14007727f
mov rcx, rax
call fcn.140075ac0
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 0x14007724c
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.14005a0c0
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x140077287

Function at 0x1400772f0
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.1400fadb0
mov r12, rax
mov rcx, rax
call fcn.1400f9e40
mov rcx, r12
call sub.msvcrt.dll_free
lea rdx, [0x1402cc04c]
mov rcx, r13
call sub.msvcrt.dll_fopen
test rax, rax
je 0x14007741a
lea rdx, [rsp + 0x4c]
mov rcx, r14
mov dword [rsp + 0x4c], 0
mov r12, rax
call fcn.140078120
mov r13, rax
test rax, rax
je 0x1400773e0
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 0x1400773c0
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.14005a0c0
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.14005a0c0
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.14005a0c0
mov eax, 0xfffffffe
jmp 0x1400773ad