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

Disassembly:
sub rsp, 0xa8
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x58], rcx
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0xa0], rcx
cmp qword [rax + 8], 0
sete al
and al, 1
cmp al, 0
je 0x140036758
mov rax, qword [rsp + 0x48]
mov qword [rax], 0
mov dword [rsp + 0x9c], 0
mov dword [rsp + 0x98], 0
mov rax, qword [rsp + 0x98]
add rsp, 0xa8
ret
mov rax, qword [rsp + 0x50]
mov dword [rsp + 0x94], 0
mov qword [rsp + 0x88], 0
mov rax, qword [rax + 8]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x88]
cmp rax, qword [rsp + 0x80]
setl al
and al, 1
cmp al, 0
je 0x1400368a0
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x88]
mov qword [rsp + 0x78], rcx
mov rcx, qword [rsp + 0x78]
mov edx, ecx
mov ecx, 0x40000000
cmp edx, 0x40000000
cmovl ecx, edx
mov dword [rsp + 0x74], ecx
mov rcx, qword [rax]
mov qword [rsp + 0x38], rcx
mov r9, qword [rsp + 0x88]
mov qword [rsp + 0x40], r9
mov rax, qword [rax + 8]
lea rcx, str.E:_Odin_core_os_file_windows.odin
mov edx, 0x5c
mov r8d, 0x30
mov qword [rsp + 0x20], rax
call fcn.1400280b0
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x58]
add rdx, rax
mov r8d, dword [rsp + 0x74]
lea r9, [rsp + 0x94]
xor eax, eax
mov qword [rsp + 0x20], 0
call sub.KERNEL32.dll_WriteFile
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x94], 0
setbe al
and al, 1
cmp al, 0
jne 0x140036850
cmp dword [rsp + 0x70], 0
jne 0x140036884
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x30], rax
call fcn.1400368d0
mov rcx, qword [rsp + 0x30]
mov rdx, rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x68], rdx
mov qword [rax], rcx
mov rax, qword [rsp + 0x68]
add rsp, 0xa8
ret
mov eax, dword [rsp + 0x94]
add rax, qword [rsp + 0x88]
mov qword [rsp + 0x88], rax
jmp 0x140036780
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x88]
mov qword [rax], rcx
mov dword [rsp + 0x64], 0
mov dword [rsp + 0x60], 0
mov rax, qword [rsp + 0x60]
add rsp, 0xa8
ret
Function at 0x140037a40
Capabilities:
Get file size

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x30], rcx
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [rsp + 0x48]
call sub.KERNEL32.dll_GetFileSizeEx
cmp eax, 0
jne 0x140037a93
call fcn.1400368d0
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x3c]
mov dword [rsp + 0x44], ecx
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x48]
mov qword [rax], rcx
mov rax, qword [rsp + 0x40]
add rsp, 0x58
ret
Function at 0x14003d98c
Capabilities:
Parse pe header

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

Function at 0x140041b7c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140041978
Function at 0x140044c3c
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 0x140044c6c
xor eax, eax
jmp 0x140044d2f
mov rbp, rbx
cmp word [rax], si
je 0x140044c91
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140044c78
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140044c74
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.140044b5c
movsxd r14, eax
test eax, eax
jne 0x140044ccf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140044c65
mov rcx, r14
call fcn.140045b18
mov rdi, rax
test rax, rax
jne 0x140044ce8
xor ecx, ecx
call fcn.1400431bc
jmp 0x140044cc4
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.140044b5c
test eax, eax
jne 0x140044d19
mov rcx, rdi
call fcn.1400431bc
jmp 0x140044d23
xor ecx, ecx
call fcn.1400431bc
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 0x140048220
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.140043c2c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400482aa
cmp byte [rbp - 0x21], r15b
je 0x1400482a5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400482e0
call fcn.140046328
test eax, eax
jne 0x1400482cc
cmp byte [rbp - 0x21], r15b
je 0x1400482c4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400482e0
cmp byte [rbp - 0x21], r15b
je 0x1400482dd
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.14004320c
test eax, eax
jne 0x140048380
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140043c2c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14004831f
cmp byte [rbp - 0x21], r15b
je 0x140048354
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140048354
call fcn.140046328
test eax, eax
jne 0x140048340
cmp byte [rbp - 0x21], r15b
je 0x140048339
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140048354
cmp byte [rbp - 0x21], r15b
je 0x140048351
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.14004320c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140048380
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140048383
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140048391
mov rcx, rdi
call fcn.1400431bc
cmp byte [rbp + 0x3f], r15b
je 0x1400483a0
mov rcx, qword [rbp + 0x27]
call fcn.1400431bc
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 0x14001b9f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov eax, dword [rcx + 0x14]
mov edi, r8d
mov rbx, qword [rsp + 0x70]
add eax, edx
xor edx, edx
mov rsi, rcx
div dword [rcx + 4]
cmp byte [rbx + 0x1c], 0
mov r10d, edx
je 0x14001bab9
movzx r8d, byte [rbx + 0x5a]
xor edx, edx
mov eax, dword [rsp + 0x80]
div r8d
mov qword [rsp + 0x50], rbp
cmp edi, eax
cmova edi, eax
mov rax, qword [rsp + 0x88]
mov dword [r9], edi
mov r9, rbx
movzx ecx, byte [rbx + 0x5a]
imul ecx, edi
mov dword [rax], ecx
movzx ecx, byte [rsi + 0x10]
mov rax, qword [rsi + 8]
mov ebp, dword [rsi + 4]
sub ebp, r10d
cmp ebp, edi
cmova ebp, edi
imul ecx, r10d
mov r8d, ebp
lea rdx, [rax + rcx*4]
mov rcx, qword [rsp + 0x78]
mov rax, qword [rbx]
call qword [case.0x140034a43.0]
cmp edi, ebp
jbe 0x14001baa4
movzx ecx, byte [rbx + 0x5a]
sub edi, ebp
mov rdx, qword [rsi + 8]
mov r9, rbx
mov rax, qword [rbx]
mov r8d, edi
imul ecx, ebp
add rcx, qword [rsp + 0x78]
call qword [case.0x140034a43.0]
mov rbp, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
mov qword [rsp + 0x70], rbx
mov rbx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
jmp 0x14001e890
push rbx
push rbp
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1070
call fcn.1400350c0
sub rsp, rax
mov rax, qword [0x140051098]
xor rax, rsp
mov qword [rsp + 0x1050], rax
mov r15, qword [rsp + 0x10e8]
xor eax, eax
mov rdi, qword [rsp + 0x10d0]
mov r14, r9
mov r12, qword [rsp + 0x10d8]
mov ebp, r8d
mov dword [r9], eax
mov ebx, edx
mov dword [r15], eax
mov r13, rcx
test r8d, r8d
je 0x14001e9c4
mov qword [rsp + 0x1068], rsi
mov esi, dword [rsp + 0x10e0]
nop
movzx ecx, byte [rdi + 0x5a]
cmp esi, ecx
jb 0x14001e9bc
mov r9d, dword [r13 + 4]
lea r10, [rdi + 8]
sub r9d, ebx
mov qword [rsp + 0x28], r10
cmp r9d, ebp
mov eax, esi
cmova r9d, ebp
xor edx, edx
div ecx
movzx ecx, byte [rdi + 0x58]
xor edx, edx
mov r11d, eax
mov eax, 0x400
div rcx
movzx edx, byte [r13 + 0x10]
mov rcx, qword [r13 + 8]
imul edx, ebx
cmp rax, r11
mov dword [rsp + 0x40], r9d
cmova eax, r11d
lea r8, [rcx + rdx*4]
mov edx, eax
mov rax, qword [rdi + 0x50]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x50]
call qword [case.0x140034a43.0]
mov ecx, dword [rsp + 0x40]
xor edx, edx
add dword [r14], ecx
mov r8d, eax
sub ebp, ecx
mov r9, rdi
lea eax, [rbx + rcx]
movzx ebx, byte [rdi + 0x5a]
div dword [r13 + 4]
mov rax, qword [rdi]
mov rcx, r12
mov dword [rsp + 0x44], edx
lea rdx, [rsp + 0x50]
imul ebx, r8d
call qword [case.0x140034a43.0]
add dword [r15], ebx
sub esi, ebx
mov eax, ebx
mov ebx, dword [rsp + 0x44]
add r12, rax
test ebp, ebp
jne 0x14001e900
mov rsi, qword [rsp + 0x1068]
mov rcx, qword [rsp + 0x1050]
xor rcx, rsp
call fcn.140035120
add rsp, 0x1070
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140026de0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140026df0]
mov dword [rax], 1
mov rax, qword [0x140026e00]
mov dword [rax], 1
mov rax, qword [0x140026d90]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140026dd0]
mov dword [0x14002a00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140026eb0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140026e90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140026d40]
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 [dbg._matherr]
call dbg.__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 0x1400014a1
Capabilities:
Execute command

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
lea rax, str.dir_C:_
mov rcx, rax
call sym.system
nop
add rsp, 0x20
pop rbp
ret
Function at 0x140001991
Capabilities:
Get explorer pid

Disassembly:
sub rsp, 0x38
mov dword [rsp + 0x2c], 0
call qword [sym.imp.USER32.dll_GetShellWindow]
lea rdx, [rsp + 0x2c]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
ret

Function at 0x140001af4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows

Disassembly:
push r13
push r12
push rdi
sub rsp, 0x60
xor eax, eax
mov ecx, 0xc
lea rdi, [rsp + 0x30]
mov dword [rsp + 0x2c], 0
rep stosd dword [rdi], eax
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [rsp + 0x34]
mov r9d, 0x40
xor ecx, ecx
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
jne 0x140001b42
xor eax, eax
jmp 0x140001b93
mov byte [rax], 0xc3
lea r9, [rsp + 0x2c]
mov edx, dword [rsp + 0x34]
mov rcx, rax
mov r8d, 0x140
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140001b3e
lea rcx, [dbg.excepPageGuard]
mov rdi, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rdi
mov r13, rax
call r12
mov rcx, r13
call rdi
mov r8d, 0x8000
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [0x140025a0c]
add rsp, 0x60
pop rdi
pop r12
pop r13
ret

Function at 0x140001c17
Capabilities:
Check for protected handle exception

Disassembly:
push r12
push rbx
sub rsp, 0x28
lea r8, str.Random_name
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov r12, rax
test rax, rax
jne 0x140001c52
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateMutex_error:__ld_n
mov edx, eax
call sym.printf_1
mov eax, 1
jmp 0x140001ca4
mov rcx, rax
mov r8d, 2
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140001c9e
lea rcx, [dbg.setHandleInfoExc]
mov rbx, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rbx
mov ecx, 1
xor r9d, r9d
xor r8d, r8d
mov r12, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [0x140025a08]
add rsp, 0x28
pop rbx
pop r12
ret

Function at 0x140001e49
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
xor r9d, r9d
lea r8, [dbg.th_instructionPrefixes]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x140025a04]
add rsp, 0x38
ret

Function at 0x140001ec2
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
xor r9d, r9d
lea r8, [dbg.th_dbgExcp]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x140025a00]
add rsp, 0x38
ret
Function at 0x14000211d
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r14
push r13
push r12
sub rsp, 0x40
mov r12, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r9d, 4
xor ecx, ecx
mov r8d, 0x3000
mov edx, 0x8000
call r12
mov r14, rax
test rax, rax
je 0x14000217b
mov r9d, 0x40
mov r8d, 0x203000
mov edx, 0x1000000
xor ecx, ecx
call r12
mov r13, rax
test rax, rax
jne 0x140002197
mov r8d, 0x8000
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.VirtualAlloc_failed._Last_error:__lu_n
xor r12d, r12d
mov edx, eax
call sym.printf_1
jmp 0x140002262
mov r8, qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov word [rax], 0x4851
mov byte [rax + 2], 0xb9
xor eax, eax
lea ecx, [rax*8]
mov rdx, r8
shr rdx, cl
mov byte [r13 + rax + 3], dl
inc rax
cmp rax, 8
jne 0x1400021a9
mov edx, 0x1000000
mov rcx, r13
mov dword [r13 + 0xb], 0xc359d1ff
call qword [sym.imp.KERNEL32.dll_ResetWriteWatch]
call r13
mov r12d, eax
cmp eax, 1
je 0x14000223f
lea rax, [rsp + 0x34]
xor ecx, ecx
mov r9, r14
mov r8d, 0x1000
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov rdx, r13
mov qword [rsp + 0x38], 0x1000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetWriteWatch]
test eax, eax
je 0x140002233
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.GetWriteWatch_failed._Last_error:__lu_n
xor r12d, r12d
mov edx, eax
call sym.printf_1
jmp 0x14000223f
mov r12, qword [rsp + 0x38]
test r12, r12
cmove r12d, eax
mov rcx, r14
mov r8d, 0x8000
xor edx, edx
mov r14, qword [sym.imp.KERNEL32.dll_VirtualFree]
call r14
mov r8d, 0x8000
xor edx, edx
mov rcx, r13
call r14
mov eax, r12d
add rsp, 0x40
pop r12
pop r13
pop r14
ret

Function at 0x140002270
Capabilities:
Switch active desktop

Disassembly:
sub rsp, 0x38
lea rcx, str.m_pcszNewDesktopName
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x182
call qword [sym.imp.USER32.dll_CreateDesktopA]
mov rcx, rax
xor eax, eax
test rcx, rcx
je 0x1400022b2
call qword [sym.imp.USER32.dll_SwitchDesktop]
test eax, eax
sete al
movzx eax, al
add rsp, 0x38
ret

Function at 0x140002319
Capabilities:
Get disk information

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
xor ebx, ebx
mov ebp, 1
lea r12, [0x140026585]
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, eax
mov eax, ebp
mov ecx, ebx
shl eax, cl
test eax, esi
je 0x140002368
lea rcx, [r12 + rbx]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
jne 0x140002368
lea edx, [rbx + 0x41]
lea rcx, str.USB_drive_detected:__c:_n
call sym.printf_1
mov eax, 1
jmp 0x140002373
inc rbx
cmp rbx, 0x1a
jne 0x140002339
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x14000261b
Capabilities:
Enumerate processes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x150
xor eax, eax
xor edx, edx
lea rbp, [rsp + 0x20]
mov rbx, rcx
mov ecx, 0x4c
mov rdi, rbp
rep stosd dword [rdi], eax
mov ecx, 2
call sym.CreateToolhelp32Snapshot
mov r12, rax
xor eax, eax
cmp r12, 0xffffffffffffffff
je 0x1400026b3
mov rdx, rbp
mov rcx, r12
mov dword [rsp + 0x20], 0x130
call sym.Process32First
test eax, eax
je 0x1400026a8
lea rsi, [rsp + 0x4c]
mov rdi, qword [sym.imp.msvcrt.dll__stricmp]
mov rdx, rbx
mov rcx, rsi
call rdi
test eax, eax
jne 0x140002691
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x28]
jmp 0x1400026b3
mov rdx, rbp
mov rcx, r12
call sym.Process32Next
test eax, eax
je 0x1400026a8
mov rdx, rbx
mov rcx, rsi
jmp 0x14000267c
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x150
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x1400029b0
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 0x140002a20
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14002a0b4]
mov r12, rcx
test ebx, ebx
jle 0x140002b50
mov rax, qword [0x14002a0b8]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140002a6b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140002af5
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140002a50
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x140002b72
mov rax, qword [0x14002a0b8]
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 [0x14002a0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002b57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002aee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002b00
add dword [0x14002a0b4], 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 [0x14002a0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002aee
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 0x140002a78
mov rax, qword [0x14002a0b8]
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 0x1400030f0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x14002a120]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14002a100]
test rbx, rbx
je 0x14000314c
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 0x140003143
test r12, r12
je 0x140003143
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003128
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 0x140003380
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140003398
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400033a0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret