joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b03f8
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rbp - 8], rax
or edi, 0xffffffff
mov esi, edx
mov rbx, rcx
cmp edx, edi
jne 0x1400b0431
xor eax, eax
jmp 0x1400b0551
mov rax, qword [rcx + 0x40]
cmp qword [rax], 0
je 0x1400b046b
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
mov rcx, r8
add rcx, qword [rax]
cmp qword [rax], rcx
jae 0x1400b046b
lea ecx, [r8 - 1]
mov eax, esi
mov dword [rdx], ecx
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], sil
jmp 0x1400b0551
cmp qword [rbx + 0x80], 0
je 0x1400b054f
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400b04a6
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400b04c7
movsx ecx, sil
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, edi
jmp 0x1400b054c
lea rax, [rbp - 0x40]
mov byte [rbp - 0x30], sil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rbp - 8]
mov qword [rsp + 0x30], rax
lea r9, [rbp - 0x2f]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea r8, [rbp - 0x30]
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400b0515
sub eax, 1
je 0x1400b0515
cmp eax, 2
jne 0x1400b054f
movsx ecx, byte [rbp - 0x30]
jmp 0x1400b04b3
mov r14, qword [rbp - 0x40]
lea rax, [rbp - 0x28]
sub r14, rax
je 0x1400b0540
mov r9, qword [rbx + 0x80]
lea rcx, [rbp - 0x28]
mov r8, r14
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp r14, rax
jne 0x1400b054f
lea rax, [rbp - 0x30]
mov byte [rbx + 0x71], 1
cmp qword [rbp - 0x38], rax
cmovne edi, esi
mov eax, edi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140225770
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x1400b0a3c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x1400b0aab
cmp byte [rcx + 0x71], 0
je 0x1400b0aab
mov rax, qword [rcx]
or edx, 0xffffffff
call qword [rax + Ordinal_26]
cmp eax, 0xffffffff
je 0x1400b0b00
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400b0ac5
sub eax, 1
je 0x1400b0ac9
cmp eax, 2
jne 0x1400b0b00
mov byte [rbx + 0x71], 0
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140225770
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x1400b0af7
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x1400b0b00
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400b0aad
xor al, al
jmp 0x1400b0aad

Function at 0x1400b468c
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400b46aa
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
xor ecx, ecx
cmp dword [rax], 0x4550
cmovne rax, rcx
ret
xor eax, eax
ret

Function at 0x1400b672c
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rbx, rcx
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, 0x20a
xor edi, edi
call sub.VCRUNTIME140.dll_memset
lea rdx, [rsp + 0x30]
mov ecx, 0x105
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0x104
ja 0x1400b67d6
or r8, 0xffffffffffffffff
lea rcx, [rsp + 0x30]
mov rax, r8
inc rax
cmp word [rcx + rax*2], di
jne 0x1400b678c
cmp word [rsp + rax*2 + 0x2e], 0x5c
jne 0x1400b67b2
lea rax, [rax*2 - 2]
cmp rax, 0x20a
jae 0x1400b681a
mov word [rsp + rax + 0x30], di
xorps xmm0, xmm0
lea rax, [rsp + 0x30]
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], rdi
inc r8
cmp word [rax + r8*2], di
jne 0x1400b67c5
lea rdx, [rsp + 0x30]
jmp 0x1400b67ee
xorps xmm0, xmm0
lea rdx, [0x140264acc]
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rdi
xor r8d, r8d
mov qword [rbx + 0x18], rdi
mov rcx, rbx
call fcn.1400b2ea0
mov rax, rbx
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140225770
mov rbx, qword [rsp + 0x268]
add rsp, 0x250
pop rdi
ret
call fcn.140225fc4
int3
Function at 0x1400b6b00
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
lea r9, [rbp - 0x30]
and dword [rbp - 0x30], ebx
mov r14, rcx
xor r8d, r8d
xor edx, edx
lea edi, [rbx + 0xb]
mov ecx, edi
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, 0xc0000004
jmp 0x1400b6b87
test rbx, rbx
je 0x1400b6b5c
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [rbp - 0x30]
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp - 0x30]
lea r9, [rbp - 0x30]
mov rdx, rax
mov ecx, edi
mov rbx, rax
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, esi
je 0x1400b6b46
test eax, eax
jns 0x1400b6bc8
test rbx, rbx
je 0x1400b6ba5
mov r8d, 0x8000
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140225770
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
test rbx, rbx
je 0x1400b6ba5
xor edi, edi
cmp dword [rbx], edi
jbe 0x1400b6b94
and qword [rbp - 0x18], 0
xorps xmm0, xmm0
and qword [rbp - 0x10], 0
mov eax, edi
imul rsi, rax, 0x128
movups xmmword [rbp - 0x28], xmm0
movzx edx, word [rsi + rbx + 0x2e]
add rdx, 0x30
add rdx, rsi
add rdx, rbx
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x1400b6c00
lea rcx, [rbp - 0x28]
call fcn.1400a9fcc
cmp qword [r14 + 0x18], 0xf
mov rdx, r14
jbe 0x1400b6c20
mov rdx, qword [r14]
cmp qword [rbp - 0x10], 0xf
lea rcx, [rbp - 0x28]
cmova rcx, qword [rbp - 0x28]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400b6c7e
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x1400b6c6f
mov rcx, qword [rbp - 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400b6c6a
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400b6cc6
call fcn.140225e3c
inc edi
cmp edi, dword [rbx]
jb 0x1400b6bd3
jmp 0x1400b6b94
mov rdi, qword [rsi + rbx + 0x18]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x1400b6cd2
mov rcx, qword [rbp - 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400b6ccd
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400b6ccd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140225e3c
mov rax, rdi
jmp 0x1400b6ba7
Function at 0x1400b6d68
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r14, r8
mov rbp, rdx
mov r12, rcx
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x1400b6d91
movsxd rcx, dword [rdx + 0x3c]
lea r13, [rdx + 0x18]
add r13, rcx
xor esi, esi
movzx eax, word [rcx + rdx + 0x14]
movzx r15d, word [rcx + rdx + 6]
add r13, rax
test r15d, r15d
je 0x1400b6df4
lea rcx, [rsi + rsi*4]
mov r8, rbx
lea rdi, [rcx*8]
mov rdx, r12
add rdi, r13
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x1400b6ded
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], 0
jne 0x1400b6ddf
cmp rbx, rax
je 0x1400b6e13
inc esi
cmp esi, r15d
jb 0x1400b6dba
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
cmp dword [rdi + 0xc], 0
je 0x1400b6df4
test r14, r14
je 0x1400b6e24
mov eax, dword [rdi + 8]
mov dword [r14], eax
mov eax, dword [rdi + 0xc]
add rax, rbp
jmp 0x1400b6df6

Function at 0x1400b78f0
Capabilities:
Delete file
Execute command
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor ebx, ebx
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x10000000
mov dword [rsp + 0x20], 1
mov dword [rsp + 0x40], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x1400b797f
cmp rdi, 0xffffffffffffffff
je 0x1400b7991
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, 0x6650
lea rdx, [0x140286f70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x1400b7991
call fcn.1400b89d0
lea rcx, str.C:WindowsSystem32Driversgdrv.sys
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [0x140265134]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140225770
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
Function at 0x1400b7c10
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
mov r11, rsp
push rbp
push r14
sub rsp, 0x168
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0x158], rax
mov r14, rdx
mov qword [rdx], 0
xor edx, edx
mov dword [r11 - 0x28], 0
mov rbp, rcx
lea r9, [r11 - 0x28]
xor r8d, r8d
lea ecx, [rdx + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp eax, 0xc0000004
jne 0x1400b7dbf
mov rax, qword gs:[0x30]
mov r8d, dword [rsp + 0x150]
mov qword [rsp + 0x198], rsi
add r8, r8
mov qword [rsp + 0x160], rdi
mov rdx, qword [rax + 0x60]
mov rcx, qword [rdx + 0x30]
mov edx, 8
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r8d, dword [rsp + 0x150]
xor r9d, r9d
add r8d, r8d
mov rdx, rax
mov rdi, rax
lea ecx, [r9 + 0xb]
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
test eax, eax
js 0x1400b7d91
mov qword [rsp + 0x190], rbx
xor ebx, ebx
cmp dword [rdi], ebx
jbe 0x1400b7d89
mov ecx, ebx
lea rax, [rsp + 0x20]
imul rcx, rcx, 0x128
mov edx, 2
add rcx, 8
add rcx, rdi
nop dword [rax]
lea rax, [rax + 0x80]
movups xmm0, xmmword [rcx]
movups xmm1, xmmword [rcx + 0x10]
lea rcx, [rcx + 0x80]
movups xmmword [rax - 0x80], xmm0
movups xmm0, xmmword [rcx - 0x60]
movups xmmword [rax - 0x70], xmm1
movups xmm1, xmmword [rcx - 0x50]
movups xmmword [rax - 0x60], xmm0
movups xmm0, xmmword [rcx - 0x40]
movups xmmword [rax - 0x50], xmm1
movups xmm1, xmmword [rcx - 0x30]
movups xmmword [rax - 0x40], xmm0
movups xmm0, xmmword [rcx - 0x20]
movups xmmword [rax - 0x30], xmm1
movups xmm1, xmmword [rcx - 0x10]
movups xmmword [rax - 0x20], xmm0
movups xmmword [rax - 0x10], xmm1
sub rdx, 1
jne 0x1400b7cf0
movups xmm0, xmmword [rcx]
lea rdx, [rsp + 0x48]
movups xmm1, xmmword [rcx + 0x10]
mov rcx, qword [rcx + 0x20]
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm1
mov qword [rax + 0x20], rcx
mov rcx, rbp
movzx eax, word [rsp + 0x46]
add rdx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400b7d7f
inc ebx
cmp ebx, dword [rdi]
jb 0x1400b7cd2
jmp 0x1400b7d89
mov rax, qword [rsp + 0x30]
xor esi, esi
mov qword [r14], rax
mov rbx, qword [rsp + 0x190]
mov rax, qword gs:[0x30]
mov r8, rdi
xor edx, edx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rdi, qword [rsp + 0x160]
mov eax, esi
mov rsi, qword [rsp + 0x198]
mov rcx, qword [rsp + 0x158]
xor rcx, rsp
call fcn.140225770
add rsp, 0x168
pop r14
pop rbp
ret
Function at 0x1400b7ec0
Capabilities:
Disable driver code integrity

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
xor ebx, ebx
mov r14, r8
mov qword [r8], rbx
mov rbp, rdx
mov rsi, rcx
call fcn.1400b9200
mov rcx, rsi
mov rdi, rax
call fcn.1400b9200
mov r9, rax
test rax, rax
je 0x1400b7fed
mov rax, qword gs:[0x30]
mov r10d, ebx
mov r8d, ebx
mov rcx, qword [rax + 0x60]
mov eax, 0x3fab
cmp word [rcx + 0x120], ax
jb 0x1400b7f82
lea r11, [0x140257680]
sub r9, r11
nop
mov ecx, ebx
mov rax, r11
movzx edx, byte [rax]
cmp byte [r9 + rax], dl
je 0x1400b7f42
test dl, dl
jne 0x1400b7f7e
inc ecx
inc rax
cmp ecx, 0x10
jb 0x1400b7f35
mov cl, 1
test cl, cl
mov eax, r8d
cmove eax, r10d
inc r8d
inc r9
mov r10d, eax
cmp r8d, 0xff
jl 0x1400b7f30
movzx ecx, bx
nop dword [rax]
inc cx
movzx eax, cx
cmp byte [rax + r11], bl
jne 0x1400b7f70
jmp 0x1400b7fdc
xor cl, cl
jmp 0x1400b7f4e
lea r11, [0x140257668]
sub r9, r11
nop dword [rax]
mov ecx, ebx
mov rax, r11
movzx edx, byte [rax]
cmp byte [r9 + rax], dl
je 0x1400b7fa2
test dl, dl
jne 0x1400b7ff4
inc ecx
inc rax
cmp ecx, 0xc
jb 0x1400b7f95
mov cl, 1
test cl, cl
mov eax, r8d
cmove eax, r10d
inc r8d
inc r9
mov r10d, eax
cmp r8d, 0xff
jl 0x1400b7f90
mov ecx, ebx
nop dword [rax + rax]
inc cx
movzx eax, cx
cmp byte [rax + r11], bl
jne 0x1400b7fd0
test r10d, r10d
jne 0x1400b7ff8
lea rcx, str.failed_to_find_CipInitialize_n
call fcn.14009ce78
xor eax, eax
jmp 0x1400b80da
xor cl, cl
jmp 0x1400b7fae
movzx r9d, cx
mov edx, r10d
movsxd rcx, r10d
lea rax, [rcx + r9]
mov r8d, dword [rax + rdi]
add rdi, 4
lea rax, [rcx + r8]
add rax, r9
lea rcx, str.CipOffset_:__d___CipInitOffset_:_0x_llx__CipInitialize_:_0x_llx_n
add rdi, rax
mov r9, rdi
call fcn.14009ce78
lea r11, [0x140257658]
mov r8, rdi
sub r8, r11
mov r10d, ebx
mov r9d, ebx
nop word [rax + rax]
mov ecx, ebx
mov rax, r11
movzx edx, byte [rax]
cmp byte [r8 + rax], dl
je 0x1400b8052
test dl, dl
jne 0x1400b80a1
inc ecx
inc rax
cmp ecx, 0xc
jb 0x1400b8045
mov cl, 1
test cl, cl
mov eax, r9d
cmove eax, r10d
inc r9d
inc r8
movsxd r10, eax
cmp r9d, 0xff
jl 0x1400b8040
nop dword [rax]
inc bx
movzx edx, bx
cmp byte [rdx + r11], 0
jne 0x1400b8080
test eax, eax
jne 0x1400b80a5
lea rcx, str.failed_to_find_Ci_gOptions_n
call fcn.14009ce78
xor eax, eax
jmp 0x1400b80da
xor cl, cl
jmp 0x1400b805e
lea rax, [r10 + rdx]
movsxd r8, dword [rax + rdi]
lea rbx, [r10 + 4]
add rbx, r8
lea rcx, str.Offset_:__d_RealOffset_:__d__g_CiOptions_:_0x_llx
add rbx, rdx
mov edx, r10d
add rbx, rdi
mov r9, rbx
call fcn.14009ce78
sub rbx, rsi
mov eax, 1
add rbx, rbp
mov qword [r14], rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x1400b8100
Capabilities:
Access peb ldr_data
Get windows directory from kuser_shared_data

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov qword [rcx], 0
lea rdx, [rsp + 0x58]
mov eax, dword [0x140264af0]
lea r8, str._lsSystem32_hs
movsd xmm0, qword [0x140264ae8]
mov rdi, rcx
mov dword [rsp + 0x60], eax
mov esi, 0x23f0
movzx eax, byte [0x140264af4]
mov r9d, 0x7ffe0030
mov byte [rsp + 0x64], al
mov eax, dword [str.CI.dll]
mov dword [rsp + 0x50], eax
movzx eax, word [0x140265270]
mov word [rsp + 0x54], ax
movzx eax, byte [0x140265272]
mov byte [rsp + 0x56], al
movsd qword [rsp + 0x58], xmm0
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
lea rax, [rsp + 0x50]
cmp word [rcx + 0x120], si
lea rcx, [rsp + 0x70]
cmovb rax, rdx
mov edx, 0x82
mov qword [rsp + 0x20], rax
call fcn.1400b7b80
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x70]
call fcn.1400b8fd0
mov ebx, eax
test eax, eax
jns 0x1400b81f9
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, str.Failed_to_map__ls:__08X_n
call fcn.14009ce78
jmp 0x1400b8330
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
cmp word [rcx + 0x120], si
jb 0x1400b8262
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x50]
call fcn.1400b7c10
mov ebx, eax
test eax, eax
jns 0x1400b8237
mov edx, eax
lea rcx, str.Failed_to_FindKernelModule__08X_n
call fcn.14009ce78
jmp 0x1400b831e
mov rdx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
call fcn.1400b7ec0
test eax, eax
je 0x1400b8319
mov rax, qword [rsp + 0x30]
xor ebx, ebx
mov qword [rdi], rax
jmp 0x1400b831e
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x58]
call fcn.1400b7c10
mov ebx, eax
test eax, eax
js 0x1400b831e
mov r11, qword [rsp + 0x48]
xor r10d, r10d
xor r9d, r9d
test r11, r11
je 0x1400b830d
mov rbx, qword [rsp + 0x40]
lea rsi, [0x140257694]
nop dword [rax + rax]
mov r8, r9
xor edx, edx
sub r8, rsi
mov rax, rsi
add r8, rbx
nop
movzx ecx, byte [rax]
cmp byte [r8 + rax], cl
je 0x1400b82bd
test cl, cl
jne 0x1400b8309
inc edx
inc rax
cmp edx, 4
jb 0x1400b82b0
mov cl, 1
test cl, cl
mov rax, r9
cmove rax, r10
inc r9
mov r10, rax
cmp r9, r11
jb 0x1400b82a0
test rax, rax
je 0x1400b830d
movsxd rcx, dword [rax + rbx + 4]
mov rbx, qword [rsp + 0x30]
add rcx, rax
add rbx, 8
add rbx, rcx
lea rcx, str.i_:_0x_llx_n_gCiEnabled_:__llx_n_gCiEnabledAddress_:__llx_n
call fcn.14009ce78
mov qword [rdi], rbx
xor ebx, ebx
jmp 0x1400b831e
xor cl, cl
jmp 0x1400b82c9
lea rcx, str.failed_to_find_CiEnabled_n
call fcn.14009ce78
mov ebx, 0xc0000225
mov rdx, qword [rsp + 0x40]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov eax, ebx
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.140225770
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x1400b8460
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x260
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rdi, rdx
mov rbx, rcx
call fcn.1400b83c0
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlCreateRegistryKey]
test eax, eax
js 0x1400b8547
lea r8, [0x140264f98]
mov dword [rsp + 0x30], 1
mov edx, 5
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov r8, rdi
lea rcx, [rsp + 0x40]
mov edx, 0x87
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea rcx, [rsp + 0x40]
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x1400b84e0
lea eax, [rax*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], eax
lea r8, str.ImagePath
lea rax, [rsp + 0x40]
mov rdx, rbx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
test eax, eax
js 0x1400b8547
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
lea r8, str.Type
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlWriteRegistryValue]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140225770
mov rbx, qword [rsp + 0x280]
add rsp, 0x260
pop rdi
ret
Function at 0x1400b8fd0
Capabilities:
Map section object

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0xf0
mov rax, qword [0x140282140]
xor rax, rsp
mov qword [rsp + 0xe0], rax
xor ebp, ebp
lea rdx, [rsp + 0x70]
mov qword [r8], rbp
mov rsi, r9
mov qword [r9], rbp
mov rdi, r8
lea r9, [rsp + 0x80]
mov qword [rsp + 0x60], rbp
xor r8d, r8d
call qword [sym.imp.ntdll.dll_RtlDosPathNameToRelativeNtPathName_U_WithStatus]
mov ebx, eax
test eax, eax
js 0x1400b91bf
movzx ecx, word [rsp + 0x80]
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x50], ebp
lea r9, [rsp + 0xd0]
mov qword [rsp + 0x48], rbp
lea r8, [rsp + 0xa0]
test cx, cx
mov dword [rsp + 0x40], 0x60
mov dword [rsp + 0x38], 1
lea rcx, [rsp + 0x60]
xorps xmm0, xmm0
mov dword [rsp + 0x30], 1
mov eax, ebp
mov dword [rsp + 0x28], 0x80
cmovne rax, qword [rsp + 0x90]
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x80]
cmove rax, rdx
mov dword [rsp + 0xa0], gethostname
mov edx, 0x120089
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0xb8], 0x40
movdqu xmmword [rsp + 0xc0], xmm0
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ntdll.dll_NtCreateFile]
mov ebx, eax
xor edx, edx
mov rax, qword gs:[0x30]
mov r8, qword [rsp + 0x78]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
lea rcx, [rsp + 0x80]
call qword [sym.imp.ntdll.dll_RtlReleaseRelativeName]
test ebx, ebx
js 0x1400b91bf
mov rax, qword [rsp + 0x60]
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov dword [rsp + 0x28], 0x1000000
xor r8d, r8d
mov edx, 0xf0004
mov dword [rsp + 0x20], 2
mov qword [rsp + 0x68], rbp
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov ebx, eax
test eax, eax
jns 0x1400b9145
lea rcx, str.NtCreateSection:_0x_08X_n
jmp 0x1400b919b
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
mov dword [rsp + 0x48], 2
mov r8, rdi
mov dword [rsp + 0x40], ebp
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x30], rsi
lea rdx, [r9 - 1]
mov qword [rdi], rbp
mov qword [rsp + 0x28], rbp
mov qword [rsi], rbp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov ebx, eax
cmp eax, 0x40000003
jne 0x1400b9190
mov ebx, ebp
jmp 0x1400b91a2
test eax, eax
jns 0x1400b91a2
lea rcx, str.NtMapViewOfSection:_0x_08X_n
mov edx, eax
call fcn.14009ce78
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400b91cd
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x1400b91cd
mov edx, ebx
lea rcx, str.NtCreateFile:_0x_08X_n
call fcn.14009ce78
mov eax, ebx
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.140225770
mov rbx, qword [rsp + 0x118]
add rsp, 0xf0
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400b9200
Capabilities:
Disable driver code integrity
Parse pe header

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov eax, 0x5a4d
mov rbp, rcx
cmp word [rcx], ax
jne 0x1400b92bd
movsxd rcx, dword [rcx + 0x3c]
add rcx, rbp
cmp dword [rcx], 0x4550
jne 0x1400b92bd
mov r8d, 0x20b
mov eax, 0x88
cmp word [rcx + 0x18], r8w
mov edx, 0x78
cmovne eax, edx
xor esi, esi
mov r12d, dword [rax + rcx]
mov eax, dword [rax + rcx + 4]
lea r13, [r12 + rbp]
mov r15d, dword [r13 + 0x20]
mov edi, dword [r13 + 0x18]
add r15, rbp
mov dword [rsp + 0x68], eax
mov eax, dword [r13 + 0x1c]
add rax, rbp
mov qword [rsp + 0x70], rax
mov eax, dword [r13 + 0x24]
add rax, rbp
sub edi, 1
mov qword [rsp + 0x60], rax
js 0x1400b92bd
nop
lea ebx, [rdi + rsi]
sar ebx, 1
lea rcx, str.CiInitialize
movsxd r14, ebx
mov edx, dword [r15 + r14*4]
add rdx, rbp
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x1400b92b4
lea edi, [rbx - 1]
jmp 0x1400b92b9
jle 0x1400b92d4
lea esi, [rbx + 1]
cmp edi, esi
jge 0x1400b9290
xor eax, eax
mov rbx, qword [rsp + 0x78]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp edi, esi
jl 0x1400b92bd
cmp ebx, dword [r13 + 0x14]
jge 0x1400b92bd
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
movzx eax, word [rax + r14*2]
mov ecx, dword [rcx + rax*4]
cmp ecx, r12d
jb 0x1400b9300
mov eax, dword [rsp + 0x68]
add eax, r12d
cmp ecx, eax
jb 0x1400b92bd
lea rax, [rcx + rbp]
jmp 0x1400b92bf