joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4089cf
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
push esi
push edi
push 0xa
lea eax, [esp + 0x10]
push eax
mov edi, ecx
mov eax, dword [edi + 0x3c]
add eax, 0x26
push eax
call fcn.0049ab7f
lea eax, [esp + 0x18]
push 0
push eax
call fcn.0049b140
push str.__xml_version_1.0__encoding_UTF_8___
lea esi, [eax + 1]
push 0x4b0cf4
push esi
call fcn.0049a965
add esp, 0x20
add esi, eax
lea eax, [esp + 0xc]
push 0
sub esi, eax
push esi
mov esi, dword [sym.imp.WSOCK32.dll_send]
push eax
push dword [edi + 0x10]
call esi
cmp eax, 0xffffffff
je 0x408a5f
xor eax, eax
push 0x4b0cf8
inc eax
lea ecx, [edi + 0x34]
call fcn.00408fda
test eax, eax
jne 0x408a5f
push eax
push dword [edi + 0x3c]
push dword [edi + 0x34]
push dword [edi + 0x10]
call esi
cmp eax, 0xffffffff
je 0x408a5f
and dword [edi + 0x3c], 0
and dword [edi + 0x40], 0
xor eax, eax
jmp 0x408a6a
push str.An_internal_error_has_occurred_in_the_debugger_engine._nContinue_running_the_script_without_the_debugger_
call fcn.00408d62
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408da8
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
mov ebx, ecx
cmp eax, 0xffffffff
jne 0x408dc6
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408dbd
sub eax, edx
mov dword [ebp - 4], eax
cmp eax, 2
jbe 0x408e41
push 3
add eax, 0xfffffffd
xor edx, edx
pop ecx
div ecx
inc eax
mov dword [ebp - 8], eax
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 2]
shl ecx, 8
or ecx, eax
sub dword [ebp - 4], 3
mov eax, ecx
shr eax, 0x12
push 0x3f
pop edx
and eax, edx
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi + esi], al
mov eax, ecx
shr eax, 0xc
and eax, edx
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi + esi + 1], al
mov eax, ecx
shr eax, 6
and eax, edx
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
and ecx, edx
mov byte [edi + esi + 2], al
mov al, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edi + esi + 3], al
add ebx, 3
add esi, 4
dec dword [ebp - 8]
jne 0x408ddc
cmp dword [ebp - 4], 0
jbe 0x408ea0
movzx ecx, byte [ebx]
shl ecx, 0x10
cmp dword [ebp - 4], 1
jbe 0x408e5c
movzx eax, byte [ebx + 1]
shl eax, 8
or ecx, eax
mov edx, ecx
shr edx, 0x12
and edx, 0x3f
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
lea eax, [esi + edi]
mov byte [eax], dl
mov edx, ecx
shr edx, 0xc
and edx, 0x3f
cmp dword [ebp - 4], 1
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 1], dl
jbe 0x408e94
shr ecx, 6
and ecx, 0x3f
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x408e96
mov cl, 0x3d
mov byte [eax + 2], cl
mov byte [eax + 3], 0x3d
add esi, 4
mov byte [esi + edi], 0
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40e480
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 [0x4d9838], 0
push esi
push edi
mov byte [esp + 0x1e], al
je 0x40e4a4
mov byte [esp + 0x1e], 1
mov al, byte [esp + 0x1e]
cmp dword [0x4d983c], 0
je 0x40e4b3
or al, 2
mov byte [esp + 0x1e], al
cmp byte [ebp + 8], al
je 0x40e6c0
test al, al
jne 0x40e4f6
cmp byte [ebp + 0xc], al
jne 0x40e4f6
push 0x4d8608
push 0
push 0
push 0x40e7b0
push 0x2000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4d9f38], eax
test eax, eax
je 0x40e587
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 [0x4d8608]
push edi
push ebx
push 0x417
push ecx
call dword [sym.imp.USER32.dll_PostThreadMessageW]
test eax, eax
jne 0x40e52c
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x32
jl 0x40e506
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 0x40e593
push 1
push 0x417
push 0x417
push 0
lea edx, [esp + 0x34]
push edx
call esi
test eax, eax
je 0x40e5fa
cmp dword [esp + 0x2c], 0
je 0x40e5a2
mov byte [esp + 0x1f], 1
call fcn.0040eb30
test al, al
jne 0x40e5a2
cmp byte [ebp + 0xc], al
jne 0x40e68e
mov byte [ebp + 8], al
jmp 0x40e541
call fcn.0040eb50
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0xc], 0
je 0x40e5de
call fcn.0040eb30
test al, al
jne 0x40e5fa
cmp byte [ebp + 0xc], 0
jne 0x40e687
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4d9838], 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
je 0x40e632
test byte [esp + 0x1e], 1
jne 0x40e64b
push str.AHK_Keybd
push 0
push 0
call esi
mov dword [0x4d9f30], eax
jmp 0x40e64b
mov ecx, dword [0x4d9f38]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [esp + 0x20], 0x103
jne 0x40e612
call edi
sub eax, ebx
cmp eax, 0x1f4
ja 0x40e5a2
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e541
mov edx, dword [0x4d9f38]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov dword [0x4d9f38], 0
call fcn.0040eb50
jmp 0x40e5b2
test byte [esp + 0x1e], 1
je 0x40e64b
mov eax, dword [0x4d9f30]
push eax
call edi
mov dword [0x4d9f30], 0
cmp dword [0x4d983c], 0
je 0x40e66d
test byte [esp + 0x1e], 2
jne 0x40e687
push str.AHK_Mouse
push 0
push 0
call esi
mov dword [0x4d9f34], eax
jmp 0x40e687
test byte [esp + 0x1e], 2
je 0x40e687
mov ecx, dword [0x4d9f34]
push ecx
call edi
mov dword [0x4d9f34], 0
cmp byte [esp + 0x1f], 0
je 0x40e6c0
fldz
sub esp, 8
fstp qword [esp]
mov dword [0x4d5a1c], 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.00484e20
add esp, 0x18
mov dword [0x4d5a1c], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410230
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov eax, 0x1004
call fcn.004a7cc0
cmp byte [0x4db430], 0
push ebx
push ebp
mov ebp, dword [esp + 0x1014]
push esi
push edi
jne 0x41039d
cmp dword [0x4d9f50], 0
jne 0x410266
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x4d9f50], eax
mov ebx, 1
add dword [0x4db434], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [0x4db434]
mov esi, dword [0x4d5a30]
mov ecx, eax
sub ecx, dword [0x4d9f50]
mov dword [0x4d9f54], eax
cmp edx, dword [0x4d5a2c]
jbe 0x41029c
cmp ecx, esi
jb 0x4102fa
xor ebx, ebx
cmp ecx, esi
jbe 0x4102b9
mov dword [0x4db434], 0
mov dword [0x4d9f50], eax
test ebx, ebx
jne 0x41039d
mov esi, dword [esp + 0x1018]
mov cl, byte [esi + 0xf]
push 0
push 0
mov byte [0x4db1ee], cl
inc byte [ebp + 0x16]
mov edx, dword [0x4db17c]
push 0
push edx
push ebp
call fcn.0047aa80
dec byte [ebp + 0x16]
test eax, eax
jne 0x41036a
mov byte [ebp + 0x1b], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
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 + 0x1c]
call fcn.0047fea0
add esp, 0xc
call fcn.0040f0d0
fldz
sub esp, 8
fstp qword [esp]
push 0
push 0
mov eax, edi
push 4
push eax
mov byte [0x4db430], bl
mov dword [0x4d5a1c], 0
call fcn.00484e20
add esp, 0x18
cmp eax, 7
jne 0x410353
push 0
push 4
mov ecx, 0x4da728
call fcn.0041ea30
mov eax, dword [0x4d9f54]
mov dword [0x4d5a1c], ebx
mov byte [0x4db430], 0
jmp 0x4102a2
cmp byte [ebp + 0x1b], 0
je 0x41039d
mov byte [ebp + 0x1b], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp + 0xc]
cmp eax, 0x3e8
ja 0x41039d
movzx eax, word [esi + 4]
mov ecx, dword [0x4d9708]
push 0
push eax
push 0x312
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret 8
Function at 0x415e40
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x40
cmp dword [0x4d9fe0], 2
push ebx
sete bl
push esi
mov esi, ecx
test bl, bl
je 0x415e7f
movzx eax, ax
lea ecx, [esp + 0x28]
test eax, 0xffffff80
je 0x415e71
mov ecx, 0x30
mov word [esp + 0x28], cx
lea ecx, [esp + 0x2a]
push 0xa
push ecx
push eax
call fcn.00499895
add esp, 0xc
jmp 0x415e86
movzx edx, ax
mov dword [esp + 8], edx
test esi, esi
jle 0x415f42
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
cmp dword [0x4d9fe0], 0
jne 0x415ef3
call ebp
sub eax, dword [0x4db234]
mov ecx, dword [0x4d5b14]
cmp eax, dword [ecx + 0xd8]
jbe 0x415ef3
push 0
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x415eec
push 1
push 0xffffffffffffffff
mov dword [0x4d5a1c], 0
call fcn.004014c0
add esp, 8
mov dword [0x4d5a1c], 1
call ebp
mov dword [0x4db234], eax
test bl, bl
je 0x415f02
lea edi, [esp + 0x30]
call fcn.00415f50
jmp 0x415f13
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x10]
push eax
call fcn.00414490
add esp, 4
cmp dword [0x4d9fe0], 2
jne 0x415f27
mov ecx, dword [0x4d5b14]
mov eax, dword [ecx + 0x60]
jmp 0x415f30
mov edx, dword [0x4d5b14]
mov eax, dword [edx + 0x5c]
push eax
call fcn.00417d70
add esp, 4
dec esi
jne 0x415e96
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x40
ret
Function at 0x415f50
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 8
cmp dword [0x4d9fe0], 0
push esi
je 0x415f67
mov al, byte [0x4d861b]
jmp 0x41608e
cmp dword [0x4d9838], 0
je 0x415f7a
mov al, byte [0x4d9705]
jmp 0x41608e
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
mov byte [esp + 0xb], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x415f9b
mov byte [esp + 7], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x415fb1
or byte [esp + 7], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x415fc7
or byte [esp + 7], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x415fdd
or byte [esp + 7], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x415ff3
or byte [esp + 7], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x416009
or byte [esp + 7], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x41601c
or byte [esp + 7], 0x40
push 0x5c
call esi
mov edx, 0x8000
test dx, ax
je 0x41602f
or byte [esp + 7], 0x80
cmp dword [0x4d9838], 0
je 0x41608a
push ebx
mov bl, byte [esp + 0xb]
not bl
and bl, byte [0x4d9705]
je 0x416089
mov cl, byte [0x4d9707]
mov al, bl
not al
and byte [0x4d9705], al
and byte [0x4d9706], al
and cl, al
mov al, cl
mov byte [0x4d9707], cl
mov ecx, 0x4d9730
call fcn.00418950
mov eax, dword [0x4d860c]
test eax, eax
je 0x416089
test byte [eax + 8], bl
je 0x416089
mov dword [0x4d860c], 0
pop ebx
mov al, byte [esp + 7]
mov byte [esp + 8], al
mov ecx, dword [esp + 8]
push 1
and al, 0xc4
push 0
or al, 4
push 0
movzx edx, al
push ecx
push edx
mov esi, 0xffc3d44f
call fcn.00418170
movzx eax, word [edi]
add esp, 0x14
mov esi, edi
cmp eax, 0x30
jb 0x4160ef
lea esp, [esp]
cmp ax, 0x39
ja 0x4160ef
mov al, byte [esi]
push 0xffc3d44d
push 0
add al, 0x30
push 0
movzx ecx, al
push 0
push ecx
push 2
call fcn.00416370
movzx eax, word [esi + 2]
add esi, 2
add esp, 0x18
cmp eax, 0x30
jae 0x4160c0
push 0xffc3d44d
push 0
push 0
push 0
push 0x12
push 1
call fcn.00416370
add esp, 0x18
pop esi
add esp, 8
ret
Function at 0x417600
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 0x4177e1
mov edi, dword [ebp]
cmp edi, 0x80000000
je 0x4177e1
mov edx, dword [0x4d9fe0]
cmp edx, 2
jne 0x417675
movzx ebx, byte [esp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0x80000000
push 0
or ebx, 1
call fcn.004179c0
add esp, 4
call fcn.00417e50
cmp byte [esp + 0x24], 0
je 0x4177e1
mov dword [esi], connect
mov dword [ebp], connect
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
or dword [ecx], 0x8001
cmp byte [esp + 0x24], 0
je 0x4176ca
cmp edx, 1
jne 0x4176b0
cmp dword [0x4d861c], 0x80000000
jne 0x41769e
push 0x4d861c
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [0x4d861c]
add dword [esi], eax
mov ecx, dword [0x4d8620]
add dword [ebp], ecx
jmp 0x4176ef
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 0x4176ef
mov edx, dword [0x4d5b14]
movzx eax, word [edx + 0xf0]
shr eax, 2
and eax, 3
cmp eax, 2
je 0x4176ef
push eax
mov edi, ebp
mov ebx, esi
call fcn.004812a0
add esp, 4
cmp dword [0x4d9fe0], 1
jne 0x417708
mov eax, dword [esi]
mov dword [0x4d861c], eax
mov ecx, dword [ebp]
mov dword [0x4d8620], 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 0x4177cb
cmp eax, 0x64
jle 0x417763
mov dword [esp + 0x20], 0x64
jmp 0x417767
test eax, eax
je 0x4177cb
cmp dword [0x4d9fe0], 1
je 0x4177cb
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.0045f3f0
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.004177f0
add esp, 4
call fcn.00417e50
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x417c20
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
push ecx
cmp dword [0x4d9fe0], 1
jne 0x417ce5
push ebx
xor bl, bl
cmp dword [0x4d9838], 0
mov byte [esp + 4], bl
je 0x417c44
mov bl, 1
mov byte [esp + 4], bl
cmp dword [0x4d983c], 0
je 0x417c54
or bl, 2
mov byte [esp + 4], bl
test bl, bl
je 0x417c6f
mov al, byte [0x4d861a]
not al
and al, bl
movzx ecx, al
push 1
push ecx
call fcn.0040e480
add esp, 8
mov edx, dword [0x4d8630]
mov eax, dword [0x4d862c]
push 0x1c
push edx
push eax
call dword [sym.imp.USER32.dll_SendInput]
test bl, bl
je 0x417d65
mov cl, byte [0x4d861a]
and cl, bl
test cl, 1
je 0x417ccc
push 1
call fcn.00418820
mov dl, byte [esp + 0x14]
mov cl, al
xor cl, dl
mov bl, cl
and bl, dl
not bl
and bl, byte [0x4d9707]
and cl, al
or bl, cl
add esp, 4
mov byte [0x4d9707], bl
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [0x4d8458], eax
mov edx, dword [esp + 4]
pop ebx
add esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], edx
jmp fcn.0040e480
mov eax, dword [0x4d96fc]
push 0
push eax
push 0x416110
push 1
mov dword [0x4d8624], 0
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x4d9840], eax
test eax, eax
je 0x417d66
mov byte [0x4d972a], 1
push 1
push 0x8000012f
mov dword [0x4d5a1c], 0
call fcn.004014c0
add esp, 8
cmp dword [0x4d9840], 0
mov dword [0x4d5a1c], 1
jne 0x417d14
mov eax, dword [0x4d8630]
mov ecx, dword [0x4d862c]
cmp dword [eax + ecx*8 - 8], 0
mov byte [0x4d972a], 0
jne 0x417d66
mov ecx, dword [eax + ecx*8 - 4]
mov edx, dword [esp + 8]
mov dword [edx], ecx
pop ecx
ret
pop ebx
pop ecx
ret

Function at 0x417f40
Capabilities:
Get graphical window text

Disassembly:
push ecx
mov eax, dword [0x4d9f20]
test eax, eax
je 0x418058
mov ecx, dword [0x4d9f24]
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 [0x4db294]
mov dword [0x4d9f28], eax
mov dword [esp + 4], edx
fild dword [esp + 4]
jns 0x417f9b
fadd dword [0x4cedf8]
fdiv qword [0x4cedf0]
mov ecx, dword [0x4d9f24]
mov edx, dword [0x4d9f20]
mov dword [0x4db294], 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 0x418008
mov eax, dword [0x4d9f24]
imul eax, eax, 0xd4
cmp esi, dword [0x4d9f2c]
je 0x417ff9
mov ecx, dword [0x4d9f20]
push 0x64
lea edx, [eax + ecx + 0xc]
push edx
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x418034
mov edx, dword [0x4d9f20]
xor ecx, ecx
mov word [eax + edx + 0xc], cx
jmp 0x418034
mov ecx, dword [0x4d9f24]
mov edx, dword [0x4d9f20]
imul ecx, ecx, 0xd4
mov eax, 0x4b2ca8
lea edx, [ecx + edx + 0xc]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x418025
mov eax, dword [0x4d9f24]
inc eax
mov dword [0x4d9f2c], esi
mov dword [0x4d9f24], eax
pop esi
cmp eax, dword [0x4d5a20]
jl 0x418058
mov dword [0x4d9f24], 0
pop ecx
ret
Function at 0x418060
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, dword [esp + 8]
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 0x41808b
cmp ebp, 2
jne 0x418161
cmp esi, ebp
je 0x418161
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
call edi
mov ecx, 0x8000
test cx, ax
je 0x4180bc
push 0xffc3d44d
push 0
push 0
push 0
push ebx
push 1
call fcn.00416370
add esp, 0x18
push 0xffc3d44d
push 0
push 0
push 0
push ebx
push 2
call fcn.00416370
add esp, 0x18
push 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4da710]
sete al
mov byte [esp + 0x10], al
test al, al
je 0x418112
push 1
push 0xffffffffffffffff
mov dword [0x4d5a1c], 0
call fcn.004014c0
add esp, 8
mov dword [0x4d5a1c], 1
cmp bl, 0x14
jne 0x418161
cmp ebp, 2
jne 0x418161
push 0x14
call edi
test al, 1
je 0x418161
push 0xffc3d44d
push 0
push 0
push 0
push 0x10
push ebp
call fcn.00416370
add esp, 0x18
cmp byte [esp + 0x10], 0
je 0x418161
push 1
push 0xffffffffffffffff
mov dword [0x4d5a1c], 0
call fcn.004014c0
add esp, 8
mov dword [0x4d5a1c], 1
pop edi
mov eax, esi
pop esi
pop ebp
ret

Function at 0x418820
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
cmp dword [0x4d9838], 0
je 0x418838
cmp byte [esp + 8], 0
jne 0x418838
mov al, byte [0x4d9705]
pop ecx
ret
push esi
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa0
mov byte [esp + 0xb], 0
call esi
mov ecx, 0x8000
test cx, ax
je 0x41885a
mov byte [esp + 7], 0x10
push 0xa1
call esi
mov edx, 0x8000
test dx, ax
je 0x418870
or byte [esp + 7], 0x20
push 0xa2
call esi
mov ecx, 0x8000
test cx, ax
je 0x418886
or byte [esp + 7], 1
push 0xa3
call esi
mov edx, 0x8000
test dx, ax
je 0x41889c
or byte [esp + 7], 2
push 0xa4
call esi
mov ecx, 0x8000
test cx, ax
je 0x4188b2
or byte [esp + 7], 4
push 0xa5
call esi
mov edx, 0x8000
test dx, ax
je 0x4188c8
or byte [esp + 7], 8
push 0x5b
call esi
mov ecx, 0x8000
test cx, ax
je 0x4188db
or byte [esp + 7], 0x40
push 0x5c
call esi
mov edx, 0x8000
pop esi
test dx, ax
je 0x4188ef
or byte [esp + 3], 0x80
cmp dword [0x4d9838], 0
je 0x41894a
push ebx
mov bl, byte [esp + 7]
not bl
and bl, byte [0x4d9705]
je 0x418949
mov cl, byte [0x4d9707]
mov al, bl
not al
and byte [0x4d9705], al
and byte [0x4d9706], al
and cl, al
mov al, cl
mov byte [0x4d9707], cl
mov ecx, 0x4d9730
call fcn.00418950
mov eax, dword [0x4d860c]
test eax, eax
je 0x418949
test byte [eax + 8], bl
je 0x418949
mov dword [0x4d860c], 0
pop ebx
mov al, byte [esp + 3]
pop ecx
ret
Function at 0x418de0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x34
push esi
xor esi, esi
push edi
test eax, eax
je 0x418e1e
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 0x418e1e
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418e1e
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 0x418e30
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 0x418edf
xor eax, eax
jmp 0x418e60
movzx ecx, word [eax + str.SYSTEMCurrentControlSetControlKeyboard_Layouts_]
mov word [esp + eax + 0xc], cx
add eax, 2
test cx, cx
jne 0x418e60
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x418ecd
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 0x418ecd
push esi
push edi
lea edi, [esp + 0x10]
lea esi, [esp + 0x8c]
mov ecx, str.Layout_File
call fcn.004813e0
pop edi
pop esi
test eax, eax
je 0x418ecd
lea ecx, [esp + 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
cmp dword [esp + 0x290], ebx
je 0x418edf
push 0
push ebx
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov eax, ebp
pop ebp
pop ebx
add esp, 0x284
ret

Function at 0x4190e0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x114
push ebp
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebp, eax
mov al, byte [esp + 0x11c]
lea ecx, [eax - 0x41]
cmp cl, 0x19
ja 0x4191dc
push ebx
push esi
push 0x100
lea edx, [esp + 0x24]
push 0
push edx
call fcn.004a48b0
mov ebx, dword [sym.imp.USER32.dll_ToUnicodeEx]
add esp, 0xc
push ebp
xor esi, esi
push esi
push 2
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
push ecx
push esi
push 0x6e
call ebx
cmp eax, 2
jne 0x41913f
movzx esi, word [esp + 0x10]
movzx ecx, byte [esp + 0x124]
push ebp
push 0
push 2
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
push 0
push ecx
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jns 0x419178
push ebp
push 0
push 2
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
push 0
push 0x6e
call ebx
test si, si
je 0x4191bc
push edi
push 1
push ebp
lea edi, [esp + 0x1b]
call fcn.004193b0
add esp, 8
mov byte [esp + 0x12], al
pop edi
test al, al
je 0x4191bc
mov al, byte [esp + 0xf]
lea ecx, [esp + 0x20]
call fcn.00418950
movzx eax, byte [esp + 0xe]
push ebp
push 0
push 2
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x30]
push edx
push 0
push eax
call ebx
cmp dword [esp + 0x1c], 0
pop esi
pop ebx
je 0x4191d2
movzx eax, word [esp + 8]
pop ebp
add esp, 0x114
ret
xor eax, eax
pop ebp
add esp, 0x114
ret
push ebp
movzx ecx, al
push 2
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
pop ebp
add esp, 0x114
ret