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

Disassembly:
push ecx
cmp byte [0x4e8a8e], 0
push ebx
mov bh, dl
mov edx, ecx
push esi
mov dword [esp + 8], edx
je 0x4114bb
mov al, byte [0x4e8a8c]
cmp al, 0xa0
je 0x411445
cmp al, 0x10
jne 0x4114bb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4e8a94]
cmp eax, 0x16
jae 0x4114b7
mov edx, dword [esp + 0x10]
mov cl, bh
call fcn.00411700
cmp byte [0x4e8a8d], 0
jne 0x411481
xor eax, eax
nop dword [eax]
cmp byte [eax + 0x4e8a98], 0
jne 0x41148c
inc eax
cmp eax, 0x16
jl 0x411470
jmp 0x4114b7
cmp byte [esp + 0x14], 0
je 0x411495
test al, al
je 0x4114b7
mov byte [0x4e8a73], 1
jmp 0x411499
test al, al
je 0x4114b7
mov al, byte [0x4e8a8f]
mov byte [0x4e5c56], al
mov al, byte [0x4e8a92]
mov byte [0x4e6590], al
mov al, byte [0x4e8a93]
mov byte [0x4e6620], al
mov edx, dword [esp + 8]
mov al, byte [0x4e5c56]
mov byte [0x4e8a8f], al
mov al, byte [0x4e6590]
mov byte [0x4e8a92], al
mov al, byte [0x4e6620]
movzx esi, bh
mov byte [0x4e8a93], al
mov eax, dword [0x4e8a84]
lea ecx, [esi + esi*4]
mov bl, byte [eax + ecx*4 + 8]
test bl, bl
je 0x411606
mov ecx, dword [esp + 8]
push edi
mov edi, dword [edx + 0x10]
mov dl, bh
push dword [esp + 0x18]
mov ecx, dword [ecx + 8]
call fcn.00411680
add esp, 4
cmp byte [esp + 0x18], 0
je 0x4115ae
cmp byte [esp + 0x1c], 0
jne 0x411533
mov cl, bl
not cl
and byte [0x4e657c], cl
cmp edi, 0xffc3d44f
je 0x411533
and byte [0x4e5c57], cl
test al, al
je case.default.0x4115e5
not bl
mov byte [esi + 0x4e6580], 0
and byte [0x4e5c56], bl
add esi, 0xffffff60
cmp esi, 5
ja case.default.0x4115e5
jmp dword [esi*4 + 0x411648]
mov al, byte [0x4e6621]
mov byte [0x4e6590], al
jmp case.default.0x4115e5
mov al, byte [0x4e6620]
mov byte [0x4e6590], al
jmp case.default.0x4115e5
mov al, byte [0x4e6623]
mov byte [0x4e6591], al
jmp case.default.0x4115e5
mov al, byte [0x4e6622]
mov byte [0x4e6591], al
jmp case.default.0x4115e5
mov al, byte [0x4e6625]
mov byte [0x4e6592], al
jmp case.default.0x4115e5
mov al, byte [0x4e6624]
mov byte [0x4e6592], al
jmp case.default.0x4115e5
cmp byte [esp + 0x1c], 0
jne 0x4115c9
or byte [0x4e657c], bl
cmp edi, 0xffc3d44f
je 0x4115c9
or byte [0x4e5c57], bl
test al, al
je case.default.0x4115e5
or byte [0x4e5c56], bl
mov byte [esi + 0x4e6580], 0x80
add esi, 0xffffff60
cmp esi, 5
ja case.default.0x4115e5
jmp dword [esi*4 + 0x411660]
mov byte [0x4e6590], 0x80
jmp case.default.0x4115e5
mov byte [0x4e6591], 0x80
jmp case.default.0x4115e5
mov byte [0x4e6592], 0x80
pop edi
mov eax, dword [esp + 0x10]
mov dl, bh
mov word [0x4e8a90], ax
mov eax, dword [esp + 0x14]
mov byte [0x4e8a8d], al
push eax
mov eax, dword [esp + 0xc]
mov byte [0x4e8a8c], bh
mov ecx, dword [eax + 8]
call fcn.00411680
add esp, 4
mov byte [0x4e8a8e], al
call dword [sym.imp.KERNEL32.dll_GetTickCount]
pop esi
mov dword [0x4e8a94], eax
pop ebx
pop ecx
ret
Function at 0x411680
Capabilities:
Check for time delay via gettickcount

Disassembly:
test cl, 0x10
jne 0x4116b7
cmp dl, 0xa0
je 0x41168f
cmp dl, 0x10
jne 0x4116ea
cmp byte [esp + 4], 0
jne 0x4116ea
cmp byte [0x4e8a73], 0
je 0x4116ba
xor eax, eax
cmp byte [eax + 0x4e8a98], 0
jne 0x4116ba
inc eax
cmp eax, 0x16
jl 0x4116a1
mov byte [0x4e8a73], 0
xor al, al
ret
cmp byte [0x4e8a8d], 0
je 0x4116ea
mov dx, word [0x4e8a90]
mov cl, byte [0x4e8a8c]
call fcn.00411700
test al, al
je 0x4116ea
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4e8a94]
cmp eax, 0x16
jb 0x4116b7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x4e8a34], eax
mov dword [0x4e8a30], eax
mov al, 1
ret
Function at 0x4126c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
push ebx
mov al, dl
mov byte [esp + 0xa], cl
xor dl, dl
mov byte [esp + 9], al
cmp dword [0x4e5bc8], 0
movzx ebx, dl
mov edx, 1
push ebp
push esi
cmovne ebx, edx
cmp dword [0x4e5bc4], 0
push edi
je 0x4126f7
or bl, 2
cmp cl, bl
je 0x412901
test bl, bl
jne 0x412740
test al, al
jne 0x412740
push 0x4e669c
push 0
push 0
push 0x412970
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4e8a6c], eax
test eax, eax
je 0x4127d9
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov al, byte [esp + 0x15]
mov cl, byte [esp + 0x16]
movzx edi, al
xor esi, esi
xor edi, 1
movzx ebp, cl
nop dword [eax + eax]
push edi
push ebp
push 0x417
push dword [0x4e669c]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x412775
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x32
jl 0x412750
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor al, al
mov byte [esp + 0x17], al
call esi
mov ebp, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, eax
mov cl, byte [esp + 0x16]
mov al, byte [esp + 0x15]
test cl, cl
je 0x4127e6
push 1
push 0x417
push 0x417
push 0
lea eax, [esp + 0x2c]
push eax
call ebp
test eax, eax
je 0x41281b
cmp dword [esp + 0x24], 0
je 0x4127f3
mov byte [esp + 0x17], 1
call fcn.00412d10
test al, al
jne 0x4127f3
mov al, byte [esp + 0x15]
test al, al
jne 0x4128d4
xor cl, cl
mov byte [esp + 0x16], cl
jmp 0x412793
call fcn.00412d30
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
test al, al
je 0x412800
call fcn.00412d10
test al, al
jne 0x41281b
cmp byte [esp + 0x15], 0
jne 0x4128cd
jmp 0x41284e
lea eax, [esp + 0x18]
push eax
push dword [0x4e8a6c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x18], 0x103
jne 0x412833
call esi
sub eax, edi
cmp eax, 0x1f4
ja 0x4127f3
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41278b
push dword [0x4e8a6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4e8a6c], 0
call fcn.00412d30
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov al, bl
and al, 1
cmp dword [0x4e5bc8], 0
je 0x412877
test al, al
jne 0x412891
push str.AHK_Keybd
push 0
push 0
call esi
mov dword [0x4e8a64], eax
jmp 0x412891
test al, al
je 0x412891
push dword [0x4e8a64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4e8a64], 0
and bl, 2
cmp dword [0x4e5bc4], 0
je 0x4128b3
test bl, bl
jne 0x4128cd
push str.AHK_Mouse
push 0
push 0
call esi
mov dword [0x4e8a68], eax
jmp 0x4128cd
test bl, bl
je 0x4128cd
push dword [0x4e8a68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4e8a68], 0
cmp byte [esp + 0x17], 0
je 0x412901
push 0
push 0
xorps xmm3, xmm3
mov dword [0x4e30f4], 0
mov edx, 0x10000
mov ecx, str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
call fcn.004a2130
add esp, 8
mov dword [0x4e30f4], 1
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x413d30
Capabilities:
Terminate process

Disassembly:
push ecx
mov eax, ecx
push eax
mov dword [esp + 4], eax
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor dl, dl
xor cl, cl
call fcn.004126c0
mov eax, dword [0x4e5b8c]
test eax, eax
je 0x413d57
push eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
push edi
xor eax, eax
xor edi, edi
cmp ax, word [0x4e66f8]
jae 0x413de2
mov edx, dword [0x4e7464]
push ebx
mov ebx, dword [0x4e7468]
push ebp
mov ebp, dword [sym.imp.USER32.dll_UnregisterHotKey]
push esi
nop word [eax + eax]
mov esi, dword [0x4e66e8]
mov esi, dword [esi + edi*4]
test esi, esi
je 0x413dd3
cmp byte [esi + 0x18], 0
je 0x413db4
movzx eax, word [esi + 4]
push eax
push dword [0x4e5ba8]
call ebp
mov edx, dword [0x4e7464]
test eax, eax
mov ebx, dword [0x4e7468]
sete al
mov byte [esi + 0x18], al
cmp esi, edx
jne 0x413dd3
test edx, edx
je 0x413dd3
mov eax, dword [ebx + 4]
mov ecx, eax
sub ecx, edx
add dword [ebx + 8], ecx
sub eax, ecx
xor edx, edx
mov dword [ebx + 4], eax
mov dword [0x4e7464], edx
movzx eax, word [0x4e66f8]
inc edi
cmp edi, eax
jl 0x413d80
pop esi
pop ebp
pop ebx
push dword [esp + 4]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
pop edi
int3
Function at 0x418420
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov al, byte [ebp + 0xc]
or byte [ebp + 8], al
push ebx
mov bl, cl
mov dword [esp + 8], edx
mov al, bl
sub al, 1
push esi
push edi
cmp al, 5
ja 0x418445
cmp bl, 3
jne 0x41844d
mov al, bl
add al, 0x66
cmp al, 5
ja 0x418451
mov bh, 1
jmp 0x418453
xor bh, bh
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x1c]
test esi, esi
jle 0x41857a
cmp dword [0x4e8b28], 0
jne 0x4184c7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x4e30fc]
sub eax, dword [0x4e8864]
cmp eax, dword [ecx + 0xd8]
jbe 0x4184cd
push 0
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x4184bc
mov edx, 1
mov dword [0x4e30f4], 0
or ecx, 0xffffffff
call fcn.00401a20
mov dword [0x4e30f4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x4e8864], eax
mov ecx, dword [0x4e30fc]
cmp byte [ebp + 0x18], 0
jne 0x418521
mov al, byte [ecx + 0xf6]
test al, al
je 0x4184e9
movzx eax, al
mov esi, 0xffc3d44d
sub esi, eax
jmp 0x4184ee
mov esi, 0xffc3d44f
cmp dword [0x4e8b28], 0
je 0x4184fe
mov al, byte [0x4e8ab7]
jmp 0x418505
xor cl, cl
call fcn.0041af90
mov cl, byte [ebp + 8]
mov dl, al
push esi
push 1
push 0
push edi
call fcn.0041a940
mov ecx, dword [0x4e30fc]
add esp, 0x10
mov esi, dword [ebp + 0x10]
test bh, bh
je 0x41854b
test edi, edi
jne 0x41854b
push dword [ebp + 0x28]
movzx eax, byte [ecx + 0xef]
mov cl, bl
push dword [ebp + 0x14]
mov edx, dword [ebp + 0x20]
push eax
push 1
push dword [ebp + 0x24]
call fcn.004198b0
add esp, 0x14
jmp 0x41856e
movzx eax, byte [ecx + 0xf6]
mov dl, bl
mov ecx, 0xffc3d44d
sub ecx, eax
push ecx
mov ecx, dword [ebp + 0x14]
push 1
push edi
push dword [esp + 0x1c]
call fcn.004189c0
add esp, 0x10
sub esi, 1
mov dword [ebp + 0x10], esi
jne 0x418461
cmp byte [ebp + 0x18], 0
jne 0x4185bb
cmp dword [0x4e8b28], 0
je 0x418590
mov al, byte [0x4e8ab7]
jmp 0x418597
xor cl, cl
call fcn.0041af90
mov cl, al
xor cl, byte [ebp + 0xc]
and cl, al
and cl, 0xcc
je 0x4185bb
push 0xffc3d44d
push 0
not cl
mov dl, al
push 1
push edi
and cl, al
call fcn.0041a940
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4185d0
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x40
mov eax, dword [0x4e8b28]
cmp eax, 2
push ebx
push esi
push edi
mov esi, edx
mov ebx, ecx
sete byte [esp + 0xf]
jne 0x41861c
movzx edx, bx
mov ecx, edx
and ecx, 0xffffff80
je 0x4185fd
mov eax, 0x30
mov word [esp + 0x2c], ax
test ecx, ecx
lea eax, [esp + 0x2c]
lea edi, [esp + 0x2e]
push 0xa
cmovne eax, edi
push eax
push edx
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itow]
mov eax, dword [0x4e8b28]
add esp, 0xc
test esi, esi
jle 0x4186ce
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
mov ebp, dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x418686
call edi
mov ecx, dword [0x4e30fc]
sub eax, dword [0x4e8864]
cmp eax, dword [ecx + 0xd8]
jbe 0x418686
push 0
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
call ebp
test eax, eax
je 0x41867f
mov edx, 1
mov dword [0x4e30f4], 0
or ecx, 0xffffffff
call fcn.00401a20
mov dword [0x4e30f4], 1
call edi
mov dword [0x4e8864], eax
cmp byte [esp + 0x13], 0
je 0x418698
lea ecx, [esp + 0x30]
call fcn.004186e0
jmp 0x4186a3
mov dl, byte [esp + 0x54]
mov ecx, ebx
call fcn.00417230
cmp dword [0x4e8b28], 2
mov eax, dword [0x4e30fc]
jne 0x4186b6
mov ecx, dword [eax + 0x60]
jmp 0x4186b9
mov ecx, dword [eax + 0x5c]
call fcn.0041a600
sub esi, 1
je 0x4186cd
mov eax, dword [0x4e8b28]
jmp 0x418631
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x40
ret
Function at 0x41a3f0
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
sub esp, 0xc
mov eax, dword fs:[0x24]
cmp dword [0x4e8b28], 1
push ebp
push esi
mov byte [esp + 0xb], dl
mov esi, ecx
mov dword [esp + 0x10], eax
jne 0x41a568
xor al, al
mov ebp, 1
cmp dword [0x4e5bc8], 0
push ebx
movzx ebx, al
cmovne ebx, ebp
cmp dword [0x4e5bc4], 0
mov dword [esp + 0x10], ebx
je 0x41a43b
or ebx, 2
mov dword [esp + 0x10], ebx
test bl, bl
je 0x41a450
mov cl, byte [0x4e8b24]
mov dl, 1
not cl
and cl, bl
call fcn.004126c0
mov eax, dword [0x4e8b10]
xor edx, edx
mov ecx, dword [0x4e6704]
push edi
xor edi, edi
test eax, eax
je 0x41a507
xor esi, esi
xor ebx, ebx
nop dword [eax]
cmp dword [esi + ecx], ebp
jne 0x41a4e5
cmp word [esi + ecx + 4], 0
jne 0x41a4e5
cmp word [esi + ecx + 6], 0
jne 0x41a4e5
push 0x1c
lea eax, [ebx + ecx]
push eax
mov eax, edi
sub eax, edx
push eax
call dword [0x4e8a3c]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4e6704]
mov dword [0x4e30f4], 0
cmp dword [0x4e7484], eax
je 0x41a4c3
mov eax, dword [esi + ecx + 0x10]
test eax, eax
js 0x41a4c3
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41a4ce
mov ecx, dword [esi + ecx + 0x10]
mov edx, ebp
call fcn.00401a20
mov eax, dword [0x4e8b10]
lea edx, [edi + 1]
mov ecx, dword [0x4e6704]
lea ebx, [esi + 0x1c]
mov dword [0x4e30f4], ebp
inc edi
add esi, 0x1c
cmp edi, eax
jb 0x41a470
mov ebx, dword [esp + 0x14]
test edx, edx
je 0x41a507
lea eax, [edx*8]
sub eax, edx
push 0x1c
lea eax, [ecx + eax*4]
push eax
push edx
jmp 0x41a50b
push 0x1c
push ecx
push eax
call dword [0x4e8a3c]
pop edi
test bl, bl
je 0x41a5eb
mov al, byte [0x4e8b24]
and al, bl
test al, 1
je 0x41a559
mov cl, 1
call fcn.0041af90
mov bl, al
xor bl, byte [esp + 0xf]
mov dl, bl
and bl, al
and dl, byte [esp + 0xf]
not dl
and dl, byte [0x4e5c56]
or dl, bl
mov byte [0x4e5c56], dl
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebx, dword [esp + 0x10]
mov dword [0x4e5d74], eax
mov cl, bl
mov dl, 1
pop ebx
pop esi
pop ebp
add esp, 0xc
jmp fcn.004126c0
push 0
push 0
mov dword [0x4e8b18], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0x418770
push 1
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x4e5b8c], eax
test eax, eax
je 0x41a5ec
mov byte [0x4e5c53], 1
mov ebp, 1
nop
mov edx, ebp
mov dword [0x4e30f4], 0
mov ecx, 0x8000012f
call fcn.00401a20
cmp dword [0x4e5b8c], 0
mov dword [0x4e30f4], ebp
jne 0x41a5a0
mov eax, dword [0x4e4ac4]
mov byte [0x4e5c53], 0
mov ecx, dword [eax]
mov eax, dword [0x4e8b10]
cmp dword [ecx + eax*8 - 8], 0
jne 0x41a5ec
mov eax, dword [ecx + eax*8 - 4]
mov dword [esi], eax
pop esi
pop ebp
add esp, 0xc
ret
pop ebx
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x41a710
Capabilities:
Get graphical window text

Disassembly:
push edi
mov edi, dword [0x4e5bc0]
test edi, edi
je 0x41a822
mov ax, word [esp + 8]
push esi
imul esi, dword [0x4e5c2c], 0xd4
mov byte [esi + edi + 6], cl
mov byte [esi + edi], dl
mov word [esi + edi + 2], ax
mov eax, 0x69
mov word [esi + edi + 4], ax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
mov eax, dword [0x4e5bc0]
mov ecx, edx
mov dword [0x4e5c28], edx
sub ecx, dword [0x4e88c4]
mov dword [0x4e88c4], edx
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x4dcc00]
imul ecx, dword [0x4e5c2c], 0xd4
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x4dcb34]
movss dword [ecx + eax + 8], xmm0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
test edi, edi
je 0x41a7e5
mov eax, dword [0x4e5bc0]
cmp edi, dword [0x4e5c24]
je 0x41a7d0
imul edx, dword [0x4e5c2c], 0xd4
push 0x64
add edx, 0xc
add eax, edx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov esi, dword [0x4e5c2c]
jmp 0x41a809
mov esi, dword [0x4e5c2c]
imul ecx, esi, 0xd4
xor edx, edx
mov word [ecx + eax + 0xc], dx
jmp 0x41a809
mov esi, dword [0x4e5c2c]
mov ecx, dword [0x4e5bc0]
mov eax, dword [0x4cf694]
imul edx, esi, 0xd4
mov dword [edx + ecx + 0xc], eax
mov eax, dword [0x4cf698]
mov dword [edx + ecx + 0x10], eax
inc esi
mov dword [0x4e5c24], edi
xor eax, eax
cmp esi, dword [0x4e3100]
cmovge esi, eax
mov dword [0x4e5c2c], esi
pop esi
pop edi

Function at 0x41a830
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push ebp
push esi
mov bl, cl
push edi
movzx ebp, bl
mov edi, edx
push ebp
call dword [sym.imp.USER32.dll_GetKeyState]
movzx esi, ax
xor esi, 0xffffffff
and esi, 1
inc esi
cmp edi, 1
je 0x41a85a
cmp edi, 2
jne 0x41a931
cmp esi, edi
je 0x41a931
push ebp
call dword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
je 0x41a88d
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.004189c0
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 2
call fcn.004189c0
add esp, 0x10
push 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4e7484]
sete bh
jne 0x41a8e2
mov edx, 1
mov dword [0x4e30f4], 0
or ecx, 0xffffffff
call fcn.00401a20
mov dword [0x4e30f4], 1
cmp bl, 0x14
jne 0x41a931
cmp edi, 2
jne 0x41a931
push ebp
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x41a931
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, edi
call fcn.004189c0
add esp, 0x10
test bh, bh
je 0x41a931
lea edx, [edi - 1]
mov dword [0x4e30f4], 0
or ecx, 0xffffffff
call fcn.00401a20
mov dword [0x4e30f4], 1
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
Function at 0x41af90
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
cmp dword [0x4e5bc8], 0
je 0x41afa5
test cl, cl
jne 0x41afa5
mov al, byte [0x4e657c]
pop ecx
ret
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push edi
push 0xa0
call esi
mov bx, ax
shr bx, 0xb
push 0xa1
and bl, 0x10
call esi
mov cl, bl
mov edi, 0x8000
or cl, 0x20
and ax, di
movzx edx, cl
movzx ecx, bl
cmove edx, ecx
push 0xa2
mov dword [esp + 0x10], edx
call esi
mov edx, dword [esp + 0xc]
mov cl, dl
or cl, 1
and ax, di
movzx ebx, cl
movzx ecx, dl
push 0xa3
cmove ebx, ecx
call esi
mov cl, bl
or cl, 2
and ax, di
movzx edx, cl
movzx ecx, bl
cmove edx, ecx
push 0xa4
mov dword [esp + 0x10], edx
call esi
mov edx, dword [esp + 0xc]
mov cl, dl
or cl, 4
and ax, di
movzx ebx, cl
movzx ecx, dl
push 0xa5
cmove ebx, ecx
call esi
mov cl, bl
or cl, 8
and ax, di
movzx edx, cl
movzx ecx, bl
cmove edx, ecx
push 0x5b
mov dword [esp + 0x10], edx
call esi
mov edx, dword [esp + 0xc]
mov cl, dl
or cl, 0x40
and ax, di
movzx ebx, cl
movzx ecx, dl
push 0x5c
cmove ebx, ecx
call esi
mov cl, bl
or cl, 0x80
and ax, di
movzx edx, cl
movzx ecx, bl
cmove edx, ecx
cmp dword [0x4e5bc8], 0
mov dword [esp + 0xc], edx
je 0x41b0c5
mov bl, byte [0x4e657c]
mov cl, dl
not cl
and cl, bl
je 0x41b0c5
mov dl, byte [0x4e5c56]
not cl
and byte [0x4e5c57], cl
and dl, cl
and bl, cl
mov byte [0x4e5c56], dl
mov ecx, 0x4e6580
mov byte [0x4e657c], bl
call fcn.0041b0d0
mov edx, dword [esp + 0xc]
pop edi
pop esi
mov al, dl
pop ebx
pop ecx
ret

Function at 0x41b590
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x38
push esi
xor esi, esi
test ecx, ecx
je 0x41b5cf
push esi
push ecx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
mov dword [esp + 8], 0x30
lea eax, [esp + 8]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x41b5cf
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41b5cf
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
pop esi
add esp, 0x38
ret
Function at 0x41b5e0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x288
xor eax, eax
push ebx
push esi
mov ebx, ecx
nop dword [eax]
mov esi, dword [eax*8 + 0x4e8ab8]
test esi, esi
je 0x41b605
cmp esi, ebx
je 0x41b631
inc eax
cmp eax, 0xa
jl 0x41b5f0
cmp eax, 0xa
mov ecx, 9
cmovl ecx, eax
mov dword [esp + 0xc], ecx
test edx, edx
je 0x41b656
pop esi
mov dword [ecx*8 + 0x4e8ab8], ebx
mov eax, edx
mov dword [ecx*8 + 0x4e8abc], edx
pop ebx
add esp, 0x288
ret
test edx, edx
je 0x41b646
cmp dword [eax*8 + 0x4e8abc], 0
jne 0x41b646
mov dword [eax*8 + 0x4e8abc], edx
mov eax, dword [eax*8 + 0x4e8abc]
pop esi
pop ebx
add esp, 0x288
ret
push ebp
xor ebp, ebp
push ebp
push ebx
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov dword [esp + 0xc], eax
test eax, eax
je 0x41b6fc
push edi
mov ecx, 0x19
lea edi, [esp + 0x18]
mov esi, str.SYSTEMCurrentControlSetControlKeyboard_Layouts_
lea eax, [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
pop edi
test eax, eax
je 0x41b6c1
push ebp
push ecx
lea eax, [esp + 0x94]
push eax
push str.Layout_File
lea edx, [esp + 0x24]
call fcn.0049da50
add esp, 0x10
test eax, eax
je 0x41b6c1
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
jmp 0x41b6c3
xor esi, esi
mov eax, dword [esp + 0xc]
cmp ebx, eax
je 0x41b6d4
push 0
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
test esi, esi
je 0x41b6fc
push str.KbdLayerDescriptor
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41b6f5
call eax
mov ebp, dword [eax + 0x28]
not ebp
and ebp, 1
add ebp, 3
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
mov dword [eax*8 + 0x4e8abc], ebp
mov dword [eax*8 + 0x4e8ab8], ebx
mov eax, ebp
pop ebp
pop esi
pop ebx
add esp, 0x288
ret
Function at 0x41b790
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
push edi
mov ebp, edx
mov bl, cl
xor edi, edi
cmp byte [edi*8 + 0x4e3174], bl
je 0x41b90f
inc edi
cmp edi, 0x6d
jl 0x41b7a0
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
lea ecx, [ebx - 0x41]
mov esi, eax
cmp cl, 0x19
ja 0x41b89f
push pe_nt_image_headers32
lea eax, [esp + 0x2c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
mov dword [esp + 0x14], eax
push esi
push eax
push 2
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x6e
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp eax, 2
jne 0x41b809
movzx eax, word [esp + 0x18]
mov dword [esp + 0x14], eax
push esi
push 0
push 2
lea eax, [esp + 0x24]
movzx edi, bl
push eax
lea eax, [esp + 0x38]
push eax
push 0
push edi
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov dword [esp + 0x24], eax
test eax, eax
jns 0x41b845
push esi
push 0
push 2
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x6e
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov eax, dword [esp + 0x14]
test ax, ax
je 0x41b88d
push 1
push esi
lea edx, [esp + 0x1b]
mov ecx, eax
call fcn.0041bb00
mov bh, al
add esp, 8
test bh, bh
je 0x41b88d
mov dl, byte [esp + 0x13]
lea ecx, [esp + 0x28]
call fcn.0041b0d0
push esi
push 0
push 2
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x38]
push eax
push 0
movzx eax, bh
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp dword [esp + 0x24], 0
je 0x41b89b
movzx eax, word [esp + 0x18]
jmp 0x41b8af
xor eax, eax
jmp 0x41b8af
push esi
push 2
movzx edi, bl
push edi
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
movzx eax, ax
mov word [ebp], ax
test ax, ax
je 0x41b8cb
pop edi
xor eax, eax
mov word [ebp + 2], ax
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
cmp byte [esp + 0x130], 0
je 0x41b8fc
test bl, bl
je 0x41b8fc
push edi
push str.vk_02X
push dword [esp + 0x134]
push ebp
call fcn.0049c640
add esp, 0x10
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
pop edi
xor eax, eax
mov word [ebp], ax
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov esi, dword [esp + 0x12c]
dec esi
push esi
push dword [edi*8 + 0x4e3170]
push ebp
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add esp, 0xc
xor eax, eax
mov word [ebp + esi*2], ax
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret