joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140065dcc
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 0x140065dfc
xor eax, eax
jmp 0x140065ebf
mov rbp, rbx
cmp word [rax], si
je 0x140065e21
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140065e08
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140065e04
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.140065c64
movsxd r14, eax
test eax, eax
jne 0x140065e5f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140065df5
mov rcx, r14
call fcn.14005b670
mov rdi, rax
test rax, rax
jne 0x140065e78
xor ecx, ecx
call fcn.14005ab3c
jmp 0x140065e54
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.140065c64
test eax, eax
jne 0x140065ea9
mov rcx, rdi
call fcn.14005ab3c
jmp 0x140065eb3
xor ecx, ecx
call fcn.14005ab3c
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 0x140065edc
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140065f63
mov rsi, rbx
cmp word [rax], bp
je 0x140065f22
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140065f0c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140065f08
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14005b670
mov rdi, rax
test rax, rax
je 0x140065f50
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400176b0
mov rbp, rdi
xor ecx, ecx
call fcn.14005ab3c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140068460
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1401022c0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400684b7
cmp word [rdx], r13w
jne 0x1400684b7
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400684bc
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400685e1
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140068602
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400684f5
mov rdx, r9
mov word [rbx], cx
jmp 0x14006851c
cmp r9, r8
jae 0x14006852c
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400684d6
jmp 0x1400685e1
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400685d6
cmp dword [rsp + 0x80], esi
je 0x1400685d6
lea r8, [0x1401022c0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400685ae
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14006857e
mov word [rbx], r13w
jmp 0x1400685de
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14006858b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400685de
cmp word [rsp + 0x70], r13w
jne 0x1400685bb
cmp rbx, r14
je 0x140068578
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14005f62c
cmp word [rsp + 0x70], r13w
je 0x1400685e1
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1401022c0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400685db
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400685e1

Function at 0x1400687b8
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400687ce
mov al, 1
jmp 0x14006882e
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400687df
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14006882c
mov ecx, dword [rcx + 0x18]
nop
call fcn.140041484
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14006882c
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14006882c
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14006882c
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14006882e
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400705a4
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.1400421e0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14007062e
cmp byte [rbp - 0x21], r15b
je 0x140070629
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140070664
call fcn.140057018
test eax, eax
jne 0x140070650
cmp byte [rbp - 0x21], r15b
je 0x140070648
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140070664
cmp byte [rbp - 0x21], r15b
je 0x140070661
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.14004254c
test eax, eax
jne 0x140070704
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400421e0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400706a3
cmp byte [rbp - 0x21], r15b
je 0x1400706d8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400706d8
call fcn.140057018
test eax, eax
jne 0x1400706c4
cmp byte [rbp - 0x21], r15b
je 0x1400706bd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400706d8
cmp byte [rbp - 0x21], r15b
je 0x1400706d5
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.14004254c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140070704
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140070707
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140070715
mov rcx, rdi
call fcn.14005ab3c
cmp byte [rbp + 0x3f], r15b
je 0x140070724
mov rcx, qword [rbp + 0x27]
call fcn.14005ab3c
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 0x140002f70
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 fcn.140004100
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140004100
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002fe0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400090a4]
mov rbx, rcx
test esi, esi
jle 0x140003110
mov rax, qword [0x1400090a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000302b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400030b5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140003010
mov rcx, rbx
call fcn.140003a30
mov rdi, rax
test rax, rax
je 0x140003132
mov rax, qword [0x1400090a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003b70
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400090a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003117
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400030ae
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400030c0
add dword [0x1400090a4], 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 [0x1400090a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400030ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002f70
nop dword [rax]
xor esi, esi
jmp 0x140003038
mov rax, qword [0x1400090a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002f70
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002f70
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400036a0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x1400036fc
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 0x1400036f3
test rsi, rsi
je 0x1400036f3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400036d8
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 0x140003a30
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140006980]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003a50
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003a58
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003a50
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140003aad
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 0x140003aa4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003a50
add rax, 0x28
cmp rax, r9
jne 0x140003a90
xor eax, eax
ret

Function at 0x140003ab0
Capabilities:
Parse pe header

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

Function at 0x140003b70
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006980]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003b8f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003b98
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x1400110c3
Capabilities:
Encrypt data using rc4 prga

Disassembly:
jmp 0x140011d00
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1a8
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, 0x32
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1c8]
mov rax, qword [0x14001f008]
xor rax, rbp
mov qword [rbp + 0x178], rax
lea rcx, [0x140025056]
call fcn.140011438
mov dword [rbp + 0x70], 8
mov dword [rbp + 0x74], 8
mov dword [rbp + 0xa0], 8
mov dword [rbp + 0xa4], 8
mov rax, qword [rbp + 0x1b8]
movsx eax, byte [rax]
test eax, eax
je 0x140011e2a
mov rax, qword [rbp + 0x1b8]
movsx eax, byte [rax]
and eax, 0xff
mov dword [rbp + 0x44], eax
mov eax, dword [rbp + 0x44]
cdq
and edx, 0xf
add eax, edx
and eax, 0xf
sub eax, edx
shl eax, 3
mov dword [rbp + 4], eax
mov eax, dword [rbp + 0x44]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
shl eax, 3
mov dword [rbp + 0x24], eax
mov eax, dword [rbp + 4]
mov dword [rbp + 0x68], eax
mov eax, dword [rbp + 0x24]
mov dword [rbp + 0x6c], eax
mov eax, dword [rbp + 0x1a8]
mov dword [rbp + 0x98], eax
mov eax, dword [rbp + 0x1b0]
mov dword [rbp + 0x9c], eax
lea r9, [rbp + 0x98]
mov r8, qword [rbp + 0x1a0]
lea rdx, [rbp + 0x68]
mov rcx, qword [rbp + 0x1c0]
call fcn.140011483
mov eax, dword [rbp + 0x1a8]
add eax, 8
mov dword [rbp + 0x1a8], eax
mov rax, qword [rbp + 0x1b8]
inc rax
mov qword [rbp + 0x1b8], rax
jmp 0x140011d79
lea rcx, [rbp - 0x20]
lea rdx, [0x14001bec0]
call fcn.1400113a2
mov rcx, qword [rbp + 0x178]
xor rcx, rbp
call fcn.140011217
lea rsp, [rbp + 0x188]
pop rdi
pop rbp
ret

Function at 0x140011267
Capabilities:
Terminate process

Disassembly:
jmp 0x1400141f0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x140011302
Capabilities:
Parse pe header

Disassembly:
jmp 0x140015540
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140015560
xor al, al
jmp 0x1400155e1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140015573
xor al, al
jmp 0x1400155e1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001559d
xor al, al
jmp 0x1400155e1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400155b1
xor al, al
jmp 0x1400155e1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400155c3
xor al, al
jmp 0x1400155e1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x1400155df
xor al, al
jmp 0x1400155e1
mov al, 1
add rsp, 0x38
ret
Function at 0x140011339
Capabilities:
Accept command line arguments

Disassembly:
jmp 0x140016f40
jmp 0x140016f60
mov qword [rsp + 0x18], rbx
push rdi
push r14
push r15
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdi, rax
mov ebx, 2
mov rdx, rax
movzx ecx, word [rax]
test cx, cx
je 0x140016fa2
cmp cx, 0x20
je 0x140016f93
cmp cx, 9
jne 0x140016f95
inc ebx
movzx ecx, word [rdx + 2]
add rdx, 2
test cx, cx
jne 0x140016f87
xor r15d, r15d
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x38], r15
mov r8, rdi
mov qword [rsp + 0x30], r15
xor edx, edx
mov dword [rsp + 0x28], r15d
mov ecx, 0xfde9
lea r9d, [r15 - 1]
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r14d, eax
test eax, eax
jle 0x14001707e
lea ecx, [rax + rbx*8]
mov r8d, 0x3000
movsxd rbp, ecx
lea r9d, [r15 + 4]
mov rdx, rbp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
je 0x14001707e
movsxd rdx, ebx
lea r9d, [r15 - 1]
mov qword [rsp + 0x38], r15
mov r8, rdi
mov qword [rsp + 0x30], r15
mov ecx, 0xfde9
mov dword [rsp + 0x28], r14d
lea rbx, [rax + rdx*8]
xor edx, edx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test rbx, rbx
je 0x14001707e
mov rdx, rsi
mov rcx, rbx
call fcn.140016dc0
mov ebx, eax
call fcn.140011140
mov rdx, rsi
mov ecx, ebx
call fcn.14001130c
mov r8d, 0x4000
mov rdx, rbp
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, ebx
jmp 0x14001709a
xor r9d, r9d
lea r8, str.Out_of_memory___aborting
lea rdx, str.Fatal_Error
lea ecx, [r9 + 0x10]
call fcn.14001119f
xor eax, eax
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140002918
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002962
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002962
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002962
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002962
cmp dword [rcx + 0x84], 0xe
jbe 0x140002962
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002964
xor al, al
add rsp, 0x28
ret
Function at 0x401808
Capabilities:
Accept command line arguments

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 0x68]
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_GetStartupInfoA
mov eax, dword [rbp - 0x2c]
and eax, 1
cmp eax, 0
je 0x401841
movzx eax, word [rbp - 0x28]
mov dword [rbp - 0x7c], eax
jmp 0x401849
mov eax, 0xa
mov dword [rbp - 0x7c], eax
movabs rax, 0
mov qword [rbp - 0x70], rax
call sub.kernel32.dll_GetCommandLineA
mov qword [rbp - 0x78], rax
mov rax, qword [rbp + 0x10]
cmp rax, 0
je 0x40188b
mov rax, qword [rbp + 0x10]
mov r11, rax
mov rax, qword [rbp - 0x78]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_strstr
mov qword [rbp - 0x70], rax
movabs rax, 0
mov rcx, qword [rbp - 0x70]
cmp rax, rcx
jne 0x4018bd
lea rax, [0x00402068]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll__strdup
mov qword [rbp - 0x70], rax
jmp 0x4018ee
mov rax, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x78]
cmp rax, rcx
jbe 0x4018ee
mov rax, qword [rbp - 0x70]
add rax, 0xffffffffffffffff
movsx ecx, byte [rax]
cmp ecx, 0x22
jne 0x4018ee
mov rax, qword [rbp - 0x70]
add rax, 0xffffffffffffffff
mov qword [rbp - 0x70], rax
mov eax, 0x30000
mov r11, rax
mov eax, 0x10000
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__controlfp
movabs rax, 0
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_GetModuleHandleA
mov ecx, dword [rbp - 0x7c]
mov r9, rcx
mov rcx, qword [rbp - 0x70]
mov r8, rcx
movabs rcx, 0
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.0040146d
leave
ret

Function at 0x401813
Capabilities:
Accept command line arguments

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 0x68]
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_GetStartupInfoA
mov eax, dword [rbp - 0x2c]
and eax, 1
cmp eax, 0
je 0x401841
movzx eax, word [rbp - 0x28]
mov dword [rbp - 0x7c], eax
jmp 0x401849
mov eax, 0xa
mov dword [rbp - 0x7c], eax
movabs rax, 0
mov qword [rbp - 0x70], rax
call sub.kernel32.dll_GetCommandLineA
mov qword [rbp - 0x78], rax
mov rax, qword [rbp + 0x10]
cmp rax, 0
je 0x40188b
mov rax, qword [rbp + 0x10]
mov r11, rax
mov rax, qword [rbp - 0x78]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_strstr
mov qword [rbp - 0x70], rax
movabs rax, 0
mov rcx, qword [rbp - 0x70]
cmp rax, rcx
jne 0x4018bd
lea rax, [0x00402068]
mov r10, rax
mov rcx, r10
call sub.msvcrt.dll__strdup
mov qword [rbp - 0x70], rax
jmp 0x4018ee
mov rax, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x78]
cmp rax, rcx
jbe 0x4018ee
mov rax, qword [rbp - 0x70]
add rax, 0xffffffffffffffff
movsx ecx, byte [rax]
cmp ecx, 0x22
jne 0x4018ee
mov rax, qword [rbp - 0x70]
add rax, 0xffffffffffffffff
mov qword [rbp - 0x70], rax
mov eax, 0x30000
mov r11, rax
mov eax, 0x10000
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__controlfp
movabs rax, 0
mov r10, rax
mov rcx, r10
call sub.kernel32.dll_GetModuleHandleA
mov ecx, dword [rbp - 0x7c]
mov r9, rcx
mov rcx, qword [rbp - 0x70]
mov r8, rcx
movabs rcx, 0
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.0040146d
leave
ret
Function at 0x1400111d1
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
jmp 0x140011820
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rdi
sub rsp, 0x168
lea rbp, [rsp + 0x40]
lea rcx, [0x140cb70a5]
call fcn.14001139d
mov r8d, dword [rbp + 0x140]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x14001187f
lea rcx, str.____Could_not_open_process_handle_n
call fcn.1400111ae
xor eax, eax
jmp 0x1400119e9
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8, qword [rbp + 0x150]
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
jne 0x1400118c8
lea rcx, str.____Could_not_allocate_memory_in_target_process_n
call fcn.1400111ae
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400119e9
mov rdx, qword [rbp + 0x28]
lea rcx, str.___Allocated_memory_at__p_n
call fcn.1400111ae
mov qword [rsp + 0x20], 0
mov r9, qword [rbp + 0x150]
mov r8, qword [rbp + 0x158]
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140011935
lea rcx, str.____Could_not_write_shellcode_to_target_process_n
call fcn.1400111ae
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400119e9
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, qword [rbp + 0x28]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
jne 0x14001199e
lea rcx, str.____Could_not_create_remote_thread_n
call fcn.1400111ae
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400119e9
lea rcx, str.___Thread_created__wait_for_callback_n
call fcn.1400111ae
mov edx, 0xffffffff
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
lea rsp, [rbp + 0x128]
pop rdi
pop rbp
ret

Function at 0x14001121c
Capabilities:
Terminate process

Disassembly:
jmp 0x1400133c0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret