joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140016288
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov r13d, edx
mov edx, 0xffffffec
mov ebp, r8d
mov rdi, rcx
call qword [sym.imp.USER32.dll_GetWindowLongW]
mov rcx, rdi
movsxd r14, eax
call qword [sym.imp.USER32.dll_GetParent]
xor r15d, r15d
lea rdx, [rsp + 0x68]
mov rcx, rdi
mov r12, rax
mov dword [rsp + 0x68], r15d
mov dword [rsp + 0x6c], r15d
mov dword [rsp + 0x70], r15d
mov dword [rsp + 0x74], r15d
call qword [sym.imp.USER32.dll_GetWindowRect]
lea rdx, [rsp + 0xd8]
mov rcx, r12
mov dword [rsp + 0xd8], r15d
mov dword [rsp + 0xdc], r15d
call qword [sym.imp.USER32.dll_ScreenToClient]
mov r8d, dword [rsp + 0xdc]
mov edx, dword [rsp + 0xd8]
lea rcx, [rsp + 0x68]
call qword [sym.imp.USER32.dll_OffsetRect]
mov rcx, rdi
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
movsxd rbx, eax
lea ecx, [rbx + 0x1b]
movsxd rdx, ecx
lea rcx, [rsp + 0x60]
call fcn.140056040
mov rsi, qword [rsp + 0x60]
lea r8d, [rbx + 0xb]
mov rdx, rsi
mov rcx, rdi
mov word [rsi], r15w
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov rax, qword [rsp + 0x60]
lea edx, [r15 + 0x31]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
mov word [rax + rbx*2 + 0x14], r15w
call qword [sym.imp.USER32.dll_SendMessageW]
lea r9, [rsp + 0xd0]
mov r15, rax
or eax, 0xffffffff
lea r8, [rsp + 0xc0]
mov edx, 0xb0
mov rcx, rdi
mov dword [rsp + 0xc0], eax
mov dword [rsp + 0xd0], eax
call qword [sym.imp.USER32.dll_SendMessageW]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.USER32.dll_ShowWindow]
test ebp, ebp
jns 0x1400163bf
mov rcx, rdi
call qword [sym.imp.USER32.dll_DestroyWindow]
and qword [rsp + 0x58], 0
mov r9d, dword [rsp + 0x68]
mov r11d, dword [rsp + 0x6c]
mov r8d, dword [rsp + 0x70]
mov r10d, dword [rsp + 0x74]
mov rax, qword [0x140106d38]
mov qword [rsp + 0x50], rax
sub r8d, r9d
movzx edx, bp
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x40], r12
sub r10d, r11d
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], r8d
mov dword [rsp + 0x28], r11d
mov dword [rsp + 0x20], r9d
lea rdx, str.EDIT
xor r8d, r8d
mov r9d, r13d
mov ecx, r14d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov r9d, 1
mov r8, r15
lea edx, [r9 + 0x2f]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.USER32.dll_SetWindowTextW]
mov r9d, dword [rsp + 0xd0]
mov r8d, dword [rsp + 0xc0]
mov edx, 0xb1
mov rcx, rbx
call qword [sym.imp.USER32.dll_SendMessageW]
lea rcx, [rsp + 0x60]
call fcn.14004ea6c
mov rax, rbx
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400167e4
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x20
mov r13, rcx
mov ebp, edx
xor r15d, r15d
lea rcx, [rsp + 0x68]
mov edx, 0x325
mov r12, r8
mov edi, r15d
mov esi, r15d
call fcn.140056040
mov rbx, qword [rsp + 0x68]
mov ecx, 0x324
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov rcx, r13
call qword [sym.imp.USER32.dll_CharUpperW]
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharUpperW]
cmp word [rbx], r15w
je 0x140016881
add ebp, 0x10
mov rcx, rbx
call fcn.140015d30
cmp eax, ebp
jb 0x1400168b2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
sub eax, 2
je 0x1400168aa
cmp eax, 1
jne 0x1400168b2
movzx eax, word [rbx]
mov edi, 1
mov word [r12 + 2], ax
movzx eax, word [r13]
cmp word [rbx], ax
jb 0x1400168b2
mov esi, edi
lea rcx, [rsp + 0x68]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
cmp esi, r15d
cmovne edi, esi
mov eax, edi
add rsp, 0x20
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret
movzx eax, word [rbx]
mov word [r12], ax
mov rcx, rbx
call fcn.1400cce60
inc eax
lea rbx, [rbx + rax*2]
cmp word [rbx], r15w
je 0x140016881
jmp 0x140016848

Function at 0x140016de0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rdi
sub rsp, 0x180
xor ebx, ebx
xor r9d, r9d
mov edx, 0x80000000
mov qword [rsp + 0x30], rbx
lea ebp, [rbx + 1]
mov dword [rsp + 0x28], 0x80
mov r8d, ebp
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140016e2d
xor eax, eax
jmp 0x140016ec6
lea r9, [rsp + 0x198]
lea rdx, [rsp + 0x40]
mov r8d, 0x40
mov rcx, rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x198], 0x40
jne 0x140016ebb
mov eax, 0x5a4d
cmp word [rsp + 0x40], ax
jne 0x140016ebb
mov edx, dword [rsp + 0x7c]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140016ebb
lea r9, [rsp + 0x198]
lea rdx, [rsp + 0x80]
mov r8d, pe_nt_image_headers64
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x198], 0xf8
jne 0x140016ebb
cmp dword [rsp + 0x80], 0x4550
cmove ebx, ebp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x140016f40
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov esi, edx
xor edx, edx
mov rbx, r8
mov r8d, ecx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x140016f8b
mov edx, esi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x140016f82
test rbx, rbx
je 0x140016f82
and qword [rbx], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140016fe0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
sub rsp, 0x20
mov rdi, rcx
mov esi, edx
lea rcx, [rsp + 0x40]
mov edx, 0x20a
call fcn.140056040
mov rax, qword [rsp + 0x40]
mov ebx, 0x20
mov word [rax], bx
mov rax, qword [rsp + 0x40]
xor r12d, r12d
mov word [rax + 2], r12w
mov rdx, qword [rsp + 0x40]
lea rcx, str.SystemRoot
add rdx, 2
mov r8d, 0x208
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rdx, str.System32OnShutdown.wcs
lea rcx, [rsp + 0x40]
call fcn.140056108
test bl, sil
lea r11, str.unknown
lea rax, [0x1400e9dd0]
lea rcx, str.reboot
lea rbx, str.lock
cmove rax, r11
test sil, 0x10
cmove rcx, rax
test sil, 2
lea rax, str.logout
cmove rax, rcx
test sil, 4
lea rcx, str.suspend
cmove rcx, rax
test sil, 8
lea rax, str.hiber
cmove rax, rcx
test sil, 0x40
lea rcx, str.poweroff
cmove rcx, rax
test sil, 0x80
cmove rbx, rcx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x40]
mov rdx, rbx
movsxd rbp, eax
call fcn.140056108
lea rdx, [0x1400e9f08]
lea rcx, [rsp + 0x40]
call fcn.140056108
cmp rdi, r12
je 0x1400170fa
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.140056108
mov rdx, qword [rsp + 0x40]
lea rcx, [0x140106ec0]
call fcn.1400425e4
lea rdx, str._25INDATA
lea rcx, [rsp + 0x50]
call fcn.14006016c
mov rax, qword [rsp + 0x40]
lea rcx, [rsp + 0x50]
lea rdx, [rax + rbp*2]
call fcn.140056108
test sil, 0x70
je 0x140017146
mov rdx, qword [rsp + 0x50]
lea rcx, [0x140106ec0]
call fcn.1400425e4
lea rcx, [rsp + 0x50]
call fcn.14004ea6c
lea rcx, [rsp + 0x40]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
add rsp, 0x20
pop r12
pop rdi
pop rsi
ret

Function at 0x140017200
Capabilities:
Get common file path
Set current directory

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x440
mov rbx, rcx
lea rdx, [rsp + 0x20]
xor edi, edi
mov ecx, 0x208
mov word [rsp + 0x20], di
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rcx, [rsp + 0x20]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp eax, edi
je 0x140017242
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rbx, qword [rsp + 0x450]
add rsp, 0x440
pop rdi
ret
Function at 0x140017254
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x1400eb800]
mov rbp, rcx
lea rcx, [rsp + 0x30]
mov qword [rcx], rax
mov eax, dword [0x1400eb808]
xor sil, sil
mov dword [rcx + 8], eax
xor dil, dil
movsx eax, dil
lea rcx, [rsp + 0x30]
add ax, 0x41
mov word [rsp + 0x30], ax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 5
jne 0x14001730e
movsx ebx, sil
lea r9, [rsp + 0x30]
lea rdx, str.HKLMSYSTEMCurrentControlSetControlSession_ManagerEnvironmentCDROM_u_s
lea rcx, [rsp + 0x40]
mov r8d, ebx
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0x40]
lea rcx, [0x140106ec0]
xor r8d, r8d
call fcn.1400a4fdc
lea r9, [rsp + 0x30]
lea rdx, str.CDROM_u
lea rcx, [rsp + 0x40]
mov r8d, ebx
call qword [sym.imp.USER32.dll_wsprintfW]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x40]
lea rcx, [0x140106ec0]
inc sil
call fcn.140055710
inc dil
cmp dil, 0x1a
jl 0x14001728c
test sil, sil
jle 0x14001733b
and qword [rsp + 0x20], 0
lea rdx, str.THREAD_Envi
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
call fcn.14003f698
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x140017884
Capabilities:
Log keystrokes via polling

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x120
and dword [rax + 0x10], 0
lea r8, [rax + 0x10]
xor edx, edx
call qword [sym.imp.SHLWAPI.dll_StrToIntExW]
cmp dword [rsp + 0x138], 0
lea rcx, [rsp + 0x20]
setne bl
call qword [sym.imp.USER32.dll_GetKeyboardState]
test bl, bl
je 0x1400178c5
test byte [rsp + 0xb0], 1
je 0x1400178cf
jmp 0x1400178f1
test byte [rsp + 0xb0], 1
je 0x1400178f1
xor r9d, r9d
mov dl, 0x45
mov cl, 0x90
lea r8d, [r9 + 1]
call qword [sym.imp.USER32.dll_keybd_event]
xor r9d, r9d
mov dl, 0x45
lea r8d, [r9 + 3]
mov cl, 0x90
call qword [sym.imp.USER32.dll_keybd_event]
xor eax, eax
add rsp, 0x120
pop rbx
ret
Function at 0x1400178fc
Capabilities:
Persist via run registry key

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
mov rbx, rcx
lea rcx, [rsp + 0x68]
mov bpl, dl
call fcn.140055fcc
lea rcx, [rsp + 0x60]
call fcn.140055fcc
xor edx, edx
lea rcx, [rbx + 2]
lea r8d, [rdx + 0x2c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
xor edi, edi
mov rsi, rax
cmp rax, rdi
je 0x140017a2d
lea r8, [rsp + 0x68]
lea rdx, [rbx + 2]
lea rcx, [0x140106ec0]
xor r9d, r9d
mov word [rax], di
mov byte [rsp + 0x20], 1
call fcn.140069b2c
mov rbx, qword [rsp + 0x68]
lea rdx, [rsi + 2]
lea r8, [rsp + 0x60]
lea rcx, [0x140106ec0]
xor r9d, r9d
mov qword [rsp + 0x50], rbx
mov byte [rsp + 0x20], 1
call fcn.140069b2c
mov rsi, qword [rsp + 0x60]
cmp bpl, dil
je 0x1400179c6
lea rcx, [rsp + 0x50]
call fcn.14001462c
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.1400cce60
mov r8, rsi
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
add eax, eax
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
jmp 0x140017a20
mov rcx, rbx
call fcn.1400cce60
lea r8, str.RegisteredOwner
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
add eax, eax
mov r9d, 1
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov rbx, 0xffffffff80000002
mov rcx, rbx
call fcn.14004fc98
mov rcx, rsi
call fcn.1400cce60
lea r8, str.RegisteredOrganization
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
add eax, eax
mov rcx, rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
mov r9d, 1
call fcn.14004fc98
jmp 0x140017a32
mov edi, 1
lea rcx, [rsp + 0x60]
call fcn.14004ea6c
lea rcx, [rsp + 0x68]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x58]
mov rax, rdi
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
xor edx, edx
jmp 0x1400178fc
Function at 0x140017a60
Capabilities:
Persist via run registry key

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
mov rbx, rcx
lea rcx, [rsp + 0x68]
mov bpl, dl
call fcn.140055fcc
lea rcx, [rsp + 0x60]
call fcn.140055fcc
xor edx, edx
lea rcx, [rbx + 2]
lea r8d, [rdx + 0x2c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
xor edi, edi
mov rsi, rax
cmp rax, rdi
je 0x140017a2d
lea r8, [rsp + 0x68]
lea rdx, [rbx + 2]
lea rcx, [0x140106ec0]
xor r9d, r9d
mov word [rax], di
mov byte [rsp + 0x20], 1
call fcn.140069b2c
mov rbx, qword [rsp + 0x68]
lea rdx, [rsi + 2]
lea r8, [rsp + 0x60]
lea rcx, [0x140106ec0]
xor r9d, r9d
mov qword [rsp + 0x50], rbx
mov byte [rsp + 0x20], 1
call fcn.140069b2c
mov rsi, qword [rsp + 0x60]
cmp bpl, dil
je 0x1400179c6
lea rcx, [rsp + 0x50]
call fcn.14001462c
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.1400cce60
mov r8, rsi
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
add eax, eax
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
jmp 0x140017a20
mov rcx, rbx
call fcn.1400cce60
lea r8, str.RegisteredOwner
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
add eax, eax
mov r9d, 1
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov rbx, 0xffffffff80000002
mov rcx, rbx
call fcn.14004fc98
mov rcx, rsi
call fcn.1400cce60
lea r8, str.RegisteredOrganization
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
add eax, eax
mov rcx, rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
mov r9d, 1
call fcn.14004fc98
jmp 0x140017a32
mov edi, 1
lea rcx, [rsp + 0x60]
call fcn.14004ea6c
lea rcx, [rsp + 0x68]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x58]
mov rax, rdi
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
xor edx, edx
jmp 0x1400178fc
Function at 0x140017d90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x20
xor r13d, r13d
mov rsi, r9
mov rbx, r8
mov r12, rdx
mov rdi, rcx
cmp qword [r9], r13
jne 0x140017df7
mov qword [r9], rbx
movzx eax, word [rcx + 0x88]
cmp word [r8], ax
je 0x140017df7
mov rcx, qword [r9]
movzx eax, word [rcx]
cmp ax, word [rdi + 0x90]
je 0x140017df7
cmp ax, word [rdi + 0x8a]
je 0x140017df7
add rcx, 2
mov qword [r9], rcx
movzx eax, word [rdi + 0x88]
cmp word [rcx], ax
jne 0x140017dcc
mov rbp, qword [r9]
jmp 0x140017e15
movzx eax, word [rbx]
cmp ax, word [rdi + 0x92]
je 0x140017e11
cmp ax, word [rdi + 0x94]
jne 0x140017e1a
add rbx, 2
cmp rbx, rbp
jbe 0x140017dfc
sub rbp, rbx
mov rcx, r12
sar rbp, 1
lea eax, [rbp + 6]
movsxd rdx, eax
call fcn.1400560cc
mov r11, qword [r12]
jmp 0x140017e47
movzx eax, word [rdi + 0x48]
xor ax, word [rbx]
mov word [r11], ax
add r11, 2
add rbx, 2
cmp rbx, qword [rsi]
jb 0x140017e34
mov word [r11], r13w
mov word [r11 + 2], r13w
mov word [r11 + 4], r13w
cmp byte [0x140104218], r13b
mov rbx, qword [r12]
jle 0x140017e77
cmp byte [rdi + 0xe], r13b
jne 0x140017e77
mov edx, ebp
mov rcx, rbx
call fcn.140017cbc
cmp byte [rsp + 0x60], r13b
jne 0x140017e86
mov rcx, rbx
call fcn.140015c5c
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop r13
pop r12
pop rdi
ret

Function at 0x140017ea4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub r9d, 1
mov r10, rdx
js 0x140017eeb
movzx r11d, word [rcx + 0x48]
movzx ecx, word [r8]
movzx edx, word [r10]
add r10, 2
lea eax, [rcx - 0x41]
xor dx, r11w
add r8, 2
cmp ax, 0x19
ja 0x140017ed3
add cx, 0x20
lea eax, [rdx - 0x41]
cmp ax, 0x19
ja 0x140017ee0
add dx, 0x20
sub cx, dx
jne 0x140017eee
sub r9d, 1
jns 0x140017eb2
xor eax, eax
ret
movzx eax, cx
ret

Function at 0x1400183a0
Capabilities:
Log keystrokes via application hook

Disassembly:
sub rsp, 0x28
cmp qword [0x140106d20], 0
jne 0x1400183d0
mov r8, qword [0x140106d38]
xor r9d, r9d
lea rdx, [0x140018208]
lea ecx, [r9 + 0xd]
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x140106d20], rax
add rsp, 0x28
ret
Function at 0x1400185d4
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x260
mov esi, edx
mov ebx, ecx
test ecx, ecx
jne 0x1400185fb
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
lea rcx, [rsp + 0x28]
xor edi, edi
xor edx, edx
and dword [rsp + 0x24], edi
mov r8d, 0x230
mov dword [rsp + 0x20], 0x238
call fcn.1400cc8d0
lea ecx, [rdi + 2]
mov edx, ebx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea rdx, [rsp + 0x20]
mov rcx, rax
mov rbp, rax
call sub.KERNEL32.dll_Process32FirstW
jmp 0x14001864a
cmp dword [rsp + 0x28], ebx
je 0x140018650
lea rdx, [rsp + 0x20]
mov rcx, rbp
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x140018637
jmp 0x140018654
mov edi, dword [rsp + 0x40]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
dec esi
mov ebx, edi
test esi, esi
jg 0x1400185fb
lea r11, [rsp + 0x260]
mov eax, edi
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x14001893c
Capabilities:
Query environment variable
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rdi, r9
mov rbx, r8
mov rsi, rcx
cmp edx, 1
je 0x140018973
cmp edx, 2
jne 0x1400189a4
mov r8d, 0x104
mov rdx, r9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rbx, rdi
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x140018985
mov rcx, rbx
call fcn.1400cce7c
lea rcx, [rsi + 2]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [0x140106ec0]
mov r8, rbx
mov rdx, rsi
call fcn.140055710
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x1400189b4
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
mov rsi, rcx
mov rbx, rdx
lea rcx, [rax + 0x20]
mov edx, 0xc11
mov r12, r8
call fcn.140056040
mov rcx, qword [rsp + 0x88]
xor edx, edx
mov r8d, 0x822
call fcn.1400cc8d0
mov rbp, qword [rsp + 0x88]
xor r14d, r14d
lea rdi, [rbp + 0x410]
lea r13, [rsi + 2]
cmp rbx, r14
mov word [rdi], r14w
cmovne r13, rbx
mov rdx, rdi
mov r8d, 0x104
mov rcx, r13
mov dword [rsp + 0x78], 0x410
mov dword [rsp + 0x70], r14d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp word [rdi], r14w
je 0x140018a4b
lea rcx, [0x140106ec0]
mov r8, rdi
mov rdx, rsi
call fcn.140055710
jmp 0x140018a91
lea rax, [rsp + 0x78]
lea r9, [rsp + 0x70]
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders
mov qword [rsp + 0x28], rax
mov r8, r13
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x20], rdi
call fcn.14004fbd8
cmp eax, r14d
jne 0x140018a91
mov edx, dword [rsp + 0x70]
mov r9, rbp
mov r8, rdi
mov rcx, rsi
mov qword [rsp + 0x20], r12
call fcn.14001893c
lea rcx, [rsp + 0x88]
call fcn.14004ea6c
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140018ab0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
lea rcx, [rsp + 0x30]
mov edx, 0x411
mov byte [0x140106ecf], 1
call fcn.140056040
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov r8d, 0x822
call fcn.1400cc8d0
mov rbx, qword [rsp + 0x30]
mov r8d, 0x104
add rbx, 0x410
xor ecx, ecx
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdi, [0x140106ec0]
lea r8, str.PE_IDBASE
mov rcx, rdi
mov edx, 0x1000
call fcn.140058f7c
lea r8, str.WM_PE_BASE
mov edx, 0x5000
mov rcx, rdi
call fcn.140058f7c
lea r8, str.PE_MENU_IDBASE
mov edx, 0x100
mov rcx, rdi
call fcn.140058f7c
lea rcx, [0x1400ebcd2]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.MyName
mov r8, rbx
mov rcx, rdi
call fcn.140055710
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x5c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
test rax, rax
je 0x140018b9e
lea rbx, [rax + 2]
lea rcx, [0x1400ebcba]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, str.MyName0
mov r8, rbx
mov rcx, rdi
call fcn.140055710
lea rcx, str.Desktop
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea rcx, str.Favorites
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea rcx, str.Programs
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea rcx, str.SendTo
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea rcx, str.Personal
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea rdx, str.Start_Menu
lea rcx, [0x1400eafd8]
xor r8d, r8d
call fcn.1400189b4
lea rdx, str.Cache
lea rcx, str.IECache
xor r8d, r8d
call fcn.1400189b4
lea rcx, str.Startup
xor r8d, r8d
xor edx, edx
call fcn.1400189b4
lea r8, str.MicrosoftInternet_ExplorerQuick_Launch
lea rdx, str.AppData
lea rcx, str.QuickLaunch
call fcn.1400189b4
lea rcx, [rsp + 0x30]
call fcn.14004ea6c
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140018c68
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
mov eax, 0x14f0
call fcn.1400e6ce0
sub rsp, rax
lea rbx, [0x140104238]
xor edi, edi
mov rcx, qword [rbx]
mov eax, 0x26
mov word [rsp + 0x90], di
mov word [rsp + 0x20], ax
lea rdx, [rsp + 0x22]
movsx eax, byte [rcx]
inc rcx
mov word [rdx], ax
add rdx, 2
cmp ax, di
jne 0x140018c9e
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x22]
mov r8d, 0xa28
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x20]
lea rcx, [0x140106ec0]
call fcn.140055710
lea rax, [0x140104260]
add rbx, 8
cmp rbx, rax
jl 0x140018c84
mov rbx, qword [rsp + 0x1500]
add rsp, 0x14f0
pop rdi
ret
Function at 0x14001967c
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf0
mov rax, qword [rdx]
xor edi, edi
movzx ebp, r8w
cmp word [rax + 2], di
mov r14d, edi
mov r12, rdx
sete r14b
mov r15d, ecx
mov esi, 0x12c
cmp qword [0x140106e70], rdi
jne 0x140019734
call qword [0x140106e68]
mov esi, edi
mov rbx, rax
cmp rax, rdi
je 0x140019717
lea r13, [0x1400e94a4]
lea rbp, str.DeviceImDisk
test bl, 1
je 0x14001970d
mov r8, rbp
cmp r15d, edi
lea rdx, str.__s_u_r_n
lea rcx, [rsp + 0x20]
mov r9d, esi
cmovne r8, r13
call qword [sym.imp.USER32.dll_wsprintfW]
movsxd r11, r14d
mov rcx, r12
lea rdx, [rsp + r11*2 + 0x20]
call fcn.140056108
shr rbx, 1
inc esi
cmp rbx, rdi
jne 0x1400196d9
xor eax, eax
mov rbx, qword [rsp + 0x130]
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r13d, edi
mov ebx, esi
shl rbx, 2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
cmp rax, rdi
je 0x140019717
mov rdx, rax
mov ecx, esi
mov dword [rax], edi
call qword [0x140106e70]
cmp rax, rdi
jne 0x140019829
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1400197e9
cmp eax, 0xea
jne 0x1400197a7
mov esi, dword [rbx]
inc esi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
inc r13d
cmp r13d, 2
jl 0x140019737
jmp 0x140019717
cmp bp, di
je 0x1400197e1
lea rdx, str._CannotControlImDiskDriver
lea rcx, [rsp + 0x138]
or r8, 0xffffffffffffffff
call fcn.1400601ac
lea rdx, [rsp + 0x138]
mov rcx, r12
call fcn.140060238
lea rcx, [rsp + 0x138]
call fcn.14004ea6c
or edi, 0xffffffff
jmp 0x140019886
cmp bp, di
je 0x140019886
lea rdx, str._ImDiskNotLoad
lea rcx, [rsp + 0x148]
or r8, 0xffffffffffffffff
call fcn.1400601ac
lea rdx, [rsp + 0x148]
mov rcx, r12
call fcn.140060238
lea rcx, [rsp + 0x148]
call fcn.14004ea6c
jmp 0x140019886
cmp dword [rbx], 1
jb 0x140019886
mov esi, 1
cmp dword [rbx], esi
jb 0x140019886
lea r13, [0x1400e94a4]
lea rbp, str.DeviceImDisk
cmp r15d, edi
movsxd rax, r14d
cmovne rbp, r13
lea r13, [rbx + 4]
lea r14, [rsp + rax*2 + 0x20]
mov r9d, dword [r13]
lea rdx, str.__s_u_r_n
lea rcx, [rsp + 0x20]
mov r8, rbp
call qword [sym.imp.USER32.dll_wsprintfW]
mov rdx, r14
mov rcx, r12
call fcn.140056108
inc esi
add r13, 4
cmp esi, dword [rbx]
jbe 0x140019858
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
jmp 0x140019719