joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000fb60
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rdi, r9
mov esi, r8d
mov rbx, rdx
mov r14, rcx
mov eax, dword [0x14012bd58]
test eax, eax
je 0x14000fbb3
lea r8, str.stdout
lea rcx, [0x14012bcd0]
call fcn.14000cd28
mov eax, dword [0x14012bd58]
cmp eax, 2
je 0x14000fd4c
lea r12, vtable.TextStream.0
mov qword [rbp - 0x19], r12
xor r15d, r15d
mov qword [rbp - 0x11], r15
mov dword [rbp - 9], r15d
mov dword [rbp - 5], 0xffffffff
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x17], xmm0
mov ecx, dword [0x1401323a0]
cmp ecx, 0xffffffff
je 0x14000fc01
mov dword [rbp - 5], ecx
lea rdx, [rbp - 1]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x14000fc01
mov byte [rbp + 5], r15b
lea r13, vtable.TextFile.0
mov qword [rbp - 0x19], r13
mov qword [rbp + 0x27], 0xffffffffffffffff
mov r9d, dword [r14 + 0x790]
mov r8d, 2
mov rdx, rdi
lea rcx, [rbp - 0x19]
call fcn.1400a1920
mov r8d, esi
mov rdx, rbx
lea rcx, [rbp - 0x19]
call fcn.1400a2080
mov r8d, dword [rbp - 0xd]
test r8d, r8d
je 0x14000fc8b
cmp qword [rbp + 0x17], 0
jne 0x14000fc8b
mov rax, qword [rbp - 0x19]
mov r9, qword [rax + 0x20]
lea rax, [fcn.1400a2570]
mov rdx, qword [rbp + 0x1f]
cmp r9, rax
jne 0x14000fc7d
mov dword [rbp - 0x29], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x29]
mov rcx, qword [rbp + 0x27]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14000fc84
lea rcx, [rbp - 0x19]
call r9
mov r8d, r15d
mov dword [rbp - 0xd], r15d
mov word [rbp + 0x13], r15w
mov rax, qword [rbp - 0x19]
mov rdx, qword [rax + 0x10]
lea rax, [fcn.1400a2500]
cmp rdx, rax
jne 0x14000fcd4
mov rcx, qword [rbp + 0x27]
cmp rcx, 0xffffffffffffffff
je 0x14000fce2
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14000fcc7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rbp - 0xd]
mov rcx, 0xffffffffffffffff
mov qword [rbp + 0x27], rcx
jmp 0x14000fce2
lea rcx, [rbp - 0x19]
call rdx
mov rcx, qword [rbp + 0x27]
mov r8d, dword [rbp - 0xd]
mov qword [rbp - 0x19], r13
test r8d, r8d
je 0x14000fd11
cmp qword [rbp + 0x17], 0
jne 0x14000fd11
mov dword [rbp - 0x29], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x29]
mov rdx, qword [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rbp - 0xd], r15d
mov rcx, qword [rbp + 0x27]
mov word [rbp + 0x13], r15w
cmp rcx, 0xffffffffffffffff
je 0x14000fd39
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14000fd31
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x27], 0xffffffffffffffff
mov qword [rbp - 0x19], r12
mov rcx, qword [rbp + 0x1f]
test rcx, rcx
je 0x14000fd4c
call fcn.1400c83c0
nop
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x140012810
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r14
mov eax, 0x4040
call fcn.1400e19f0
sub rsp, rax
mov rbx, qword [rsp + 0x4080]
mov r14, r9
mov r12, r8
mov esi, edx
mov rdi, rcx
test rbx, rbx
jne 0x14001285f
mov rbx, qword [rcx + 0x6a8]
test rbx, rbx
jne 0x14001285f
mov ecx, dword [rcx + 0x2c8]
movzx eax, word [rdi + 0x2cc]
jmp 0x140012867
movzx ecx, word [rbx + 2]
movzx eax, word [rbx + 4]
test esi, esi
je 0x140012954
mov r9, qword [0x140130360]
lea rdx, str.Warning:
movzx ecx, cx
lea r8, str._s___d__:____s_s_n
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rdx
movzx eax, ax
mov r9, qword [r9 + rcx*8]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x4060], rbp
mov qword [rsp + 0x4068], r15
mov r15d, 0x2000
mov edx, r15d
mov dword [rsp + 0x20], eax
call fcn.1400a4cd0
cmp word [r14], 0
movsxd rbp, eax
je 0x1400128e9
lea rax, [rsp + 0x40]
sub r15d, ebp
lea rcx, [rax + rbp*2]
mov edx, r15d
mov r9, r14
lea r8, str._____Specifically:__s_n
call fcn.1400a4cd0
add ebp, eax
mov r15, qword [rsp + 0x4068]
lea rdx, [rsp + 0x40]
cmp esi, 3
jne 0x14001290f
lea r9, [0x140108f4c]
mov r8d, ebp
mov rcx, rdi
call fcn.14000fb60
jmp 0x14001294c
lea rcx, [0x14012bcd0]
call fcn.14000ce28
test al, al
jne 0x14001292a
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp esi, 2
jne 0x14001294c
mov r9, r14
mov qword [rsp + 0x20], rbx
mov r8d, 1
lea rcx, [0x1401319c0]
mov rdx, r12
call fcn.140010e80
mov rbp, qword [rsp + 0x4060]
lea r11, [rsp + 0x4040]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rdi
ret
Function at 0x14001fe80
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov rax, rsp
mov byte [rax + 0x20], r9b
mov word [rax + 0x10], dx
push rsi
push rdi
sub rsp, 0x98
mov qword [rax + 8], 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
lea eax, [rbp - 1]
cmp al, 5
ja 0x14001fec5
cmp cl, 3
jne 0x14001fecc
lea eax, [rbp + 0x66]
cmp al, 5
ja 0x14001fed1
mov r15b, 1
jmp 0x14001fed4
xor r15b, r15b
mov eax, dword [rsp + 0xd0]
mov rsi, qword [rsp + 0xe8]
movzx r12d, byte [rsp + 0xe0]
test eax, eax
jle 0x140020062
mov edi, dword [rsp + 0xd8]
mov qword [rsp + 0x78], r14
mov r14d, eax
cmp dword [0x1401324b8], 0
jne 0x14001ff75
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x140129398]
sub eax, dword [0x140132168]
cmp eax, dword [rcx + 0x88]
jbe 0x14001ff7c
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 0x14001ff69
mov edx, 1
mov dword [0x140129390], 0
mov ecx, 0xffffffff
call fcn.140001800
mov dword [0x140129390], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140132168], eax
mov rcx, qword [0x140129398]
test r12b, r12b
jne 0x14001ffdd
movzx eax, byte [rcx + 0xc5]
test al, al
je 0x14001ff95
mov ebx, 0xffc3d44d
sub ebx, eax
jmp 0x14001ff9a
mov ebx, 0xffc3d44f
cmp dword [0x1401324b8], 0
je 0x14001ffac
movzx eax, byte [0x1401324a8]
jmp 0x14001ffb3
xor ecx, ecx
call fcn.1400233e0
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov r8, rsi
mov byte [rsp + 0x20], 1
movzx edx, al
movzx ecx, r13b
call fcn.140022b60
mov rcx, qword [0x140129398]
movzx ebx, word [rsp + 0xb8]
test r15b, r15b
je 0x140020022
test rsi, rsi
jne 0x140020022
movzx eax, byte [rcx + 0xc3]
mov r9d, 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.140021840
jmp 0x14002004b
movzx eax, byte [rcx + 0xc5]
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.140020610
sub r14, 1
jne 0x14001ff03
mov r14, qword [rsp + 0x78]
movzx edi, byte [rsp + 0xc8]
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 + 0xb0]
jne 0x1400200cf
cmp dword [0x1401324b8], 0
je 0x14002009e
movzx eax, byte [0x1401324a8]
jmp 0x1400200a5
xor ecx, ecx
call fcn.1400233e0
not dil
and dil, al
and dil, 0xcc
je 0x1400200cf
mov dword [rsp + 0x28], 0xffc3d44d
mov r9b, 1
mov r8, rsi
mov byte [rsp + 0x20], 0
movzx edx, dil
xor ecx, ecx
call fcn.140022b60
add rsp, 0x98
pop rdi
pop rsi
ret
Function at 0x1400200e0
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r14
sub rsp, 0x80
cmp dword [0x1401324b8], 2
movzx r14d, r8b
mov ebx, edx
sete bpl
movzx esi, cx
jne 0x14002013c
mov eax, esi
mov ecx, esi
and eax, 0xffffff80
je 0x140020119
mov edx, gethostbyaddr
mov word [rsp + 0x30], dx
lea r8, [rsp + 0x32]
test eax, eax
lea rdx, [rsp + 0x30]
cmovne rdx, r8
mov r8d, 0xa
call fcn.1400cd5a4
movzx esi, word [rsp + 0xa8]
test ebx, ebx
jle 0x1400202c3
mov qword [rsp + 0xa0], rdi
mov rdi, rbx
mov qword [rsp + 0xb0], r15
xor r15d, r15d
nop word [rax + rax]
cmp dword [0x1401324b8], r15d
jne 0x1400201cc
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x140129398]
sub eax, dword [0x140132168]
cmp eax, dword [rcx + 0x88]
jbe 0x1400201cc
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 0x1400201c0
mov edx, 1
mov dword [0x140129390], r15d
mov ecx, 0xffffffff
call fcn.140001800
mov dword [0x140129390], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140132168], eax
test bpl, bpl
je 0x14002027a
cmp dword [0x1401324b8], r15d
je 0x1400201e7
movzx eax, byte [0x1401324a8]
jmp 0x1400201ee
xor ecx, ecx
call fcn.1400233e0
movzx ecx, al
mov dword [rsp + 0x28], 0xffc3d44f
and cl, 0xc4
mov byte [rsp + 0x20], 1
add dword [rax + 0x334504c9], eax
leave
xor r8d, r8d
movzx edx, al
call fcn.140022b60
movzx eax, word [rsp + 0x30]
lea rbx, [rsp + 0x30]
cmp ax, 0x30
jb 0x140020259
cmp ax, 0x39
ja 0x140020259
movzx edx, byte [rbx]
xor r8d, r8d
add dl, 0x30
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
mov ecx, 2
call fcn.140020610
movzx eax, word [rbx + 2]
add rbx, 2
cmp ax, 0x30
jae 0x140020222
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
mov dl, reloc.OLEAUT32.dll_SafeArrayGetUBound
mov ecx, 1
call fcn.140020610
jmp 0x140020286
movzx edx, r14b
movzx ecx, si
call fcn.14001e170
cmp dword [0x1401324b8], 2
mov rax, qword [0x140129398]
jne 0x14002029e
mov ecx, dword [rax + 0x9c]
jmp 0x1400202a4
mov ecx, dword [rax + 0x98]
call fcn.140022630
sub rdi, 1
jne 0x140020160
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 0x140022490
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 ebx, 1
movzx esi, dl
cmp dword [0x1401324b8], ebx
mov rdi, rcx
jne 0x14002259f
xor al, al
cmp qword [0x1401301a8], 0
movzx edi, al
cmovne edi, ebx
cmp qword [0x1401301a0], 0
je 0x1400224d4
or dil, 2
test dil, dil
je 0x140022576
movzx ecx, byte [0x1401324a9]
movzx edx, bl
not cl
and cl, dil
call fcn.1400176a0
mov rdx, qword [0x140130358]
mov r8d, 0x28
mov ecx, dword [0x14013249c]
call qword [sym.imp.USER32.dll_SendInput]
movzx eax, byte [0x1401324a9]
and al, dil
test bl, al
je 0x14002255b
movzx ecx, bl
call fcn.1400233e0
movzx r8d, al
mov byte [0x1401300c6], al
xor r8b, sil
mov byte [0x1401300c7], al
movzx edx, r8b
and r8b, al
and dl, sil
not dl
and dl, byte [0x1401300c5]
or dl, r8b
mov byte [0x1401300c5], dl
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [0x14012fff0], rax
movzx edx, bl
movzx ecx, dil
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.1400176a0
mov rdx, qword [0x140130358]
mov r8d, 0x28
mov ecx, dword [0x14013249c]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp qword [sym.imp.USER32.dll_SendInput]
mov r8, qword [0x14012fee8]
lea rdx, [0x140020390]
xor esi, esi
xor r9d, r9d
mov ecx, ebx
mov dword [0x1401324a4], esi
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x14012fe98], rax
test rax, rax
je 0x140022617
mov byte [0x14012fffd], bl
mov edx, ebx
mov dword [0x140129390], esi
mov ecx, 0x8000012f
call fcn.140001800
cmp qword [0x14012fe98], rsi
mov dword [0x140129390], ebx
jne 0x1400225d2
mov edx, dword [0x14013249c]
mov rax, qword [0x14012c318]
dec edx
mov byte [0x14012fffd], sil
mov rcx, qword [rax]
cmp dword [rcx + rdx*8], esi
jne 0x140022617
mov eax, dword [rcx + rdx*8 + 4]
mov dword [rdi], eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140022840
Capabilities:
Get graphical window text

Disassembly:
sub rsp, 0x28
mov r10, qword [0x14012fee0]
test r10, r10
je 0x14002297b
movsxd rax, dword [0x14012ff0c]
imul r9, rax, 0xd4
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], WSAGetLastError
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [0x14012ff08], eax
sub ecx, dword [0x140132388]
xorps xmm0, xmm0
mov dword [0x140132388], eax
cvtsi2ss xmm0, rcx
movsxd rcx, dword [0x14012ff0c]
imul rdx, rcx, 0xd4
divss xmm0, dword [0x140114448]
mov rcx, qword [0x14012fee0]
movss dword [rdx + rcx + 8], xmm0
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor edi, edi
mov rbx, rax
test rax, rax
je 0x140022930
cmp rax, qword [0x14012ff00]
je 0x140022914
movsxd rcx, dword [0x14012ff0c]
mov r8d, WSAAsyncSelect
imul rdx, rcx, 0xd4
mov rcx, qword [0x14012fee0]
add rcx, 0xc
add rdx, rcx
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov edx, dword [0x14012ff0c]
jmp 0x140022954
movsxd rdx, dword [0x14012ff0c]
mov rax, qword [0x14012fee0]
imul rcx, rdx, 0xd4
mov word [rcx + rax + 0xc], di
jmp 0x140022954
movsxd rdx, dword [0x14012ff0c]
movabs r8, 0x41002f004e
mov rax, qword [0x14012fee0]
imul rcx, rdx, 0xd4
mov qword [rcx + rax + 0xc], r8
inc edx
mov qword [0x14012ff00], rbx
cmp edx, dword [0x1401293a0]
mov rbx, qword [rsp + 0x30]
mov dword [0x14012ff0c], edx
jl 0x140022976
mov dword [0x14012ff0c], edi
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret
Function at 0x140022a10
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
movzx edi, cl
mov esi, edx
mov ecx, edi
call qword [sym.imp.USER32.dll_GetKeyState]
movzx ebx, ax
lea eax, [rsi - 1]
xor ebx, 0xffffffff
and ebx, 1
inc ebx
cmp eax, 1
ja 0x140022b5b
cmp ebx, esi
je 0x140022b5b
mov ecx, edi
mov qword [rsp + 0x40], r14
call qword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jns 0x140022a83
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
movzx edx, dil
mov ecx, 1
call fcn.140020610
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
movzx edx, dil
mov ecx, 2
call fcn.140020610
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, rax
xor edx, edx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x1401319a0]
sete r14b
jne 0x140022ae4
mov edx, 1
mov dword [0x140129390], 0
mov ecx, 0xffffffff
call fcn.140001800
mov dword [0x140129390], 1
cmp dil, 0x14
jne 0x140022b3f
cmp esi, 2
jne 0x140022b3f
mov ecx, edi
call qword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x140022b3f
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
xor r9d, r9d
mov byte [rsp + 0x20], r8b
mov dl, reloc.WSOCK32.dll_recv
mov ecx, esi
call fcn.140020610
test r14b, r14b
je 0x140022b3f
mov edx, 1
mov dword [0x140129390], 0
mov ecx, 0xffffffff
call fcn.140001800
mov dword [0x140129390], 1
mov r14, qword [rsp + 0x40]
mov eax, ebx
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
mov eax, ebx
jmp 0x140022b46
Function at 0x1400233e0
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x28
cmp qword [0x1401301a8], 0
je 0x1400233fe
test cl, cl
jne 0x1400233fe
movzx eax, byte [0x1401300c7]
add rsp, 0x28
ret
mov qword [rsp + 0x30], rbx
mov ecx, 0xa0
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
xor ebp, ebp
mov ecx, reloc.WSOCK32.dll_recv
test ax, ax
cmovns ecx, ebp
movzx ebx, cl
mov ecx, 0xa1
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 0x20
movzx edx, cl
test ax, ax
mov ecx, 0xa2
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 1
movzx edx, cl
test ax, ax
mov ecx, 0xa3
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 2
movzx edx, cl
test ax, ax
mov ecx, 0xa4
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 4
movzx edx, cl
test ax, ax
mov ecx, 0xa5
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 8
movzx edx, cl
test ax, ax
mov ecx, 0x5b
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 0x40
movzx edx, cl
test ax, ax
mov ecx, 0x5c
cmovns edx, ebx
movzx ebx, dl
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
movzx ecx, bl
or cl, 0x80
test ax, ax
movzx esi, cl
cmovns esi, ebx
cmp qword [0x1401301a8], rbp
movzx edi, sil
je 0x140023589
movzx ebx, sil
not bl
and bl, byte [0x1401300c7]
cmp byte [0x14012fffe], bpl
je 0x140023541
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x1401302c0]
cmp eax, 0x14
jae 0x140023541
movzx ecx, byte [0x14012fffe]
test bl, cl
je 0x140023541
movzx eax, cl
not al
and bl, al
or dil, cl
test bl, bl
je 0x140023589
movzx edx, byte [0x1401300c5]
lea rcx, [0x1401301c0]
movzx eax, bl
not al
and byte [0x1401300c7], al
and dl, al
and byte [0x1401300c6], al
mov byte [0x1401300c5], dl
call fcn.1400235b0
mov rcx, qword [0x140130308]
test rcx, rcx
je 0x140023589
test byte [rcx + 0xc], bl
je 0x140023589
mov qword [0x140130308], rbp
mov rsi, qword [rsp + 0x40]
movzx eax, dil
mov rdi, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret
Function at 0x1400239b0
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
xor edi, edi
xor edx, edx
mov esi, edi
mov r15, rcx
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov r14, rax
test rax, rax
je 0x140023b80
movaps xmm0, xmmword [str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
lea rcx, [rbp - 0x6c]
movaps xmm1, xmmword [0x14010ae60]
mov eax, dword [0x14010aeb0]
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [0x14010ae70]
movaps xmmword [rsp + 0x40], xmm1
movaps xmm1, xmmword [0x14010ae80]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x14010ae90]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x14010aea0]
mov dword [rbp - 0x70], eax
movzx eax, word [0x14010aeb4]
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rbp - 0x80], xmm1
mov word [rbp - 0x6c], ax
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x140023b40
lea rax, [rbp + 0x200]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140023b3c
mov rcx, qword [rbp + 0x200]
lea rax, [rbp + 0x1f8]
mov qword [rsp + 0x28], rax
lea rdx, str.Layout_File
lea rax, [rbp - 0x50]
mov qword [rsp + 0x2f0], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rbp + 0x1f8], 0x208
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rbp + 0x200]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov rbx, qword [rsp + 0x2f0]
jne 0x140023b3c
mov edx, dword [rbp + 0x1f8]
test edx, edx
je 0x140023b3c
shr edx, 1
mov ecx, edx
dec edx
cmp word [rbp + rdx*2 - 0x50], di
jne 0x140023b1a
test edx, edx
je 0x140023b40
mov ecx, edx
mov r8d, edx
nop word [rax + rax]
lea eax, [r8 - 1]
mov edx, ecx
mov r8d, eax
cmp word [rbp + rax*2 - 0x50], di
jne 0x140023b29
mov ecx, eax
mov edx, eax
test eax, eax
jne 0x140023b00
jmp 0x140023b29
cmp ecx, 0x104
jae 0x140023b3c
mov word [rbp + rcx*2 - 0x50], di
mov edx, ecx
test edx, edx
je 0x140023b40
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
jmp 0x140023b40
mov word [rbp - 0x50], di
cmp r15, r14
je 0x140023b50
xor edx, edx
mov rcx, r14
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test rsi, rsi
je 0x140023b80
lea rdx, str.KbdLayerDescriptor
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140023b77
call rax
mov edi, dword [rax + 0x50]
not edi
and edi, 1
add edi, 3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, edi
add rsp, 0x2c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140023ce0
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rdi
sub rsp, 0x148
movzx edi, cl
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayout]
lea edx, [rdi - 0x41]
mov rbp, rax
cmp dl, 0x19
ja 0x140023eef
mov qword [rsp + 0x170], rbx
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x178], rsi
xor edx, edx
mov r8d, 0x100
mov qword [rsp + 0x140], r14
call fcn.1400e61b0
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x168]
xor esi, esi
lea r8, [rsp + 0x40]
mov dword [rsp + 0x28], esi
xor edx, edx
mov ecx, WSAGetLastError
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x168]
cmp eax, 2
mov dword [rsp + 0x28], esi
movzx ebx, si
mov dword [rsp + 0x20], 2
cmove bx, word [rsp + 0x168]
lea r8, [rsp + 0x40]
xor edx, edx
mov ecx, edi
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov r14d, eax
test eax, eax
jns 0x140023dc8
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x160]
mov dword [rsp + 0x28], esi
lea r8, [rsp + 0x40]
xor edx, edx
mov dword [rsp + 0x20], 2
mov ecx, WSAGetLastError
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test bx, bx
je 0x140023ebd
cmp bx, 0xa
jne 0x140023de7
movzx edx, byte [rsp + 0x160]
mov dil, ntohs
jmp 0x140023e89
mov rdx, rbp
movzx ecx, bx
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rdi, ax
mov rcx, rdi
shr rcx, 8
cmp cl, 0xff
jne 0x140023e42
cmp dil, 0xff
jne 0x140023e42
lea eax, [rbx - 0x41]
cmp ax, 0x19
jbe 0x140023e1f
lea eax, [rbx - 0x61]
cmp ax, 0x19
ja 0x140023ebd
movzx r8d, bl
lea edx, [rbx - 0x61]
movzx eax, r8b
and al, 0xdf
cmp dx, 0x19
movzx edi, al
cmova edi, r8d
sub bx, 0x41
cmp bx, 0x19
setbe cl
test cl, 0x38
jne 0x140023ebd
movzx edx, byte [rsp + 0x160]
movzx eax, cl
and al, 6
cmp al, 6
jne 0x140023e5d
or dl, 8
jmp 0x140023e77
test cl, 2
je 0x140023e6a
test dl, 3
jne 0x140023e6a
or dl, 1
test cl, 4
je 0x140023e77
test dl, 0xc
jne 0x140023e77
or dl, 4
test cl, 1
je 0x140023e84
test dl, 0x30
jne 0x140023e84
or dl, 0x10
test dil, dil
je 0x140023ebd
lea rcx, [rsp + 0x40]
call fcn.1400235b0
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x160]
mov dword [rsp + 0x28], esi
lea r8, [rsp + 0x40]
xor edx, edx
movzx ecx, dil
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_ToUnicodeEx]
mov rbx, qword [rsp + 0x170]
test r14d, r14d
mov r14, qword [rsp + 0x140]
je 0x140023eda
movzx esi, word [rsp + 0x168]
movzx eax, si
mov rsi, qword [rsp + 0x178]
add rsp, 0x148
pop rdi
pop rbp
ret
mov ecx, edi
mov r8, rbp
mov edx, 2
call qword [sym.imp.USER32.dll_MapVirtualKeyExW]
add rsp, 0x148
pop rdi
pop rbp
ret