joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000cf88
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov rsi, rdx
mov rdi, rcx
cmp r8, 0xffffffffffffffff
jne 0x14000cfb0
mov rcx, rdx
call fcn.1400c5d70
mov r8, rax
lea r10, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
cmp r8, 2
jbe 0x14000d04f
lea rcx, [r8 - 3]
movabs rax, 0xaaaaaaaaaaaaaaab
mul rcx
lea r9, [rdi + 2]
shr rdx, 1
inc rdx
imul rax, rdx, 0xfffffffffffffffd
lea rbx, [rdx*4]
add r8, rax
movzx eax, byte [rsi + 1]
movzx ecx, byte [rsi]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsi + 2]
shl rcx, 8
add rsi, 3
or rcx, rax
mov rax, rcx
shr rax, 0x12
mov al, byte [rax + r10]
mov byte [r9 - 2], al
mov rax, rcx
shr rax, 0xc
and eax, 0x3f
mov al, byte [rax + r10]
mov byte [r9 - 1], al
mov rax, rcx
shr rax, 6
and ecx, 0x3f
and eax, 0x3f
mov al, byte [rax + r10]
mov byte [r9], al
lea r9, [r9 + 4]
mov al, byte [rcx + r10]
mov byte [r9 - 3], al
sub rdx, 1
jne 0x14000cfeb
test r8, r8
je 0x14000d0ae
movzx ecx, byte [rsi]
shl rcx, 0x10
cmp r8, 1
jbe 0x14000d06c
movzx eax, byte [rsi + 1]
shl rax, 8
or rcx, rax
mov rax, rcx
shr rax, 0x12
mov al, byte [rax + r10]
mov byte [rbx + rdi], al
mov rax, rcx
shr rax, 0xc
and eax, 0x3f
mov al, byte [rax + r10]
mov byte [rbx + rdi + 1], al
cmp r8, 1
jbe 0x14000d09f
shr rcx, 6
and ecx, 0x3f
mov al, byte [rcx + r10]
jmp 0x14000d0a1
mov al, 0x3d
mov byte [rbx + rdi + 2], al
mov byte [rbx + rdi + 3], 0x3d
add rbx, 4
mov rsi, qword [rsp + 0x38]
mov rax, rbx
mov byte [rbx + rdi], 0
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x14000e524
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rdx
mov rbx, rcx
mov rcx, rsi
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x14000e587
mov rdi, qword [rbx + 8]
test rdi, rdi
je 0x14000e5ba
mov eax, dword [rdi + 0x20]
sub eax, 1
mov dword [rdi + 0x20], eax
jne 0x14000e57c
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14000e56f
call fcn.1400c0680
mov edx, 0x28
mov rcx, rdi
call fcn.1400b9e5c
and qword [rbx + 8], 0
mov byte [rbx + 0x10], 0
jmp 0x14000e5ba
xor edx, edx
mov rcx, rbx
call fcn.14000e980
mov rcx, qword [rbx + 8]
mov rdx, rdi
call fcn.14000e7c4
mov rax, qword [rbx + 8]
mov r8d, edi
mov rcx, rsi
mov rdx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, eax
mov rax, qword [rbx + 8]
mov qword [rax + 0x10], rcx
mov rsi, qword [rsp + 0x38]
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14000f4e0
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 [0x140121ad8]
test eax, eax
je 0x14000f533
lea r8, str.stdout
lea rcx, [0x140121a50]
call fcn.14000c7ac
mov eax, dword [0x140121ad8]
cmp eax, 2
je 0x14000f6cc
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 [0x140128010]
cmp ecx, 0xffffffff
je 0x14000f581
mov dword [rbp - 5], ecx
lea rdx, [rbp - 1]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x14000f581
mov byte [rbp + 5], r15b
lea r13, vtable.TextFile.0
mov qword [rbp - 0x19], r13
mov qword [rbp + 0x27], 0xffffffffffffffff
mov r9d, dword [r14 + 0x798]
mov r8d, 2
mov rdx, rdi
lea rcx, [rbp - 0x19]
call fcn.1400998a0
mov r8d, esi
mov rdx, rbx
lea rcx, [rbp - 0x19]
call fcn.14009a030
mov r8d, dword [rbp - 0xd]
test r8d, r8d
je 0x14000f60b
cmp qword [rbp + 0x17], 0
jne 0x14000f60b
mov rax, qword [rbp - 0x19]
mov r9, qword [rax + 0x20]
lea rax, [fcn.14009a520]
mov rdx, qword [rbp + 0x1f]
cmp r9, rax
jne 0x14000f5fd
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 0x14000f604
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.14009a4b0]
cmp rdx, rax
jne 0x14000f654
mov rcx, qword [rbp + 0x27]
cmp rcx, 0xffffffffffffffff
je 0x14000f662
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14000f647
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rbp - 0xd]
mov rcx, 0xffffffffffffffff
mov qword [rbp + 0x27], rcx
jmp 0x14000f662
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 0x14000f691
cmp qword [rbp + 0x17], 0
jne 0x14000f691
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 0x14000f6b9
mov eax, dword [rbp - 0x11]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x14000f6b1
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 0x14000f6cc
call fcn.1400c0680
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 0x140012100
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.1400d9cc0
sub rsp, rax
mov rbx, qword [rsp + 0x4080]
mov r14, r9
mov r12, r8
mov esi, edx
mov rdi, rcx
test rbx, rbx
jne 0x14001214f
mov rbx, qword [rcx + 0x6b0]
test rbx, rbx
jne 0x14001214f
mov ecx, dword [rcx + 0x2d0]
movzx eax, word [rdi + 0x2d4]
jmp 0x140012157
movzx ecx, word [rbx + 2]
movzx eax, word [rbx + 4]
test esi, esi
je 0x140012268
mov r9, qword [0x140125fc0]
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.14009c920
cmp word [r14], 0
movsxd rbp, eax
je 0x1400121d9
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.14009c920
add ebp, eax
mov r15, qword [rsp + 0x4068]
cmp esi, 3
jne 0x1400121ff
lea r9, [0x1400ffd5c]
mov r8d, ebp
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.14000f4e0
jmp 0x140012260
mov eax, dword [0x140121ad4]
test eax, eax
je 0x140012227
lea r8, str.stderr
lea rdx, [rsp + 0x40]
lea rcx, [0x140121a50]
call fcn.14000c7ac
mov eax, dword [0x140121ad4]
cmp eax, 2
je 0x140012237
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp esi, 2
jne 0x140012260
mov qword [rsp + 0x28], 0
lea r8d, [rsi - 1]
mov r9, r14
mov qword [rsp + 0x20], rbx
mov rdx, r12
lea rcx, [0x140127620]
call fcn.140010840
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 0x14001f460
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 0x14001f4a5
cmp cl, 3
jne 0x14001f4ac
lea eax, [rbp + 0x66]
cmp al, 5
ja 0x14001f4b1
mov r15b, 1
jmp 0x14001f4b4
xor r15b, r15b
mov eax, dword [rsp + 0xd0]
mov rsi, qword [rsp + 0xe8]
movzx r12d, byte [rsp + 0xe0]
test eax, eax
jle 0x14001f63e
mov edi, dword [rsp + 0xd8]
mov qword [rsp + 0x78], r14
mov r14d, eax
cmp dword [0x140128120], 0
jne 0x14001f553
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x14011f188]
sub eax, dword [0x140127dd0]
cmp eax, dword [rcx + 0x88]
jbe 0x14001f55a
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 0x14001f547
mov edx, 1
mov dword [0x14011f180], 0
lea ecx, [rdx - 2]
call fcn.1400016f0
mov dword [0x14011f180], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140127dd0], eax
mov rcx, qword [0x14011f188]
test r12b, r12b
jne 0x14001f5bb
movzx eax, byte [rcx + 0xc5]
test al, al
je 0x14001f573
mov ebx, 0xffc3d44d
sub ebx, eax
jmp 0x14001f578
mov ebx, 0xffc3d44f
cmp dword [0x140128120], 0
je 0x14001f58a
movzx eax, byte [0x140127e88]
jmp 0x14001f591
xor ecx, ecx
call fcn.140022740
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov r8, rsi
mov byte [rsp + 0x20], 1
movzx edx, al
movzx ecx, r13b
call fcn.140021ed0
mov rcx, qword [0x14011f188]
movzx ebx, word [rsp + 0xb8]
test r15b, r15b
je 0x14001f5fe
test rsi, rsi
jne 0x14001f5fe
movzx eax, byte [rcx + 0xc3]
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.140020ba0
jmp 0x14001f627
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.14001fbe0
sub r14, 1
jne 0x14001f4e3
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 0x14001f6ab
cmp dword [0x140128120], 0
je 0x14001f67a
movzx eax, byte [0x140127e88]
jmp 0x14001f681
xor ecx, ecx
call fcn.140022740
not dil
and dil, al
and dil, 0xcc
je 0x14001f6ab
mov dword [rsp + 0x28], 0xffc3d44d
mov r9b, 1
mov r8, rsi
mov byte [rsp + 0x20], 0
movzx edx, dil
xor ecx, ecx
call fcn.140021ed0
add rsp, 0x98
pop rdi
pop rsi
ret
Function at 0x14001f6c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r14
sub rsp, 0x80
cmp dword [0x140128120], 2
movzx r14d, r8b
mov ebx, edx
sete bpl
movzx esi, cx
jne 0x14001f71c
mov eax, esi
mov ecx, esi
and eax, 0xffffff80
je 0x14001f6f9
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.1400c5cb8
movzx esi, word [rsp + 0xa8]
test ebx, ebx
jle 0x14001f89c
mov qword [rsp + 0xa0], rdi
mov rdi, rbx
mov qword [rsp + 0xb0], r15
xor r15d, r15d
nop word [rax + rax]
cmp dword [0x140128120], r15d
jne 0x14001f7aa
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x14011f188]
sub eax, dword [0x140127dd0]
cmp eax, dword [rcx + 0x88]
jbe 0x14001f7aa
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 0x14001f79e
mov edx, 1
mov dword [0x14011f180], r15d
lea ecx, [rdx - 2]
call fcn.1400016f0
mov dword [0x14011f180], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140127dd0], eax
test bpl, bpl
je 0x14001f853
cmp dword [0x140128120], r15d
je 0x14001f7c5
movzx eax, byte [0x140127e88]
jmp 0x14001f7cc
xor ecx, ecx
call fcn.140022740
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.140021ed0
movzx eax, word [rsp + 0x30]
lea rbx, [rsp + 0x30]
cmp ax, 0x30
jb 0x14001f833
cmp ax, 0x39
ja 0x14001f833
xor r8d, r8d
mov dword [rsp + 0x28], 0xffc3d44d
lea edx, [rax + 0x30]
mov byte [rsp + 0x20], r8b
xor r9d, r9d
lea ecx, [r8 + 2]
call fcn.14001fbe0
movzx eax, word [rbx + 2]
add rbx, 2
cmp ax, 0x30
jae 0x14001f800
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.14001fbe0
jmp 0x14001f85f
movzx edx, r14b
movzx ecx, si
call fcn.14001d810
cmp dword [0x140128120], 2
mov rax, qword [0x14011f188]
jne 0x14001f877
mov ecx, dword [rax + 0x9c]
jmp 0x14001f87d
mov ecx, dword [rax + 0x98]
call fcn.1400219a0
sub rdi, 1
jne 0x14001f740
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 0x140021800
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 [0x140128120], ebx
mov rdi, rcx
jne 0x140021903
xor al, al
cmp qword [0x140125e08], 0
movzx edi, al
cmovne edi, ebx
cmp qword [0x140125e00], 0
je 0x140021844
or dil, 2
test dil, dil
je 0x1400218da
movzx ecx, byte [0x140127e89]
movzx edx, bl
not cl
and cl, dil
call fcn.140016f70
mov rdx, qword [0x140125fb8]
mov r8d, 0x28
mov ecx, dword [0x14012810c]
call qword [sym.imp.USER32.dll_SendInput]
movzx eax, byte [0x140127e89]
and al, dil
test bl, al
je 0x1400218bf
movzx ecx, bl
call fcn.140022740
movzx r8d, al
xor r8b, sil
movzx edx, r8b
and r8b, al
and dl, sil
not dl
and dl, byte [0x140125d27]
or dl, r8b
mov byte [0x140125d27], dl
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov qword [0x140125c50], rax
movzx edx, bl
movzx ecx, dil
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140016f70
mov rdx, qword [0x140125fb8]
mov r8d, 0x28
mov ecx, dword [0x14012810c]
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 [0x140125b48]
lea rdx, [0x14001f960]
xor esi, esi
xor r9d, r9d
mov ecx, ebx
mov dword [0x140128114], esi
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x140125b00], rax
test rax, rax
je 0x140021985
mov byte [0x140125c5f], bl
nop word [rax + rax]
mov edx, ebx
mov dword [0x14011f180], esi
mov ecx, 0x8000012f
call fcn.1400016f0
cmp qword [0x140125b00], rsi
mov dword [0x14011f180], ebx
jne 0x140021940
mov edx, dword [0x14012810c]
mov rax, qword [0x140122098]
dec edx
mov byte [0x140125c5f], sil
mov rcx, qword [rax]
cmp dword [rcx + rdx*8], esi
jne 0x140021985
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 0x140022cf0
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 0x140022ecc
movaps xmm0, xmmword [str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
lea rcx, [rbp - 0x6c]
movaps xmm1, xmmword [0x140101c30]
mov eax, dword [0x140101c80]
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [0x140101c40]
movaps xmmword [rsp + 0x40], xmm1
movaps xmm1, xmmword [0x140101c50]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x140101c60]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x140101c70]
mov dword [rbp - 0x70], eax
movzx eax, word [0x140101c84]
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 0x140022e8c
lea rax, [rbp + 0x200]
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 0x140022e88
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 0x140022e88
mov edx, dword [rbp + 0x1f8]
test edx, edx
je 0x140022e88
shr edx, 1
mov ecx, edx
dec edx
mov dword [rbp + 0x1f8], edx
cmp word [rbp + rdx*2 - 0x50], si
jne 0x140022e60
test edx, edx
je 0x140022e8c
mov ecx, edx
mov r8d, edx
nop
lea eax, [r8 - 1]
mov edx, ecx
mov r8d, eax
cmp word [rbp + rax*2 - 0x50], si
jne 0x140022e75
mov dword [rbp + 0x1f8], eax
mov ecx, eax
mov edx, eax
test eax, eax
jne 0x140022e40
jmp 0x140022e75
mov dword [rbp + 0x1f8], ecx
cmp ecx, 0x104
jae 0x140022e88
mov word [rbp + rcx*2 - 0x50], di
mov edx, ecx
test edx, edx
je 0x140022e8c
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
jmp 0x140022e8c
mov word [rbp - 0x50], di
cmp r15, r14
je 0x140022e9c
xor edx, edx
mov rcx, r14
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test rsi, rsi
je 0x140022ecc
lea rdx, str.KbdLayerDescriptor
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140022ec3
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 0x140023020
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 0x14002322c
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.1400bc940
xor esi, esi
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], esi
lea r9, [rsp + 0x168]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x20], 2
xor edx, edx
lea ecx, [rsi + 0x6e]
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 0x140023104
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
lea ecx, [rsi + 0x6e]
call qword [sym.imp.USER32.dll_ToUnicodeEx]
test bx, bx
je 0x1400231fa
cmp bx, 0xa
jne 0x140023123
movzx edx, byte [rsp + 0x160]
mov dil, ntohs
jmp 0x1400231c6
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 0x14002317f
cmp dil, 0xff
jne 0x14002317f
cmp bx, 0x5a
ja 0x140023168
cmp bx, 0x41
jb 0x1400231fa
movzx eax, bl
cmp bx, 0x5a
ja 0x14002317a
cmp bx, 0x41
jb 0x14002317a
mov cl, 1
jmp 0x14002317c
lea eax, [rbx - 0x61]
cmp ax, 0x19
ja 0x1400231fa
movzx eax, bl
and al, 0xdf
xor cl, cl
movzx edi, al
test cl, 0x38
jne 0x1400231fa
movzx edx, byte [rsp + 0x160]
movzx eax, cl
and al, 6
cmp al, 6
jne 0x14002319a
or dl, 8
jmp 0x1400231b4
test cl, 2
je 0x1400231a7
test dl, 3
jne 0x1400231a7
or dl, 1
test cl, 4
je 0x1400231b4
test dl, 0xc
jne 0x1400231b4
or dl, 4
test cl, 1
je 0x1400231c1
test dl, 0x30
jne 0x1400231c1
or dl, 0x10
test dil, dil
je 0x1400231fa
lea rcx, [rsp + 0x40]
call fcn.1400228f0
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 0x140023217
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
Function at 0x140023340
Capabilities:
Log keystrokes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
movzx r10d, word [rcx]
movzx ebp, r8b
mov rsi, rcx
test r10w, r10w
je 0x140023485
movzx r9d, word [rcx + 2]
movzx ecx, r10w
test r9w, r9w
jne 0x14002338e
mov r8, qword [rsp + 0x60]
mov r9b, 1
call fcn.1400234a0
jmp 0x140023487
mov edx, 0xffdf
lea eax, [r10 - 0x61]
and cx, dx
cmp ax, 0x19
cmova cx, r10w
cmp cx, 0x56
jne 0x1400233f0
movzx ecx, r9w
lea eax, [r9 - 0x61]
and cx, dx
cmp ax, 0x19
cmova cx, r9w
cmp cx, 0x4b
jne 0x1400233f0
lea rcx, [rsi + 4]
mov r8d, reloc.WSOCK32.dll_recv
lea rdx, [rsp + 0x40]
call fcn.1400c6f68
mov rcx, qword [rsp + 0x40]
xor edi, edi
movzx edx, al
cmp word [rcx], di
cmove edi, edx
movzx eax, dil
jmp 0x140023487
lea r15, str.Numpad0
xor edi, edi
mov rbx, r15
lea r14, [0x14011fa50]
mov rcx, qword [rbx]
mov rdx, rsi
call fcn.1400c0504
test eax, eax
je 0x140023477
inc edi
add rbx, 0x10
cmp rbx, r14
jl 0x140023403
test bpl, bpl
jne 0x140023485
xor edx, edx
mov rcx, rsi
call fcn.140023250
test ax, ax
je 0x140023485
movzx edx, ax
sub edx, 0x45
je 0x140023473
mov r8d, 0xff
sub edx, 0xf1
je 0x14002344c
cmp edx, 0xf
jne 0x140023450
and ax, r8w
bt ax, 8
jae 0x140023463
and ax, r8w
mov ecx, 0xe000
or ax, cx
movzx ecx, ax
mov edx, 3
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
jmp 0x140023487
mov al, reloc.WSOCK32.dll_send
jmp 0x140023487
movsxd rax, edi
add rax, rax
movzx eax, byte [r15 + rax*8 + 8]
jmp 0x140023487
xor al, al
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x1400234a0
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
movzx esi, r9b
mov rdi, rdx
movzx ebx, cx
cmp cx, 0xa
jne 0x1400234d1
mov al, 0xd
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rdx, r8
call qword [sym.imp.USER32.dll_VkKeyScanExW]
movsx rdx, ax
mov rcx, rdx
shr rcx, 8
cmp cl, 0xff
jne 0x140023526
cmp dl, 0xff
jne 0x140023526
test sil, sil
je 0x14002352b
cmp bx, 0x5a
ja 0x140023513
cmp bx, 0x41
jb 0x14002352b
movzx eax, bl
cmp bx, 0x5a
ja 0x140023521
cmp bx, 0x41
jb 0x140023521
mov cl, 1
jmp 0x140023523
lea eax, [rbx - 0x61]
cmp ax, 0x19
ja 0x14002352b
movzx eax, bl
and al, 0xdf
xor cl, cl
movzx edx, al
test cl, 0x38
je 0x14002353d
xor al, al
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
test rdi, rdi
je 0x140023580
movzx eax, cl
and al, 6
cmp al, 6
jne 0x140023550
or byte [rdi], 8
jmp 0x140023570
test cl, 2
je 0x140023560
movzx eax, byte [rdi]
test al, 3
jne 0x140023560
or al, 1
mov byte [rdi], al
test cl, 4
je 0x140023570
movzx eax, byte [rdi]
test al, 0xc
jne 0x140023570
or al, 4
mov byte [rdi], al
test cl, 1
je 0x140023580
movzx eax, byte [rdi]
test al, 0x30
jne 0x140023580
or al, 0x10
mov byte [rdi], al
mov rbx, qword [rsp + 0x30]
movzx eax, dl
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret