joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18f00
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
mov byte [rsp + 0x40], 0
lea rdi, [rsp + 0x41]
xor eax, eax
mov ecx, 0x17
rep stosb byte [rdi], al
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0xc0000001
cmp dword [0x00027ba0], 3
jne 0x18f4c
cmp qword [rsp + 0x70], 0
je 0x18f4c
cmp qword [rsp + 0x78], 0
jne 0x18f56
mov eax, 0xc000000d
jmp 0x18fe8
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x30]
call fcn.000183f0
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
jge 0x18f86
mov edx, dword [rsp + 0x38]
lea rcx, [0x000244a0]
call sub.ntoskrnl.exe_DbgPrint
mov eax, dword [rsp + 0x38]
jmp 0x18fe8
mov rax, qword [rsp + 0x70]
mov rax, qword [rax]
mov r9, qword [rsp + 0x30]
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call qword [rax + 0x10]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x103
jne 0x18fd9
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_KeWaitForSingleObject]
mov rdx, qword [rsp + 0x30]
mov eax, dword [rdx + 0x30]
mov dword [rsp + 0x38], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_IoFreeIrp]
mov eax, dword [rsp + 0x38]
add rsp, 0x60
pop rdi
ret

Function at 0x194d0
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0xc0
mov dword [rsp + 0xb8], 0
lea rdx, [0x000244f0]
lea rcx, [rsp + 0xa8]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rcx, qword [rsp + 0xb0]
call fcn.0001ccd0
mov dword [rsp + 0x78], 0x30
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x90], 0x40
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 3
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x78]
mov edx, 0x40000000
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov dword [rsp + 0xb8], eax
xor eax, eax
mov rcx, 0xffffffffffffffff
lea rdi, [0x000276b8]
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], ecx
lea rax, [0x000276b8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_ZwWriteFile]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
add rsp, 0xc0
pop rdi
ret
Function at 0x19620
Capabilities:
Print debug messages
Read file on windows

Disassembly:
push rdi
sub rsp, 0x130
mov rax, qword [0x00027100]
xor rax, rsp
mov qword [rsp + 0x128], rax
mov dword [rsp + 0x100], 0
lea rdi, [0x0002aee0]
xor eax, eax
mov ecx, 0x40
rep stosb byte [rdi], al
lea rdi, [rsp + 0xa8]
xor eax, eax
mov ecx, 0x3c
rep stosb byte [rdi], al
call fcn.000117e0
lea rdx, [0x000244f0]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov dword [rsp + 0x70], 0x30
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x88], 0x40
lea rax, [rsp + 0x60]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0x70]
mov edx, 0xc0000000
lea rcx, [rsp + 0xf8]
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov dword [rsp + 0x100], eax
cmp dword [rsp + 0x100], 0
jl 0x19828
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0x3c
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xe8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov dword [rsp + 0x100], eax
movzx eax, word [0x00024520]
mov word [0x0002aee0], ax
lea rdx, [0x000244e0]
lea rcx, [rsp + 0xa8]
call qword [sym.imp.ntoskrnl.exe__stricmp]
test eax, eax
jne 0x197e9
lea rdi, [0x0002aee0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
sub rdi, 1
lea rdx, [0x000276b8]
xor ecx, ecx
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx], al
add rcx, 1
test al, al
jne 0x197c5
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
call fcn.000194d0
jmp 0x19826
lea rdi, [0x0002aee0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
sub rdi, 1
lea rdx, [rsp + 0xa8]
xor ecx, ecx
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx], al
add rcx, 1
test al, al
jne 0x19809
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
jmp 0x19888
call fcn.000194d0
movzx edx, word [0x00024520]
mov word [0x0002aee0], dx
lea rdi, [0x0002aee0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
sub rdi, 1
lea rdx, [0x000276b8]
xor ecx, ecx
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx], al
add rcx, 1
test al, al
jne 0x1985a
lea rcx, [0x00024530]
call sub.ntoskrnl.exe_DbgPrint
lea rdx, [0x0002aee0]
lea rcx, [0x00024540]
call sub.ntoskrnl.exe_DbgPrint
mov rcx, qword [rsp + 0x128]
xor rcx, rsp
call fcn.00021b70
add rsp, 0x130
pop rdi
ret
Function at 0x1a9f0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x80
mov dword [rsp + 0x40], 0
lea rdi, [rsp + 0x48]
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x40], 0x30
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0x200
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x30], rax
lea rax, [0x0001a4d0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, 0x1fffff
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jl 0x1aaec
mov qword [rsp + 0x28], 0
lea rax, [0x00027bf0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [sym.imp.ntoskrnl.exe_PsThreadType]
mov r8, qword [r8]
mov edx, 0x1fffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandle]
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp dword [rsp + 0x70], 0
jge 0x1aaec
mov byte [0x00027ba4], 1
add rsp, 0x80
pop rdi
ret

Function at 0x1b140
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x80
mov dword [rsp + 0x40], 0
lea rdi, [rsp + 0x48]
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x40], 0x30
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0x200
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x30], rax
lea rax, [0x000198f0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, 0x1fffff
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jl 0x1b22e
mov qword [rsp + 0x28], 0
lea rax, [0x00027bf8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [sym.imp.ntoskrnl.exe_PsThreadType]
mov r8, qword [r8]
mov edx, 0x1fffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandle]
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
add rsp, 0x80
pop rdi
ret
Function at 0x1b240
Capabilities:
Find process by pid

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov byte [rsp + 0x20], 0
mov ecx, dword [rsp + 0x50]
lea rdx, [rsp + 0x28]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov dword [rsp + 0x30], eax
mov edx, 8
xor ecx, ecx
call sub.ntoskrnl.exe_ExAllocatePool
mov qword [rsp + 0x38], rax
cmp dword [rsp + 0x30], 0
jl 0x1b2cc
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.ntoskrnl.exe_PsGetProcessImageFileName]
lea rdx, [0x00023a00]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe__stricmp]
test eax, eax
je 0x1b2c7
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.ntoskrnl.exe_PsGetProcessImageFileName]
lea rdx, [0x00024650]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe__stricmp]
test eax, eax
jne 0x1b2cc
mov byte [rsp + 0x20], 1
mov al, byte [rsp + 0x20]
add rsp, 0x48
ret
Function at 0x1e080
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x38], 0
xor eax, eax
mov word [rsp + 0x30], ax
cmp qword [rsp + 0x90], 0
je 0x1e0d5
cmp qword [rsp + 0x98], 0
je 0x1e0d5
cmp qword [rsp + 0xa8], 0
jne 0x1e0dc
xor eax, eax
jmp 0x1e1f4
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 1
je 0x1e0f7
cmp dword [rsp + 0x78], 4
je 0x1e133
jmp 0x1e13f
lea r8, [rsp + 0x70]
mov edx, 0x104
mov rcx, qword [rsp + 0xa8]
call fcn.0001d000
cmp qword [rsp + 0x70], 0
ja 0x1e11d
xor eax, eax
jmp 0x1e1f4
mov rax, qword [rsp + 0x70]
shl rax, 1
movzx eax, ax
add rax, 2
mov word [rsp + 0x30], ax
jmp 0x1e149
mov eax, 4
mov word [rsp + 0x30], ax
jmp 0x1e149
mov eax, 0xc0000001
jmp 0x1e1f4
mov dword [rsp + 0x40], 0x30
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0x40
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
lea r8, [rsp + 0x40]
mov edx, 0xf003f
lea rcx, [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
jl 0x1e1a9
cmp qword [rsp + 0x38], 0
jne 0x1e1ad
xor eax, eax
jmp 0x1e1f4
movzx eax, word [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0xa0]
xor r8d, r8d
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov dword [rsp + 0x34], eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, dword [rsp + 0x34]
add rsp, 0x88
ret
Function at 0x1f4b0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x38
mov dword [rsp + 0x24], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x0002aeb8]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x24]
call qword [sym.imp.ntoskrnl.exe_PsGetVersion]
cmp dword [rsp + 0x24], 5
jne 0x1f4f8
cmp dword [rsp + 0x20], 1
jne 0x1f4f8
mov dword [0x0002aebc], 0x33
jmp 0x1f56e
cmp dword [rsp + 0x24], 6
jne 0x1f512
cmp dword [rsp + 0x20], 1
jne 0x1f512
mov dword [0x0002aebc], 0x3d
jmp 0x1f56e
cmp dword [rsp + 0x24], 6
jne 0x1f52c
cmp dword [rsp + 0x20], 2
jne 0x1f52c
mov dword [0x0002aebc], 0x3e
jmp 0x1f56e
cmp dword [rsp + 0x24], 6
jne 0x1f546
cmp dword [rsp + 0x20], 3
jne 0x1f546
mov dword [0x0002aebc], 0x3f
jmp 0x1f56e
cmp dword [rsp + 0x24], 0xa
jne 0x1f560
cmp dword [rsp + 0x20], 0
jne 0x1f560
mov dword [0x0002aebc], 0x64
jmp 0x1f56e
mov dword [0x0002aebc], 0
xor al, al
jmp 0x1f570
mov al, 1
add rsp, 0x38
ret

Function at 0x1f580
Capabilities:
Check os version

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov dword [rsp + 0x24], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x0002aeb8]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x24]
call qword [sym.imp.ntoskrnl.exe_PsGetVersion]
cmp dword [rsp + 0x24], 5
jne 0x1f5d9
cmp dword [rsp + 0x20], 1
jne 0x1f5d9
lea rdi, [0x0002af40]
lea rsi, [0x00024ba0]
mov ecx, 7
rep movsb byte [rdi], byte [rsi]
jmp 0x1f689
cmp dword [rsp + 0x24], 6
jne 0x1f601
cmp dword [rsp + 0x20], 1
jne 0x1f601
lea rdi, [0x0002af40]
lea rsi, [0x00024bb0]
mov ecx, 6
rep movsb byte [rdi], byte [rsi]
jmp 0x1f689
cmp dword [rsp + 0x24], 6
jne 0x1f626
cmp dword [rsp + 0x20], 2
jne 0x1f626
lea rdi, [0x0002af40]
lea rsi, [0x00024bc0]
mov ecx, 6
rep movsb byte [rdi], byte [rsi]
jmp 0x1f689
cmp dword [rsp + 0x24], 6
jne 0x1f64b
cmp dword [rsp + 0x20], 3
jne 0x1f64b
lea rdi, [0x0002af40]
lea rsi, [0x00024bd0]
mov ecx, 7
rep movsb byte [rdi], byte [rsi]
jmp 0x1f689
cmp dword [rsp + 0x24], 0xa
jne 0x1f670
cmp dword [rsp + 0x20], 0
jne 0x1f670
lea rdi, [0x0002af40]
lea rsi, [0x00024be0]
mov ecx, 7
rep movsb byte [rdi], byte [rsi]
jmp 0x1f689
lea rdi, [0x0002af40]
lea rsi, [0x00024bf0]
mov ecx, 7
rep movsb byte [rdi], byte [rsi]
xor al, al
jmp 0x1f68b
mov al, 1
add rsp, 0x38
pop rdi
pop rsi
ret
Function at 0x1f740
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x80
mov dword [rsp + 0x40], 0
lea rdi, [rsp + 0x48]
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x40], 0x30
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0x200
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x30], rax
lea rax, [0x0001f6a0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, 0x1fffff
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jl 0x1f83c
mov qword [rsp + 0x28], 0
lea rax, [0x00028078]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [sym.imp.ntoskrnl.exe_PsThreadType]
mov r8, qword [r8]
mov edx, 0x1fffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandle]
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp dword [rsp + 0x70], 0
jge 0x1f83c
mov byte [0x00027ba6], 1
add rsp, 0x80
pop rdi
ret
Function at 0x1fd40
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x428
mov rax, qword [0x00027100]
xor rax, rsp
mov qword [rsp + 0x410], rax
mov dword [rsp + 0x3c8], 0
xor eax, eax
mov word [rsp + 0x1b0], ax
lea rdi, [rsp + 0x1b2]
xor eax, eax
mov ecx, 0x1fe
rep stosb byte [rdi], al
lea rdi, [rsp + 0x70]
xor eax, eax
mov ecx, 0x100
rep stosb byte [rdi], al
lea rdx, [0x00024e00]
lea rcx, [rsp + 0x170]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov dword [rsp + 0x180], 0x30
mov qword [rsp + 0x188], 0
mov dword [rsp + 0x198], 0x40
lea rax, [rsp + 0x170]
mov qword [rsp + 0x190], rax
mov qword [rsp + 0x1a0], 0
mov qword [rsp + 0x1a8], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 3
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x3b0]
lea r8, [rsp + 0x180]
mov edx, 0x40000000
lea rcx, [rsp + 0x3c0]
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov dword [rsp + 0x3c8], eax
cmp dword [rsp + 0x3c8], 0
jl 0x1fff3
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0x100
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x3b0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x3c0]
call qword [sym.imp.ntoskrnl.exe_ZwReadFile]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x3e0]
call qword [sym.imp.ntoskrnl.exe_RtlInitAnsiString]
mov r8b, 1
lea rdx, [rsp + 0x3e0]
lea rcx, [rsp + 0x3d0]
call qword [sym.imp.ntoskrnl.exe_RtlAnsiStringToUnicodeString]
mov dword [rsp + 0x3c8], eax
cmp dword [rsp + 0x3c8], 0
jl 0x1ffe5
lea rax, [0x00024e40]
mov qword [rsp + 0x3f0], rax
lea rax, [rsp + 0x1b0]
mov qword [rsp + 0x3f8], rax
mov rax, qword [rsp + 0x3f8]
mov qword [rsp + 0x400], rax
mov rax, qword [rsp + 0x3f0]
movzx eax, word [rax]
mov word [rsp + 0x408], ax
mov rcx, qword [rsp + 0x3f8]
movzx eax, word [rsp + 0x408]
mov word [rcx], ax
mov rax, qword [rsp + 0x3f0]
add rax, 2
mov qword [rsp + 0x3f0], rax
mov rax, qword [rsp + 0x3f8]
add rax, 2
mov qword [rsp + 0x3f8], rax
cmp word [rsp + 0x408], 0
jne 0x1ff18
lea rdi, [rsp + 0x1b0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
sub rdi, 2
mov rdx, qword [rsp + 0x3d8]
xor ecx, ecx
movzx eax, word [rdx + rcx]
mov word [rdi + rcx], ax
add rcx, 2
test ax, ax
jne 0x1ff93
lea rdi, [rsp + 0x1b0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
sub rdi, 2
lea rsi, [0x00024e80]
mov ecx, 0x56
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x1b0]
call fcn.0001ccd0
lea rcx, [rsp + 0x3d0]
call qword [sym.imp.ntoskrnl.exe_RtlFreeUnicodeString]
mov rcx, qword [rsp + 0x3c0]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov rcx, qword [rsp + 0x410]
xor rcx, rsp
call fcn.00021b70
add rsp, 0x428
pop rdi
pop rsi
ret
Function at 0x21870
Capabilities:
Get file attributes
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x170
mov rax, qword [0x00027100]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x14c], 0
mov rdx, qword [rsp + 0x180]
lea rcx, [rsp + 0x100]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov dword [rsp + 0x118], 0x30
mov qword [rsp + 0x120], 0
mov dword [rsp + 0x130], 0x40
lea rax, [rsp + 0x100]
mov qword [rsp + 0x128], rax
mov qword [rsp + 0x138], 0
mov qword [rsp + 0x140], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x150]
lea r8, [rsp + 0x118]
mov edx, 0x80000000
lea rcx, [rsp + 0x110]
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov dword [rsp + 0x148], eax
cmp dword [rsp + 0x148], 0
jl 0x21b38
mov dword [rsp + 0x20], 5
mov r9d, 0x18
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x150]
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov dword [rsp + 0x148], eax
cmp dword [rsp + 0x148], 0
jl 0x21b38
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x14c], eax
mov edx, dword [rsp + 0x14c]
xor ecx, ecx
call sub.ntoskrnl.exe_ExAllocatePool
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
je 0x21b38
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov eax, dword [rsp + 0x14c]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov dword [rsp + 0x148], eax
cmp dword [rsp + 0x148], 0
jge 0x21a70
mov dword [rsp + 0x14c], 0
xor edx, edx
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rsp + 0x80], 0
jmp 0x21b1a
lea rcx, [rsp + 0x90]
call fcn.00020020
mov r8d, dword [rsp + 0x14c]
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0x90]
call fcn.00020080
lea rcx, [rsp + 0x90]
call fcn.00020260
mov ecx, 0x21
call fcn.0001b350
mov qword [0x00028288], rax
cmp qword [0x00028288], 0
je 0x21b1a
mov rdi, qword [0x00028288]
xor eax, eax
xor ecx, ecx
rep stosb byte [rdi], al
mov dword [rsp + 0x78], 0
jmp 0x21ae4
mov eax, dword [rsp + 0x78]
add eax, 1
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 0x10
jge 0x21b1a
movsxd rax, dword [rsp + 0x78]
movzx r8d, byte [rsp + rax + 0xe8]
mov eax, dword [rsp + 0x78]
shl eax, 1
cdqe
mov rcx, qword [0x00028288]
add rcx, rax
lea rdx, [0x00024ee0]
call qword [sym.imp.ntoskrnl.exe_sprintf]
jmp 0x21ad9
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
xor edx, edx
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.00021b70
add rsp, 0x170
pop rdi
ret

Function at 0x2d064
Capabilities:
Create device object

Disassembly:
sub rsp, 0x28
mov r8, rdx
mov r9, rcx
call fcn.0002d008
mov rdx, r8
mov rcx, r9
add rsp, 0x28
jmp fcn.000155a0
Function at 0x140011235
Capabilities:
Terminate process

Disassembly:
jmp 0x140014470
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 0x1400112cb
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400157c0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x1400157e0
xor al, al
jmp 0x140015861
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400157f3
xor al, al
jmp 0x140015861
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 0x14001581d
xor al, al
jmp 0x140015861
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140015831
xor al, al
jmp 0x140015861
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140015843
xor al, al
jmp 0x140015861
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001585f
xor al, al
jmp 0x140015861
mov al, 1
add rsp, 0x38
ret
Function at 0x14000af00
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 fcn.140014de0
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.140014de0
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 0x14000af70
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400e00a4]
test esi, esi
mov rbx, rcx
jle 0x14000b0a0
mov rax, qword [0x1400e00a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000afbb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000b045
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000afa0
mov rcx, rbx
call fcn.14000b9c0
test rax, rax
mov rdi, rax
je 0x14000b0c2
mov rax, qword [0x1400e00a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14000bb00
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400e00a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000b0a7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000b03e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000b050
add dword [0x1400e00a4], 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 [0x1400e00a8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000b03e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000af00
nop dword [rax]
xor esi, esi
jmp 0x14000afc8
mov rax, qword [0x1400e00a8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.14000af00
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.14000af00
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000b630
Capabilities:
Get thread local storage value

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