joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000c2c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
mov eax, 0x1040
call fcn.1400c0680
sub rsp, rax
cmp byte [0x140109b1c], 0
mov rbx, rdx
mov rbp, rcx
jne 0x14000c44d
cmp dword [0x140106d08], 0
jne 0x14000c2fb
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140106d08], eax
inc dword [0x140109b18]
mov qword [rsp + 0x1050], rsi
mov qword [rsp + 0x1058], rdi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9d, dword [0x140109b18]
mov ecx, eax
sub ecx, dword [0x140106d08]
cmp r9d, dword [0x140103404]
mov edx, dword [0x140103400]
mov dword [0x140106d04], eax
jbe 0x14000c3b6
cmp ecx, edx
jae 0x14000c3b6
mov dword [rsp + 0x20], ecx
lea r8, str._u_hotkeys_have_been_received_in_the_last__ums._n_nDo_you_want_to_continue__n_see_MaxHotkeysPerInterval_in_the_help_file_
lea rcx, [rsp + 0x40]
mov edx, 0x800
mov esi, 1
call fcn.14008b520
call fcn.14000b0b0
xor edi, edi
mov byte [0x140109b1c], sil
xor r8d, r8d
mov dword [0x140101a50], edi
lea edx, [rsi + 3]
mov qword [rsp + 0x20], rdi
lea rcx, [rsp + 0x40]
xorps xmm3, xmm3
call fcn.140090ee0
cmp eax, 7
jne 0x14000c3a1
xor r8d, r8d
lea edx, [rsi + 4]
lea rcx, [0x1401082b0]
call fcn.14001b150
mov eax, dword [0x140106d04]
mov dword [0x140101a50], esi
mov byte [0x140109b1c], dil
jmp 0x14000c3be
xor edi, edi
mov esi, edi
cmp ecx, edx
jbe 0x14000c3ce
mov dword [0x140109b18], edi
mov dword [0x140106d08], eax
test esi, esi
jne 0x14000c43d
movzx eax, byte [rbp + 0xf]
lea r8, [0x1400cffc0]
mov byte [0x140108e2e], al
xor r9d, r9d
inc byte [rbx + 0x22]
mov rcx, qword [rbx]
mov dword [rsp + 0x30], edi
mov rdx, rcx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
call fcn.140082680
dec byte [rbx + 0x22]
test eax, eax
jne 0x14000c409
mov byte [rbx + 0x27], al
jmp 0x14000c43d
cmp byte [rbx + 0x27], 0
je 0x14000c43d
mov byte [rbx + 0x27], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rbx + 0x18]
cmp eax, 0x3e8
ja 0x14000c43d
movzx r8d, word [rbp + 4]
xor r9d, r9d
mov rcx, qword [0x140105d70]
mov edx, 0x312
call qword [sym.imp.USER32.dll_PostMessageW]
mov rsi, qword [rsp + 0x1050]
mov rdi, qword [rsp + 0x1058]
mov rbx, qword [rsp + 0x1060]
add rsp, 0x1040
pop rbp
ret
Function at 0x1400125f0
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov rax, rsp
mov word [rax + 0x10], dx
push rsi
push rdi
sub rsp, 0x98
mov qword [rax + 0x18], rbx
movzx edi, r9b
mov qword [rax - 0x18], rbp
movzx ebx, dx
mov qword [rax - 0x20], r12
movzx ebp, cl
mov qword [rax - 0x28], r13
movzx r13d, r8b
mov qword [rax - 0x38], r15
or r13b, r9b
mov byte [rsp + 0xb0], r9b
lea eax, [rbp - 1]
cmp al, 5
ja 0x140012639
cmp cl, 3
jne 0x140012640
lea eax, [rbp + 0x66]
cmp al, 5
ja 0x140012645
mov r15b, 1
jmp 0x140012648
xor r15b, r15b
mov eax, dword [rsp + 0xd0]
mov rsi, qword [rsp + 0xe8]
movzx r12d, byte [rsp + 0xe0]
test eax, eax
jle 0x1400127d5
mov edi, dword [rsp + 0xd8]
mov qword [rsp + 0x78], r14
mov r14d, eax
cmp dword [0x140106d0c], 0
jne 0x1400126e7
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x140101a58]
sub eax, dword [0x140108e7c]
cmp eax, dword [rcx + 0x118]
jbe 0x1400126ee
xor r9d, r9d
mov dword [rsp + 0x20], 0
xor r8d, r8d
lea rcx, [rsp + 0x40]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x1400126db
mov edx, 1
mov dword [0x140101a50], 0
or ecx, 0xffffffff
call fcn.1400016f0
mov dword [0x140101a50], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140108e7c], eax
mov rcx, qword [0x140101a58]
test r12b, r12b
jne 0x140012752
movzx eax, byte [rcx + 0x136]
test al, al
je 0x14001270a
movzx eax, al
mov ebx, 0xffc3d44d
sub ebx, eax
jmp 0x14001270f
mov ebx, 0xffc3d44f
cmp dword [0x140106d0c], 0
je 0x140012721
movzx eax, byte [0x14010911c]
jmp 0x140012728
xor ecx, ecx
call fcn.1400157e0
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov r8, rsi
mov byte [rsp + 0x20], 1
movzx edx, al
movzx ecx, r13b
call fcn.140014fb0
mov rcx, qword [0x140101a58]
movzx ebx, word [rsp + 0xb8]
test r15b, r15b
je 0x140012795
test rsi, rsi
jne 0x140012795
movzx eax, byte [rcx + 0x12f]
lea r9d, [rsi + 1]
movzx ecx, byte [rsp + 0x100]
mov r8d, dword [rsp + 0xf8]
mov edx, dword [rsp + 0xf0]
mov byte [rsp + 0x30], cl
movzx ecx, bpl
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], eax
call fcn.140013f70
jmp 0x1400127be
movzx eax, byte [rcx + 0x136]
mov r9, rsi
mov ecx, 0xffc3d44d
movzx r8d, bx
sub ecx, eax
movzx edx, bpl
mov dword [rsp + 0x28], ecx
mov ecx, edi
mov byte [rsp + 0x20], 1
call fcn.140012d70
sub r14, 1
jne 0x140012677
movzx edi, byte [rsp + 0xb0]
mov r14, qword [rsp + 0x78]
mov r15, qword [rsp + 0x70]
test r12b, r12b
mov r12, qword [rsp + 0x88]
mov r13, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xc0]
jne 0x140012842
cmp dword [0x140106d0c], 0
je 0x140012811
movzx eax, byte [0x14010911c]
jmp 0x140012818
xor ecx, ecx
call fcn.1400157e0
not dil
and dil, al
and dil, 0xcc
je 0x140012842
mov dword [rsp + 0x28], 0xffc3d44d
mov r9b, 1
mov r8, rsi
mov byte [rsp + 0x20], 0
movzx edx, dil
xor ecx, ecx
call fcn.140014fb0
add rsp, 0x98
pop rdi
pop rsi
ret
Function at 0x140012850
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r14
sub rsp, 0x80
cmp dword [0x140106d0c], 2
movzx r14d, r8b
mov ebx, edx
movzx esi, cx
sete bpl
test bpl, bpl
je 0x1400128ab
movzx ecx, cx
lea rdx, [rsp + 0x30]
test ecx, 0xffffff80
je 0x140012898
mov eax, gethostbyname
lea rdx, [rsp + 0x32]
mov word [rsp + 0x30], ax
mov r8d, 0xa
call fcn.1400ab2e8
movzx esi, word [rsp + 0xa8]
test ebx, ebx
jle 0x140012a2c
mov qword [rsp + 0xa0], rdi
mov rdi, rbx
mov qword [rsp + 0xb0], r15
xor r15d, r15d
nop dword [rax]
cmp dword [0x140106d0c], r15d
jne 0x14001293a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x140101a58]
sub eax, dword [0x140108e7c]
cmp eax, dword [rcx + 0x118]
jbe 0x14001293a
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x14001292e
mov edx, 1
mov dword [0x140101a50], r15d
or ecx, 0xffffffff
call fcn.1400016f0
mov dword [0x140101a50], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140108e7c], eax
test bpl, bpl
je 0x1400129e6
cmp dword [0x140106d0c], r15d
je 0x140012955
movzx eax, byte [0x14010911c]
jmp 0x14001295c
xor ecx, ecx
call fcn.1400157e0
movzx ecx, al
mov dword [rsp + 0x28], 0xffc3d44f
and cl, 0xc4
mov byte [rsp + 0x20], 1
or cl, 4
xor r9d, r9d
xor r8d, r8d
movzx edx, al
call fcn.140014fb0
movzx eax, word [rsp + 0x30]
lea rbx, [rsp + 0x30]
cmp ax, 0x30
jb 0x1400129c6
cmp ax, 0x39
ja 0x1400129c6
movzx edx, byte [rbx]
xor r8d, r8d
add dl, 0x30
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
lea ecx, [r8 + 2]
call fcn.140012d70
movzx eax, word [rbx + 2]
add rbx, 2
cmp ax, 0x30
jae 0x140012990
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
mov dl, reloc.OLEAUT32.dll_SafeArrayGetUBound
lea ecx, [r8 + 1]
call fcn.140012d70
jmp 0x1400129f2
movzx edx, r14b
movzx ecx, si
call fcn.140010dd0
cmp dword [0x140106d0c], 2
mov rax, qword [0x140101a58]
jne 0x140012a0a
mov ecx, dword [rax + 0x80]
jmp 0x140012a0d
mov ecx, dword [rax + 0x7c]
call fcn.140014b10
sub rdi, 1
jne 0x1400128d0
mov r15, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop r14
pop rsi
pop rbp
ret
Function at 0x140014310
Capabilities:
Check for unmoving mouse cursor

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
mov eax, dword [rcx]
mov ebx, r9d
mov rsi, rdx
mov rdi, rcx
cmp eax, 0x80000000
je 0x1400144fc
mov r9d, dword [rdx]
cmp r9d, 0x80000000
je 0x1400144fc
cmp dword [0x140106d0c], 2
mov qword [rsp + 0x58], rbp
jne 0x140014392
movzx ebx, byte [rsp + 0x70]
mov ecx, 0x80000001
test bl, bl
mov ebp, 1
mov r8d, eax
cmovne ebp, ecx
xor edx, edx
mov ecx, ebp
call fcn.140014710
call fcn.140014c00
test bl, bl
je 0x1400144f7
mov rbp, qword [rsp + 0x58]
mov dword [rdi], 0x80000000
mov dword [rsi], 0x80000000
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
or dword [r8], 0x8001
cmp byte [rsp + 0x70], 0
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r15
je 0x1400143f8
cmp dword [0x140106d0c], 1
jne 0x1400143df
mov eax, dword [0x140109120]
cmp eax, 0x80000000
jne 0x1400143d3
lea rcx, [0x140109120]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [0x140109120]
add dword [rdi], eax
mov eax, dword [0x140109124]
add dword [rsi], eax
jmp 0x140014403
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [rsp + 0x50]
add dword [rdi], eax
mov eax, dword [rsp + 0x54]
add dword [rsi], eax
jmp 0x140014403
mov r8d, 2
call fcn.14008cc80
cmp dword [0x140106d0c], 1
jne 0x14001441c
mov eax, dword [rdi]
mov dword [0x140109120], eax
mov eax, dword [rsi]
mov dword [0x140109124], eax
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ebp, 1
mov r14d, eax
mov ecx, ebp
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, dword [rdi]
mov r15d, eax
mov eax, ecx
sar ecx, 0x1f
shl eax, 0x10
and ecx, 0xfffffffe
cdq
inc ecx
idiv r14d
add ecx, eax
mov dword [rdi], ecx
mov ecx, dword [rsi]
mov eax, ecx
shl eax, 0x10
cdq
sar ecx, 0x1f
idiv r15d
and ecx, 0xfffffffe
lea r9d, [rcx + 1]
add r9d, eax
mov dword [rsi], r9d
test ebx, ebx
js 0x1400144d9
cmp ebx, 0x64
jle 0x140014477
lea ebx, [rbp + 0x63]
jmp 0x14001447b
test ebx, ebx
je 0x1400144d9
cmp dword [0x140106d0c], ebp
je 0x1400144d9
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov r8d, dword [rsp + 0x54]
or r9d, 0xffffffff
mov rcx, qword [rsp + 0x50]
mov eax, r8d
shl eax, 0x10
mov r10d, ebp
cdq
mov dword [rsp + 0x20], ebx
idiv r15d
test r8d, r8d
mov r8d, dword [rdi]
cmovs r10d, r9d
add r10d, eax
mov eax, ecx
shl eax, 0x10
cdq
idiv r14d
test ecx, ecx
mov edx, r10d
cmovs ebp, r9d
mov r9d, dword [rsi]
lea ecx, [rax + rbp]
call fcn.140064ff0
jmp 0x1400144ed
mov r8d, dword [rdi]
xor edx, edx
mov ecx, 0x8001
call fcn.140014510
call fcn.140014c00
mov r14, qword [rsp + 0x60]
mov r15, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
Function at 0x1400149a0
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov edi, 1
movzx esi, dl
cmp dword [0x140106d0c], edi
mov rbx, rcx
jne 0x140014a7d
xor al, al
cmp qword [0x140105d98], 0
movzx ebx, al
cmovne ebx, edi
cmp qword [0x140105d90], 0
je 0x1400149e3
or bl, 2
test bl, bl
je 0x1400149fb
movzx ecx, byte [0x14010911d]
movzx edx, dil
not cl
and cl, bl
call fcn.14000a270
mov rdx, qword [0x140106d10]
mov r8d, 0x28
mov ecx, dword [0x140109110]
call qword [sym.imp.USER32.dll_SendInput]
test bl, bl
je 0x140014af6
movzx eax, byte [0x14010911d]
and al, bl
test dil, al
je 0x140014a62
movzx ecx, dil
call fcn.1400157e0
movzx r8d, al
xor r8b, sil
movzx edx, r8b
and r8b, al
and dl, sil
not dl
and dl, byte [0x140106b53]
or dl, r8b
mov byte [0x140106b53], dl
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [0x140105f60], rax
movzx edx, dil
movzx ecx, bl
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.14000a270
mov r8, qword [0x140105dd0]
lea rdx, [0x140012af0]
xor esi, esi
xor r9d, r9d
mov ecx, edi
mov dword [0x140109118], esi
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x140105d38], rax
test rax, rax
je 0x140014af6
mov byte [0x140106b50], dil
mov edx, edi
mov dword [0x140101a50], esi
mov ecx, 0x8000012f
call fcn.1400016f0
cmp qword [0x140105d38], rsi
mov dword [0x140101a50], edi
jne 0x140014ab1
mov edx, dword [0x140109110]
mov rax, qword [0x140103418]
dec edx
mov byte [0x140106b50], sil
mov rcx, qword [rax]
cmp dword [rcx + rdx*8], esi
jne 0x140014af6
mov eax, dword [rcx + rdx*8 + 4]
mov dword [rbx], eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140014d20
Capabilities:
Get graphical window text

Disassembly:
sub rsp, 0x28
mov r10, qword [0x140105d88]
test r10, r10
je 0x140014e57
movsxd rax, dword [0x140105de4]
imul r9, rax, 0xd4
mov eax, 0x69
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x20], rdi
mov byte [r9 + r10 + 6], cl
mov byte [r9 + r10], dl
mov word [r9 + r10 + 2], r8w
mov word [r9 + r10 + 4], ax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [0x140105de0], eax
sub ecx, dword [0x140109098]
xorps xmm0, xmm0
mov dword [0x140109098], eax
cvtsi2ss xmm0, rcx
movsxd rcx, dword [0x140105de4]
imul rdx, rcx, 0xd4
divss xmm0, dword [0x1400eeb08]
mov rcx, qword [0x140105d88]
movss dword [rdx + rcx + 8], xmm0
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor edi, edi
mov rbx, rax
test rax, rax
je 0x140014e11
cmp rax, qword [0x140105dd8]
je 0x140014df5
movsxd rcx, dword [0x140105de4]
lea r8d, [rdi + 0x64]
imul rdx, rcx, 0xd4
mov rcx, qword [0x140105d88]
add rcx, 0xc
add rdx, rcx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov edx, dword [0x140105de4]
jmp 0x140014e35
movsxd rdx, dword [0x140105de4]
mov rax, qword [0x140105d88]
imul rcx, rdx, 0xd4
mov word [rcx + rax + 0xc], di
jmp 0x140014e35
movsxd rdx, dword [0x140105de4]
movabs r8, 0x41002f004e
mov rax, qword [0x140105d88]
imul rcx, rdx, 0xd4
mov qword [rcx + rax + 0xc], r8
inc edx
mov qword [0x140105dd8], rbx
cmp edx, dword [0x140101a60]
mov rbx, qword [rsp + 0x30]
cmovge edx, edi
mov rdi, qword [rsp + 0x20]
mov dword [0x140105de4], edx
add rsp, 0x28
ret

Function at 0x140014e60
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
movzx edi, cl
mov esi, edx
mov ecx, edi
mov ebp, edi
call qword [sym.imp.USER32.dll_GetKeyState]
and al, 1
lea r8d, [rsi - 1]
neg al
sbb ebx, ebx
add ebx, 2
cmp r8d, 1
ja 0x140014f8d
cmp ebx, esi
je 0x140014f8d
mov ecx, edi
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
je 0x140014ed4
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
movzx edx, dil
lea ecx, [r8 + 1]
call fcn.140012d70
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
movzx edx, dil
lea ecx, [r8 + 2]
call fcn.140012d70
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, rax
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x140108290]
sete bpl
test bpl, bpl
je 0x140014f35
mov edx, 1
mov dword [0x140101a50], 0
or ecx, 0xffffffff
call fcn.1400016f0
mov dword [0x140101a50], 1
cmp dil, 0x14
jne 0x140014f8d
cmp esi, 2
jne 0x140014f8d
lea ecx, [rsi + 0x12]
call qword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x140014f8d
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
mov dl, reloc.OLEAUT32.dll_SafeArrayGetDim
mov ecx, esi
call fcn.140012d70
test bpl, bpl
je 0x140014f8d
lea edx, [rsi - 1]
mov dword [0x140101a50], 0
or ecx, 0xffffffff
call fcn.1400016f0
mov dword [0x140101a50], 1
mov rbp, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x1400157e0
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x28
cmp qword [0x140105d98], 0
je 0x1400157fe
test cl, cl
jne 0x1400157fe
movzx eax, byte [0x140106b55]
add rsp, 0x28
ret
mov qword [rsp + 0x30], rbx
mov ecx, 0xa0
mov qword [rsp + 0x20], rdi
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
shr ax, 0xb
mov ecx, 0xa1
and al, 0x10
movzx ebx, al
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
mov edi, 0x8000
or cl, 0x20
movzx edx, cl
and ax, di
mov ecx, 0xa2
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 1
movzx edx, cl
and ax, di
mov ecx, 0xa3
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 2
movzx edx, cl
and ax, di
mov ecx, 0xa4
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 4
movzx edx, cl
and ax, di
mov ecx, 0xa5
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 8
movzx edx, cl
and ax, di
mov ecx, 0x5b
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 0x40
movzx edx, cl
and ax, di
mov ecx, 0x5c
cmove edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
and ax, di
movzx ecx, bl
or cl, 0x80
test ax, ax
movzx edi, cl
cmove edi, ebx
cmp qword [0x140105d98], 0
je 0x140015954
movzx ecx, byte [0x140106b55]
movzx ebx, dil
not bl
and bl, cl
je 0x140015954
movzx edx, byte [0x140106b53]
movzx eax, bl
not al
and byte [0x140106b54], al
and cl, al
and dl, al
mov byte [0x140106b55], cl
lea rcx, [0x140106b60]
mov byte [0x140106b53], dl
call fcn.140015970
mov rcx, qword [0x140106cb0]
test rcx, rcx
je 0x140015954
test byte [rcx + 0xc], bl
mov eax, 0
cmovne rcx, rax
mov qword [0x140106cb0], rcx
mov rbx, qword [rsp + 0x30]
movzx eax, dil
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret

Function at 0x140015de0
Capabilities:
Get keyboard layout

Disassembly:
push rbx
sub rsp, 0x70
xor ebx, ebx
test rcx, rcx
je 0x140015e24
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x48
mov ecx, eax
mov ebx, eax
call qword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x140015e24
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140015e24
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebx, eax
mov ecx, ebx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
add rsp, 0x70
pop rbx
ret
Function at 0x140015e40
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x2c0
xor edx, edx
mov rbp, rcx
xor edi, edi
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rsi, rax
test rax, rax
je 0x140015fdc
movaps xmm0, xmmword [str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
lea rcx, [rsp + 0x94]
movaps xmm1, xmmword [0x1400e42c0]
mov eax, dword [0x1400e4310]
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [0x1400e42d0]
movaps xmmword [rsp + 0x40], xmm1
movaps xmm1, xmmword [0x1400e42e0]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x1400e42f0]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x1400e4300]
mov dword [rsp + 0x90], eax
movzx eax, word [0x1400e4314]
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x80], xmm1
mov word [rsp + 0x94], ax
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x140015fcc
lea rax, [rsp + 0x2f0]
xor r8d, r8d
lea r9d, [rdi + 1]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140015fcc
mov rcx, qword [rsp + 0x2f0]
lea rax, [rsp + 0x2e8]
mov qword [rsp + 0x28], rax
lea rdx, str.Layout_File
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x2e0], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x2e8], 0x208
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x2f0]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov rbx, qword [rsp + 0x2e0]
jne 0x140015fcc
mov ecx, dword [rsp + 0x2e8]
test ecx, ecx
je 0x140015fcc
shr ecx, 1
dec ecx
cmp word [rsp + rcx*2 + 0xb0], di
jne 0x140015fa5
test ecx, ecx
je 0x140015fcc
lea edx, [rcx - 1]
cmp word [rsp + rdx*2 + 0xb0], di
jne 0x140015fb7
mov ecx, edx
test edx, edx
jne 0x140015f90
jmp 0x140015fcc
inc ecx
cmp ecx, 0x104
jae 0x140015fcc
mov word [rsp + rcx*2 + 0xb0], di
test ecx, ecx
je 0x140015fcc
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
cmp rbp, rsi
je 0x140015fdc
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rax, rdi
add rsp, 0x2c0
pop rdi
pop rsi
pop rbp
ret
Function at 0x140016270
Capabilities:
Get keyboard layout

Disassembly:
mov qword [rsp + 0x10], rdx
push rsi
push rdi
sub rsp, 0x158
movzx esi, cl
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea edx, [rsi - 0x41]
mov rdi, rax
cmp dl, 0x19
ja 0x1400163e6
mov qword [rsp + 0x150], rbx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x148], rbp
xor edx, edx
mov r8d, 0x100
mov qword [rsp + 0x140], r14
call fcn.1400a9f50
xor ebx, ebx
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], ebx
lea r9, [rsp + 0x180]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x20], 2
xor edx, edx
lea ecx, [rbx + 0x6e]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov qword [rsp + 0x30], rdi
lea r9, [rsp + 0x180]
cmp eax, 2
movzx ecx, sil
movzx ebp, bx
mov dword [rsp + 0x28], ebx
cmove bp, word [rsp + 0x180]
lea r8, [rsp + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov r14d, eax
test eax, eax
jns 0x140016356
mov qword [rsp + 0x30], rdi
lea r9, [rsp + 0x178]
mov dword [rsp + 0x28], ebx
lea r8, [rsp + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 2
lea ecx, [rbx + 0x6e]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test bp, bp
je 0x1400163b4
mov r9b, 1
lea rdx, [rsp + 0x170]
mov r8, rdi
movzx ecx, bp
call fcn.140016670
movzx esi, al
test al, al
je 0x1400163b4
movzx edx, byte [rsp + 0x170]
lea rcx, [rsp + 0x40]
call fcn.140015970
mov qword [rsp + 0x30], rdi
lea r9, [rsp + 0x178]
mov dword [rsp + 0x28], ebx
lea r8, [rsp + 0x40]
xor edx, edx
movzx ecx, sil
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rbp, qword [rsp + 0x148]
test r14d, r14d
mov r14, qword [rsp + 0x140]
je 0x1400163d1
movzx ebx, word [rsp + 0x180]
movzx eax, bx
mov rbx, qword [rsp + 0x150]
add rsp, 0x158
pop rdi
pop rsi
ret
movzx ecx, sil
mov r8, rdi
mov edx, 2
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
add rsp, 0x158
pop rdi
pop rsi
ret