joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002910
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140002932
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140002941
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140002964
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140002966
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400029a2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140002a3e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400029dd
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x140002a1e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x140002a3e
cmp rbx, rax
ja 0x1400029f0
test rbx, rbx
je 0x140002a3e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x140002e60
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140009028]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002e8d
xor eax, eax
jmp 0x140002ff9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002ec7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002ec7
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140002ff9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140002fec
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002f0a
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 0x140002f35
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ff1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
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 0x140002fa4
sub eax, 1
je 0x140002fa4
cmp eax, 2
jne 0x140002fec
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ff1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002fd2
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140002fec
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002ff1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140003eb0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140003280
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140009028]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003353
cmp byte [rcx + 0x71], 0
je 0x140003353
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000334f
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 0x140003314
sub eax, 1
je 0x140003318
cmp eax, 2
jne 0x14000334f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003eb0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003346
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 0x14000334f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400032fc
xor al, al
jmp 0x1400032fc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003eb0
add rsp, 0x60
pop rbx
ret

Function at 0x1400049e8
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x38
mov r8, rcx
mov dword [rsp + 0x28], 1
xor ecx, ecx
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea rdx, str.open
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
add rsp, 0x38
ret
Function at 0x140002c00
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov rax, qword [0x140022020]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov edx, 0x104
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0x102
ja 0x140002e08
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xor r14d, r14d
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], r14
lea rax, [rbp - 0x80]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], r14w
jne 0x140002c71
movabs rsi, 0x7ffffffffffffffe
cmp rbx, rsi
ja 0x140002e4a
mov qword [rsp + 0x78], 7
cmp rbx, 8
jae 0x140002cbe
mov qword [rsp + 0x70], rbx
add rbx, rbx
mov r8, rbx
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x60]
call fcn.140012e30
mov word [rsp + rbx + 0x60], r14w
jmp 0x140002d10
mov rax, rbx
or rax, 7
cmp rax, rsi
ja 0x140002cd9
mov rsi, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rsi, rcx
lea rdx, [rsi + 1]
lea rcx, [rsp + 0x60]
call fcn.140005f70
mov rdi, rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
add rbx, rbx
mov r8, rbx
lea rdx, [rbp - 0x80]
mov rcx, rax
call fcn.140012e30
mov word [rbx + rdi], r14w
lea rdx, str.WindowsShell.Manifest
lea rcx, [rsp + 0x60]
call fcn.1400081f0
mov qword [rsp + 0x28], 0x38
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x38], xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateActCtxW]
cmp rax, 0xffffffffffffffff
jne 0x140002d92
lea rbx, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rbx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rbx
lea rcx, str.CreateActCtxW_failed_using_manifest__s._Error_code:__d
call fcn.1400079f0
xor bl, bl
jmp 0x140002dbe
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ActivateActCtx]
test eax, eax
jne 0x140002dbc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ActivateActCtx_failed._Error_code:__d
call fcn.1400079f0
xor bl, bl
jmp 0x140002dbe
mov bl, 1
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x140002e03
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002dfe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002dfe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140011580
movzx eax, bl
jmp 0x140002e1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetWindowsDirectory_failed._Error_code:__d
call fcn.1400079f0
xor al, al
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140011560
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.140001460
int3
Function at 0x140008670
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x140022020]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rsi, rcx
mov qword [rsp + 0x28], rcx
xor r14d, r14d
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], r14
mov word [rsp + 0x30], r14w
xor r8d, r8d
xor edx, edx
lea rcx, str.DOTNET_RUNTIME_ID
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
je 0x140008709
mov eax, 2
mul rdi
mov rbx, 0xffffffffffffffff
cmovo rax, rbx
mov rcx, rax
call fcn.14001184c
mov rbp, rax
mov r8d, edi
mov rdx, rax
lea rcx, str.DOTNET_RUNTIME_ID
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x1400087b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x140008738
test eax, eax
jle 0x140008722
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str.DOTNET_RUNTIME_ID
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.140007de0
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r14
mov qword [rsi + 0x18], r14
mov r8d, 7
lea rdx, str.win_x64
mov rcx, rsi
call fcn.1400063c0
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x14000881a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400087a0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400087a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140011580
jmp 0x14000881a
inc rbx
cmp word [rbp + rbx*2], 0
jne 0x1400087b0
mov rax, qword [rsp + 0x48]
cmp rbx, rax
ja 0x1400087f1
lea rdi, [rsp + 0x30]
cmp rax, 8
cmovae rdi, qword [rsp + 0x30]
mov qword [rsp + 0x40], rbx
add rbx, rbx
mov r8, rbx
mov rdx, rbp
mov rcx, rdi
call fcn.140012e30
mov word [rbx + rdi], r14w
jmp 0x140008801
mov r9, rbp
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.140006900
mov rcx, rbp
call fcn.140011580
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rsi + 0x10], xmm1
mov rax, rsi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140011560
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x140008840
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140022020]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rsi, rdx
mov r14, rcx
lea r15, [rdx + 0x10]
xor r12d, r12d
mov qword [r15], r12
mov rax, rdx
cmp qword [rdx + 0x18], 8
jb 0x140008882
mov rax, qword [rdx]
mov word [rax], r12w
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x38], 7
mov qword [rsp + 0x30], r12
mov word [rsp + 0x20], r12w
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x1400088e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x140008a05
test eax, eax
jle 0x1400088d0
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
mov rdx, r14
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.140007de0
jmp 0x140008a05
mov eax, 2
mul rdi
mov rbx, 0xffffffffffffffff
cmovo rax, rbx
mov rcx, rax
call fcn.14001184c
mov rbp, rax
mov r8d, edi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400088b3
nop dword [rax + rax]
inc rbx
cmp word [rbp + rbx*2], 0
jne 0x140008920
mov rax, qword [rsp + 0x38]
cmp rbx, rax
ja 0x140008961
lea rdi, [rsp + 0x20]
cmp rax, 8
cmovae rdi, qword [rsp + 0x20]
mov qword [rsp + 0x30], rbx
add rbx, rbx
mov r8, rbx
mov rdx, rbp
mov rcx, rdi
call fcn.140012e30
mov word [rbx + rdi], r12w
jmp 0x140008971
mov r9, rbp
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.140006900
mov rcx, rbp
call fcn.140011580
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.14000d180
test al, al
je 0x1400089e5
lea rax, [rsp + 0x20]
cmp rsi, rax
je 0x1400089e1
lea r9, [rsp + 0x20]
cmp qword [rsp + 0x38], 8
cmovae r9, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsi + 0x18]
cmp rbx, rax
ja 0x1400089d6
cmp rax, 8
jb 0x1400089bb
mov rsi, qword [rsi]
mov qword [r15], rbx
lea r8, [rbx + rbx]
mov rdx, r9
mov rcx, rsi
call fcn.140012e30
mov word [rsi + rbx*2], r12w
mov bl, 1
jmp 0x140008a07
mov rdx, rbx
mov rcx, rsi
call fcn.140006900
mov bl, 1
jmp 0x140008a07
lea r8, [rsp + 0x20]
cmp qword [rsp + 0x38], 8
cmovae r8, qword [rsp + 0x20]
mov rdx, r14
lea rcx, str.Did_not_find___s__directory___s_
call fcn.1400079f0
xor bl, bl
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x140008a4c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008a47
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140008a47
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140011580
movzx eax, bl
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140011560
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x14000ca40
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov rax, qword [0x140022020]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov r14, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
xor ebp, ebp
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], bp
movzx eax, byte [str.d38cc827_e34f_4453_9df4_1e796e9f1d07]
cmp al, 0x65
jne 0x14000cae1
mov qword [rsp + 0x30], rbp
mov word [rsp + 0x20], bp
xor r8d, r8d
xor edx, edx
lea rcx, str._DOTNET_TEST_GLOBALLY_REGISTERED_PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x14000cb3d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x14000cae1
test eax, eax
jle 0x14000cacb
movzx eax, ax
or eax, 0x80070000
mov r8d, eax
lea rdx, str._DOTNET_TEST_GLOBALLY_REGISTERED_PATH
lea rcx, str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.140007de0
mov rdx, r14
mov ecx, 7
call fcn.14000cc60
movzx ebx, al
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x14000cc37
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000cc32
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000cc32
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov eax, 2
mul rdi
mov rbx, 0xffffffffffffffff
cmovo rax, rbx
mov rcx, rax
call fcn.14001184c
mov rsi, rax
mov r8d, edi
mov rdx, rax
lea rcx, str._DOTNET_TEST_GLOBALLY_REGISTERED_PATH
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x14000cab2
inc rbx
cmp word [rsi + rbx*2], 0
jne 0x14000cb76
mov rax, qword [rsp + 0x38]
cmp rbx, rax
ja 0x14000cbb5
lea rdi, [rsp + 0x20]
cmp rax, 8
cmovae rdi, qword [rsp + 0x20]
mov qword [rsp + 0x30], rbx
add rbx, rbx
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.140012e30
mov word [rbx + rdi], bp
jmp 0x14000cbc5
mov r9, rsi
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.140006900
mov rcx, rsi
call fcn.140011580
lea rax, [rsp + 0x20]
cmp r14, rax
je 0x14000cc2b
lea r9, [rsp + 0x20]
cmp qword [rsp + 0x38], 8
cmovae r9, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x30]
mov rax, qword [r14 + 0x18]
cmp rbx, rax
ja 0x14000cc20
mov rdi, r14
cmp rax, 8
jb 0x14000cc02
mov rdi, qword [r14]
mov qword [r14 + 0x10], rbx
lea r8, [rbx + rbx]
mov rdx, r9
mov rcx, rdi
call fcn.140012e30
mov word [rdi + rbx*2], bp
mov bl, 1
jmp 0x14000caf1
mov rdx, rbx
mov rcx, r14
call fcn.140006900
mov bl, 1
jmp 0x14000caf1
call fcn.140011580
movzx eax, bl
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140011560
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
Function at 0x1400120e0
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2d8
lea rax, str.StarRail.exe
mov qword [rsp + 0x40], rax
xor edx, edx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0xffffffffffffffff
jne 0x140003f50
lea rdx, str.Failed_to_create_process_snapshot._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002270
mov qword [rsp + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x28], eax
mov edx, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov qword [rsp + 0x38], rax
lea rdx, [0x140003160]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x14000408d
mov dword [rsp + 0x90], 0x238
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x140004080
lea rax, [rsp + 0xbc]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
movzx edx, word [rax]
cmp dx, word [rax + rcx]
jne 0x140003f9b
add rax, 2
test dx, dx
jne 0x140003f85
xor eax, eax
jmp 0x140003fa0
sbb eax, eax
or eax, 1
test eax, eax
jne 0x140004066
lea rdx, [rsp + 0x68]
lea rcx, [0x14000f0f8]
call fcn.140004bc0
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x70]
lea rcx, [0x14000f0f8]
call fcn.140004a80
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
lea r9, [rsp + 0x98]
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x78]
call fcn.1400031c0
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x80]
lea rcx, [0x14000f0f8]
call fcn.140004bc0
mov qword [rsp + 0x58], rax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
call fcn.140003d10
movzx eax, al
test eax, eax
je 0x140004066
lea rdx, [rsp + 0x98]
lea rcx, [0x14000f0f8]
call fcn.140004eb0
mov edx, dword [rsp + 0x98]
lea rcx, [0x14000ca90]
call fcn.1400021a0
mov rax, qword [rsp + 0x2e0]
mov ecx, dword [rsp + 0x98]
mov dword [rax], ecx
mov al, 1
jmp 0x14000408d
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x140003f75
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add rsp, 0x2d8
ret
Function at 0x1400040a0
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x278
mov dword [rsp + 0x30], 0x238
xor edx, edx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32FirstW
cmp eax, 1
jne 0x140004117
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_Process32NextW
cmp eax, 1
jne 0x140004117
mov rdx, qword [rsp + 0x280]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140004115
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x38]
jmp 0x140004124
jmp 0x1400040d9
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x278
ret

Function at 0x1400041b0
Capabilities:
Enumerate threads
Resume thread
Suspend thread

Disassembly:
mov byte [rsp + 0x10], dl
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x60
xor edx, edx
mov ecx, 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0xffffffffffffffff
jne 0x1400041db
jmp 0x14000428f
lea rax, [rsp + 0x38]
mov rdi, rax
xor eax, eax
mov ecx, 0x1c
rep stosb byte [rdi], al
mov dword [rsp + 0x38], 0x1c
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_Thread32First
test eax, eax
jne 0x140004214
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000428f
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x44], eax
jne 0x140004271
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140004271
movzx eax, byte [rsp + 0x78]
test eax, eax
je 0x140004257
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov dword [rsp + 0x20], eax
jmp 0x140004266
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x140004214
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x60
pop rdi
ret
Function at 0x140005d68
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140005db2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140005db2
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140005db2
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140005db2
cmp dword [rcx + 0x84], 0xe
jbe 0x140005db2
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140005db4
xor al, al
add rsp, 0x28
ret