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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
xor al, al
cmp dword [0x4c8668], 0
push esi
push edi
mov byte [esp + 0x1e], al
je 0x408b14
mov byte [esp + 0x1e], 1
mov al, byte [esp + 0x1e]
cmp dword [0x4c866c], 0
je 0x408b23
or al, 2
mov byte [esp + 0x1e], al
cmp byte [ebp + 8], al
je 0x408d30
test al, al
jne 0x408b66
cmp byte [ebp + 0xc], al
jne 0x408b66
push 0x4c7420
push 0
push 0
push 0x408e00
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4c8f64], eax
test eax, eax
je 0x408bf7
push 0xf
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
movzx ebx, byte [ebp + 8]
xor eax, eax
xor esi, esi
cmp byte [ebp + 0xc], al
sete al
mov edi, eax
mov ecx, dword [0x4c7420]
push edi
push ebx
push 0x417
push ecx
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x408b9c
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x32
jl 0x408b76
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [esp + 0x1f], 0
call edi
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov ebx, eax
cmp byte [ebp + 8], 0
je 0x408c03
push 1
push 0x417
push 0x417
push 0
lea edx, [esp + 0x34]
push edx
call esi
test eax, eax
je 0x408c6a
cmp dword [esp + 0x2c], 0
je 0x408c12
mov byte [esp + 0x1f], 1
call fcn.00409170
test al, al
jne 0x408c12
cmp byte [ebp + 0xc], al
jne 0x408cfe
mov byte [ebp + 8], al
jmp 0x408bb1
call fcn.00409190
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0xc], 0
je 0x408c4e
call fcn.00409170
test al, al
jne 0x408c6a
cmp byte [ebp + 0xc], 0
jne 0x408cf7
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4c8668], 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
je 0x408ca2
test byte [esp + 0x1e], 1
jne 0x408cbb
push str.AHK_Keybd
push 0
push 0
call esi
mov dword [0x4c8f5c], eax
jmp 0x408cbb
mov ecx, dword [0x4c8f64]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x20], 0x103
jne 0x408c82
call edi
sub eax, ebx
cmp eax, 0x1f4
ja 0x408c12
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x408bb1
mov edx, dword [0x4c8f64]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov dword [0x4c8f64], 0
call fcn.00409190
jmp 0x408c22
test byte [esp + 0x1e], 1
je 0x408cbb
mov eax, dword [0x4c8f5c]
push eax
call edi
mov dword [0x4c8f5c], 0
cmp dword [0x4c866c], 0
je 0x408cdd
test byte [esp + 0x1e], 2
jne 0x408cf7
push str.AHK_Mouse
push 0
push 0
call esi
mov dword [0x4c8f60], eax
jmp 0x408cf7
test byte [esp + 0x1e], 2
je 0x408cf7
mov ecx, dword [0x4c8f60]
push ecx
call edi
mov dword [0x4c8f60], 0
cmp byte [esp + 0x1f], 0
je 0x408d30
fldz
sub esp, 8
fstp qword [esp]
mov dword [0x4c491c], 0
push 0
push 0
push 0x10000
push str.Warning:_The_keyboard_and_or_mouse_hook_could_not_be_activated__some_parts_of_the_script_will_not_function.
call fcn.00479350
add esp, 0x18
mov dword [0x4c491c], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a830
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov eax, 0x100c
call fcn.004996b0
cmp byte [0x4ca40c], 0
push ebx
push ebp
mov ebp, dword [esp + 0x101c]
push esi
push edi
jne 0x40a9a3
cmp dword [0x4c8f7c], 0
jne 0x40a866
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x4c8f7c], eax
mov ebx, 1
add dword [0x4ca410], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [0x4ca410]
mov esi, dword [0x4c4930]
mov ecx, eax
sub ecx, dword [0x4c8f7c]
mov dword [0x4c8f80], eax
cmp edx, dword [0x4c492c]
jbe 0x40a89c
cmp ecx, esi
jb 0x40a900
xor edx, edx
cmp ecx, esi
jbe 0x40a8b9
mov dword [0x4ca410], 0
mov dword [0x4c8f7c], eax
test edx, edx
jne 0x40a9a3
mov esi, dword [esp + 0x1020]
mov cl, byte [esi + 0xf]
push 0
mov byte [0x4ca1da], cl
mov ecx, dword [ebp]
add byte [ebp + 0x16], bl
push 0
push 0x4a18cc
push ecx
xor eax, eax
xor edx, edx
call fcn.0046cb10
dec byte [ebp + 0x16]
add esp, 0x10
test eax, eax
jne 0x40a971
mov byte [ebp + 0x1b], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret 8
push ecx
push edx
push str._u_hotkeys_have_been_received_in_the_last__ums._n_nDo_you_want_to_continue__n_see_MaxHotkeysPerInterval_in_the_help_file_
mov esi, 0x800
lea edi, [esp + 0x24]
call fcn.00474930
add esp, 0xc
call fcn.004097d0
fldz
sub esp, 8
fstp qword [esp]
push 0
push 0
mov eax, edi
push 4
push eax
mov byte [0x4ca40c], bl
mov dword [0x4c491c], 0
call fcn.00479350
add esp, 0x18
cmp eax, 7
jne 0x40a958
push 0
push ebx
push 0x4c9718
call fcn.00416950
mov eax, dword [0x4c8f80]
mov dword [0x4c491c], ebx
mov byte [0x4ca40c], 0
mov edx, ebx
jmp 0x40a8a2
cmp byte [ebp + 0x1b], 0
je 0x40a9a3
mov byte [ebp + 0x1b], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp + 0xc]
cmp eax, 0x3e8
ja 0x40a9a3
movzx edx, word [esi + 4]
mov eax, dword [0x4c8538]
push 0
push edx
push 0x312
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100c
ret 8
Function at 0x40f650
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x40
cmp dword [0x4c9008], 2
push ebx
push ebp
push esi
sete bl
push edi
mov esi, ecx
test bl, bl
je 0x40f695
movzx eax, ax
lea ecx, [esp + 0x30]
test eax, 0xffffff80
je 0x40f683
mov ecx, 0x30
mov word [esp + 0x30], cx
lea ecx, [esp + 0x32]
push 0xa
push ecx
push eax
call fcn.0048dc35
mov edi, dword [esp + 0x1c]
add esp, 0xc
jmp 0x40f698
movzx edi, ax
test esi, esi
jle 0x40f749
mov ebp, esi
cmp dword [0x4c9008], 0
jne 0x40f705
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x4ca20c]
mov edx, dword [0x4c4a14]
cmp eax, dword [edx + 0xd8]
jbe 0x40f705
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 0x40f6fe
push 1
push 0xffffffffffffffff
mov dword [0x4c491c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c491c], 1
call esi
mov dword [0x4ca20c], eax
test bl, bl
je 0x40f714
lea eax, [esp + 0x30]
call fcn.0040f760
jmp 0x40f721
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0040ddb0
add esp, 4
cmp dword [0x4c9008], 2
jne 0x40f735
mov edx, dword [0x4c4a14]
mov esi, dword [edx + 0x60]
jmp 0x40f73d
mov eax, dword [0x4c4a14]
mov esi, dword [eax + 0x5c]
call fcn.004116a0
dec ebp
jne 0x40f6a2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret

Function at 0x40f760
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 8
cmp dword [0x4c9008], 0
push ebx
push esi
push edi
mov esi, eax
je 0x40f77b
mov al, byte [0x4c7456]
jmp 0x40f86e
cmp dword [0x4c8668], 0
je 0x40f78e
mov al, byte [0x4c8535]
jmp 0x40f86e
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
xor bl, bl
call edi
mov ecx, 0x8000
test cx, ax
je 0x40f7a9
mov bl, 0x10
push 0xa1
call edi
mov edx, 0x8000
test dx, ax
je 0x40f7bd
or bl, 0x20
push 0xa2
call edi
mov ecx, 0x8000
test cx, ax
je 0x40f7d1
or bl, 1
push 0xa3
call edi
mov edx, 0x8000
test dx, ax
je 0x40f7e5
or bl, 2
push 0xa4
call edi
mov ecx, 0x8000
test cx, ax
je 0x40f7f9
or bl, 4
push 0xa5
call edi
mov edx, 0x8000
test dx, ax
je 0x40f80d
or bl, 8
push 0x5b
call edi
mov ecx, 0x8000
test cx, ax
je 0x40f81e
or bl, 0x40
push 0x5c
call edi
mov edx, 0x8000
test dx, ax
je 0x40f82f
or bl, 0x80
cmp dword [0x4c8668], 0
je 0x40f86c
mov al, bl
not al
and al, byte [0x4c8535]
je 0x40f86c
mov cl, byte [0x4c8537]
not al
and byte [0x4c8535], al
and byte [0x4c8536], al
and cl, al
mov al, cl
mov byte [0x4c8537], cl
mov ecx, 0x4c8558
call fcn.00412200
mov al, bl
mov byte [esp + 0x10], al
mov ecx, dword [esp + 0x10]
push 1
and al, 0xc4
push 0
or al, 4
movzx edx, al
push 0
push ecx
push edx
mov eax, 0xffc3d44f
call fcn.00411a90
movzx eax, word [esi]
add esp, 0x14
cmp eax, 0x30
jb 0x40f8cf
lea ebx, [ebx]
cmp ax, 0x39
ja 0x40f8cf
mov al, byte [esi]
push 0xffc3d44d
push 0
add al, 0x30
push 0
movzx ecx, al
push 0
push ecx
push 2
call fcn.0040fb60
movzx eax, word [esi + 2]
add esi, 2
add esp, 0x18
cmp eax, 0x30
jae 0x40f8a0
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 1
call fcn.0040fb60
add esp, 0x18
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x410f30
Capabilities:
Check for unmoving mouse cursor

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, eax
mov eax, dword [esi]
push edi
cmp eax, 0x80000000
je 0x411111
mov edi, dword [ebp]
cmp edi, 0x80000000
je 0x411111
mov edx, dword [0x4c9008]
cmp edx, 2
jne 0x410fa5
movzx ebx, byte [esp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0x80000000
push 0
or ebx, 1
call fcn.004112f0
add esp, 4
call fcn.00411770
cmp byte [esp + 0x24], 0
je 0x411111
mov dword [esi], SysReAllocString
mov dword [ebp], SysReAllocString
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
or dword [ecx], 0x8001
cmp byte [esp + 0x24], 0
je 0x410ffa
cmp edx, 1
jne 0x410fe0
cmp dword [0x4c7458], 0x80000000
jne 0x410fce
push 0x4c7458
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [0x4c7458]
add dword [esi], eax
mov ecx, dword [0x4c745c]
add dword [ebp], ecx
jmp 0x41101f
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
add dword [esi], eax
add dword [ebp], ecx
jmp 0x41101f
mov edx, dword [0x4c4a14]
movzx eax, word [edx + 0xf0]
shr eax, 2
and eax, 3
cmp eax, 2
je 0x41101f
push eax
mov edi, ebp
mov ebx, esi
call fcn.00475cd0
add esp, 4
cmp dword [0x4c9008], 1
jne 0x411038
mov eax, dword [esi]
mov dword [0x4c7458], eax
mov ecx, dword [ebp]
mov dword [0x4c745c], ecx
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call ebx
push 1
mov edi, eax
call ebx
mov ecx, dword [esi]
mov ebx, eax
mov eax, ecx
shl eax, 0x10
cdq
idiv edi
xor edx, edx
test ecx, ecx
setns dl
lea eax, [eax + edx*2 - 1]
mov dword [esi], eax
mov ecx, dword [ebp]
mov eax, ecx
shl eax, 0x10
cdq
idiv ebx
xor edx, edx
test ecx, ecx
setns dl
lea edx, [edx + edx - 1]
add edx, eax
mov eax, dword [esp + 0x20]
mov dword [ebp], edx
test eax, eax
js 0x4110fb
cmp eax, 0x64
jle 0x411093
mov dword [esp + 0x20], 0x64
jmp 0x411097
test eax, eax
je 0x4110fb
cmp dword [0x4c9008], 1
je 0x4110fb
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp]
mov eax, dword [esi]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
mov eax, ecx
shl eax, 0x10
cdq
idiv ebx
mov esi, dword [esp + 0x1c]
xor edx, edx
test ecx, ecx
setns dl
mov ebx, eax
lea ebx, [ebx + edx*2 - 1]
mov eax, esi
shl eax, 0x10
cdq
idiv edi
mov ecx, eax
xor eax, eax
test esi, esi
setns al
lea ecx, [ecx + eax*2 - 1]
mov eax, ebx
call fcn.004546f0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esi]
push 0x8001
xor ecx, ecx
call fcn.00411120
add esp, 4
call fcn.00411770
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x411550
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
sub esp, 8
cmp dword [0x4c9008], 1
push ebx
jne 0x411617
xor bl, bl
cmp dword [0x4c8668], 0
mov byte [esp + 8], bl
je 0x411576
mov bl, 1
mov byte [esp + 8], bl
cmp dword [0x4c866c], 0
je 0x411586
or bl, 2
mov byte [esp + 8], bl
test bl, bl
je 0x4115a1
mov al, byte [0x4c7455]
not al
and al, bl
movzx ecx, al
push 1
push ecx
call fcn.00408af0
add esp, 8
mov edx, dword [0x4c746c]
mov eax, dword [0x4c7468]
push 0x1c
push edx
push eax
call dword [0x4ca3e8]
test bl, bl
je 0x411695
mov cl, byte [0x4c7455]
and cl, bl
test cl, 1
je 0x4115fe
push 1
call fcn.00412100
mov dl, byte [esp + 0x18]
mov cl, al
xor cl, dl
mov bl, cl
and bl, dl
not bl
and bl, byte [0x4c8537]
and cl, al
or bl, cl
add esp, 4
mov byte [0x4c8537], bl
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [0x4c7280], eax
mov edx, dword [esp + 8]
pop ebx
add esp, 8
mov dword [esp + 8], 1
mov dword [esp + 4], edx
jmp fcn.00408af0
mov eax, dword [0x4c8530]
push 0
push eax
push 0x40f8f0
push 1
mov dword [0x4c7460], 0
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x4c8670], eax
test eax, eax
je 0x411695
mov byte [0x4c8658], 1
push 1
push 0x8000012f
mov dword [0x4c491c], 0
call fcn.004013d0
add esp, 8
cmp dword [0x4c8670], 0
mov dword [0x4c491c], 1
jne 0x411646
mov eax, dword [0x4c746c]
mov ecx, dword [0x4c7468]
cmp dword [eax + ecx*8 - 8], 0
mov byte [0x4c8658], 0
jne 0x411695
mov ecx, dword [eax + ecx*8 - 4]
mov edx, dword [esp + 0x10]
mov dword [edx], ecx
pop ebx
add esp, 8
ret

Function at 0x411860
Capabilities:
Get graphical window text

Disassembly:
push ecx
mov eax, dword [0x4c8f4c]
test eax, eax
je 0x411978
mov ecx, dword [0x4c8f50]
imul ecx, ecx, 0xd4
add eax, ecx
mov cl, byte [esp + 8]
mov byte [eax + 6], dl
mov dx, word [esp + 0xc]
mov byte [eax], cl
mov ecx, 0x69
mov word [eax + 2], dx
push esi
mov word [eax + 4], cx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, eax
sub edx, dword [0x4ca26c]
mov dword [0x4c8f54], eax
mov dword [esp + 4], edx
fild dword [esp + 4]
jns 0x4118bb
fadd dword [0x4bea70]
fdiv qword [0x4bea68]
mov ecx, dword [0x4c8f50]
mov edx, dword [0x4c8f4c]
mov dword [0x4ca26c], eax
imul ecx, ecx, 0xd4
fstp dword [esp + 4]
fld dword [esp + 4]
fstp dword [ecx + edx + 8]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
test esi, esi
je 0x411928
mov eax, dword [0x4c8f50]
imul eax, eax, 0xd4
cmp esi, dword [0x4c8f58]
je 0x411919
mov ecx, dword [0x4c8f4c]
push 0x64
lea edx, [eax + ecx + 0xc]
push edx
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x411954
mov edx, dword [0x4c8f4c]
xor ecx, ecx
mov word [eax + edx + 0xc], cx
jmp 0x411954
mov ecx, dword [0x4c8f50]
mov edx, dword [0x4c8f4c]
imul ecx, ecx, 0xd4
mov eax, 0x4a38e0
lea edx, [ecx + edx + 0xc]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x411945
mov eax, dword [0x4c8f50]
inc eax
mov dword [0x4c8f58], esi
mov dword [0x4c8f50], eax
pop esi
cmp eax, dword [0x4c4920]
jl 0x411978
mov dword [0x4c8f50], 0
pop ecx
ret
Function at 0x411980
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
movzx edi, bl
push edi
call dword [sym.imp.USER32.dll_GetKeyState]
and al, 1
movsx esi, al
neg esi
sbb esi, esi
add esi, 2
cmp ebp, 1
je 0x4119ac
cmp ebp, 2
jne 0x411a82
cmp esi, ebp
je 0x411a82
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
call edi
mov ecx, 0x8000
test cx, ax
je 0x4119dd
push 0xffc3d44d
push 0
push 0
push 0
push ebx
push 1
call fcn.0040fb60
add esp, 0x18
push 0xffc3d44d
push 0
push 0
push 0
push ebx
push 2
call fcn.0040fb60
add esp, 0x18
push 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4c96c0]
sete al
mov byte [esp + 0x14], al
test al, al
je 0x411a33
push 1
push 0xffffffffffffffff
mov dword [0x4c491c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c491c], 1
cmp bl, 0x14
jne 0x411a82
cmp ebp, 2
jne 0x411a82
push 0x14
call edi
test al, 1
je 0x411a82
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push ebp
call fcn.0040fb60
add esp, 0x18
cmp byte [esp + 0x14], 0
je 0x411a82
push 1
push 0xffffffffffffffff
mov dword [0x4c491c], 0
call fcn.004013d0
add esp, 8
mov dword [0x4c491c], 1
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret

Function at 0x412100
Capabilities:
Log keystrokes via polling

Disassembly:
cmp dword [0x4c8668], 0
je 0x412116
cmp byte [esp + 4], 0
jne 0x412116
mov al, byte [0x4c8535]
ret
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
xor bl, bl
call esi
mov ecx, 0x8000
test cx, ax
je 0x412133
mov bl, 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x412147
or bl, 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x41215b
or bl, 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x41216f
or bl, 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x412183
or bl, 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x412197
or bl, 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x4121a8
or bl, 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x4121b9
or bl, 0x80
cmp dword [0x4c8668], 0
je 0x4121f6
mov al, bl
not al
and al, byte [0x4c8535]
je 0x4121f6
mov cl, byte [0x4c8537]
not al
and byte [0x4c8535], al
and byte [0x4c8536], al
and cl, al
mov al, cl
mov byte [0x4c8537], cl
mov ecx, 0x4c8558
call fcn.00412200
pop esi
mov al, bl
pop ebx
ret

Function at 0x412690
Capabilities:
Get keyboard layout

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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x284
push ebx
push ebp
xor ebp, ebp
push ebp
push eax
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov ebx, eax
test ebx, ebx
je 0x41278f
xor eax, eax
jmp 0x412710
movzx ecx, word [eax + str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
mov word [esp + eax + 0xc], cx
add eax, 2
test cx, cx
jne 0x412710
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x41277d
lea edx, [esp + 8]
push edx
push 1
push 0
lea eax, [esp + 0x18]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41277d
push esi
push edi
lea edi, [esp + 0x10]
lea esi, [esp + 0x8c]
mov ecx, str.Layout_File
call fcn.00475e40
pop edi
pop esi
test eax, eax
je 0x41277d
lea ecx, [esp + 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
cmp dword [esp + 0x290], ebx
je 0x41278f
push 0
push ebx
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov eax, ebp
pop ebp
pop ebx
add esp, 0x284
ret

Function at 0x412960
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x114
push ebx
push edi
push 0
mov bl, al
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edi, eax
lea eax, [ebx - 0x41]
cmp al, 0x19
ja 0x412a4f
push ebp
push esi
push 0x100
lea ecx, [esp + 0x28]
push 0
push ecx
call fcn.00496d90
mov ebp, dword [sym.imp.USER32.dll_ToUnicodeEx]
add esp, 0xc
push edi
xor esi, esi
push esi
push 2
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
push esi
push 0x6e
call ebp
cmp eax, 2
jne 0x4129ba
movzx esi, word [esp + 0x14]
push edi
push 0
push 2
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
movzx eax, bl
push 0
push eax
call ebp
mov dword [esp + 0x1c], eax
test eax, eax
jns 0x4129ee
push edi
push 0
push 2
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
push 0
push 0x6e
call ebp
test si, si
je 0x412a2d
push 1
lea eax, [esp + 0x17]
push edi
push eax
call fcn.00412c10
mov bl, al
add esp, 0xc
test bl, bl
je 0x412a2d
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x24]
call fcn.00412200
push edi
push 0
push 2
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
movzx eax, bl
push 0
push eax
call ebp
cmp dword [esp + 0x1c], 0
pop esi
pop ebp
je 0x412a44
movzx eax, word [esp + 0xc]
pop edi
pop ebx
add esp, 0x114
ret
pop edi
xor eax, eax
pop ebx
add esp, 0x114
ret
push edi
movzx ecx, bl
push 2
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
pop edi
pop ebx
add esp, 0x114
ret
Function at 0x412c10
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, dword [esp + 8]
cmp si, 0xa
jne 0x412c1f
mov al, 0xd
pop ebp
ret
mov eax, dword [esp + 0xc]
push ebx
push edi
push eax
push esi
call dword [sym.imp.USER32.dll_VkKeyScanExW]
movzx ecx, ax
mov eax, ecx
shr eax, 8
mov bl, cl
cmp al, 0xff
jne 0x412c7d
cmp cl, 0xff
jne 0x412c7d
cmp byte [esp + 0x18], 0
je 0x412c81
movzx edi, si
test edi, 0xffffff80
jne 0x412c81
push 0x103
push edi
call fcn.0048f13e
add esp, 8
test eax, eax
je 0x412c81
mov eax, esi
call fcn.004094f0
push 1
push edi
mov bl, al
call fcn.0048f13e
add esp, 8
test eax, eax
setne al
test al, 0x38
je 0x412c87
pop edi
pop ebx
xor al, al
pop ebp
ret
test ebp, ebp
je 0x412ccf
mov cl, al
and cl, 6
cmp cl, 6
jne 0x412c9b
or byte [ebp], 8
jmp 0x412cbf
test al, 2
je 0x412cad
mov cl, byte [ebp]
test cl, 3
jne 0x412cad
or cl, 1
mov byte [ebp], cl
test al, 4
je 0x412cbf
mov cl, byte [ebp]
test cl, 0xc
jne 0x412cbf
or cl, 4
mov byte [ebp], cl
test al, 1
je 0x412ccf
mov al, byte [ebp]
test al, 0x30
jne 0x412ccf
or al, 0x10
mov byte [ebp], al
pop edi
mov al, bl
pop ebx
pop ebp
ret

Function at 0x4133c0
Capabilities:
Log keystrokes

Disassembly:
movzx ecx, bx
mov eax, ecx
cmp eax, 0x11c
jg 0x41341d
je 0x41341a
sub eax, 0x1d
cmp eax, 0x36
ja case.0x41342e.286
movzx eax, byte [eax + 0x4134c8]
jmp dword [eax*4 + 0x41347c]
mov al, 0xa0
ret
mov al, 0xa2
ret
mov al, 0xa4
ret
mov al, 0x6a
ret
mov al, 0x6d
ret
mov al, 0x6b
ret
mov al, 0x2e
ret
mov al, 0xc
ret
mov al, 0x2d
ret
mov al, 0x26
ret
mov al, 0x28
ret
mov al, 0x25
ret
mov al, 0x27
ret
mov al, 0x24
ret
mov al, 0x23
ret
mov al, 0x21
ret
mov al, 0x22
ret
mov al, 0x13
ret
mov al, 0xd
ret
sub eax, 0x11d
cmp eax, 0x40
ja case.0x41342e.286
movzx edx, byte [eax + 0x413528]
jmp dword [edx*4 + 0x413500]
mov al, 0xa1
ret
mov al, 0xa3
ret
mov al, 0xa5
ret
mov al, 0x5b
ret
mov al, 0x5c
ret
mov al, 0x90
ret
mov al, 0x6f
ret
mov al, 0x5d
ret
mov al, 0x2c
ret
push esi
mov esi, dword [sym.imp.USER32.dll_MapVirtualKeyW]
test ebx, 0x100
je 0x413470
movzx eax, cl
push 1
or eax, 0xe000
push eax
call esi
test eax, eax
jne 0x413478
movzx ecx, bl
push 1
push ecx
call esi
pop esi
ret

Function at 0x413570
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov dword [0x4c7480], eax
mov edx, 1
mov eax, 0x4c7480
push edi
mov ecx, dword [eax]
mov edi, ecx
shr edi, 0x1e
xor edi, ecx
imul edi, edi, 0x6c078965
add edi, edx
mov dword [eax + 4], edi
add eax, 4
inc edx
cmp eax, 0x4c7e3c
jl 0x413580
mov dword [0x4c4908], 1
mov dword [0x4c900c], 1
pop edi
ret
Function at 0x4135c0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
cmp dword [0x4c900c], 0
push esi
mov esi, 0x4c7480
jne 0x4135da
call dword [sym.imp.KERNEL32.dll_GetTickCount]
call fcn.00413570
mov dword [0x4c4908], 0x270
mov dword [0x4c747c], esi
mov ecx, 0xe3
nop
mov eax, dword [esi + 4]
mov edx, dword [esi]
xor edx, eax
and edx, 0x7ffffffe
xor edx, dword [esi]
and al, 1
movzx eax, al
shr edx, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor edx, eax
xor edx, dword [esi + 0x634]
add esi, 4
dec ecx
mov dword [esi - 4], edx
jne 0x4135f0
mov ecx, 0x18c
mov eax, dword [esi + 4]
mov edx, dword [esi]
xor edx, eax
and edx, 0x7ffffffe
xor edx, dword [esi]
and al, 1
movzx eax, al
shr edx, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor edx, eax
xor edx, dword [esi - 0x38c]
add esi, 4
dec ecx
mov dword [esi - 4], edx
jne 0x413625
mov ecx, dword [esi]
mov eax, dword [0x4c7480]
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, dword [esi]
and al, 1
movzx edx, al
shr ecx, 1
neg edx
sbb edx, edx
and edx, 0x9908b0df
xor ecx, edx
xor ecx, dword [esi - 0x38c]
mov dword [esi], ecx
pop esi
ret

Function at 0x413690
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
dec dword [0x4c4908]
jne 0x41369d
call fcn.004135c0
mov eax, dword [0x4c747c]
mov ecx, dword [eax]
add eax, 4
mov dword [0x4c747c], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov edx, ecx
and edx, 0xff3a58ad
shl edx, 7
xor ecx, edx
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret

Function at 0x4136e0
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ecx
dec dword [0x4c4908]
jne 0x4136ee
call fcn.004135c0
mov ecx, dword [0x4c747c]
mov eax, dword [ecx]
add ecx, 4
mov dword [0x4c747c], ecx
mov ecx, eax
shr ecx, 0xb
xor eax, ecx
mov edx, eax
and edx, 0xff3a58ad
shl edx, 7
xor eax, edx
mov ecx, eax
and ecx, 0xffffdf8c
shl ecx, 0xf
xor eax, ecx
mov edx, eax
shr edx, 0x12
xor edx, eax
mov dword [esp], edx
fild dword [esp]
jns 0x413735
fadd qword [0x4bea40]
fmul qword [0x4bea80]
pop ecx
ret