joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400c8d20
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov byte [rsp + 0x38], 0xff
mov rcx, qword [rcx + 0x20]
mov edi, r8d
mov esi, edx
mov byte [rsp + 0x3a], dil
xor r9d, r9d
mov byte [rsp + 0x39], sil
lea rdx, [rsp + 0x38]
mov rcx, qword [rcx + 0x188]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1400c8d7f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbx
mov r8d, eax
call fcn.14009f8f0
mov r9d, edi
lea rdx, str.SENT
mov r8d, esi
mov rcx, rbx
call fcn.1400c88c0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400c8f20
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x1400c90d6
push rbp
push rdi
push r13
sub rsp, 0x20
mov rbp, qword [rcx + 0x198]
mov rdi, rcx
mov r13, qword [rcx + 0x20]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rsi
lea rsi, [rbp + 0x1cd8]
mov qword [rsp + 0x50], r14
lea rbx, [rbp + 0x1ed8]
mov qword [rsp + 0x58], r15
mov qword [rbx], rsi
mov rax, rsi
cmp rsi, rbx
jae 0x1400c8f76
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x1400c8f8f
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1400c8f8f
mov byte [rax], Ordinal_33
inc qword [rbx]
movzx ecx, word [rbp + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbp + 0x1caa]
movzx r14d, ax
shr r14w, 8
movzx r15d, ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
shr cx, 8
cmp r9, rbx
jae 0x1400c8fce
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x1400c8fe1
mov byte [r9], r14b
inc qword [rbx]
mov r9, qword [rbx]
mov r14, qword [rsp + 0x50]
cmp r9, rbx
jae 0x1400c9020
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400c9020
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400c9020
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1400c9020
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rbp + 0x1ee0], r9
lea r8, [rbp + 0x1cda]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rdi
call fcn.1400c89f0
mov rcx, qword [r13 + 0x188]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x1400c9082
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rdi
mov r8d, eax
call fcn.14009f8f0
lea rdx, [rbp + 0x1cdb]
mov r8d, 4
mov rcx, rdi
call fcn.1400c8db0
mov rcx, qword [r13 + 0x188]
lea rdx, [rbp + 0x1cdf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1400c90ce
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rdi
mov r8d, eax
call fcn.14009f8f0
add rsp, 0x20
pop r13
pop rdi
pop rbp
ret
Function at 0x1400ca760
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x140140800]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rax, qword [rcx + 0x20]
mov rbp, rcx
xor r9d, r9d
xor esi, esi
mov rdi, qword [rax + 0x590]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 0x80
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r8d, dword [rdi + 0x144]
mov rdx, qword [rdi + 0x150]
add r8d, 4
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rdi + 0x13c], eax
cmp dword [rdi + 0x138], esi
jne 0x1400ca7f6
movsxd r8, dword [rsp + 0x30]
lea rcx, [rdi + 0xb8]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rdi + 0x138], eax
mov r8d, dword [rdi + 0x13c]
mov qword [rsp + 0x100], r14
cmp r8d, 4
jge 0x1400ca846
lea rdx, str.Received_too_short_packet
mov rcx, rbp
call fcn.14009f8f0
mov dword [rdi + 0xc], 7
mov eax, esi
mov r14, qword [rsp + 0x100]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400e6c50
add rsp, 0xd0
pop rdi
pop rsi
pop rbp
ret
mov rdx, qword [rdi + 0x150]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rdi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x1400ca87c.1
movsxd rax, ecx
lea r9, [0x140000000]
mov ecx, dword [r9 + rax*4 + 0xca984]
add rcx, r9
jmp rcx
cmp r8d, 4
jle case.0x1400ca87c.4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rdi + 0x14c]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x1400ca87c.4
lea eax, [r8 - 4]
mov rcx, rbp
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.14009ff10
mov esi, eax
test eax, eax
je case.0x1400ca87c.4
mov edx, 5
mov rcx, rdi
call fcn.1400cb390
jmp 0x1400ca821
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
shl ecx, 8
lea r14, [rdx + 4]
mov qword [rsp + 0xf8], rbx
movsxd rbx, eax
movzx eax, byte [rdx + 3]
mov rdx, rbx
or ecx, eax
mov dword [rdi + 8], ecx
mov rcx, r14
call fcn.1400cb400
cmp rax, rbx
mov rbx, qword [rsp + 0xf8]
jae case.0x1400ca87c.4
mov r8, r14
lea rdx, str.TFTP_error:__s
mov rcx, rbp
call fcn.14009f9e0
jmp case.0x1400ca87c.4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rdi
call fcn.1400ca4b0
mov esi, eax
test eax, eax
je case.0x1400ca87c.4
jmp 0x1400ca823
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rbp
lea rdx, [0x140119144]
call fcn.14009f8f0
mov rcx, rbp
call fcn.1400b53d0
test eax, eax
je 0x1400ca821
mov edx, 5
mov rcx, rdi
call fcn.1400cb390
mov eax, Ordinal_46
jmp 0x1400ca823
Function at 0x1400d2380
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x140141920]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x1400d23e4
lea r9d, [rax + 2]
mov dword [rsp + 0x20], 3
xor r8d, r8d
lea ecx, [rax + 6]
xor edx, edx
call fcn.1400d8290
test al, al
je 0x1400d23d8
mov dword [0x140141920], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x140141920], 1
jmp 0x1400d23e9
cmp eax, 2
je 0x1400d243b
lea rax, [rsp + 0x58]
mov edx, 0xffff
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400d241a
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x1400d243b
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x30
pop rbx
ret

Function at 0x1400d3030
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x148
mov rax, qword [0x140140800]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rax, qword [rcx]
mov rdi, rcx
mov rsi, r9
mov rbp, r8
mov rcx, qword [rax + 0x10]
mov dword [r9], 0
xor r9d, r9d
mov rcx, qword [rcx + 0x98]
call qword [sym.imp.WS2_32.dll_recv]
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
jne 0x1400d30d1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x1400d3095
mov dword [rsi], 0x51
jmp 0x1400d30ca
mov r8d, 0x100
lea rdx, [rsp + 0x30]
mov ecx, ebx
call fcn.1400b6c50
mov rcx, qword [rdi + 8]
lea rdx, str.Recv_failure:__s
mov r8, rax
call fcn.14009f8f0
mov rax, qword [rdi + 8]
mov dword [rax + 0xd64], ebx
mov dword [rsi], Ordinal_60
mov rbx, 0xffffffffffffffff
mov edx, dword [rsi]
lea r8, str.nw_in_read_len_zu______d__err_d
mov rcx, qword [rdi + 8]
mov r9, rbp
mov dword [rsp + 0x28], edx
mov rdx, qword [rdi]
mov dword [rsp + 0x20], ebx
call fcn.14009fa80
mov rax, rbx
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400e6c50
add rsp, 0x148
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1400d3110
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x1c0
mov rax, qword [0x140140800]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov rax, qword [rdx + 0x20]
mov rsi, rdx
mov rbx, qword [rcx + 0x10]
mov rcx, qword [rax + 0x2c8]
test dword [rcx + 0x84], 0x800
jne 0x1400d3251
mov rcx, qword [rbx + 0x98]
lea r8, [rsp + 0x20]
xorps xmm0, xmm0
mov dword [rsp + 0x20], 0x80
lea rdx, [rsp + 0x30]
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400d31e1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, eax
mov ebx, eax
call fcn.1400b6c50
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rsi
call fcn.14009f8f0
mov eax, 2
jmp 0x1400d3253
mov edx, dword [rsp + 0x20]
lea r9, [rbx + 0x144]
lea r8, [rbx + 0x114]
lea rcx, [rsp + 0x30]
call fcn.1400a0ff0
test al, al
jne 0x1400d3251
mov qword [rsp + 0x1e0], rdi
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ebx, dword [rax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, ebx
mov rdi, rax
call fcn.1400b6c50
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.14009f8f0
mov rdi, qword [rsp + 0x1e0]
mov eax, 2
jmp 0x1400d3253
xor eax, eax
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.1400e6c50
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1c0
pop rsi
ret
Function at 0x1400e5820
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r15
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbp, rcx
mov ecx, dword [rcx + 0x20]
mov rsi, rdx
add rcx, 0x18
mov r15d, r8d
lea r9d, [rax + rax]
add rcx, r9
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1400e5863
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop rsi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbp
mov qword [rax + 8], rcx
mov eax, dword [rbp + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rdi
mov qword [rbx + 0x10], rax
lea rdi, [rbp + 8]
mov qword [rsp + 0x50], r14
cmp r15d, dword [rbp + 0x1c]
jbe 0x1400e58b0
call qword [rbp]
mov rcx, qword [rbx + 8]
mov r8d, r15d
mov rdx, rsi
call qword [rdi]
mov esi, dword [rbp + 0x18]
add rsi, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, rsi
call qword [rbp + reloc.WS2_32.dll_recv]
mov r15d, dword [rbp + 0x20]
mov rcx, qword [rbx + 8]
call qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rbp]
xor r14d, r14d
test r15, r15
je 0x1400e5912
mov r14, r15
nop dword [rax]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rbx + 8]
call qword [rdi]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea rsi, [rsi + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
call qword [rdi]
sub r15, 1
jne 0x1400e58d0
lea rdi, [rbp + 8]
mov eax, dword [rbp + 0x1c]
cmp r14, rax
jae 0x1400e5951
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [0x1400fb5df]
mov r8d, 1
call qword [rdi]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x1400fb5e0]
mov r8d, 1
call qword [rdi]
mov eax, dword [rbp + 0x1c]
inc r14
cmp r14, rax
jb 0x1400e5920
mov r14, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rsi
pop rbp
ret
Function at 0x1400e5b40
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140140800]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbp, r8
mov dword [rsp + 0x20], 0xf0000040
mov rsi, rdx
mov rdi, rcx
xor r8d, r8d
lea rcx, [rsp + 0x38]
xor edx, edx
mov r9d, Ordinal_26
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1400e5b8c
mov eax, reloc.WLDAP32.dll_Ordinal_27
jmp 0x1400e5c5e
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x800c
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x1400e5bd0
mov rcx, qword [rsp + 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
mov qword [rsp + 0x38], 0
jmp 0x1400e5c5e
mov rcx, rbp
call fcn.1400a2450
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov r8d, eax
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x20], 0
lea edx, [r8 + 2]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp dword [rsp + 0x30], 0x20
jne 0x1400e5c3a
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x30]
mov r8, rdi
mov dword [rsp + 0x20], 0
mov edx, 2
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400e5c4a
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400e5c5c
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400e6c50
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400e68a0
Capabilities:
Encode data using xor

Disassembly:
mov r10, rcx
test rdx, rdx
je 0x1400e6905
nop dword [rax + rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movzx eax, r8b
movzx r9d, r8b
shr r9b, 1
and al, 0xfe
not r9b
movzx eax, al
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
or r8b, 1
test r9b, 2
movzx ecx, r8b
cmove ecx, eax
mov byte [r10 - 1], cl
sub rdx, 1
jne 0x1400e68b0
ret

Function at 0x1400e7bfc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400e7c46
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400e7c46
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400e7c46
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400e7c46
cmp dword [rcx + 0x84], 0xe
jbe 0x1400e7c46
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400e7c48
xor al, al
add rsp, 0x28
ret
Function at 0x119ac
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x20
xor ebx, ebx
mov r12, r8
mov r13d, edx
mov rbp, rcx
cmp qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation], rbx
jne 0x119da
mov edi, ebx
jmp 0x119f9
xor r8d, r8d
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x50]
lea ecx, [r8 + 0xb]
mov dword [rsp + 0x50], ebx
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
mov edi, dword [rsp + 0x50]
cmp rbp, rbx
jne 0x11a0e
mov eax, edi
mov qword [r12], rax
mov eax, 0x80000005
jmp 0x11a9a
cmp r13d, edi
jae 0x11a1a
mov ebx, 0x80000005
jmp 0x11a92
call fcn.0001309c
mov rsi, rax
cmp rax, rbx
jne 0x11a2e
mov eax, 0xc0000001
jmp 0x11a9a
mov r8, r13
xor edx, edx
mov rcx, rbp
call fcn.00013b70
mov r11d, dword [rsi]
mov r14d, ebx
mov dword [rbp], r11d
cmp dword [rsi], ebx
jbe 0x11a92
add rbp, 0x14
lea r13, [rsi + 0x20]
mov rax, qword [r13 - 8]
lea rcx, [rbp + 2]
lea rdx, [r13 + 0x10]
mov qword [rbp - 0xc], rax
mov eax, dword [r13]
mov r8d, 0x100
mov dword [rbp - 4], eax
movzx eax, word [r13 + 0xe]
mov word [rbp], ax
call fcn.00013820
inc r14d
add r13, 0x128
add rbp, 0x110
cmp r14d, dword [rsi]
jb 0x11a51
mov ecx, edi
mov eax, ebx
mov qword [r12], rcx
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret

Function at 0x11d8c
Capabilities:
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation], 0
je 0x11dfa
and dword [rsp + 0x30], 0
xor edx, edx
lea r9, [rsp + 0x30]
lea ecx, [rdx + 5]
xor r8d, r8d
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
mov r11d, dword [rsp + 0x30]
test r11d, r11d
je 0x11dfa
mov rdx, r11
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rbx, rax
test rax, rax
je 0x11dfa
mov r8d, dword [rsp + 0x30]
xor r9d, r9d
mov rdx, rax
lea ecx, [r9 + 5]
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
test eax, eax
js 0x11def
mov rax, rbx
jmp 0x11dfc
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x129bc
Capabilities:
Check os version

Disassembly:
push rbx
sub rsp, 0x160
mov rax, qword [0x00015100]
xor rax, rsp
mov qword [rsp + 0x150], rax
lea rdx, [rsp + 0x24]
lea rcx, [rsp + 0x20]
xor r9d, r9d
xor r8d, r8d
xor ebx, ebx
mov dword [rsp + 0x30], 0x11c
call qword [sym.imp.ntoskrnl.exe_PsGetVersion]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlGetVersion]
mov eax, dword [rsp + 0x34]
lea r11d, [rbx + 1]
cmp eax, 5
jne 0x12a38
mov eax, dword [rsp + 0x38]
cmp eax, 2
jne 0x12a20
lea ebx, [rax + 1]
jmp 0x12aaf
cmp eax, r11d
jne 0x12a2f
mov ebx, 2
jmp 0x12aaf
cmp eax, ebx
jne 0x12aaf
mov ebx, r11d
jmp 0x12aaf
cmp eax, 6
jne 0x12a94
mov eax, dword [rsp + 0x38]
cmp eax, r11d
jne 0x12a56
cmp byte [rsp + 0x14a], r11b
setne bl
add ebx, 6
jmp 0x12aaf
cmp eax, ebx
jne 0x12a6a
cmp byte [rsp + 0x14a], r11b
setne bl
add ebx, 4
jmp 0x12aaf
cmp eax, 2
jne 0x12a7f
cmp byte [rsp + 0x14a], r11b
setne bl
add ebx, 8
jmp 0x12aaf
cmp eax, 3
jne 0x12aaf
cmp byte [rsp + 0x14a], r11b
setne bl
add ebx, 0xa
jmp 0x12aaf
cmp eax, 0xa
jne 0x12aaf
cmp dword [rsp + 0x38], ebx
jne 0x12aaf
cmp byte [rsp + 0x14a], r11b
mov eax, 0xc
cmove ebx, eax
sub ebx, r11d
je 0x12aeb
sub ebx, r11d
je 0x12ae4
sub ebx, r11d
je 0x12add
sub ebx, r11d
je 0x12ae4
sub ebx, r11d
je 0x12ae4
sub ebx, r11d
je 0x12ad6
cmp ebx, r11d
je 0x12ad6
xor eax, eax
jmp 0x12af0
mov eax, 0x120
jmp 0x12af0
mov eax, 0x100
jmp 0x12af0
mov eax, 0x118
jmp 0x12af0
mov eax, 0x110
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.00013700
add rsp, 0x160
pop rbx
ret
Function at 0x12df8
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x30
xor esi, esi
lea rax, [rax + 0x10]
xor r9d, r9d
mov dword [rax], esi
lea edx, [rsi + 2]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rbp, rcx
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
mov edx, dword [rsp + 0x58]
lea ecx, [rsi + 1]
mov r8d, 0x6d6c7374
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov rdi, rax
cmp rax, rsi
jne 0x12e4e
mov ebx, 0xc0000088
jmp 0x13011
mov r9d, dword [rsp + 0x58]
lea rax, [rsp + 0x58]
mov r8, rdi
mov edx, 2
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp eax, esi
mov ebx, eax
jge 0x12e82
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rdi, rsi
cmp ebx, esi
jl 0x13011
cmp rdi, rsi
je 0x13011
mov ebx, esi
cmp dword [rdi + 0x14], esi
jbe 0x12ffb
lea rax, [rsp + 0x58]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov edx, ebx
mov rcx, rbp
mov dword [rsp + 0x20], esi
mov dword [rsp + 0x58], esi
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
mov edx, dword [rsp + 0x58]
mov ecx, 1
mov r8d, 0x6d6c7374
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
xor ecx, ecx
mov rsi, rax
cmp rax, rcx
je 0x12feb
mov ecx, dword [rsp + 0x58]
lea rax, [rsp + 0x58]
mov r9, rsi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
xor r8d, r8d
mov rcx, rbp
mov edx, ebx
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
xor r10d, r10d
cmp eax, r10d
jge 0x12f1f
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x12feb
mov r8d, dword [rsi + 0xc]
lea rcx, [rsi + 0x10]
mov al, r10b
mov r9d, r8d
mov dword [rsp + 0x58], r8d
mov edx, r10d
shr r9d, 1
je 0x12f5e
cmp al, r10b
jne 0x12f59
cmp word [rcx], r10w
jne 0x12f49
mov al, 1
jmp 0x12f4f
inc edx
add rcx, 2
cmp edx, r9d
jb 0x12f3a
cmp al, r10b
je 0x12f5e
mov rax, r8
jmp 0x12f62
lea eax, [r8 + 2]
mov rdx, rax
xor ecx, ecx
mov qword [rsp + 0x60], rax
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
xor ecx, ecx
mov rbp, rax
cmp rax, rcx
je 0x12fdb
mov r8, qword [rsp + 0x60]
xor edx, edx
mov rcx, rax
call fcn.00013b70
mov r8d, dword [rsp + 0x58]
lea rdx, [rsi + 0x10]
mov rcx, rbp
call fcn.00013820
mov r8, qword [rsp + 0x50]
xor eax, eax
lea rdx, [rsp + 0x58]
mov rcx, rbp
mov qword [rsp + 0x58], rax
call fcn.00013028
xor ecx, ecx
cmp eax, ecx
jl 0x12fd0
mov rcx, qword [rsp + 0x58]
call fcn.00012df8
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rbp, qword [rsp + 0x50]
inc ebx
mov esi, 0
cmp ebx, dword [rdi + 0x14]
jb 0x12e9e
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rcx, rbp
call qword [sym.imp.ntoskrnl.exe_ZwDeleteKey]
mov ebx, eax
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
Function at 0x1309c
Capabilities:
Get system information on windows

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation], 0
je 0x1311a
and dword [rsp + 0x30], 0
xor r8d, r8d
lea r9, [rsp + 0x30]
lea ecx, [r8 + 0xb]
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
mov r11d, dword [rsp + 0x30]
test r11d, r11d
je 0x1311a
mov rdx, r11
mov ecx, 1
mov r8d, 0x6d6c7374
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov rbx, rax
test rax, rax
je 0x1311a
mov r8d, dword [rsp + 0x30]
xor r9d, r9d
mov rdx, rax
lea ecx, [r9 + 0xb]
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
test eax, eax
js 0x1310c
mov rax, rbx
jmp 0x1311c
mov edx, 0x6d6c7374
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
add rsp, 0x20
pop rbx
ret