joyce8/EMBER2024-capa huggingface dataset:
Function at 0x259f026e0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
movabs rax, 0x1fffffffffffffff
mov rcx, qword [rdx]
cmp rax, rcx
jb 0x259f02741
cmp r8, rcx
jb 0x259f02710
add rcx, 1
add rcx, rcx
add rsp, 0x28
jmp fcn.259f12380
add r8, r8
cmp rcx, r8
jae 0x259f026fb
cmp rax, r8
jae 0x259f02738
movabs rcx, 0x4000000000000000
mov qword [rdx], rax
add rsp, 0x28
jmp fcn.259f12380
mov qword [rdx], r8
lea rcx, [r8 + 1]
jmp 0x259f026ff
lea rcx, str.basic_string::_M_create
call fcn.259f14380
nop
nop
nop
mov qword [rcx + 8], rdx
ret

Function at 0x259f0b330
Capabilities:
Encode data using xor

Disassembly:
mov r11, rdx
mov rax, rcx
mov r10, rdx
and r11, 0xfffffffffffffff8
add r11, rcx
movabs rcx, 0xc6a4a7935bd1e995
imul r10, rcx
xor r10, r8
cmp rax, r11
je 0x259f0b388
nop word cs:[rax + rax]
mov r9, qword [rax]
add rax, 8
imul r9, rcx
mov r8, r9
shr r8, 0x2f
xor r8, r9
imul r8, rcx
xor r8, r10
mov r10, r8
imul r10, rcx
cmp r11, rax
jne 0x259f0b360
and edx, 7
je 0x259f0b3bd
sub edx, 1
movsxd rax, edx
xor edx, edx
nop dword [rax]
movzx ecx, byte [r11 + rax]
shl rdx, 8
sub rax, 1
add rdx, rcx
test eax, eax
jns 0x259f0b398
xor rdx, r10
movabs r10, 0xc6a4a7935bd1e995
imul r10, rdx
movabs rax, 0xc6a4a7935bd1e995
mov rdx, r10
shr rdx, 0x2f
xor rdx, r10
imul rdx, rax
mov rax, rdx
shr rax, 0x2f
xor rax, rdx
ret

Function at 0x259f12380
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov eax, 1
test rcx, rcx
cmovne rax, rcx
mov rbx, rax
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
test rax, rax
je 0x259f123a7
add rsp, 0x20
pop rbx
ret
call fcn.259f0c5b0
test rax, rax
je 0x259f12ed0
call rax
jmp 0x259f12394
Function at 0x259f12eb0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rbx, rcx
call fcn.259f124a0
mov rax, qword [rbx - 0x10]
mov rcx, qword [rbx - 0x40]
mov rbp, qword [rbx - 0x18]
movsxd rsi, dword [rbx - 0x24]
mov qword [rsp + 0x30], rax
mov rdi, qword [rbx - 0x38]
call fcn.259e77410
mov rcx, rax
jmp 0x259f12df0
call fcn.259f124a0
call fcn.259f126f0
mov rbx, qword [rax]
test byte [rbx + 0x50], 1
je 0x259f12e77
mov rbx, qword [rbx]
lea r12, [rsp + 0x20]
mov rdx, rbp
xor ecx, ecx
mov r8, r12
call fcn.259e76fe0
mov rdx, qword [rbx - 0x90]
mov r9, rsi
mov r8, rbx
mov rcx, r12
call fcn.259e770d0
test al, al
jne 0x259f12e95
lea rbx, [0x259f22900]
mov r9, rsi
xor r8d, r8d
mov rcx, r12
mov rdx, rbx
call fcn.259e770d0
test al, al
je 0x259f12e9a
mov ecx, 8
call fcn.259f12430
lea r8, [0x259eded60]
mov rdx, rbx
mov rcx, rax
mov rax, qword [0x259f1ffe0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
add rbx, 0x90
jmp 0x259f12e06
call fcn.259f12960
mov rcx, rdi
call fcn.259e773f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rax
call fcn.259f124a0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, 8
call fcn.259f12430
lea r8, [fcn.259f09dc0]
lea rdx, [0x259f23570]
mov rcx, rax
mov rax, qword [0x259f202b0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
nop
nop
nop
mov rcx, rax
mov rax, rdx
sub rax, 1
jne 0x259f12f7c
call fcn.259f124a0
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
call fcn.259f125d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rdi
call fcn.259e6b1a0
call fcn.259f12960
call fcn.259f124a0
call fcn.259f125d0
jmp 0x259f12f6a
Function at 0x259f12ed0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rbx, rcx
call fcn.259f124a0
mov rax, qword [rbx - 0x10]
mov rcx, qword [rbx - 0x40]
mov rbp, qword [rbx - 0x18]
movsxd rsi, dword [rbx - 0x24]
mov qword [rsp + 0x30], rax
mov rdi, qword [rbx - 0x38]
call fcn.259e77410
mov rcx, rax
jmp 0x259f12df0
call fcn.259f124a0
call fcn.259f126f0
mov rbx, qword [rax]
test byte [rbx + 0x50], 1
je 0x259f12e77
mov rbx, qword [rbx]
lea r12, [rsp + 0x20]
mov rdx, rbp
xor ecx, ecx
mov r8, r12
call fcn.259e76fe0
mov rdx, qword [rbx - 0x90]
mov r9, rsi
mov r8, rbx
mov rcx, r12
call fcn.259e770d0
test al, al
jne 0x259f12e95
lea rbx, [0x259f22900]
mov r9, rsi
xor r8d, r8d
mov rcx, r12
mov rdx, rbx
call fcn.259e770d0
test al, al
je 0x259f12e9a
mov ecx, 8
call fcn.259f12430
lea r8, [0x259eded60]
mov rdx, rbx
mov rcx, rax
mov rax, qword [0x259f1ffe0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
add rbx, 0x90
jmp 0x259f12e06
call fcn.259f12960
mov rcx, rdi
call fcn.259e773f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rax
call fcn.259f124a0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, 8
call fcn.259f12430
lea r8, [fcn.259f09dc0]
lea rdx, [0x259f23570]
mov rcx, rax
mov rax, qword [0x259f202b0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
nop
nop
nop
mov rcx, rax
mov rax, rdx
sub rax, 1
jne 0x259f12f7c
call fcn.259f124a0
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
call fcn.259f125d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rdi
call fcn.259e6b1a0
call fcn.259f12960
call fcn.259f124a0
call fcn.259f125d0
jmp 0x259f12f6a
Function at 0x259f12f00
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rbx, rcx
call fcn.259f124a0
mov rax, qword [rbx - 0x10]
mov rcx, qword [rbx - 0x40]
mov rbp, qword [rbx - 0x18]
movsxd rsi, dword [rbx - 0x24]
mov qword [rsp + 0x30], rax
mov rdi, qword [rbx - 0x38]
call fcn.259e77410
mov rcx, rax
jmp 0x259f12df0
call fcn.259f124a0
call fcn.259f126f0
mov rbx, qword [rax]
test byte [rbx + 0x50], 1
je 0x259f12e77
mov rbx, qword [rbx]
lea r12, [rsp + 0x20]
mov rdx, rbp
xor ecx, ecx
mov r8, r12
call fcn.259e76fe0
mov rdx, qword [rbx - 0x90]
mov r9, rsi
mov r8, rbx
mov rcx, r12
call fcn.259e770d0
test al, al
jne 0x259f12e95
lea rbx, [0x259f22900]
mov r9, rsi
xor r8d, r8d
mov rcx, r12
mov rdx, rbx
call fcn.259e770d0
test al, al
je 0x259f12e9a
mov ecx, 8
call fcn.259f12430
lea r8, [0x259eded60]
mov rdx, rbx
mov rcx, rax
mov rax, qword [0x259f1ffe0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
add rbx, 0x90
jmp 0x259f12e06
call fcn.259f12960
mov rcx, rdi
call fcn.259e773f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rax
call fcn.259f124a0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, 8
call fcn.259f12430
lea r8, [fcn.259f09dc0]
lea rdx, [0x259f23570]
mov rcx, rax
mov rax, qword [0x259f202b0]
add rax, 0x10
mov qword [rcx], rax
call fcn.259f129b0
nop
nop
nop
mov rcx, rax
mov rax, rdx
sub rax, 1
jne 0x259f12f7c
call fcn.259f124a0
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
call fcn.259f125d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov rcx, rdi
call fcn.259e6b1a0
call fcn.259f12960
call fcn.259f124a0
call fcn.259f125d0
jmp 0x259f12f6a
Function at 0x1400293ac
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001ca74
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001ca74
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400294fc
cmp rax, 0xffffffffffffffff
je 0x1400294fc
xor edi, edi
test rbp, rbp
jle 0x1400294a7
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001f3a0
mov rbx, rax
test rax, rax
jne 0x140029434
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14002949d
mov edx, 0x8000
mov ecx, r14d
call fcn.14001a3a8
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001d750
cmp eax, 0xffffffff
je 0x14002947d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140029444
mov edx, r15d
mov ecx, r14d
call fcn.14001a3a8
jmp 0x14002949d
cmp byte [rsi + 0x38], dil
je 0x140029494
cmp dword [rsi + 0x34], 5
jne 0x140029494
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x14002949d
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001b13c
jmp 0x140029510
jns 0x140029510
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001ca74
cmp rax, 0xffffffffffffffff
jne 0x1400294c8
cmp byte [rsi + 0x30], dil
je 0x140029510
mov edi, dword [rsi + 0x2c]
jmp 0x140029510
mov ecx, r14d
call fcn.140018864
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140029510
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140029510
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140029509
mov eax, dword [rsi + 0x2c]
jmp 0x14002950e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001ca74
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x7ff7bbd3e1b4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
push rax
call 0x7ff7bbdeda11
test rax, rax
je 0x7ff7bbd3e1fe
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x7ff7bbd3e1fe
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x7ff7bbd3e1fe
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x7ff7bbd3e1fe
cmp dword [rcx + 0x84], 0xe
jbe 0x7ff7bbd3e1fe
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x7ff7bbd3e200
xor al, al
add rsp, 0x28
ret

Function at 0x7ff7bbd48680
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x7ff7bbd486a8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x7ff7bbd486a8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14003a3a0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14003a3ad
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14003a3bd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14003a3a5
lea eax, [rcx + 1]
call r11
adc eax, eax
add ebx, ebx
jne 0x14003a3d5
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14003a3c2
sub eax, 3
jb 0x14003a3ef
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14003a426
movsxd rbp, eax
lea eax, [rcx + 1]
call r11
adc ecx, ecx
call r11
adc ecx, ecx
jne 0x14003a416
mov ecx, eax
add eax, 2
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14003a414
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14003a403
cmp rbp, 0xfffffffffffff300
adc ecx, eax
call fcn.14003a362
jmp 0x14003a3ad
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x15000
mov dl, 4
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x14003a472
cmp rsi, rcx
jae 0x14003a47a
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x14003a459
cmp al, 0x8f
ja 0x14003a459
cmp byte [rsi - 2], 0xf
je 0x14003a45f
sub al, 0xe8
cmp al, 1
ja 0x14003a443
cmp rsi, rcx
jae 0x14003a47a
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x14003a449
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x14003a47a
lodsb al, byte [rsi]
jmp 0x14003a459
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x37000]
mov eax, dword [rdi]
or eax, eax
je 0x14003a4d7
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x3a1dc]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14003a487
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x14003a4d1
mov qword [rbx], rax
add rbx, 8
jmp 0x14003a4a7
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x14003a511
cmp al, 0xef
ja 0x14003a503
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14003a4e3
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14003a4f2
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x21f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14003a565
sub rsp, 0xffffffffffffff80
jmp 0x14001165e
Function at 0x14004bc70
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x10090
call fcn.140050190
sub rsp, rax
mov rax, qword [0x14008efc0]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx edx, byte [rcx]
lea rbx, [rsp + 0x30]
xor eax, eax
mov rsi, rcx
mov word [rsp + 0x80], ax
mov word [rsp + 0x30], ax
lea edi, [rax + 0x28]
test dl, dl
je 0x14004bd32
nop dword [rax + rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14004bcdd
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14004bcd0
cmp rcx, 1
jb 0x14004bd8a
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
nop word [rax + rax]
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14004bd00
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14005f74c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14004bcc0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x14004bd63
lea rcx, [rsp + 0x80]
call fcn.140062584
jmp 0x14004bd65
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.14004fec0
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.14005f4f8
int3
Function at 0x14004fa40
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x14008efc0]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor eax, eax
lea rbx, [rsp + 0x30]
mov rbp, rdx
mov word [rsp + 0x30], ax
movzx edx, byte [rcx]
mov rsi, rcx
lea edi, [rax + 0x28]
test dl, dl
je 0x14004fae5
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14004fa9d
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14004fa90
cmp rcx, 1
jb 0x14004fb16
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14004fab3
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14005f74c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14004fa80
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14004fec0
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.14005f4f8
int3

Function at 0x14004fd50
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x14008efc0]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx edx, byte [rcx]
lea rbx, [rsp + 0x30]
xor eax, eax
mov rsi, rcx
mov word [rsp + 0x30], ax
lea edi, [rax + 0x28]
test dl, dl
je 0x14004fdf5
nop dword [rax]
cmp word [rbx], 0
mov rcx, rdi
mov rax, rbx
je 0x14004fdad
nop dword [rax]
add rax, 2
dec rcx
cmp word [rax], 0
jne 0x14004fda0
cmp rcx, 1
jb 0x14004fe27
mov byte [rsp + 0x20], dl
mov rcx, 0xffffffffffffffff
mov byte [rsp + 0x21], 0
cmp word [rax + rcx*2 + 2], 0
lea rcx, [rcx + 1]
jne 0x14004fdc3
lea rcx, [rax + rcx*2]
mov r8d, 2
lea rdx, [rsp + 0x20]
call fcn.14005f74c
movzx edx, byte [rsi + 1]
inc rsi
add rbx, 2
dec rdi
test dl, dl
jne 0x14004fd90
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14004fec0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.14005f4f8
int3

Function at 0x1400508f4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14005093e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14005093e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14005093e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14005093e
cmp dword [rcx + 0x84], 0xe
jbe 0x14005093e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140050940
xor al, al
add rsp, 0x28
ret
Function at 0x140055d38
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140055ba3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140055ba3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140055ba3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140055ba3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140055ba3
cmp dword [rcx + 0x84], 0xe
jbe 0x140055ba3
cmp dword [rcx + 0xf8], 0
je 0x140055ba3
mov ecx, ebx
call fcn.140055c54
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140055a30
nop
cmp dword [rbp + 0x20], 0
je 0x140055bf1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140055bfc
int3
xor r8d, r8d
xor edx, edx
jmp 0x140055b34
Function at 0x1400677f0
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
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140067877
mov rsi, rbx
cmp word [rax], bp
je 0x140067836
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140067820
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14006781c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140062670
mov rdi, rax
test rax, rax
je 0x140067864
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14006db70
mov rbp, rdi
xor ecx, ecx
call fcn.1400635a4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14006b3ec
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14006b402
mov al, 1
jmp 0x14006b462
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14006b413
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14006b460
mov ecx, dword [rcx + 0x18]
nop
call fcn.140067f94
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14006b460
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14006b460
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14006b460
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14006b462
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14006d950
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14006d978
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14006d978
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140003e40
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
mov rbx, r8
xor edx, edx
test rcx, rcx
je 0x140003e74
cmp word [rcx], 0x5a4d
jne 0x140003e74
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003e74
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003e74
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003d80
test eax, eax
jne 0x140003e90
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140003df0
test rax, rax
je 0x140003e85
lea rdx, [rax + 0x10]
lea rax, [rsp + 0x38]
mov rcx, qword [rbx]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], 0
call fcn.140004636
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140004540
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.1400044e0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140004994
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x14098ac98]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x14098ac94]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400049e2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400049da
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140004ac9
inc ebx
add rax, 0x28
jmp 0x1400049ba
mov rcx, r12
call fcn.1400051c1
mov rbp, rax
test rax, rax
jne 0x140004a01
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140004930
movsxd rbx, ebx
mov rax, qword [0x14098ac98]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.14000526f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14098ac98]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140004a63
mov rax, qword [0x14098ac98]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140004930
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140004ac3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140004ac3
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14098ac98]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140004ac3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140004930
inc dword [0x14098ac94]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret