joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401da5
Capabilities:
Log keystrokes

Disassembly:
mov eax, dword [esi]
push ebp
xor ebp, ebp
cmp eax, ebp
jne 0x401db5
xor al, al
jmp 0x401e3f
push ebx
push edi
push 1
push eax
call fcn.00403060
mov edi, dword [sym.imp.USER32.dll_MapVirtualKeyW]
push ebp
push 0x25
call edi
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
shl eax, 0x10
or eax, 1
cmp dword [esp + 0x10], ebp
push eax
jge 0x401e01
push 0x25
push 0x100
push dword [esi]
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
push 0x25
call edi
shl eax, 0x10
or eax, 0xc0000001
push eax
push 0x25
jmp 0x401e23
push 0x27
push 0x100
push dword [esi]
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
push 0x25
call edi
shl eax, 0x10
or eax, 0xc0000001
push eax
push 0x27
push 0x101
push dword [esi]
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
push dword [esi]
call fcn.00403060
pop edi
mov al, 1
pop ebx
pop ebp
ret 4

Function at 0x4022d4
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, eax
mov eax, dword [ebx]
test eax, eax
jne 0x4022e7
xor al, al
jmp 0x40231f
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push 0xb0
push eax
call esi
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jne 0x40230a
xor al, al
jmp 0x40231e
push edi
push 0
push 0
push 0xe
push dword [ebx]
call esi
mov edi, eax
test edi, edi
jne 0x402324
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 0x101]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044b6ac
pop ecx
push eax
mov dword [ebp - 4], eax
lea eax, [edi + 1]
push eax
push 0xd
push dword [ebx]
call esi
test eax, eax
je 0x402381
mov eax, dword [ebp - 8]
cmp eax, edi
je 0x402360
mov ecx, dword [ebp - 4]
and word [ecx + eax*2], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
push eax
mov eax, dword [ebp + 8]
call fcn.0040d98a
mov bl, 1
push dword [ebp - 4]
call fcn.0044b716
pop ecx
mov al, bl
jmp 0x40231d
xor bl, bl
jmp 0x402374
Function at 0x402dbd
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
and dword [ebp - 8], 0
and dword [ebp - 4], 0
cmp byte [esi + 8], 0
push edi
je 0x402df5
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetDlgCtrlID]
cmp dword [esi + 0x30], eax
jne 0x402dee
mov dword [esi + 0x3c], edi
xor eax, eax
jmp 0x402f06
mov dword [ebp - 4], 1
cmp byte [esi + 4], 0
mov edi, dword [sym.imp.USER32.dll_GetClassNameW]
push ebx
mov ebx, 0x100
je 0x402e34
push ebx
lea eax, [ebp - 0x80c]
push eax
push dword [ebp + 8]
call edi
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x80c]
push ecx
push eax
call fcn.0044bbeb
test eax, eax
pop ecx
pop ecx
jne 0x402e31
mov dword [ebp - 8], 1
inc dword [ebp - 4]
cmp byte [esi + 7], 0
je 0x402e9f
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x80c]
push eax
push ebx
call edi
mov edi, dword [esi + 0x18]
lea eax, [ebp - 0x80c]
push eax
call fcn.0044bc79
push eax
lea eax, [ebp - 0x80c]
push eax
push edi
call fcn.0044bc44
add esp, 0x10
test eax, eax
jne 0x402e9a
inc dword [esi + 0x40]
push dword [esi + 0x40]
lea eax, [ebp - 0x80c]
push eax
push str._s_u
push eax
call fcn.0044bc8f
push dword [esi + 0x18]
lea eax, [ebp - 0x80c]
push eax
call fcn.0044bbeb
add esp, 0x18
test eax, eax
je 0x402efb
inc dword [ebp - 4]
jmp 0x402ea2
mov ebx, dword [ebp + 8]
cmp byte [esi + 6], 0
je 0x402ed4
push 0x400
lea eax, [ebp - 0x80c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [esi + 0x24]
lea ecx, [ebp - 0x80c]
push ecx
push eax
call fcn.0044bbeb
test eax, eax
pop ecx
pop ecx
je 0x402efb
inc dword [ebp - 4]
cmp byte [esi + 5], 0
je 0x402ef3
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jne 0x402ef0
inc dword [esi + 0x40]
mov eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x34]
jne 0x402ef0
inc dword [ebp - 8]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp dword [ebp - 8], eax
jne 0x402f02
mov dword [esi + 0x3c], ebx
xor eax, eax
jmp 0x402f05
xor eax, eax
inc eax
pop ebx
pop edi
leave
ret 4
Function at 0x402f0b
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
push esi
mov esi, eax
mov eax, dword [ebp + 8]
push 0x468050
call fcn.0040d98a
push 1
push ebx
call fcn.00403060
call dword [sym.imp.USER32.dll_GetFocus]
push 0
push 0
push ebx
mov dword [esi + 0x3c], eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_AttachThreadInput]
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x402fd0
push ebx
push eax
call fcn.0040303d
test eax, eax
je 0x402fd0
push edi
push dword [esi + 0x3c]
call fcn.00402969
push 0xff
lea eax, [ebp - 0x200]
push eax
push dword [esi + 0x3c]
mov dword [esi + 0x38], ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
lea eax, [ebp - 0x200]
lea edi, [esi + 0xc]
push eax
mov eax, edi
call fcn.0040d98a
and dword [esi + 0x40], 0
push esi
push 0x402fd7
push ebx
call dword [sym.imp.USER32.dll_EnumChildWindows]
push dword [esi + 0x40]
lea eax, [ebp - 0x200]
push dword [edi]
push str._s_d
push eax
call fcn.0044bc8f
add esp, 0x10
lea eax, [ebp - 0x200]
push eax
mov eax, dword [ebp + 8]
call fcn.0040d98a
mov al, 1
pop edi
jmp 0x402fd2
xor al, al
pop esi
leave
ret 4

Function at 0x403060
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
cmp byte [ebp + 0xc], 1
jne 0x40308b
lea eax, [ebp + 0xc]
push eax
push 0x1388
push 2
push 0
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
test eax, eax
je 0x4030a6
push 1
jmp 0x40308d
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_AttachThreadInput]
pop ebp
ret 8

Function at 0x4031b5
Capabilities:
Get graphical window text

Disassembly:
push ebx
mov ebx, eax
mov eax, dword [esp + 8]
push 0x468050
call fcn.0040d98a
mov eax, dword [ebx]
test eax, eax
jne 0x4031d2
xor al, al
pop ebx
ret 4
push ebp
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push edi
push 0
push 0
push 0xe
push eax
call ebp
mov esi, eax
test esi, esi
jne 0x4031ef
mov esi, 0x7fff
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044b6ac
pop ecx
mov edi, eax
push edi
inc esi
push esi
push 0xd
push dword [ebx]
call ebp
and word [edi + eax*2], 0
test eax, eax
jle 0x403235
mov eax, dword [esp + 0x14]
push edi
call fcn.0040d98a
mov bl, 1
push edi
call fcn.0044b716
pop ecx
pop edi
pop esi
mov al, bl
pop ebp
jmp 0x4031ce
xor bl, bl
jmp 0x403227
Function at 0x4038ec
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
and dword [ebp - 4], 0
and dword [ebp - 8], 0
cmp byte [edi + 0xb], 0
je 0x40390c
xor eax, eax
inc eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
cmp byte [edi + 9], 0
push esi
mov esi, 0x400
je 0x403945
push esi
lea eax, [ebp - 0x818]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClassNameW]
mov eax, dword [edi + 0x48]
lea ecx, [ebp - 0x818]
push ecx
push eax
call fcn.0044bbeb
test eax, eax
pop ecx
pop ecx
jne 0x403942
inc dword [ebp - 4]
inc dword [ebp - 8]
cmp byte [edi + 6], 0
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetWindowTextW]
je 0x4039db
push esi
lea eax, [ebp - 0x818]
push eax
push dword [ebp + 8]
call ebx
cmp byte [edi + 0xc], 0
jne 0x403984
lea eax, [ebp - 0x818]
push eax
call fcn.0044bc79
pop ecx
push eax
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.USER32.dll_CharUpperBuffW]
mov eax, dword [edi + 0x10]
dec eax
je 0x4039ba
dec eax
je 0x4039a3
dec eax
jne 0x4039d8
push dword [edi + 0x14]
lea eax, [ebp - 0x818]
push eax
call fcn.0044bbeb
pop ecx
pop ecx
jmp 0x4039d1
push dword [edi + 0x14]
lea eax, [ebp - 0x818]
push eax
call fcn.0044bebc
test eax, eax
pop ecx
pop ecx
je 0x4039d8
jmp 0x4039d5
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
push eax
lea eax, [ebp - 0x818]
push eax
push ecx
call fcn.0044bc44
add esp, 0xc
test eax, eax
jne 0x4039d8
inc dword [ebp - 4]
inc dword [ebp - 8]
cmp byte [edi + 7], 0
je 0x403a1d
push esi
lea eax, [ebp - 0x818]
push eax
push dword [ebp + 8]
call ebx
lea eax, [ebp - 0x818]
push eax
lea esi, [ebp - 0x14]
call fcn.0040d832
mov eax, esi
push eax
lea esi, [edi + 0x2c]
call fcn.00405427
push dword [ebp - 0x14]
mov bl, al
call fcn.0044b716
test bl, bl
pop ecx
je 0x403a1a
inc dword [ebp - 4]
inc dword [ebp - 8]
cmp byte [edi + 8], 0
pop ebx
je 0x403a40
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jne 0x403a3d
push dword [ebp + 8]
mov esi, edi
call fcn.00403a88
test al, al
je 0x403a3d
inc dword [ebp - 4]
inc dword [ebp - 8]
cmp byte [edi + 0xa], 0
je 0x403a5f
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jne 0x403a5c
inc dword [edi + 0x58]
mov eax, dword [edi + 0x58]
cmp eax, dword [edi + 0x54]
jne 0x403a5c
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jne 0x403a80
lea eax, [ebp + 8]
push eax
lea esi, [edi + 0x68]
call fcn.00406c81
inc dword [edi + 0x5c]
xor eax, eax
cmp byte [edi + 4], al
sete al
jmp 0x403a83
xor eax, eax
inc eax
pop esi
leave
ret 4
Function at 0x403ae6
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
push dword [esp + 0xc]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x403b00
cmp byte [ebx + 5], 1
jne 0x403b8b
push ebp
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0xe
push dword [esp + 0x1c]
call ebp
mov esi, eax
test esi, esi
jne 0x403b1e
mov esi, 0x7fff
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044b6ac
pop ecx
mov edi, eax
push edi
inc esi
push esi
push 0xd
push dword [esp + 0x1c]
call ebp
xor esi, esi
cmp eax, esi
mov word [edi + eax*2], si
pop ebp
jg 0x403b5a
inc esi
push edi
call fcn.0044b716
pop ecx
mov eax, esi
jmp 0x403b8e
cmp byte [ebx + 0xc], 0
jne 0x403b6f
push edi
call fcn.0044bc79
pop ecx
push eax
push edi
call dword [sym.imp.USER32.dll_CharUpperBuffW]
push dword [ebx + 0x20]
push edi
call fcn.0044bebc
test eax, eax
pop ecx
pop ecx
je 0x403b84
mov byte [ebx + 0x60], 1
jmp 0x403b4f
push edi
call fcn.0044b716
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
ret 4
Function at 0x4058e8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20630
call fcn.00450b00
push ebx
xor ebx, ebx
push esi
push edi
push 0x400
mov byte [0x488f98], bl
mov byte [0x488f99], bl
mov byte [0x488f9a], bl
mov dword [0x488f9c], ebx
mov dword [0x488fa0], ebx
mov dword [0x488fa4], ebx
mov dword [0x488fa8], ebx
mov dword [0x488fac], 0x468834
mov dword [0x488fb0], ebx
mov dword [0x488fb4], ebx
mov dword [0x488fb8], ebx
mov dword [0x488fbc], 0x468834
mov dword [0x488fc0], ebx
mov dword [0x488fc4], ebx
mov dword [0x488fc8], ebx
mov dword [0x488fd0], ebx
mov dword [0x488fd8], ebx
call fcn.0044b6ac
pop ecx
mov dword [0x488fcc], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push ebx
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.0044e200
push esi
lea eax, [ebp - 0x424]
push str.Include
push eax
call fcn.0044e24a
push ebx
push ebx
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.0044da7e
mov edi, 0x20a
push edi
call fcn.0044b6ac
mov ecx, dword [0x488fcc]
mov edx, dword [0x488fd0]
mov dword [ecx + edx*4], eax
mov ecx, dword [0x488fd0]
mov eax, dword [0x488fcc]
mov eax, dword [eax + ecx*4]
inc dword [0x488fd0]
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.0044b632
add esp, 0x40
lea eax, [ebp - 0xc]
push eax
push 0x20019
push ebx
push str.SoftwareAutoIt_v3AutoIt
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405b4f
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20630]
push eax
push ebx
push ebx
push str.Include
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x1fffe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405b46
shr dword [ebp - 4], 1
mov eax, dword [ebp - 4]
add eax, eax
mov word [ebp + eax - 0x20630], bx
mov word [ebp + eax - 0x2062e], bx
lea eax, [ebp - 0x20630]
mov word [ebp - 0x21c], bx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp ax, bx
mov word [ebp - 0x10], ax
mov word [ebp - 0xe], bx
je 0x405ab8
cmp ax, 0x3b
je 0x405ab8
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.0044b608
pop ecx
pop ecx
jmp 0x405b3d
lea eax, [ebp - 0x21c]
push eax
call fcn.0044bc79
test eax, eax
pop ecx
je 0x405af4
lea eax, [ebp - 0x21c]
push eax
call fcn.0044bc79
cmp word [ebp + eax*2 - 0x21e], 0x5c
pop ecx
je 0x405af4
lea eax, [ebp - 0x21c]
push 0x468460
push eax
call fcn.0044b608
pop ecx
pop ecx
push edi
call fcn.0044b6ac
mov ecx, dword [0x488fcc]
mov edx, dword [0x488fd0]
mov dword [ecx + edx*4], eax
mov ecx, dword [0x488fd0]
mov eax, dword [0x488fcc]
mov eax, dword [eax + ecx*4]
inc dword [0x488fd0]
push esi
lea ecx, [ebp - 0x21c]
push ecx
push eax
call fcn.0044da9c
mov eax, dword [ebp - 8]
add esp, 0x10
cmp word [eax], bx
mov word [ebp - 0x21c], bx
je 0x405b46
add dword [ebp - 8], 2
jmp 0x405a88
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, 0x488f98
pop ebx
leave
ret
Function at 0x406983
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
add ecx, eax
push ebx
push edi
mov edi, dword [ecx]
add eax, 4
mov dword [esi], eax
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044b6ac
mov ecx, dword [esi]
add ecx, dword [ebp + 8]
lea ebx, [edi + edi]
push ebx
push ecx
push eax
mov dword [ebp - 4], eax
call fcn.0044dc10
mov eax, dword [ebp - 4]
add dword [esi], ebx
xor ecx, ecx
add esp, 0x10
cmp edi, ecx
mov word [ebx + eax], cx
jle 0x4069dc
xor word [eax + ecx*2], di
inc ecx
cmp ecx, edi
jl 0x4069d3
pop edi
pop ebx
leave
ret 4

Function at 0x407755
Capabilities:
Get keyboard layout
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_MapVirtualKeyW]
push edi
push 5
pop eax
mov dword [0x487120], eax
mov dword [0x487124], eax
mov al, byte [0x487339]
xor ebx, ebx
neg al
push ebx
push 0x5b
mov dword [0x487364], ebx
mov byte [0x487128], 1
mov byte [0x487129], bl
sbb eax, eax
and eax, 0xffffff70
add eax, 0xa0
mov dword [0x487374], eax
call esi
push ebx
push 0x10
mov byte [0x487371], al
call esi
push ebx
push dword [0x487374]
mov byte [0x48736e], al
call esi
push ebx
push 0xa1
mov byte [0x48736f], al
call esi
push ebx
push 0x11
mov byte [0x487370], al
call esi
push ebx
push 0x12
mov byte [0x48736c], al
call esi
mov byte [0x48736d], al
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameA]
xor edi, edi
inc edi
lea esi, [edi + 0x473e28]
movzx eax, byte [esi]
push eax
call dword [sym.imp.USER32.dll_VkKeyScanA]
cmp ax, 0xffff
jne 0x407807
mov byte [esi], 0x20
inc edi
cmp edi, 7
jle 0x4077ee
lea eax, [ebp - 8]
push str.0409
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
pop edi
pop esi
pop ebx
jne 0x40784f
push 4
lea eax, [ebp - 0xc]
push str.0002
push eax
call fcn.0044e438
add esp, 0xc
test eax, eax
mov byte [0x473e2a], 0x20
mov byte [0x473e2d], 0x20
je 0x4078e1
jmp 0x4078cc
lea eax, [ebp - 8]
push str.0809
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
jne 0x40786c
mov byte [0x473e2a], 0x20
jmp 0x4078c5
lea eax, [ebp - 6]
push 0x468be0
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
jne 0x407889
mov byte [0x473e2d], 0x20
jmp 0x4078da
lea eax, [ebp - 6]
push 0x468be4
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
je 0x407863
lea eax, [ebp - 6]
push 0x468be8
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
je 0x4078da
lea eax, [ebp - 6]
push 0x468bec
push eax
call fcn.0044e3b0
test eax, eax
pop ecx
pop ecx
jne 0x4078e1
mov byte [0x473e2d], 0x20
mov byte [str.__lF], 0x20
mov byte [0x473e2b], 0x20
mov byte [0x473e2c], 0x20
leave
ret
Function at 0x407ad4
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
xor edi, edi
cmp ebx, edi
jne 0x407aee
mov eax, dword [ebp + 8]
cmp byte [eax + 9], 0
je 0x407bc4
push esi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp byte [ebp + 0xc], 0
mov dword [ebp - 4], eax
je 0x407b8f
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call edi
mov esi, dword [sym.imp.USER32.dll_AttachThreadInput]
push 1
push eax
push dword [ebp - 4]
mov dword [0x48b454], eax
call esi
test ebx, ebx
mov dword [ebp + 0xc], eax
je 0x407b61
lea eax, [ebp - 0xc]
push eax
push ebx
call edi
mov ecx, dword [0x48b454]
cmp ecx, eax
mov dword [0x48b450], eax
je 0x407b56
push 1
push eax
push ecx
call esi
mov dword [ebp - 8], eax
mov eax, dword [0x48b450]
push 1
push eax
push dword [ebp - 4]
call esi
mov dword [ebp - 0xc], eax
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
jne 0x407bc3
cmp dword [ebp - 8], ecx
jne 0x407bc3
cmp dword [ebp - 0xc], ecx
jne 0x407bc3
mov eax, dword [0x48b454]
cmp dword [ebp - 4], eax
jne 0x407bc3
cmp eax, dword [0x48b450]
jne 0x407bc3
mov eax, dword [ebp + 8]
mov dword [eax + 0x248], ecx
jmp 0x407bc3
cmp ebx, edi
mov esi, dword [sym.imp.USER32.dll_AttachThreadInput]
je 0x407bb7
push edi
push dword [0x48b450]
push eax
call esi
mov ecx, dword [0x48b454]
mov eax, dword [0x48b450]
cmp ecx, eax
je 0x407bb7
push edi
push eax
push ecx
call esi
push edi
push dword [0x48b454]
push dword [ebp - 4]
call esi
pop esi
pop edi
leave
ret 8

Function at 0x407c3a
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetKeyState]
and al, 1
cmp byte [ebp + 0xc], al
mov byte [ebp - 1], al
je 0x407c98
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
push eax
push dword [ebp + 8]
xor ebx, ebx
mov eax, esi
call fcn.00407bc9
mov edi, dword [esi + 4]
push esi
call fcn.00408db0
push ebx
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
push eax
push dword [ebp + 8]
mov eax, esi
push 2
pop ebx
call fcn.00407bc9
mov edi, dword [esi]
push esi
call fcn.00408db0
mov al, byte [ebp - 1]
pop edi
pop ebx
leave
ret 8
Function at 0x407de3
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x108
push ebx
push ebp
mov ebp, 0x200
test ebp, eax
push edi
je 0x407dfc
or dword [esi + 0x244], 8
test ax, 0x400
je 0x407e09
or dword [esi + 0x244], 1
mov edi, 0x100
test edi, eax
je 0x407e19
or dword [esi + 0x244], 2
mov eax, dword [esi + 0x244]
test al, 8
mov ebx, 0x800
je 0x407e35
test ebx, eax
je 0x407e35
xor eax, 8
mov dword [esi + 0x244], eax
mov eax, dword [esi + 0x244]
test al, 1
je 0x407e4c
test edi, eax
je 0x407e4c
xor eax, 1
mov dword [esi + 0x244], eax
mov eax, dword [esi + 0x244]
test al, 2
je 0x407e63
test ebp, eax
je 0x407e63
xor eax, 2
mov dword [esi + 0x244], eax
mov eax, dword [esi + 0x244]
test al, 0x10
je 0x407e7c
test ax, 0x1000
je 0x407e7c
xor eax, 0x10
mov dword [esi + 0x244], eax
cmp dword [esi + 0x248], 0
je 0x407ed7
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov eax, dword [esi + 0x244]
test ebx, eax
jne 0x407e9f
mov byte [esp + 0x21], 0
test edi, eax
jne 0x407ea8
mov byte [esp + 0x22], 0
test ebp, eax
jne 0x407ebc
mov ecx, dword [esi + 0x254]
mov byte [esp + 0x20], 0
mov byte [esp + ecx + 0x10], 0
test ax, 0x1000
jne 0x407ec7
mov byte [esp + 0x6b], 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
jmp 0x407fcd
mov ebp, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call ebp
mov edi, 0x8000
test di, ax
jne 0x407ef8
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test di, ax
je 0x407f0c
test dword [esi + 0x244], ebx
jne 0x407f0c
push 0
push 0x11
pop eax
mov ecx, esi
call fcn.0040880f
push 0x12
call ebp
test di, ax
jne 0x407f22
push 0x12
call dword [sym.imp.USER32.dll_GetKeyState]
test di, ax
je 0x407f39
test word [esi + 0x244], 0x100
jne 0x407f39
push 0
push 0x12
pop eax
mov ecx, esi
call fcn.0040880f
push dword [esi + 0x254]
call ebp
test di, ax
jne 0x407f57
push dword [esi + 0x254]
call dword [sym.imp.USER32.dll_GetKeyState]
test di, ax
je 0x407f71
test word [esi + 0x244], 0x200
jne 0x407f71
mov eax, dword [esi + 0x254]
push 0
mov ecx, esi
call fcn.0040880f
mov ebx, 0xa1
push ebx
call ebp
test di, ax
jne 0x407f8a
push ebx
call dword [sym.imp.USER32.dll_GetKeyState]
test di, ax
je 0x407fa0
test word [esi + 0x244], 0x400
jne 0x407fa0
push 0
mov eax, ebx
mov ecx, esi
call fcn.0040880f
push 0x5b
call ebp
test di, ax
jne 0x407fb6
push 0x5b
call dword [sym.imp.USER32.dll_GetKeyState]
test di, ax
je 0x407fcd
test word [esi + 0x244], 0x1000
jne 0x407fcd
push 0
push 0x5b
pop eax
mov ecx, esi
call fcn.0040880f
pop edi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x407fd7
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x104
and dword [esp], 0
push ebx
mov ebx, dword [esp + 0x10c]
cmp dword [ebx + 0x248], 0
je 0x408090
lea eax, [esp + 8]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov al, 0x80
cmp byte [esp + 0x19], al
jne 0x40801c
test word [ebx + 0x244], 0x800
jne 0x40801c
mov dword [esp + 4], 8
cmp byte [esp + 0x1a], al
jne 0x408032
test word [ebx + 0x244], 0x100
jne 0x408032
or dword [esp + 4], 1
mov ecx, dword [ebx + 0x254]
cmp byte [esp + ecx + 8], al
je 0x408044
cmp byte [esp + 0x18], al
jne 0x408054
test word [ebx + 0x244], 0x200
jne 0x408054
or dword [esp + 4], 2
cmp byte [esp + 0xa9], al
jne 0x40806d
test word [ebx + 0x244], 0x400
jne 0x40806d
or dword [esp + 4], 4
cmp byte [esp + 0x63], al
jne 0x408172
test word [ebx + 0x244], 0x1000
jne 0x408172
or dword [esp + 4], 0x10
jmp 0x408172
push ebp
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call edi
mov ebp, dword [sym.imp.USER32.dll_GetKeyState]
mov esi, 0x8000
test si, ax
jne 0x4080b6
push 0x11
call ebp
test si, ax
je 0x4080c9
test word [ebx + 0x244], 0x800
jne 0x4080c9
mov dword [esp + 0x10], 8
push 0x12
call edi
test si, ax
jne 0x4080db
push 0x12
call ebp
test si, ax
je 0x4080eb
test word [ebx + 0x244], 0x100
jne 0x4080eb
or dword [esp + 0x10], 1
add ebx, 0x254
push dword [ebx]
call edi
test si, ax
jne 0x408103
push dword [ebx]
call ebp
test si, ax
je 0x40811a
mov eax, dword [esp + 0x118]
test word [eax + 0x244], 0x200
jne 0x40811a
or dword [esp + 0x10], 2
mov ebx, 0xa1
push ebx
call edi
test si, ax
jne 0x40812f
push ebx
call ebp
test si, ax
je 0x408146
mov eax, dword [esp + 0x118]
test word [eax + 0x244], 0x400
jne 0x408146
or dword [esp + 0x10], 4
push 0x5b
call edi
test si, ax
jne 0x408158
push 0x5b
call ebp
test si, ax
je 0x40816f
mov eax, dword [esp + 0x118]
test word [eax + 0x244], 0x1000
jne 0x40816f
or dword [esp + 0x10], 0x10
pop edi
pop esi
pop ebp
mov eax, dword [esp + 4]
pop ebx
add esp, 0x104
ret 4