joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14215e058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14215e1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14215e089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14215e06f
add dl, dl
jne 0x14215e096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14215e0f6
xor eax, eax
add dl, dl
jne 0x14215e0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14215e1ad
add dl, dl
jne 0x14215e0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14215e0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14215e0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14215e0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14215e0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14215e07e
mov eax, 1
add dl, dl
jne 0x14215e106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14215e113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14215e0fb
sub eax, ebx
mov ebx, 1
jne 0x14215e14c
mov ecx, 1
add dl, dl
jne 0x14215e12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14215e13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14215e123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14215e07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14215e168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14215e175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14215e15d
cmp eax, 0x7d00
jae 0x14215e19b
cmp eax, 0x500
jb 0x14215e196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14215e07e
cmp eax, 0x7f
ja 0x14215e19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14215e07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14215e1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14215e07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1800013d0
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x50], rbx
mov rdi, rcx
lea rax, [0x180032570]
mov qword [rcx], rax
cmp byte [rcx + 0x678c], 0
je 0x18000141b
mov rbx, qword [rcx + 0x6790]
test rbx, rbx
je 0x18000141b
mov rcx, rbx
call fcn.180011020
mov rcx, rbx
call fcn.180025cf0
nop
mov rcx, qword [rdi + 0xad10]
test rcx, rcx
je 0x18000142d
call fcn.180025cf8
nop
mov rcx, qword [rdi + 0x89c0]
test rcx, rcx
je 0x18000143f
call fcn.180025cf8
nop
lea rcx, [rdi + 0x67b8]
call fcn.180011fa0
nop
lea rbx, [rdi + 0x20ec]
mov qword [rsp + 0x48], rbx
lea rcx, [rbx + 0x3a78]
call fcn.1800102a0
nop
lea rcx, [rbx + 0x2e54]
call fcn.1800102a0
nop
lea rcx, [rbx + 0x2230]
call fcn.1800102a0
nop
lea rcx, [rbx + 0x112c]
call fcn.180008bc0
nop
lea rcx, [rbx + 0x6c]
call fcn.180008bc0
nop
lea rcx, [rdi + 0x102c]
call fcn.180008bc0
nop
mov rcx, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
jmp fcn.18000f250

Function at 0x18000554e
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
cmp qword [rsp + 0x70], 0
jne 0x18000556b
xor eax, eax
jmp 0x180005672
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x20], 0
jmp 0x1800055d5
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x18]
cmp dword [rsp + 0x20], eax
jae 0x180005670
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x40]
call fcn.18000575e
movzx eax, al
test eax, eax
je 0x18000566b
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
jmp 0x180005672
jmp 0x1800055cb
xor eax, eax
add rsp, 0x68
ret
Function at 0x1800058de
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push r14
sub rsp, 0x78
mov ecx, dword [0x18003a6a0]
xor edx, edx
call fcn.18000567e
xor r14d, r14d
lea rdx, [rsp + 0xb0]
xor ecx, ecx
mov qword [rsp + 0xb0], r14
mov rbp, rax
call fcn.18000567e
mov ebx, dword [0x18003a68c]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [0x18003a68c]
mov rcx, rax
mov rbx, rax
call fcn.18000587e
mov rax, qword [rsp + 0xb0]
mov edx, r14d
cmp word [rax], dx
je 0x18000597a
movzx eax, word [rax]
mov ecx, r14d
nop dword [rax]
mov word [rcx + rbx], ax
lea edx, [rdx + 1]
mov rax, qword [rsp + 0xb0]
lea rcx, [rdx + rdx]
movzx eax, word [rcx + rax]
test ax, ax
jne 0x18000595e
mov r9, qword [str.brunch.deb]
mov eax, r14d
cmp word [rbx], ax
je 0x180005997
nop dword [rax + rax]
inc eax
cmp word [rbx + rax*2], r14w
jne 0x18000598e
lea edx, [rax - 1]
cmp word [rbx + rdx*2], 0x5c
je 0x1800059c0
nop dword [rax]
nop word [rax + rax]
mov ecx, eax
mov eax, edx
dec edx
mov word [rbx + rcx*2], r14w
cmp word [rbx + rdx*2], 0x5c
jne 0x1800059ae
movzx ecx, byte [r9]
mov r8d, r14d
test cl, cl
je 0x1800059e6
nop dword [rax]
movsx edx, cl
lea r8d, [r8 + 1]
mov ecx, eax
inc eax
mov word [rbx + rcx*2], dx
movzx ecx, byte [r8 + r9]
test cl, cl
jne 0x1800059ce
mov edx, 1
mov qword [rsp + 0x30], r14
mov r8d, edx
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180005caa
mov rdx, qword [str.GetFileSize]

Function at 0x180006970
Capabilities:
Hash data using sha256

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [0x180041f10], 2
mov edi, r8d
mov esi, edx
mov rbx, rcx
jl 0x1800069cc
movaps xmm0, xmmword [0x1800327b0]
movaps xmm1, xmmword [0x1800327c0]
movdqa xmmword [0x18003bc90], xmm0
movaps xmm0, xmmword [0x1800327d0]
movdqa xmmword [0x18003bc80], xmm1
movaps xmm1, xmmword [0x1800327e0]
movdqa xmmword [0x18003bc70], xmm0
movdqa xmmword [0x18003bc60], xmm1
xor edx, edx
mov r8d, pe_nt_image_headers64
call fcn.180025ee0
mov qword [rbx + 0x110], 0
mov byte [rbx + 0x118], 0
mov rax, qword [rbx + 0xf8]
bts edi, 0xd
mov dword [rax], 0x6a09e667
mov rax, qword [rbx + 0xf8]
shl edi, 0x10
mov dword [rax + 4], 0xbb67ae85
mov rax, qword [rbx + 0xf8]
mov dword [rax + 8], 0x3c6ef372
mov rax, qword [rbx + 0xf8]
mov dword [rax + 0xc], 0xa54ff53a
mov rax, qword [rbx + 0xf8]
mov dword [rax + 0x10], 0x510e527f
mov rax, qword [rbx + 0xf8]
mov dword [rax + 0x14], 0x9b05688c
mov rax, qword [rbx + 0xf8]
mov dword [rax + 0x18], 0x1f83d9ab
mov rax, qword [rbx + 0xf8]
mov dword [rax + 0x1c], 0x5be0cd19
mov rax, qword [rbx + 0xf8]
xor dword [rax], 0x2080020
mov rax, qword [rbx + 0xf8]
xor dword [rax + 8], esi
mov rax, qword [rbx + 0xf8]
mov rbx, qword [rsp + 0x38]
xor dword [rax + 0xc], edi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x141cb0058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.141cb01df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x141cb0089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141cb006f
add dl, dl
jne 0x141cb0096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141cb00f6
xor eax, eax
add dl, dl
jne 0x141cb00a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141cb01ad
add dl, dl
jne 0x141cb00b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141cb00c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141cb00d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141cb00dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x141cb00ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x141cb007e
mov eax, 1
add dl, dl
jne 0x141cb0106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141cb0113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141cb00fb
sub eax, ebx
mov ebx, 1
jne 0x141cb014c
mov ecx, 1
add dl, dl
jne 0x141cb012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141cb013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141cb0123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141cb007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x141cb0168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141cb0175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141cb015d
cmp eax, 0x7d00
jae 0x141cb019b
cmp eax, 0x500
jb 0x141cb0196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141cb007e
cmp eax, 0x7f
ja 0x141cb019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141cb007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x141cb01d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x141cb007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20

Function at 0x1004010e0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea r9, str._______________Q_msgkey____M_shmkey____S_semkey__...
lea r8, str.usage:_ipcrm___q_msqid____m_shmid____s_semid_
lea rdx, str._s_n_s_n
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop word cs:[rax + rax]
Function at 0x140029bbc
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.14001d294
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001d294
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140029d0c
cmp rax, 0xffffffffffffffff
je 0x140029d0c
xor edi, edi
test rbp, rbp
jle 0x140029cb7
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001fbc0
mov rbx, rax
test rax, rax
jne 0x140029c44
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140029cad
mov edx, 0x8000
mov ecx, r14d
call fcn.14001abfc
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.14001df70
cmp eax, 0xffffffff
je 0x140029c8d
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140029c54
mov edx, r15d
mov ecx, r14d
call fcn.14001abfc
jmp 0x140029cad
cmp byte [rsi + 0x38], dil
je 0x140029ca4
cmp dword [rsi + 0x34], 5
jne 0x140029ca4
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140029cad
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001b960
jmp 0x140029d20
jns 0x140029d20
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001d294
cmp rax, 0xffffffffffffffff
jne 0x140029cd8
cmp byte [rsi + 0x30], dil
je 0x140029d20
mov edi, dword [rsi + 0x2c]
jmp 0x140029d20
mov ecx, r14d
call fcn.1400190b8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140029d20
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 0x140029d20
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140029d19
mov eax, dword [rsi + 0x2c]
jmp 0x140029d1e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001d294
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 0x14002ae10
Capabilities:
Parse pe header

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

Function at 0x140451cb9
Capabilities:
Encode data using xor

Disassembly:
add r11, 0xc
xor edx, edx
test rcx, rcx
push 0xffffffff86024489
push 0x13a21427
lea rsp, [rsp + 0x18]
je 0x140451d4d
mov ebx, 0x9db05428
inc rbx
push r11
lea rbx, [0x140472788]
movzx r11d, byte [rax]
push 0xffffffffbb0ea8b1
xor r11d, edx
and r11d, 0xff
neg word [rsp + 6]
xor qword [rsp], 0x718bfda8
mov r11d, dword [rbx + r11*4]
shr edx, 8
push 0xffffffffda3f92af
not qword [rsp + 5]
xor edx, r11d
inc rax
xor edx, 0x7c1c38ae
dec rcx
push 0x2b0d7c83
lea rsp, [rsp + 0x18]
jne 0x140451ceb
mov r11d, 0xf69b8b97
push r11
mov r11, qword [rsp + 8]
lea rsp, [rsp + 0x10]
not edx
push 0x4da6cabf
mov dword [r11], edx
lea rsp, [rsp + 8]
jmp fcn.1404672af
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400eff00]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400eff10]
mov dword [rax], 1
mov rax, qword [0x1400eff20]
mov dword [rax], 1
mov rax, qword [0x1400efef0]
mov dword [rax], 1
mov rax, qword [0x1400efd90]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x1400efee0]
mov dword [0x14011a020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010c0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400efe90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x1400efe70]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x1400ef1c0]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067

Function at 0x140001b90
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x140001c00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14011a0c4]
mov r12, rcx
test ebx, ebx
jle 0x140001d30
mov rax, qword [0x14011a0c8]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140001c4b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140001cd5
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140001c30
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x140001d52
mov rax, qword [0x14011a0c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14011a0c8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001d37
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001cce
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001ce0
add dword [0x14011a0c4], 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 [0x14011a0c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001cce
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor ebx, ebx
jmp 0x140001c58
mov rax, qword [0x14011a0c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002220
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x14011a120]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14011a100]
test rbx, rbx
je 0x14000227c
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 0x140002273
test r12, r12
je 0x140002273
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002258
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 0x1400024b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400024c8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400024d0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x1400024e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x140002525
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x14000251c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x140002527
add rax, 0x28
cmp rax, r9
jne 0x140002508
xor eax, eax
ret

Function at 0x140002530
Capabilities:
Parse pe header

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call sym.strlen
cmp rax, 8
ja 0x1400025c0
mov rdx, qword [0x1400efd90]
xor r12d, r12d
cmp word [rdx], 0x5a4d
jne 0x1400025ae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400025ae
cmp word [rax + 0x18], 0x20b
jne 0x1400025ae
movzx edx, word [rax + 0x14]
lea r12, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x1400025c0
sub eax, 1
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8 + 0x28]
jmp 0x140002599
add r12, 0x28
cmp r12, rsi
je 0x1400025c0
mov r8d, 8
mov rdx, rbx
mov rcx, r12
call sym.strncmp
test eax, eax
jne 0x140002590
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret

Function at 0x1400025d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400efd90]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400025f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400025f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400025f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140002645
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 0x14000263c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400025f0
add rax, 0x28
cmp rax, r9
jne 0x140002628
xor eax, eax
ret

Function at 0x140002650
Capabilities:
Parse pe header

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

Function at 0x140002690
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400efd90]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400026b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400026b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400026b0
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x1400026f8
sub edx, 1
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400026ef
test rcx, rcx
je 0x1400026b0
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400026e0
xor eax, eax
ret
Function at 0x140002700
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400efd90]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140002720
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140002728
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x140002740
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400efd90]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002760
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002768
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002760
sub rcx, rdx
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x140002760
lea eax, [r8 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop dword [rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400027ac
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400027c0
add rdx, 0x28
cmp rdx, r9
jne 0x140002798
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x1400027d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1400efd90]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400027f2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002800
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400027f2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400027f2
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x1400027f2
sub r8d, 1
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop dword [rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x14000284d
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002860
add rdx, 0x28
cmp r10, rdx
jne 0x140002838
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x14000286f
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x14000287f
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002856
test ecx, ecx
jg 0x140002868
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret

Function at 0x14000de60
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rbx
test rax, rax
je 0x14000dea8
mov rcx, r12
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop r12
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rbx
mov qword [0x14011acc0], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x14000de8f