joyce8/EMBER2024-capa huggingface dataset:
Function at 0x50fc40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbp, rsp
mov rbx, rcx
mov rsi, rdx
mov qword [rbp + 0x60], r8
mov rcx, rsi
mov rdx, qword [rbp + 0x60]
mov r8, r9
call sub.kernel32.dll_FindResourceW
mov qword [rbx + 0x20], rax
cmp qword [rbx + 0x20], 0
jne 0x50fc77
mov rcx, rbp
call fcn.0050fb30
mov rcx, rsi
mov rdx, qword [rbx + 0x20]
call sub.kernel32.dll_LoadResource
mov qword [rbx + 0x28], rax
cmp qword [rbx + 0x28], 0
jne 0x50fc96
mov rcx, rbp
call fcn.0050fb30
mov rcx, qword [rbx + 0x28]
call sub.kernel32.dll_LockResource
mov rdi, rax
mov rcx, rsi
mov rdx, qword [rbx + 0x20]
call sub.kernel32.dll_SizeofResource
mov rcx, rbx
mov rdx, rdi
mov r8d, eax
call fcn.0050f3c0
lea rsp, [rbp + 0x28]
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x523fe0
Capabilities:
Resume thread

Disassembly:
push rbp
sub rsp, 0x40
mov rbp, rsp
mov qword [rbp + 0x20], rcx
mov byte [rbp + 0x2f], dl
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], 0
nop
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x19], 0
jne 0x524013
movzx rax, byte [rbp + 0x2f]
test al, al
je 0x524071
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x1d], 0
jne 0x524071
mov rax, qword [rbp + 0x20]
cmp byte [rax + 0x68], 0
jne 0x524071
mov rax, qword [rbp + 0x20]
mov byte [rax + 0x1b], 0
mov byte [rax + 0x19], 0
mov rax, qword [rbp + 0x20]
mov rcx, qword [rax + 0x10]
call sub.kernel32.dll_ResumeThread
cmp eax, 1
je 0x52409b
lea rcx, [rbp + 0x38]
mov rdx, qword [0x006e1c30]
call fcn.004134b0
mov rcx, qword [0x004e0200]
mov dl, 1
mov r8, qword [rbp + 0x38]
call fcn.00438440
mov rcx, rax
call fcn.0040ce00
jmp 0x52409b
lea rcx, [rbp + 0x30]
mov rdx, qword [0x006e1c30]
call fcn.004134b0
mov rcx, qword [0x004e0200]
mov dl, 1
mov r8, qword [rbp + 0x30]
call fcn.00438440
mov rcx, rax
call fcn.0040ce00
nop
lea rcx, [rbp + 0x30]
mov edx, 2
call fcn.0040dd70
lea rsp, [rbp + 0x40]
pop rbp
ret

Function at 0x524f50
Capabilities:
Suspend thread

Disassembly:
push rbp
sub rsp, 0x40
mov rbp, rsp
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x50], rcx
mov rax, qword [rbp + 0x50]
movzx rax, byte [rax + 0x1b]
mov byte [rbp + 0x3f], al
nop
mov rax, qword [rbp + 0x50]
mov byte [rax + 0x1b], 1
mov rax, qword [rbp + 0x50]
mov rcx, qword [rax + 0x10]
call sub.kernel32.dll_SuspendThread
mov rcx, qword [rbp + 0x50]
test eax, eax
setge dl
call fcn.00523e20
jmp 0x524fab
lea rsp, [rbp + 0x40]
pop rbp
ret

Function at 0x524fd0
Capabilities:
Resume thread

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov rcx, qword [rbx + 0x10]
call sub.kernel32.dll_ResumeThread
mov esi, eax
mov rcx, rbx
test esi, esi
setge dl
call fcn.00523e20
cmp esi, 1
jne 0x524ffa
mov byte [rbx + 0x1b], 0
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x529380
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbp, rsp
mov rsi, rcx
lea rdi, [rbp + 0x20]
movsq qword [rdi], qword [rsi]
movsq qword [rdi], qword [rsi]
cmp qword [0x006ec4a0], 0
jne 0x529435
xor rcx, rcx
mov edx, 0x1000
mov r8d, 0x1000
mov r9d, 0x40
call sub.kernel32.dll_VirtualAlloc_1
mov rbx, rax
mov rax, qword [0x006ec498]
mov qword [rbx], rax
lea rcx, [0x006c34fc]
lea rdx, [rbx + 8]
mov r8d, 8
call fcn.00408bb0
lea rax, [0x00529340]
mov qword [rbx + 0x10], rax
lea rsi, [rbx + 0x18]
mov byte [rsi], 0xe8
mov rcx, rsi
lea rdx, [rbx + 8]
call fcn.00529370
mov dword [rsi + 1], eax
mov rax, qword [0x006ec4a0]
mov qword [rsi + 5], rax
mov qword [0x006ec4a0], rsi
add rsi, 0x15
mov rax, rbx
neg rax
lea rax, [rsi + rax]
cmp rax, 0xfed
jl 0x5293f3
mov qword [0x006ec498], rbx
mov rax, qword [0x006ec4a0]
mov rsi, qword [0x006ec4a0]
mov rcx, qword [rsi + 5]
mov qword [0x006ec4a0], rcx
lea rdi, [rsi + 5]
lea rsi, [rbp + 0x20]
movsq qword [rdi], qword [rsi]
movsq qword [rdi], qword [rsi]
lea rsp, [rbp + 0x38]
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x573f20
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push rbp
push rbx
sub rsp, 0xa8
mov rbp, rsp
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x78], 0
mov qword [rbp + 0x70], 0
mov qword [rbp + 0x48], rbp
mov qword [rbp + 0xc0], rcx
mov qword [rbp + 0xc8], rdx
nop
lea rcx, [rbp + 0x78]
mov rdx, qword [rbp + 0xc8]
call fcn.0040e340
mov rcx, qword [rbp + 0x78]
call fcn.005733c0
mov byte [rbp + 0x83], al
cmp byte [rbp + 0x83], 0
jne 0x573f95
lea rcx, [rbp + 0x78]
mov edx, 1
mov r8d, 1
call fcn.0040f6b0
mov rax, qword [rbp + 0xc0]
mov rax, qword [rax + 8]
mov qword [rbp + 0x98], rax
mov rcx, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0xc8]
call fcn.005751a0
mov qword [rbp + 0x90], rax
cmp qword [rbp + 0x90], 0
je 0x5740e9
nop
mov rcx, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0x90]
call fcn.005738f0
mov rcx, qword [rbp + 0xc0]
lea rdx, [rbp + 0x54]
call fcn.005742a0
test al, al
je 0x5740c9
lea rcx, [rbp + 0x70]
xor rdx, rdx
mov r8d, dword [rbp + 0x58]
add r8d, 1
call fcn.0040df50
mov eax, dword [rbp + 0x54]
sub eax, 1
mov dword [rbp + 0x84], eax
cmp dword [rbp + 0x84], 0
jl 0x5740c8
mov eax, dword [rbp + 0x58]
add eax, 1
mov dword [rbp + 0x88], eax
mov rcx, qword [rbp + 0x70]
call fcn.0040f010
mov rcx, qword [rbp + 0x90]
mov edx, dword [rbp + 0x84]
mov r8, rax
lea r9, [rbp + 0x88]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.advapi32.dll_RegEnumKeyExW
mov rcx, qword [rbp + 0xc0]
mov edx, eax
call fcn.00573810
test al, al
je 0x5740b4
mov rcx, qword [rbp + 0x70]
call fcn.0040f010
lea rcx, [rbp + 0x40]
mov rdx, rax
call fcn.0040f0b0
mov rcx, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0x40]
call fcn.00573f20
sub dword [rbp + 0x84], 1
cmp dword [rbp + 0x84], 0xffffffff
jne 0x574028
nop
nop
mov rcx, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0x98]
call fcn.005738f0
mov rcx, qword [rbp + 0x90]
call sub.advapi32.dll_RegCloseKey_1
cmp byte [0x006ec4fc], 0
je 0x574148
mov rcx, qword [rbp + 0xc0]
movzx rdx, byte [rbp + 0x83]
call fcn.005738d0
mov rbx, rax
mov rcx, qword [rbp + 0x78]
call fcn.0040f010
mov rcx, rbx
mov rdx, rax
mov rax, qword [rbp + 0xc0]
mov r8d, dword [rax + 0x2c]
and r8d, 0x300
xor r9, r9
call sub.advapi32.dll_RegDeleteKeyExW
mov rcx, qword [rbp + 0xc0]
mov edx, eax
call fcn.00573810
mov byte [rbp + 0x8f], al
jmp 0x574187
mov rcx, qword [rbp + 0xc0]
movzx rdx, byte [rbp + 0x83]
call fcn.005738d0
mov rbx, rax
mov rcx, qword [rbp + 0x78]
call fcn.0040f010
mov rcx, rbx
mov rdx, rax
call sub.advapi32.dll_RegDeleteKeyW
mov rcx, qword [rbp + 0xc0]
mov edx, eax
call fcn.00573810
mov byte [rbp + 0x8f], al
nop
lea rcx, [rbp + 0x40]
call fcn.0040dc90
lea rcx, [rbp + 0x70]
mov edx, 2
call fcn.0040dd70
movzx rax, byte [rbp + 0x8f]
lea rsp, [rbp + 0xa8]
pop rbx
pop rbp
ret

Function at 0x574270
Capabilities:
Delete registry value

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, rdx
call fcn.0040f010
mov rcx, qword [rbx + 8]
mov rdx, rax
call sub.advapi32.dll_RegDeleteValueW
mov rcx, rbx
mov edx, eax
call fcn.00573810
add rsp, 0x20
pop rbx
ret
Function at 0x575a50
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
sub rsp, 0x98
mov rbp, rsp
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x48], rbp
mov qword [rbp + 0xb0], rcx
mov qword [rbp + 0xb8], rdx
mov qword [rbp + 0xc0], r8
nop
mov rax, qword [rbp + 0xb0]
lea rax, [rax + rbp + 0x50]
mov rcx, rbp
neg rcx
mov rax, qword [rax + rcx]
mov rax, qword [rax + 8]
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0xb0]
lea rax, [rax + rbp + 0x50]
mov rcx, rbp
neg rcx
mov rcx, qword [rax + rcx]
mov rdx, qword [rbp + 0xb8]
call fcn.005738f0
nop
mov rax, qword [rbp + 0xb0]
lea rax, [rax + rbp + 0x50]
mov rcx, rbp
neg rcx
mov rcx, qword [rax + rcx]
lea rdx, [rbp + 0x64]
call fcn.005742a0
test al, al
je 0x575bfd
mov rcx, qword [rbp + 0xb0]
mov rdx, qword [rbp + 0xb8]
mov r8, qword [rbp + 0xc0]
xor r9, r9
call fcn.00575820
lea rcx, [rbp + 0x58]
xor rdx, rdx
mov r8d, dword [rbp + 0x70]
add r8d, 1
call fcn.0040df50
xor rax, rax
mov ebx, dword [rbp + 0x6c]
sub ebx, 1
mov dword [rbp + 0x80], eax
cmp dword [rbp + 0x80], ebx
jg 0x575bfc
add ebx, 1
mov eax, dword [rbp + 0x70]
add eax, 1
mov dword [rbp + 0x84], eax
mov rcx, qword [rbp + 0x58]
call fcn.0040f010
mov rcx, qword [rbp + 0xb8]
mov edx, dword [rbp + 0x80]
mov r8, rax
lea r9, [rbp + 0x84]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
call sub.advapi32.dll_RegEnumValueW
mov rcx, qword [rbp + 0xb0]
lea rcx, [rcx + rbp + 0x50]
mov rdx, rbp
neg rdx
mov rcx, qword [rcx + rdx]
mov edx, eax
call fcn.00573810
test al, al
je 0x575be9
mov rcx, qword [rbp + 0x58]
call fcn.0040f010
lea rcx, [rbp + 0x40]
mov rdx, rax
call fcn.0040f0b0
mov rcx, qword [rbp + 0xb0]
mov rdx, qword [rbp + 0xb8]
mov r8, qword [rbp + 0xc0]
mov r9, qword [rbp + 0x40]
call fcn.00575820
add dword [rbp + 0x80], 1
cmp dword [rbp + 0x80], ebx
jne 0x575b40
nop
nop
mov rax, qword [rbp + 0xb0]
lea rax, [rax + rbp + 0x50]
mov rcx, rbp
neg rcx
mov rcx, qword [rax + rcx]
mov rdx, qword [rbp + 0x88]
call fcn.005738f0
nop
lea rcx, [rbp + 0x40]
call fcn.0040dc90
lea rcx, [rbp + 0x58]
call fcn.0040dc90
lea rsp, [rbp + 0x98]
pop rbx
pop rbp
ret
Function at 0x581680
Capabilities:
Encode data using xor

Disassembly:
mov r8, rcx
xor rax, rax
xor rcx, rcx
sub edx, 1
cmp ecx, edx
jg 0x5816c2
add edx, 1
mov r9d, eax
and r9w, 0xf800
movzx r9d, r9w
shr r9d, 0xb
shl eax, 5
or r9w, ax
mov eax, r9d
movzx r9w, byte [r8]
xor ax, r9w
add r8, 1
add ecx, 1
cmp ecx, edx
jne 0x581693
nop
ret
Function at 0x5ab8f0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rbp, rsp
mov qword [rbp + 0x90], rcx
mov qword [rbp + 0x98], rdx
xor rax, rax
mov qword [rbp + 0x38], rax
cmp qword [0x006ec848], 0
je 0x5abab4
mov ecx, 0x11
call sub.user32.dll_GetKeyState
mov rcx, qword [0x006e1bd8]
mov rcx, qword [rcx]
test ax, 0x8000
setne al
movzx rcx, byte [rcx + 0x170]
xor cl, al
test cl, cl
je 0x5abab4
mov rcx, qword [0x006ec850]
mov rax, qword [0x006ec850]
mov rbx, qword [rax]
call qword [rbx + 0x10]
xor rbx, rbx
mov rax, qword [0x006ec848]
mov esi, dword [rax + 0x10]
sub esi, 1
cmp ebx, esi
jg 0x5aba76
add esi, 1
mov rcx, qword [0x006ec848]
mov edx, ebx
call fcn.005018c0
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0x50]
cmp rax, qword [rbp + 0x98]
je 0x5aba6b
mov rax, qword [rbp + 0x50]
cmp byte [rax + 0x381], 0
je 0x5aba6b
mov rcx, qword [rbp + 0x50]
mov rax, qword [rbp + 0x50]
mov rax, qword [rax]
call qword [rax + 0xd0]
test al, al
je 0x5aba6b
mov rcx, qword [rbp + 0x50]
call fcn.005be1a0
mov rcx, rax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x5aba6b
mov rcx, rbp
call fcn.005ab870
test al, al
jne 0x5aba6b
mov rcx, qword [rbp + 0x50]
mov dx, 0xffb9
call fcn.0040aef0
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x98]
call rax
test al, al
je 0x5aba6b
mov byte [rbp + 0x5f], 1
mov rcx, qword [rbp + 0x50]
mov dx, 0xffba
call fcn.0040aef0
mov rdi, rax
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x98]
lea r8, [rbp + 0x40]
mov r9, qword [rbp + 0x90]
lea rax, [rbp + 0x5f]
mov qword [rsp + 0x20], rax
call rdi
cmp byte [rbp + 0x5f], 0
je 0x5aba6b
lea rcx, [rbp + 0x40]
mov rdx, qword [rbp + 0x90]
call fcn.00417650
test al, al
je 0x5aba6b
mov rcx, qword [0x006ec850]
mov rdx, qword [rbp + 0x50]
call fcn.005aaab0
add ebx, 1
cmp ebx, esi
jne 0x5ab97c
nop
mov rax, qword [0x006ec850]
cmp dword [rax + 0x10], 0
jle 0x5aba94
mov rcx, qword [0x006ec850]
call fcn.005aabb0
mov qword [rbp + 0x38], rax
mov rax, qword [rbp + 0x38]
test rax, rax
je 0x5abab4
mov rcx, rbp
mov rdx, qword [rbp + 0x38]
call fcn.005ab610
test al, al
jne 0x5abab4
xor rax, rax
mov qword [rbp + 0x38], rax
mov rax, qword [rbp + 0x38]
lea rsp, [rbp + 0x68]
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x5b8e10
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
mov rbp, rsp
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
call sub.user32.dll_GetMessagePos
mov ecx, eax
call fcn.00417dd0
mov dword [rbp + 0x3c], eax
movsx rax, word [rbp + 0x3c]
mov dword [rbp + 0x34], eax
movsx rax, word [rbp + 0x3e]
mov dword [rbp + 0x38], eax
mov rcx, rbx
mov rdx, qword [rbp + 0x34]
call fcn.005af320
mov qword [rbp + 0x158], rax
test rdi, rdi
jne 0x5b8e7b
mov rcx, rbx
mov rdx, qword [rbp + 0x158]
xor r8, r8
xor r9, r9
mov byte [rsp + 0x20], 0
call fcn.005b8c30
mov rdi, rax
test rdi, rdi
je 0x5b8f6a
cmp rdi, rbx
je 0x5b8ea9
mov eax, dword [rbp + 0x158]
sub eax, dword [rdi + 0x90]
mov dword [rbp + 0x40], eax
mov eax, dword [rbp + 0x15c]
sub eax, dword [rdi + 0x94]
mov dword [rbp + 0x44], eax
jmp 0x5b8eb4
mov rax, qword [rbp + 0x158]
mov qword [rbp + 0x40], rax
movzx eax, word [rsi + 0x10]
mov dword [rbp + 0x48], eax
mov rax, qword [rsi + 8]
mov qword [rbp + 0x50], rax
movzx rax, word [rsi + 0x12]
cmp rax, 0x201
jge 0x5b8ef4
sub rax, 0xa1
cmp rax, 2
jb 0x5b8f17
sub rax, 3
cmp rax, 2
jb 0x5b8f23
sub rax, 3
cmp rax, 2
jae 0x5b8f29
jmp 0x5b8f1d
sub rax, 0x201
cmp rax, 2
jb 0x5b8f17
sub rax, 3
cmp rax, 2
jb 0x5b8f23
sub rax, 3
cmp rax, 2
jae 0x5b8f29
jmp 0x5b8f1d
mov byte [rbp + 0x4c], 0
jmp 0x5b8f2d
mov byte [rbp + 0x4c], 2
jmp 0x5b8f2d
mov byte [rbp + 0x4c], 1
jmp 0x5b8f2d
mov byte [rbp + 0x4c], 0
lea rcx, [rbp + 0x58]
call sub.user32.dll_GetKeyboardState
lea rcx, [rbp + 0x58]
call fcn.00677820
mov ebx, eax
call fcn.005aa120
or bx, ax
mov word [rbp + 0x4d], bx
mov rcx, rdi
mov edx, 0xb04b
xor r8, r8
lea r9, [rbp + 0x40]
call fcn.005b1c10
mov qword [rsi + 0x18], rax
mov al, 1
jmp 0x5b8f6d
xor rax, rax
lea rsp, [rbp + 0x168]
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x5f4130
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push rbp
sub rsp, 0x50
mov rbp, rsp
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0x60], rcx
mov qword [rbp + 0x68], rdx
mov rcx, qword [rbp + 0x68]
call fcn.0040de20
nop
xor rcx, rcx
call sub.user32.dll_OpenClipboard
test eax, eax
je 0x5f4224
nop
mov dword [rbp + 0x38], 0
cmp qword [rbp + 0x68], 0
je 0x5f4177
mov rax, qword [rbp + 0x68]
mov eax, dword [rax - 4]
mov dword [rbp + 0x38], eax
mov eax, dword [rbp + 0x38]
add eax, eax
mov dword [rbp + 0x3c], eax
mov ecx, 0x2002
mov edx, dword [rbp + 0x3c]
add edx, 2
movsxd rdx, edx
call sub.kernel32.dll_GlobalAlloc
mov qword [rbp + 0x48], rax
nop
mov rcx, qword [rbp + 0x48]
call sub.kernel32.dll_GlobalLock
mov qword [rbp + 0x40], rax
nop
mov dword [rbp + 0x30], 0
cmp qword [rbp + 0x68], 0
je 0x5f41be
mov rax, qword [rbp + 0x68]
mov eax, dword [rax - 4]
mov dword [rbp + 0x30], eax
mov eax, dword [rbp + 0x30]
add eax, eax
mov dword [rbp + 0x34], eax
mov rcx, qword [rbp + 0x68]
call fcn.0040f010
mov rcx, rax
mov rdx, qword [rbp + 0x40]
mov r8d, dword [rbp + 0x34]
add r8d, 2
movsxd r8, r8d
call fcn.00408bb0
call sub.user32.dll_EmptyClipboard
mov ecx, 0xd
mov rdx, qword [rbp + 0x48]
call sub.user32.dll_SetClipboardData
nop
mov rcx, qword [rbp + 0x48]
call sub.kernel32.dll_GlobalUnlock
jmp 0x5f421c
nop
call sub.user32.dll_CloseClipboard
jmp 0x5f4241
mov rcx, qword [0x00424b48]
mov dl, 1
mov r8, qword [0x006e14d8]
call fcn.004386d0
mov rcx, rax
call fcn.0040ce00
nop
lea rcx, [rbp + 0x68]
call fcn.0040dc90
lea rsp, [rbp + 0x50]
pop rbp
ret

Function at 0x5fb8c0
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
sub rsp, 0x20
movzx rbx, word [0x005fb914]
mov ecx, 0x10
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x5fb8e1
or bx, 1
mov ecx, 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x5fb8f5
or bx, 4
mov ecx, 0x12
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x5fb909
or bx, 2
mov eax, ebx
add rsp, 0x20
pop rbx
ret
Function at 0x665e60
Capabilities:
Get keyboard layout

Disassembly:
push rbp
add rsp, 0xffffffffffffff80
mov rbp, rsp
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x38], rbp
mov qword [rbp + 0x90], rcx
nop
mov byte [0x006ddab8], 0
mov word [rbp + 0x54], 0
lea rcx, [rbp + 0x54]
call sub.user32.dll_GetKeyboardLayoutNameW
mov rcx, qword [0x00571e70]
mov dl, 1
call fcn.005735a0
mov qword [rbp + 0x70], rax
nop
mov rcx, qword [rbp + 0x70]
mov rdx, 0xffffffff80000002
call fcn.00573860
lea rcx, [rbp + 0x28]
lea rdx, [rbp + 0x54]
mov r8d, 0xa
call fcn.0040f0e0
lea rcx, [rbp + 0x30]
lea rdx, [0x00666080]
mov r8, qword [rbp + 0x28]
call fcn.0040f440
mov rcx, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x30]
call fcn.00573c70
test al, al
je 0x665f9c
mov rcx, qword [rbp + 0x70]
lea rdx, [rbp + 0x68]
lea r8, [0x006660f4]
call fcn.00574970
mov rcx, qword [rbp + 0x68]
mov edx, 0x8000
call fcn.0043c420
mov qword [rbp + 0x78], rax
cmp qword [rbp + 0x78], 0
je 0x665f9c
nop
mov rcx, qword [rbp + 0x78]
lea rdx, [0x0066610c]
call fcn.0041a050
mov qword [rbp + 0x40], rax
cmp qword [rbp + 0x40], 0
je 0x665f92
call qword [rbp + 0x40]
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
je 0x665f92
mov rcx, qword [rbp + 0x90]
call fcn.00665dd0
test eax, eax
je 0x665f76
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x50]
mov dword [rbp + 0x50], eax
jmp 0x665f80
mov rax, qword [rbp + 0x48]
mov eax, dword [rax + 0x50]
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 1
cmp eax, 1
sete al
mov byte [0x006ddab8], al
nop
mov rcx, qword [rbp + 0x78]
call sub.kernel32.dll_FreeLibrary_2
nop
mov rcx, qword [rbp + 0x70]
call fcn.0040a960
nop
lea rcx, [rbp + 0x28]
mov edx, 2
call fcn.0040dd70
lea rcx, [rbp + 0x68]
call fcn.0040dc90
lea rsp, [rbp + 0x80]
pop rbp
ret

Function at 0x666190
Capabilities:
Log keystrokes via polling

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, rsp
mov rsi, rcx
lea rdi, [rbp + 0x20]
movsq qword [rdi], qword [rsi]
movsq qword [rdi], qword [rsi]
movsq qword [rdi], qword [rsi]
movsq qword [rdi], qword [rsi]
movzx bx, byte [rbp + 0x28]
test bx, bx
je 0x6661ee
mov ecx, 0x10
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x6661c9
add bx, 0x2000
mov ecx, 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x6661de
add bx, 0x4000
mov eax, dword [rbp + 0x30]
test eax, 0x20000000
je 0x6661ee
add bx, 0x8000
mov eax, ebx
lea rsp, [rbp + 0x48]
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x677750
Capabilities:
Log keystrokes via polling

Disassembly:
push rbx
sub rsp, 0x20
movzx rbx, word [0x006777b8]
mov eax, ecx
test ax, 4
je 0x67776a
or bx, 1
mov eax, ecx
test ax, 8
je 0x677777
or bx, 4
mov eax, ecx
test ax, 1
je 0x677784
or bx, 8
mov eax, ecx
test ax, 2
je 0x677791
or bx, 0x10
test cx, 0x10
je 0x67779c
or bx, 0x20
mov ecx, 0x12
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x6777b0
or bx, 2
mov eax, ebx
add rsp, 0x20
pop rbx
ret
Function at 0x6777c0
Capabilities:
Log keystrokes via polling

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
movzx rsi, word [0x00677810]
mov ecx, 0x10
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x6777e4
or si, 1
mov ecx, 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x6777f8
or si, 4
test ebx, 0x20000000
je 0x677804
or si, 2
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x685ba0
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push rbp
sub rsp, 0x510
mov rbp, rsp
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x58], rbp
mov qword [rbp + 0x520], rcx
nop
mov rax, qword [rbp + 0x520]
cmp qword [rax + 0x80], 0
jne 0x685dd2
mov rcx, qword [0x004d6978]
mov dl, 1
call fcn.00508ba0
mov rcx, qword [rbp + 0x520]
mov qword [rcx + 0x80], rax
mov rax, qword [rbp + 0x520]
lea rcx, [rax + 0x88]
call fcn.0040dc90
mov ecx, 0x40
lea rdx, [rbp + 0x2f0]
call sub.user32.dll_GetKeyboardLayoutList
mov dword [rbp + 0x4fc], eax
xor rax, rax
mov ecx, dword [rbp + 0x4fc]
sub ecx, 1
mov dword [rbp + 0x3c], ecx
mov dword [rbp + 0x4f8], eax
mov eax, dword [rbp + 0x3c]
cmp dword [rbp + 0x4f8], eax
jg 0x685daa
mov eax, dword [rbp + 0x3c]
add eax, 1
mov dword [rbp + 0x3c], eax
movsxd rax, dword [rbp + 0x4f8]
mov rcx, qword [rbp + rax*8 + 0x2f0]
call fcn.005c8100
test al, al
je 0x685d94
movsxd rax, dword [rbp + 0x4f8]
lea rax, [rbp + rax*8 + 0x2f0]
mov qword [rbp + 0x48], rax
mov byte [rbp + 0x50], 0x10
lea rcx, [rbp + 0x70]
lea rdx, [0x00685e64]
lea r8, [rbp + 0x48]
xor r9, r9
call fcn.004305f0
mov rcx, 0xffffffff80000002
mov rdx, rax
xor r8, r8
mov r9d, 0x20019
lea rax, [rbp + 0x508]
mov qword [rsp + 0x20], rax
call sub.advapi32.dll_RegOpenKeyExW_1
test eax, eax
jne 0x685d94
nop
mov dword [rbp + 0x4f4], 0x200
mov rcx, qword [rbp + 0x508]
lea rdx, [0x00685ed2]
xor r8, r8
xor r9, r9
lea rax, [rbp + 0xf0]
mov qword [rsp + 0x20], rax
lea rax, [rbp + 0x4f4]
mov qword [rsp + 0x28], rax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x685d87
lea rcx, [rbp + 0x40]
lea rdx, [rbp + 0xf0]
mov r8d, pe_nt_image_headers64
call fcn.0040f0e0
mov rax, qword [rbp + 0x520]
mov rax, qword [rax + 0x80]
mov rcx, rax
mov rdx, qword [rbp + 0x40]
movsxd r8, dword [rbp + 0x4f8]
mov r8, qword [rbp + r8*8 + 0x2f0]
mov rax, qword [rax]
call qword [rax + 0x80]
movsxd rax, dword [rbp + 0x4f8]
mov rcx, qword [rbp + 0x520]
mov rax, qword [rbp + rax*8 + 0x2f0]
cmp rax, qword [rcx + 0x90]
jne 0x685d87
mov rax, qword [rbp + 0x520]
lea rcx, [rax + 0x88]
lea rdx, [rbp + 0xf0]
mov r8d, pe_nt_image_headers64
call fcn.0040f0e0
nop
mov rcx, qword [rbp + 0x508]
call sub.advapi32.dll_RegCloseKey_1
add dword [rbp + 0x4f8], 1
mov eax, dword [rbp + 0x3c]
cmp dword [rbp + 0x4f8], eax
jne 0x685c48
nop
mov rax, qword [rbp + 0x520]
mov rax, qword [rax + 0x80]
mov byte [rax + 0x61], 0
mov rax, qword [rbp + 0x520]
mov rcx, qword [rax + 0x80]
mov dl, 1
call fcn.00508a50
mov rax, qword [rbp + 0x520]
mov rax, qword [rax + 0x80]
mov qword [rbp + 0x500], rax
nop
lea rcx, [rbp + 0x40]
call fcn.0040dc90
mov rax, qword [rbp + 0x500]
lea rsp, [rbp + 0x510]
pop rbp
ret
Function at 0x687160
Capabilities:
Create thread

Disassembly:
sub rsp, 0x48
mov rax, qword [0x006eca78]
cmp byte [rax + 0x151], 0
jne 0x687203
cmp qword [0x006ecab0], 0
jne 0x6871a6
call sub.kernel32.dll_GetCurrentThreadId_1
mov ecx, 3
mov rdx, qword [0x006dfc38]
xor r8, r8
mov r9d, eax
call sub.user32.dll_SetWindowsHookExW
mov qword [0x006ecab0], rax
cmp qword [0x006ecaa8], 0
jne 0x6871c8
xor rcx, rcx
xor rdx, rdx
xor r8, r8
xor r9, r9
call sub.kernel32.dll_CreateEventW
mov qword [0x006ecaa8], rax
cmp qword [0x006ecab8], 0
jne 0x687203
xor rcx, rcx
mov edx, 0x3e8
mov r8, qword [0x006dfc30]
xor r9, r9
mov dword [rsp + 0x20], 0
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
call sub.kernel32.dll_CreateThread_1
mov qword [0x006ecab8], rax
add rsp, 0x48
ret

Function at 0x6886f0
Capabilities:
Enumerate gui resources

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x50
mov rbp, rsp
mov rbx, rcx
cmp qword [rbx + 0x2c8], 0
je 0x6887db
cmp dword [rbx + 0x120], 0
jne 0x6887d1
mov rax, qword [rbx + 0x2c8]
mov qword [rbp + 0x40], rax
mov byte [rbp + 0x48], dl
lea rcx, [0x006885d0]
lea rdx, [rbp + 0x40]
call sub.user32.dll_EnumWindows
mov rax, qword [rbx + 0x118]
cmp dword [rax + 0x10], 0
je 0x6887d1
mov rcx, qword [rbp + 0x40]
mov edx, 3
call sub.user32.dll_GetWindow
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0x40]
mov ecx, 0xffffffec
mov edx, ecx
mov rcx, rax
call sub.user32.dll_GetWindowLongPtrW
test rax, 8
je 0x68877f
mov qword [rbp + 0x40], 0xfffffffffffffffe
mov rax, qword [rbx + 0x118]
mov esi, dword [rax + 0x10]
sub esi, 1
test esi, esi
jl 0x6887d0
mov rcx, qword [rbx + 0x118]
mov edx, esi
call fcn.005018c0
mov rcx, rax
mov rdx, qword [rbp + 0x40]
xor r8, r8
xor r9, r9
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x30], 0x213
call sub.user32.dll_SetWindowPos
sub esi, 1
cmp esi, 0xffffffff
jne 0x688790
nop
lea rax, [rbx + 0x120]
add dword [rax], 1
lea rsp, [rbp + 0x50]
pop rbx
pop rsi
pop rbp
ret