joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140019cf0
Capabilities:
Delete registry key

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xa0
mov rax, qword [0x1400a3c40]
xor rax, rsp
mov qword [rbp + 0x4f], rax
mov rbx, rcx
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rsi, rax
test rax, rax
je 0x140019ef5
mov rcx, qword [rbx + 0x10]
movabs rdi, 0x7ffffffffffffffe
mov rax, rdi
sub rax, rcx
cmp rax, 0x34
jb 0x140019f20
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x140019d61
mov rax, qword [rbx]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x34
lea r9, str.RegistryMachineSystemCurrentControlSetServices_
lea rcx, [rbp + 0x1f]
call fcn.140010e90
nop
lea rdx, [rbp + 0x1f]
cmp qword [rbp + 0x37], 8
cmovae rdx, qword [rbp + 0x1f]
lea rcx, [rbp + 0x3f]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rax, qword [rbx + 0x10]
sub rdi, rax
cmp rdi, 0x22
jb 0x140019f26
cmp qword [rbx + 0x18], 8
jb 0x140019db8
mov rbx, qword [rbx]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], 0x22
lea r9, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 1]
call fcn.140010e90
nop
lea rdx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rdx, qword [rbp - 1]
lea r8, [rbp - 9]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x140019e07
cmp eax, 2
sete bl
jmp 0x140019e64
mov rcx, qword [rbp - 9]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.NtUnloadDriver
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp + 0x3f]
call rax
lea rdx, [rbp - 1]
mov rcx, 0xffffffff80000002
test eax, eax
je 0x140019e4a
cmp qword [rbp + 0x17], 8
cmovae rdx, qword [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
xor bl, bl
jmp 0x140019e64
cmp qword [rbp + 0x17], 8
cmovae rdx, qword [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
je 0x140019e62
xor bl, bl
jmp 0x140019e64
mov bl, 1
mov rdx, qword [rbp + 0x17]
cmp rdx, 8
jb 0x140019ea4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140019e9f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019f2c
call fcn.14005bba4
xor eax, eax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], 7
mov word [rbp - 1], ax
mov rdx, qword [rbp + 0x37]
cmp rdx, 8
jb 0x140019ef2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140019eed
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019f1a
call fcn.14005bba4
movzx eax, bl
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.14005b650
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.140026ed8
int3
call fcn.1400017b0
nop
call fcn.1400017b0
nop
call fcn.140026ed8
int3
Function at 0x140019f40
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov rax, qword [0x1400a3c40]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r14, rcx
xor ebp, ebp
mov ebx, ebp
mov dword [rsp + 0x20], ebp
lea r9, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
lea ecx, [rbp + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x140019fd4
test rbx, rbx
je 0x140019f9c
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rsp + 0x20]
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
lea r9, [rsp + 0x20]
mov r8d, dword [rsp + 0x20]
mov rdx, rax
mov ecx, 0xb
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140019f86
test eax, eax
jns 0x14001a013
test rbx, rbx
je 0x140019fee
mov r8d, 0x8000
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14005b650
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
test rbx, rbx
je 0x140019fee
mov edi, ebp
cmp dword [rbx], ebp
jbe 0x140019fdd
nop
mov esi, edi
imul rax, rsi, 0x128
movzx ecx, word [rax + rbx + 0x2e]
add rcx, rax
lea rdx, [rbx + 0x30]
add rdx, rcx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], send
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x14001a052
lea rcx, [rsp + 0x28]
call fcn.140003650
mov rdx, r14
cmp qword [r14 + 0x18], 0x10
jb 0x14001a073
mov rdx, qword [r14]
lea rcx, [rsp + 0x28]
cmp qword [rsp + 0x40], 0x10
cmovae rcx, qword [rsp + 0x28]
call fcn.140027f30
test eax, eax
je 0x14001a0d5
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x14001a0c6
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001a0c1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001a133
call fcn.14005bba4
inc edi
cmp edi, dword [rbx]
jb 0x14001a020
jmp 0x140019fdd
imul rax, rsi, 0x128
mov rdi, qword [rax + rbx + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x14001a12b
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001a126
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001a133
call fcn.14005bba4
mov rax, rdi
jmp 0x140019ff0
call fcn.140026ed8
int3
Function at 0x14001cf20
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push r12
push r15
sub rsp, 0x10
mov r11d, dword [rdx + 0xb0]
mov r15, r8
mov rsi, rdx
mov r12, rcx
test r11d, r11d
je 0x14001d09c
movzx eax, word [rdx + 0x14]
lea r9, [rdx + 0x18]
movzx r8d, word [rdx + 6]
add r9, rax
xor r10d, r10d
test r8d, r8d
je 0x14001d09c
nop
mov edx, dword [r9 + 0xc]
cmp r11d, edx
jb 0x14001cf74
mov ecx, dword [r9 + 8]
add ecx, edx
cmp r11d, ecx
jb 0x14001cf8a
inc r10d
add r9, 0x28
cmp r10d, r8d
jl 0x14001cf60
add rsp, 0x10
pop r15
pop r12
pop rsi
ret
sub r11d, edx
mov qword [rsp], r14
mov r14d, dword [r9 + 0x14]
mov eax, r11d
add rax, r12
add r14, rax
je 0x14001d098
mov qword [rsp + 0x38], rbp
xor ebp, ebp
cmp dword [rsi + 0xb4], ebp
jbe 0x14001d093
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x40], rdi
mov qword [rsp + 8], r13
mov r13d, 0xf000
nop dword [rax]
mov edi, dword [r14 + 4]
lea rdx, [rsi + 0x18]
movzx eax, word [rsi + 0x14]
lea r10, [r14 + 8]
movzx ebx, word [rsi + 6]
sub rdi, 8
mov r11d, dword [r14]
add rdx, rax
shr rdi, 1
xor r9d, r9d
test ebx, ebx
je 0x14001d025
nop dword [rax + rax]
mov r8d, dword [rdx + 0xc]
cmp r11d, r8d
jb 0x14001d019
mov eax, dword [rdx + 8]
lea ecx, [r8 + rax]
cmp r11d, ecx
jb 0x14001d0a6
inc r9d
add rdx, 0x28
cmp r9d, ebx
jl 0x14001d000
xor r8d, r8d
xor edx, edx
test rdi, rdi
je 0x14001d071
mov r9d, 0xa000
nop word [rax + rax]
movzx eax, word [r10]
movzx ecx, ax
and cx, r13w
cmp cx, r9w
jne 0x14001d064
and eax, 0xfff
lea rcx, [rax + r8]
mov rax, r15
sub rax, qword [rsi + 0x30]
add qword [rcx], rax
inc edx
add r10, 2
mov eax, edx
cmp rax, rdi
jb 0x14001d040
add ebp, dword [r14 + 4]
mov r14, r10
cmp ebp, dword [rsi + 0xb4]
jb 0x14001cfd0
mov r13, qword [rsp + 8]
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov r14, qword [rsp]
add rsp, 0x10
pop r15
pop r12
pop rsi
ret
sub r11d, r8d
mov r8d, dword [rdx + 0x14]
mov eax, r11d
add rax, r12
add r8, rax
jmp 0x14001d028
Function at 0x14001d0c0
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x20], rsi
push r12
push r14
push r15
sub rsp, 0x20
mov r12, r9
mov rsi, r8
mov r15, rdx
mov r14, rcx
call fcn.14001cbe0
test al, al
jne 0x14001d0fb
call fcn.140014900
xor eax, eax
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
mov r8, r12
mov rdx, rsi
mov rcx, r15
call fcn.14001cf20
movzx r9d, word [rsi + 0x14]
mov r8, r15
add r9d, 0x18
mov rdx, r12
mov rcx, r14
call fcn.14001c6b0
test al, al
je 0x14001d0e4
movzx ecx, word [rsi + 6]
mov qword [rsp + 0x40], rbx
movzx ebx, word [rsi + 0x14]
mov qword [rsp + 0x48], rbp
add rbx, 0x20
mov qword [rsp + 0x50], rdi
xor edi, edi
mov ebp, edi
cmp di, cx
jae 0x14001d186
add rbx, rsi
nop dword [rax + rax]
mov r9d, dword [rbx + 8]
cmp r9d, dword [rbx]
cmovae r9d, dword [rbx]
test r9d, r9d
je 0x14001d175
mov r8d, dword [rbx + 0xc]
mov rcx, r14
mov edx, dword [rbx + 4]
add r8, r15
add rdx, r12
call fcn.14001c6b0
movzx eax, word [rsi + 6]
inc ebp
add rbx, 0x28
cmp ebp, eax
jl 0x14001d150
movzx ecx, ax
mov eax, dword [rsi + 0x28]
mov rbp, qword [rsp + 0x48]
add rax, r12
cmp byte [rsp + 0x60], dil
je 0x14001d1e2
mov r11d, dword [rsi + 0x88]
test r11d, r11d
je 0x14001d1e0
movzx eax, word [rsi + 0x14]
lea r8, [rsi + 0x18]
add r8, rax
movzx ebx, cx
mov rdx, r8
mov r9d, edi
test ebx, ebx
je 0x14001d1e0
nop dword [rax]
mov r10d, dword [rdx + 0xc]
cmp r11d, r10d
jb 0x14001d1d4
mov ecx, dword [rdx + 8]
add ecx, r10d
cmp r11d, ecx
jb 0x14001d1fc
inc r9d
add rdx, 0x28
cmp r9d, ebx
jl 0x14001d1c0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
mov esi, dword [rdx + 0x14]
sub r11d, r10d
mov eax, r11d
add rax, r15
add rsi, rax
je 0x14001d1e0
mov r11d, dword [rsi + 0x1c]
mov rdx, r8
mov r9d, edi
mov r10d, dword [rdx + 0xc]
cmp r11d, r10d
jb 0x14001d22b
mov ecx, dword [rdx + 8]
add ecx, r10d
cmp r11d, ecx
jb 0x14001d239
inc r9d
add rdx, 0x28
cmp r9d, ebx
jl 0x14001d217
jmp 0x14001d1e0
sub r11d, r10d
mov r10d, dword [rdx + 0x14]
mov eax, r11d
add rax, r15
add r10, rax
je 0x14001d1e0
mov r9d, dword [rsi + 0x24]
nop
mov edx, dword [r8 + 0xc]
cmp r9d, edx
jb 0x14001d264
mov ecx, dword [r8 + 8]
add ecx, edx
cmp r9d, ecx
jb 0x14001d273
inc edi
add r8, 0x28
cmp edi, ebx
jl 0x14001d250
jmp 0x14001d1e0
mov ecx, dword [r8 + 0x14]
sub r9d, edx
mov eax, r9d
add rax, r15
add rcx, rax
je 0x14001d1e0
movzx eax, word [rcx]
mov eax, dword [r10 + rax*4]
add rax, r12
jmp 0x14001d1e2
Function at 0x140026c98
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x140026b2b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140026b2b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140026b2b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140026b2b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140026b2b
cmp dword [rcx + 0x84], 0xe
jbe 0x140026b2b
cmp dword [rcx + 0xf8], 0
je 0x140026b2b
mov ecx, ebx
call fcn.140026bcc
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.1400269bc
cmp dword [rbp + 0x20], 0
je 0x140026b78
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140026b80
int3
xor r8d, r8d
xor edx, edx
jmp 0x140026ac4

Function at 0x140027518
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140027538
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140026f98
or eax, 0xffffffff
jmp 0x14002753a
xor eax, eax
add rsp, 0x28
ret
Function at 0x140001500
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0x90], rcx
mov r12, rdx
call sub.msvcrt.dll_wcslen
mov r15, qword [rsp + 0x90]
mov rbp, rax
jmp 0x1400015a1
add rbp, 1
mov rax, rbx
sub rax, r15
sar rax, 1
sub rbp, rax
lea r10, [rbp + rbp]
lea ebp, [rdi - 1]
test r9d, r9d
jg 0x140001680
sub ebp, r9d
mov dword [rsp + 0x28], r9d
mov r8d, edi
mov rdx, rsi
movsxd rbp, ebp
mov qword [rsp + 0x38], r10
mov rcx, r13
mov qword [rsp + 0x30], r11
movzx ebp, word [rsi + rbp*2]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r9d, dword [rsp + 0x28]
test r9d, r9d
je 0x140001599
mov r11, qword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov rdx, rbx
lea rcx, [rbx + r11*2]
call sub.msvcrt.dll_memmove
mov word [rsi + rdi*2 - 2], bp
mov rbp, r14
lea rdx, section..rdata
mov rcx, r15
call sub.msvcrt.dll_wcsstr
mov rsi, rax
test rax, rax
je 0x1400016e8
lea r13, [rax + 4]
lea rdx, section..rdata
mov rcx, r13
call sub.msvcrt.dll_wcsstr
test rax, rax
je 0x1400016e8
xor edx, edx
lea rbx, [rax + 4]
xor r8d, r8d
mov rcx, r13
mov word [rax], dx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r9, rbx
sub r9, rsi
movsxd rdi, eax
sar r9, 1
not r9d
add r9d, edi
movsxd r11, r9d
lea r14, [r11 + rbp]
cmp r14, r12
jb 0x140001530
lea r12, [r12 + r12*2 + 0x30]
lea rax, [r14 + 1]
mov dword [rsp + 0x30], r9d
shr r12, 1
mov qword [rsp + 0x28], r11
cmp r14, r12
cmovae r12, rax
cmp r15, qword [rsp + 0x90]
lea rdx, [r12 + r12]
je 0x1400016b0
mov rcx, r15
call sub.msvcrt.dll_realloc
mov r11, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x30]
test rax, rax
mov rcx, rax
je 0x1400016fc
add rbp, 1
mov rax, rcx
sub rax, r15
mov r15, rcx
add rsi, rax
add rbx, rax
lea r13, [rsi + 4]
jmp 0x140001534
lea rcx, [rbx + r11*2]
mov r8, r10
mov rdx, rbx
movsxd rbp, ebp
call sub.msvcrt.dll_memmove
movzx ebp, word [rsi + rbp*2]
mov r8d, edi
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x140001599
mov rcx, rdx
call sub.msvcrt.dll_malloc
mov rcx, rax
test rax, rax
je 0x1400016fc
add rbp, 1
mov rdx, r15
lea r8, [rbp + rbp]
call sub.msvcrt.dll_memcpy
mov r11, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x30]
mov rcx, rax
jmp 0x14000165e
mov rax, r15
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 2
call qword [fcn.140002ca0]
mov r8, r13
lea rdx, str.Substituting__s_results_in_too_large_a_command_line_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop word cs:[rax + rax]
nop
Function at 0x140001730
Capabilities:
Accept command line arguments

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rdi, rcx
mov rbp, rdx
lea rdx, [rsp + 0x2c]
mov rsi, r8
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
mov eax, dword [rsp + 0x2c]
test eax, eax
jle 0x1400017b5
mov rdi, qword [rbx]
movzx ecx, word [rdi]
cmp cx, 0x5c
je 0x1400017a8
call qword [sym.imp.msvcrt.dll_isalpha]
test eax, eax
je 0x140001774
cmp word [rdi + 2], 0x3a
je 0x1400017a8
mov rdx, rbp
mov rcx, rsi
call sub.msvcrt.dll_wcscpy
mov rdx, qword [rbx]
mov r8d, 0x1000
mov rcx, rsi
call fcn.140001450
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rdx, rdi
mov rcx, rsi
call sub.msvcrt.dll_wcscpy
jmp 0x140001790
mov ecx, 2
call qword [fcn.140002ca0]
mov r8, rdi
lea rdx, str.Invalid_command_line:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop dword [rax]

Function at 0x140001a20
Capabilities:
Terminate process

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov edi, r8d
mov rbx, rcx
mov r14, rdx
call sub.msvcrt.dll_wcscpy
test edi, edi
je 0x140001a53
js 0x140001a70
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x140001b5c
mov eax, dword [section..data]
test eax, eax
js 0x140001b46
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rbp, qword [sym.imp.msvcrt.dll__waccess]
mov r13, qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r12, [0x14004a040]
jmp 0x140001a9e
mov rcx, rbx
call r13
test eax, eax
je 0x140001b5c
mov rcx, rbx
call sub.msvcrt.dll_wcslen
mov rsi, rax
mov eax, dword [section..data]
test eax, eax
jns 0x140001abb
mov rcx, rbx
call fcn.140001930
test eax, eax
jne 0x140001a61
mov r8d, 0x1000
mov rdx, r12
mov rcx, rbx
movsxd rsi, esi
call fcn.140001450
lea rsi, [rbx + rsi*2]
mov rcx, rbx
xor edx, edx
call rbp
xor ecx, ecx
mov word [rsi], cx
cmp eax, 0xffffffff
jne 0x140001a61
mov r8d, 0x1000
lea rdx, str.mingw_bin
mov rcx, rbx
call fcn.140001450
xor edx, edx
mov rcx, rbx
call rbp
xor edx, edx
mov word [rsi], dx
cmp eax, 0xffffffff
jne 0x140001a61
add edi, 1
jne 0x140001a90
mov ecx, 2
call qword [fcn.140002ca0]
mov r8, r14
lea rdx, str.Top_level_not_found:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call sub.msvcrt.dll_exit
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp fcn.140001930
mov ecx, 2
call qword [fcn.140002ca0]
mov r8, r14
lea rdx, str.Invalid_executable_path:__s_n
mov rcx, rax
call sub.msvcrt.dll_fwprintf
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x140001e80
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.140002ca0
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.140002ca0
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 0x140001ef0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14004a124]
mov rbx, rcx
test esi, esi
jle 0x140002020
mov rax, qword [0x14004a128]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001f3b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001fc5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001f20
mov rcx, rbx
call fcn.140002940
mov rdi, rax
test rax, rax
je 0x140002042
mov rax, qword [0x14004a128]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002a80
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14004a128]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002027
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001fbe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001fd0
add dword [0x14004a124], 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 [0x14004a128]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001fbe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001e80
nop dword [rax]
xor esi, esi
jmp 0x140001f48
mov rax, qword [0x14004a128]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001e80
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001e80
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400025b0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14004a180]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14004a160]
test rbx, rbx
je 0x14000260c
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 0x140002603
test rsi, rsi
je 0x140002603
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400025e8
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 0x140002940
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x1400029c0
Capabilities:
Parse pe header

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

Function at 0x140002a80
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006d40]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140002a9f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002aa8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x37f4118e0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
cmp edx, 1
je 0x37f4118f8
mov eax, 1
add rsp, 0x38
ret
mov qword [rsp + 0x28], 0
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
lea r8, [0x37f411540]
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
add rsp, 0x38
ret

Function at 0x37f41b1e0
Capabilities:
Execute shellcode via indirect call
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 fcn.37f4212a0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.37f4212a0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call fcn.37f4219d0
nop
nop word [rax + rax]

Function at 0x37f41b250
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x37f4bb064]
mov r12, rcx
test ebx, ebx
jle 0x37f41b380
mov rax, qword [0x37f4bb068]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x37f41b29b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x37f41b325
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x37f41b280
mov rcx, r12
call fcn.37f41bab0
mov rsi, rax
test rax, rax
je 0x37f41b3a2
mov rax, qword [0x37f4bb068]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.37f41bbe0
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x37f4bb068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x37f41b387
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x37f41b31e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x37f41b330
add dword [0x37f4bb064], 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 [0x37f4bb068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x37f41b31e
call qword [0x37f4bd3b8]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.37f41b1e0
nop dword [rax]
xor ebx, ebx
jmp 0x37f41b2a8
mov rax, qword [0x37f4bb068]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.37f41b1e0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.37f41b1e0
nop
nop word cs:[rax + rax]
nop dword [rax]