joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140066640
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value
Set current directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x360
mov rbp, rcx
lea r12, [0x140101bd0]
mov r15, rcx
movzx r13d, dl
mov rcx, qword [0x14012de08]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
mov r14d, eax
cmp eax, 0xffffffff
jne 0x1400667ce
mov rsi, 0xffffffff80000001
mov edi, ebx
nop word [rax + rax]
mov r9d, edi
lea rax, [rsp + 0x3b0]
or r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREAutoHotkey
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400668a9
mov rcx, qword [rsp + 0x3b0]
lea rax, [rsp + 0x3a0]
mov qword [rsp + 0x28], rax
lea rdx, str.InstallDir
lea rax, [rsp + 0x150]
mov dword [rsp + 0x3a0], 0x208
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x3b0]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x1400668a7
mov edx, dword [rsp + 0x3a0]
test edx, edx
je 0x1400668a7
shr edx, 1
mov ecx, edx
dec edx
mov dword [rsp + 0x3a0], edx
cmp word [rsp + rdx*2 + 0x150], bx
jne 0x140066787
test edx, edx
je 0x140066783
mov eax, edx
mov r8d, edx
nop word [rax + rax]
lea ecx, [r8 - 1]
mov edx, eax
cmp word [rsp + rcx*2 + 0x150], 0
mov r8d, ecx
jne 0x140066783
mov dword [rsp + 0x3a0], ecx
mov eax, ecx
mov edx, ecx
test ecx, ecx
jne 0x140066760
xor ebx, ebx
jmp 0x1400667a6
xor ebx, ebx
mov dword [rsp + 0x3a0], ecx
cmp ecx, 0x104
jae 0x1400668a9
mov word [rsp + rcx*2 + 0x150], bx
mov edx, ecx
test edx, edx
je 0x1400668b1
lea rcx, [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14006688c
test r13b, r13b
je 0x1400667fe
cmp r14d, 0xffffffff
je 0x1400667fe
mov r9, rbp
lea r8, str._script__s
mov edx, 0x40
lea rcx, [rsp + 0x50]
call fcn.1400a2630
mov r15, qword [0x14012de00]
lea r12, [rsp + 0x50]
mov byte [rsp + 0x40], 0
lea rcx, [0x14012d680]
mov byte [rsp + 0x38], 0
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov r8, r12
mov qword [rsp + 0x28], rbx
mov rdx, r15
mov byte [rsp + 0x20], 0
call fcn.140064610
test eax, eax
jne 0x140066869
mov r9, rbp
lea r8, str.Could_not_launch__s
mov edx, 0x40
lea rcx, [rsp + 0xd0]
call fcn.1400a2630
xorps xmm3, xmm3
mov qword [rsp + 0x20], rbx
xor r8d, r8d
lea rcx, [rsp + 0xd0]
mov edx, reloc.WSOCK32.dll_recv
call fcn.1400a9200
mov rax, qword [0x140127b60]
lea rcx, [0x140101bd0]
test rax, rax
je 0x140066886
mov rax, qword [rax]
test rax, rax
cmovne rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rbx, qword [rsp + 0x3a8]
add rsp, 0x360
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor ebx, ebx
mov word [rsp + 0x150], bx
test edi, edi
jne 0x1400668bf
mov edi, 0x200
jmp 0x1400666a0
cmp rsi, 0xffffffff80000002
je 0x14006688c
mov rsi, 0xffffffff80000002
jmp 0x140066693
Function at 0x1400680c0
Capabilities:
Set current directory

Disassembly:
push rbx
sub rsp, 0x20
movzx eax, word [rcx]
mov rbx, rcx
test ax, ax
je 0x1400680f8
cmp word [rcx + 2], 0x3a
jne 0x1400680f8
cmp word [rcx + 4], 0
jne 0x1400680f8
mov word [rsp + 0x30], ax
lea rbx, [rsp + 0x30]
xor eax, eax
mov dword [rsp + 0x32], 0x5c003a
mov word [rsp + 0x36], ax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x140068110
mov eax, 0xa0070000
add rsp, 0x20
pop rbx
ret
cmp byte [0x14012de1c], 0
je 0x140068121
mov rcx, rbx
call fcn.140068130
mov eax, 1
add rsp, 0x20
pop rbx
ret

Function at 0x140068130
Capabilities:
Get common file path

Disassembly:
push rbx
mov eax, 0x10020
call fcn.1400def50
sub rsp, rax
mov rbx, rcx
lea rdx, [rsp + 0x20]
mov ecx, 0x8000
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
lea rdx, [rsp + 0x20]
cmove rdx, rbx
test rdx, rdx
je 0x14006816e
lea rcx, vtable.CKuStringT_wchar_t__class_CKuStringUtilW_.0
call fcn.140065150
add rsp, 0x10020
pop rbx
ret

Function at 0x140068180
Capabilities:
Get common file path

Disassembly:
mov eax, 0x10028
call fcn.1400def50
sub rsp, rax
lea rdx, [rsp + 0x20]
mov ecx, 0x8000
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1400681b3
lea rcx, [rsp + 0x20]
call fcn.1400d1750
add rsp, 0x10028
ret
xor eax, eax
add rsp, 0x10028
ret

Function at 0x14006d2f0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
sub rsp, 0x20
movzx ebx, cl
test cl, cl
jne 0x14006d305
xor al, al
add rsp, 0x20
pop rbx
ret
sub edx, 1
je 0x14006d330
mov ecx, ebx
cmp edx, 1
je 0x14006d322
call qword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
add rsp, 0x20
pop rbx
ret
call qword [sym.imp.USER32.dll_GetKeyState]
and al, 1
add rsp, 0x20
pop rbx
ret
lea eax, [rbx - 1]
cmp al, 5
ja 0x14006d33c
cmp bl, 3
jne 0x14006d343
lea eax, [rbx + 0x66]
cmp al, 5
ja 0x14006d360
cmp qword [0x14012be60], 0
jne 0x14006d382
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr eax, 0xf
and al, 1
add rsp, 0x20
pop rbx
ret
cmp qword [0x14012be68], 0
je 0x14006d34d
xor edx, edx
xor r8d, r8d
movzx ecx, bl
call fcn.140022d00
test al, al
je 0x14006d382
mov cl, 1
call fcn.140022a60
lea rcx, [0x14012be80]
movzx eax, byte [rbx + rcx]
shr al, 7
add rsp, 0x20
pop rbx
ret
Function at 0x140071020
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x270
cmp word [rcx], 0
je 0x140071124
test dl, dl
jne 0x14007105c
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x140071124
mov al, 1
mov rbx, qword [rsp + 0x288]
add rsp, 0x270
pop rdi
ret
lea r9, [rsp + 0x280]
mov edx, 0x104
lea r8, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov rbx, 0xffffffffffffffff
lea rcx, [rsp + 0x60]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x140071083
xor edi, edi
test rax, rax
je 0x1400710a1
cmp word [rsp + rax*2 + 0x5e], 0x5c
jne 0x1400710a1
mov word [rsp + rax*2 + 0x5e], di
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140071124
test al, 0x10
je 0x140071124
lea rax, [rsp + 0x60]
nop word [rax + rax]
cmp word [rax + rbx*2 + 2], di
lea rbx, [rbx + 1]
jne 0x1400710c0
lea rax, [rsp + 0x60]
mov word [rsp + rbx*2 + 0x62], di
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x20]
mov eax, 0x614
mov qword [rsp + 0x38], rdi
xorps xmm0, xmm0
mov word [rsp + 0x40], ax
movdqu xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
sete al
mov rbx, qword [rsp + 0x288]
add rsp, 0x270
pop rdi
ret
mov rbx, qword [rsp + 0x288]
xor al, al
add rsp, 0x270
pop rdi
ret
Function at 0x140080370
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r13
push r14
sub rsp, 0x20
mov r13, r8
mov esi, r9d
mov rbx, rdx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x147
mov rcx, qword [r13 + 0x28]
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [r13 + 0x28]
mov rdi, rax
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov r14d, eax
lea ecx, [rax*2 + 2]
movsxd rcx, ecx
call fcn.1400c5924
mov rbp, rax
test rax, rax
jne 0x1400803da
mov rcx, rbx
call fcn.140010e10
jmp 0x140080501
mov rcx, qword [r13 + 0x28]
lea r8d, [r14 + 1]
mov rdx, rbp
call qword [sym.imp.USER32.dll_GetWindowTextW]
movsxd r14, eax
cmp rdi, 0xffffffffffffffff
je 0x14008041e
mov rcx, qword [r13 + 0x28]
test eax, eax
jne 0x140080459
xor r9d, r9d
mov r8, rdi
mov edx, 0x149
call qword [sym.imp.USER32.dll_SendMessageW]
test rax, rax
je 0x140080470
mov rdi, 0xffffffffffffffff
cmp rdi, rdi
jne 0x140080470
mov rcx, qword [r13 + 0x28]
mov r9, rbp
mov edx, 0x158
mov r8, 0xffffffffffffffff
call qword [sym.imp.USER32.dll_SendMessageW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140080470
test esi, esi
je 0x140080470
xor esi, esi
mov qword [rbx + 0x20], rbp
mov dword [rbx + 0x10], esi
mov qword [rbx], rbp
mov qword [rbx + 8], r14
jmp 0x140080501
lea r8, [rdi - 1]
mov r9, rbp
mov edx, 0x158
call qword [sym.imp.USER32.dll_SendMessageW]
cmp rdi, rax
jne 0x14008041e
mov rcx, rbp
call fcn.1400c5910
test esi, esi
je 0x14008053a
cmp esi, 2
jne 0x14008048f
test byte [r13 + 0x51], sil
jne 0x14008053a
mov rcx, qword [r13 + 0x28]
xor r9d, r9d
mov r8, rdi
mov qword [rsp + 0x40], r15
mov edx, 0x149
call qword [sym.imp.USER32.dll_SendMessageW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400804fc
xor esi, esi
lea r14, [rax + rax]
cmp rax, 0xff
ja 0x14008051a
mov rax, qword [rbx + 0x18]
mov qword [rbx], rax
mov word [r14 + rax], si
mov qword [rbx + 8], r15
mov r9, qword [rbx]
mov r8, rdi
mov rcx, qword [r13 + 0x28]
mov edx, 0x148
call qword [sym.imp.USER32.dll_SendMessageW]
cmp rax, 0xffffffffffffffff
jne 0x1400804fc
lea rax, [0x140101bd0]
mov dword [rbx + 0x10], esi
mov qword [rbx], rax
mov qword [rbx + 8], rsi
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r13
pop rdi
ret
lea rcx, [r14 + 2]
call fcn.1400c5924
mov qword [rbx + 0x20], rax
test rax, rax
jne 0x1400804c4
mov rcx, rbx
call fcn.140010e10
test eax, eax
je 0x1400804fc
jmp 0x1400804d0
lea eax, [rdi + 1]
mov dword [rbx + 0x10], 1
movsxd rcx, eax
mov qword [rbx], rcx
jmp 0x140080501
Function at 0x140080c70
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rcx, qword [r8 + 0x28]
mov rbp, r8
mov rdi, rdx
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
movsxd r14, eax
xor r15d, r15d
mov rbx, r14
cmp r14, 0xffffffffffffffff
jne 0x140080cba
nop word [rax + rax]
inc rbx
cmp word [r15 + rbx*2], r15w
jne 0x140080cb0
lea rsi, [rbx + rbx]
cmp rbx, 0xff
ja 0x140080d24
mov rax, qword [rdi + 0x18]
mov qword [rdi], rax
mov word [rsi + rax], r15w
mov qword [rdi + 8], rbx
mov rdx, qword [rdi]
lea r8d, [r14 + 1]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.USER32.dll_GetWindowTextW]
movsxd rcx, eax
mov qword [rdi + 8], rcx
test eax, eax
je 0x140080d06
mov rax, qword [rdi]
cmp word [rax + rcx*2 - 2], r15w
jne 0x140080d06
lea rax, [rcx - 1]
mov qword [rdi + 8], rax
mov eax, 1
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
lea rcx, [rsi + 2]
call fcn.1400c5924
mov qword [rdi + 0x20], rax
test rax, rax
jne 0x140080ccb
mov rcx, rdi
call fcn.140010e10
cmp eax, 1
je 0x140080cd7
xor eax, eax
jmp 0x140080d0b

Function at 0x140080e50
Capabilities:
Hide graphical window

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [rcx + 0x30], 0
mov rbx, rcx
je 0x140080f90
mov rcx, qword [rcx + 0x40]
test rcx, rcx
je 0x140080ec6
xor r9d, r9d
xor r8d, r8d
mov edx, 0x406
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x140080ec6
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rdi
xor edi, edi
mov esi, eax
mov rcx, qword [rbx + 0x40]
xor r9d, r9d
mov r8, rdi
mov edx, 0x414
call qword [sym.imp.USER32.dll_SendMessageW]
test rax, rax
je 0x140080eb3
mov rcx, rax
call qword [sym.imp.USER32.dll_DestroyIcon]
inc rdi
sub rsi, 1
jne 0x140080e90
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x140080f06
mov rcx, qword [rbx + 0x30]
xor edx, edx
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, qword [rbx + 0x30]
xor edx, edx
call qword [sym.imp.USER32.dll_SetMenu]
cmp byte [rbx + 0x110], 0
jne 0x140080f06
mov rcx, qword [rbx + 0x30]
mov byte [rbx + 0x110], 1
call qword [sym.imp.USER32.dll_DestroyWindow]
mov rax, qword [rbx + 0x28]
test rax, rax
jne 0x140080f1d
cmp rbx, qword [0x14012bb98]
jne 0x140080f44
test rax, rax
je 0x140080f23
lea rdx, [rax + 0x20]
jmp 0x140080f2a
lea rdx, [0x14012bb98]
mov rcx, qword [rbx + 0x20]
lea r8, [rcx + 0x28]
test rcx, rcx
jne 0x140080f3e
lea r8, [0x14012be30]
mov qword [rdx], rcx
mov qword [r8], rax
mov rcx, rbx
mov qword [rbx + 0x30], 0
call fcn.140080fa0
cmp byte [rbx + 0x115], 0
je 0x140080f66
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WSOCK32.dll_recv]
cmp dword [0x14012bb68], 0
jne 0x140080f90
lea rcx, [0x14012d680]
call fcn.140047510
test al, al
jne 0x140080f90
mov edx, 4
lea rcx, [0x14012d680]
call fcn.140047930
mov eax, 1
add rsp, 0x20
pop rbx
ret
Function at 0x14008cc30
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x70
cmp dword [0x1401251d0], 0
mov r15, r9
mov rbp, r8
mov r14, rdx
mov rdi, rcx
je 0x14008cc96
cmp dword [0x14012bb3c], 0
jne 0x14008cc96
mov r9d, dword [rdx + 0x48]
xor r10d, r10d
test r9d, r9d
jle 0x14008cc96
mov rax, qword [rdx + 0x38]
mov ecx, dword [r8 + 0x10]
add rax, 0xe
nop
cmp dword [rax - 6], ecx
jne 0x14008cc8a
cmp byte [rax], 1
je 0x14008ccb2
inc r10d
add rax, 0x10
cmp r10d, r9d
jl 0x14008cc80
xor al, al
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
mov eax, dword [0x14012bb68]
cmp eax, dword [reloc.WSOCK32.dll_inet_addr]
jge 0x14008cc96
mov rbx, qword [0x1401251d8]
cmp dword [rbx + 0x68], 0
jg 0x14008cc96
inc eax
add rbx, 0xc8
mov dword [0x14012bb68], eax
mov rax, qword [0x14012bb40]
mov qword [0x1401251d8], rbx
test rax, rax
je 0x14008ccf8
lea rcx, [rax + 0x80]
jmp 0x14008ccfa
xor ecx, ecx
test rbx, rbx
je 0x14008cd08
lea rax, [rbx + 0x80]
jmp 0x14008cd0a
xor eax, eax
movups xmm0, xmmword [rcx]
xor edx, edx
movups xmmword [rax], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [rcx + 0x20]
movups xmmword [rax + 0x20], xmm0
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [rax + 0x30], xmm1
movsd xmm0, qword [rcx + 0x40]
xorps xmm1, xmm1
movsd qword [rax + 0x40], xmm0
lea rcx, [0x14012d680]
movups xmmword [rbx], xmm1
movups xmmword [rbx + 0x10], xmm1
movups xmmword [rbx + 0x20], xmm1
movups xmmword [rbx + 0x30], xmm1
movups xmmword [rbx + 0x40], xmm1
movups xmmword [rbx + 0x50], xmm1
movups xmmword [rbx + 0x60], xmm1
movups xmmword [rbx + 0x70], xmm1
mov byte [rbx + 0x7f], 1
mov dword [rbx + 0x68], 0
call fcn.140046d20
movzx eax, byte [rbx + 0xc2]
test al, al
jne 0x14008cd7e
mov byte [rbx + 0xc2], al
cmp dword [0x14012de34], 0
je 0x14008cd90
cmp dword [0x14012de30], 0
jne 0x14008cd94
test al, al
je 0x14008cdca
mov dword [rbx + 0x88], reloc.WSOCK32.dll_recv
mov byte [rbx + 0x7f], 0
test al, al
jne 0x14008cdca
cmp dword [0x14012de34], 0
jge 0x14008cdb8
mov dword [rbx + 0x70], 0xffffffff
jmp 0x14008cdca
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0x74], eax
mov eax, dword [0x14012de34]
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14012de38], eax
mov rcx, rdi
mov rax, qword [rdi]
call qword [rax + reloc.WSOCK32.dll_htonl]
mov r9d, dword [rbp + 0x10]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x30], r15
lea rcx, [r14 + 0x38]
mov qword [rsp + 0x28], rdi
mov r8d, 2
mov byte [rsp + 0x20], 1
mov dword [rsp + 0x50], 5
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x68], 1
mov qword [rsp + 0x58], rbp
call fcn.140099830
mov rdx, qword [rdi]
mov rcx, rdi
mov ebx, eax
call qword [rdx + reloc.WSOCK32.dll_recv]
call fcn.1400047c0
cmp ebx, 7
sete al
jmp 0x14008cc98
Function at 0x14008ce40
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp word [rcx], 0
mov rbx, rcx
je 0x14008cf54
xor dil, dil
cmp word [rcx + 2], 0
je 0x14008ce93
movzx eax, word [rbx]
cmp ax, 0x21
je 0x14008ce83
cmp ax, 0x2b
je 0x14008ce7f
cmp ax, 0x5e
jne 0x14008ce93
mov al, 2
jmp 0x14008ce85
mov al, 1
jmp 0x14008ce85
mov al, 4
add rbx, 2
or dil, al
cmp word [rbx + 2], 0
jne 0x14008ce66
xor ecx, ecx
mov byte [rsp + 0x40], 0
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
lea rdx, [rsp + 0x40]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140023680
movzx esi, al
test al, al
je 0x14008cf54
movzx ecx, dil
or cl, 4
test byte [rsp + 0x40], 0xc
movzx edx, cl
movzx ecx, dil
cmove edx, ecx
movzx r8d, dl
movzx eax, r8b
or al, 2
test byte [rsp + 0x40], 3
movzx ecx, al
cmove ecx, r8d
movzx edx, cl
mov rcx, rbx
movzx eax, dl
or al, 1
test byte [rsp + 0x40], 0x30
movzx edi, al
cmove edi, edx
xor edx, edx
call fcn.140023590
movzx edx, ax
test ax, ax
jne 0x14008cf1f
xor edx, edx
movzx ecx, sil
call fcn.1400241f0
movzx edx, ax
mov eax, 0x100
and dx, ax
movzx eax, dil
or al, 8
movzx ecx, al
test dx, dx
movzx eax, dil
cmove ecx, eax
movzx eax, cl
shl ax, 8
or ax, si
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rbx, qword [rsp + 0x48]
xor eax, eax
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x14008ed80
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x20], rbx
push r14
sub rsp, 0x30
mov r14, rdx
mov rbx, rcx
movzx eax, word [rbx]
cmp ax, 0x20
je 0x14008eda0
cmp ax, 9
jne 0x14008eda6
add rbx, 2
jmp 0x14008ed91
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rdi
test ax, ax
je 0x14008efc9
cmp word [rbx + 2], 0
lea rcx, [rbx + 2]
jne 0x14008edd7
mov word [rdx + 2], ax
mov al, 1
mov byte [rdx], 0
jmp 0x14008efcb
mov byte [rdx], 1
xor sil, sil
mov edx, 0x2b
call fcn.1400c1808
mov rbp, rax
test rax, rax
je 0x14008eeb8
lea rdi, [rbp - 2]
cmp rdi, rbx
jbe 0x14008ee18
nop dword [rax]
movzx eax, word [rdi]
cmp ax, 0x20
je 0x14008ee0f
cmp ax, 9
jne 0x14008ee18
sub rdi, 2
cmp rdi, rbx
ja 0x14008ee00
sub rdi, rbx
lea rdx, str.Ctrl
sar rdi, 1
mov rcx, rbx
inc rdi
mov r8, rdi
call fcn.1400c5980
test eax, eax
jne 0x14008ee3d
or sil, 1
jmp 0x14008ee77
mov r8, rdi
lea rdx, [0x1401064b0]
mov rcx, rbx
call fcn.1400c5980
test eax, eax
jne 0x14008ee59
or sil, 4
jmp 0x14008ee77
mov r8, rdi
lea rdx, str.Shift
mov rcx, rbx
call fcn.1400c5980
test eax, eax
jne 0x14008efc9
or sil, 0x10
lea rbx, [rbp + 2]
nop dword [rax + rax]
movzx eax, word [rbx]
cmp ax, 0x20
je 0x14008ee8f
cmp ax, 9
jne 0x14008ee95
add rbx, 2
jmp 0x14008ee80
test ax, ax
je 0x14008efc9
mov edx, 0x2b
lea rcx, [rbx + 2]
call fcn.1400c1808
mov rbp, rax
test rax, rax
jne 0x14008edf3
xor ecx, ecx
cmp word [rbx + 2], cx
jne 0x14008ef81
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx ecx, word [rbx]
mov rdi, rax
call qword [sym.imp.USER32.dll_CharLowerW]
mov rbx, rax
cmp ax, 0xa
jne 0x14008eee6
mov dl, 0xd
jmp 0x14008ef9c
mov rdx, rdi
movzx ecx, bx
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rdx, ax
mov rcx, rdx
shr rcx, 8
cmp cl, 0xff
jne 0x14008ef3a
cmp dl, 0xff
jne 0x14008ef3a
lea eax, [rbx - 0x41]
cmp ax, 0x19
lea eax, [rbx - 0x61]
ja 0x14008ef1e
cmp ax, 0x19
jbe 0x14008ef24
movzx edx, bx
jmp 0x14008ef2f
cmp ax, 0x19
ja 0x14008ef3f
movzx edx, bx
mov eax, 0xffdf
and dx, ax
sub bx, 0x41
cmp bx, 0x19
setbe cl
test cl, 0x38
je 0x14008ef43
xor dl, dl
jmp 0x14008ef9c
movzx eax, cl
and al, 6
cmp al, 6
jne 0x14008ef52
or sil, 8
jmp 0x14008ef70
test cl, 2
je 0x14008ef61
test sil, 3
jne 0x14008ef61
or sil, 1
test cl, 4
je 0x14008ef70
test sil, 0xc
jne 0x14008ef70
or sil, 4
test cl, 1
je 0x14008ef9c
test sil, 0x30
jne 0x14008ef9c
or sil, 0x10
jmp 0x14008ef9c
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140023680
movzx edx, al
movzx eax, dl
mov word [r14 + 2], ax
test sil, 1
je 0x14008efae
or byte [r14], 8
test sil, 4
je 0x14008efb8
or byte [r14], 0x10
test sil, 0x10
je 0x14008efc2
or byte [r14], 4
test dl, dl
setne al
jmp 0x14008efcb
xor al, al
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
Function at 0x14009d5b0
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x30], rbx
mov r14, rdx
mov qword [rbp + 0x38], rsi
mov rbx, rcx
mov esi, 1
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14009d6a4
xor r12d, r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], r12d
mov edx, 0x40000000
mov rcx, rbx
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x14009d6a4
mov rbx, 0xffffffffffffffff
nop dword [rax]
cmp word [r14 + rbx*2 + 2], r12w
lea rbx, [rbx + 1]
jne 0x14009d620
lea edx, [rbx + 4]
lea eax, [rdx + rdx]
mov ecx, eax
add rax, 0xf
cmp rax, rcx
ja 0x14009d647
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1400def50
sub rsp, rax
lea r8, str.__s_
mov r9, r14
lea rdi, [rsp + 0x40]
mov rcx, rdi
call fcn.1400a2630
lea ebx, [rbx*2 + 6]
mov qword [rsp + 0x20], r12
mov r8d, ebx
lea r9, [rbp + 0x40]
mov rdx, rdi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14009d692
cmp dword [rbp + 0x40], ebx
je 0x14009d695
mov esi, r12d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
cmove esi, r12d
mov rbx, qword [rbp + 0x30]
mov eax, esi
mov rsi, qword [rbp + 0x38]
mov rsp, rbp
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x14009e200
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov r11, rsp
push rbx
push rsi
push rdi
sub rsp, 0x240
xor esi, esi
mov dword [r11 + 0x10], 0xff
lea rax, [r11 + 0x20]
xor edx, edx
mov qword [rsp + 0x38], rax
lea r9, [r11 + 0x10]
mov qword [rsp + 0x30], rsi
lea r8, [rsp + 0x40]
mov qword [rsp + 0x28], rsi
mov rdi, rcx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x14009e30c
nop
mov rax, qword [0x1401251d8]
lea rdx, [rsp + 0x40]
xor r8d, r8d
mov rcx, rdi
mov r9d, dword [rax + 0xb0]
lea rax, [rsp + 0x270]
or r9d, 0x20019
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x14009e319
mov rcx, qword [rsp + 0x270]
call fcn.14009e200
mov rcx, qword [rsp + 0x270]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x14009e319
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ebx, eax
test eax, eax
jne 0x14009e319
lea rax, [rsp + 0x278]
mov dword [rsp + 0x268], 0xff
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x268]
mov qword [rsp + 0x30], rsi
lea r8, [rsp + 0x40]
mov qword [rsp + 0x28], rsi
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0x14009e250
xor eax, eax
add rsp, 0x240
pop rdi
pop rsi
pop rbx
ret
mov eax, ebx
add rsp, 0x240
pop rdi
pop rsi
pop rbx
ret

Function at 0x14009fe70
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x38
mov rcx, qword [rcx + 0x40]
lea r9, [rsp + 0x40]
xor eax, eax
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x40]
add rsp, 0x38
ret

Function at 0x14009fea0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
mov rcx, qword [rcx + 0x40]
lea r9, [rsp + 0x40]
xor eax, eax
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rsp + 0x40]
add rsp, 0x38
ret

Function at 0x14009ff30
Capabilities:
Get file size

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx + 0x40]
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
xor ecx, ecx
test eax, eax
cmovne rcx, qword [rsp + 0x30]
mov rax, rcx
add rsp, 0x28
ret

Function at 0x1400a3f00
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
mov eax, 0x10020
call fcn.1400def50
sub rsp, rax
mov rdi, rdx
lea rcx, str.ComSpec
lea rdx, [rsp + 0x20]
mov r8d, 0x7fff
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
je 0x1400a3f69
lea rcx, [rbx + 1]
cmp rcx, 0x7fff
ja 0x1400a3f69
lea r8, [rbx*2 + 2]
mov rcx, rdi
lea rdx, [rsp + 0x20]
call fcn.1400e2970
mov eax, ebx
mov rbx, qword [rsp + 0x10030]
add rsp, 0x10020
pop rdi
ret
xor eax, eax
mov word [rdi], ax
mov eax, ebx
mov rbx, qword [rsp + 0x10030]
add rsp, 0x10020
pop rdi
ret