joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40340c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00405e0c
test esi, esi
jne 0x403444
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameW_1
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00405f48
jmp 0x403462
call sub.KERNEL32.DLL_GetCommandLineW_1
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004032f0
mov edi, eax
test esi, esi
je 0x403462
cmp dword [ebx], 0
je 0x403462
dec esi
jmp 0x40344b
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x403494
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x582008], 0x8088405
inc edx
mov dword [ebx + 0x582008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403ba4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x582024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403c3c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW_1
test eax, eax
jne 0x403c1c
xor eax, eax
push ebp
push 0x403c15
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403c74
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403c1c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
movzx eax, word [0x582024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x582024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404d48
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x58d054], 0
je 0x404da9
cmp word [0x58d330], 0xd7b2
jne 0x404d71
cmp dword [0x58d338], 0
jbe 0x404d71
mov eax, 0x58d32c
call dword [0x58d348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle_1
push eax
call sub.KERNEL32.DLL_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404dd4
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle_1
push eax
call sub.KERNEL32.DLL_WriteFile_1
pop edx
ret
cmp byte [0x582034], 0
jne 0x404dc5
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404f74
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x582038], 0
je 0x404f9a
mov edx, esi
mov eax, ebx
call dword [0x582038]
jmp 0x404fa9
mov eax, 8
call fcn.00403038
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x58d055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404f3c
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.KERNEL32.DLL_CreateThread_1
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x416cd0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x58fb68
push 0xa
push 0x416d64
mov eax, dword [0x58fb50]
push eax
call sub.KERNEL32.DLL_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x416cf4
call fcn.00420ae4
push ebx
mov eax, dword [0x58fb50]
push eax
call sub.KERNEL32.DLL_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x416d0b
call fcn.00420ae4
push ebx
call sub.KERNEL32.DLL_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x416d1d
call fcn.00420ae4
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x58fb6c], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x58fb70], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x58fb74], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x58fb78], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x58fb7c], ecx
add edx, dword [eax + 0x14]
mov dword [0x58fb80], edx
pop esi
pop ebx
ret

Function at 0x418744
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x4187ed
test eax, edx
je 0x4187f0
push 0
push 0
cmp word [eax - 0xa], 2
je 0x41876d
push edx
mov edx, eax
mov eax, esp
call fcn.00406038
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x418783
push eax
lea eax, [esp + 8]
call fcn.00406038
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x418792
movzx eax, word [eax]
sub eax, ecx
jmp 0x4187b9
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
shl ecx, 1
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x4187d3
add ecx, 4
js 0x4187aa
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x4187d0
push eax
mov eax, ecx
mov edx, 2
call fcn.00405014
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x4187b7
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x4187b9
xor eax, eax
ret
test eax, eax
je 0x418800
test edx, edx
jne 0x418754
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

Function at 0x419864
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00405e98
push eax
call sub.KERNEL32.DLL_GetFileAttributesW
cmp eax, 0xffffffff
je 0x419882
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x4198a3
cmp ebx, 3
je 0x4198a3
cmp ebx, 0x7b
je 0x4198a3
mov eax, esi
call fcn.00419824
test al, al
jne 0x4198a7
xor eax, eax
jmp 0x4198a9
mov al, 1
pop esi
pop ebx
ret

Function at 0x4198ac
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00405e98
push eax
call sub.KERNEL32.DLL_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4198c5
test al, 0x10
jne 0x4198c9
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret
Function at 0x4199e4
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.00405e98
push eax
call sub.KERNEL32.DLL_SetFileAttributesW
test eax, eax
jne 0x419a06
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x41e114
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x200]
push ecx
push edx
push eax
call sub.KERNEL32.DLL_GetLocaleInfoW
test eax, eax
jle 0x41e14d
mov ecx, eax
dec ecx
lea edx, [ebp - 0x200]
mov eax, ebx
call fcn.00405f48
jmp 0x41e156
mov eax, ebx
mov edx, esi
call fcn.00405e0c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x41e160
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov edi, ecx
mov esi, edx
mov ebx, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push ebx
call sub.KERNEL32.DLL_GetLocaleInfoW
test eax, eax
jle 0x41e182
movzx eax, word [esp]
jmp 0x41e184
mov eax, edi
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x41e90c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff778
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 4], ecx
xor ecx, ecx
push ebp
push 0x41ea31
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0x400
lea ecx, [ebp - 0x888]
call fcn.0041e720
mov esi, eax
mov eax, dword [0x58c04c]
cmp byte [eax], 0
je 0x41e9d9
mov eax, dword [0x58bd14]
call fcn.00403590
call fcn.004031a0
push 0
push 0
push 0
push 0
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.KERNEL32.DLL_WideCharToMultiByte
mov ebx, eax
push ebx
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x41e8e8]
call fcn.004078b4
add esp, 4
push 0
push 0
push ebx
mov eax, dword [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.KERNEL32.DLL_WideCharToMultiByte
push 0
lea eax, [ebp - 8]
push eax
push ebx
mov eax, dword [ebp - 4]
push eax
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
push eax
call sub.KERNEL32.DLL_WriteFile
push 0
lea eax, [ebp - 8]
push eax
push 2
push 0x41ea4c
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
push eax
call sub.KERNEL32.DLL_WriteFile
jmp 0x41ea15
push 0x40
lea eax, [ebp - 0x88]
push eax
mov eax, dword [0x58bca0]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x58fb50]
call fcn.004079a8
push eax
call sub.user32.dll_LoadStringW
push 0x2010
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x888]
push eax
push 0
call sub.user32.dll_MessageBoxW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41ea38
lea eax, [ebp - 4]
mov edx, dword [0x41e8e8]
call fcn.004078c0
ret
Function at 0x41f668
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x41f73e
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], 0xffffffff
lea eax, [ebp - 4]
mov edx, ebx
call fcn.00405e60
lea eax, [ebp - 4]
call fcn.0040688c
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.00405e98
push eax
call sub.version.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
je 0x41f728
mov eax, ebx
call fcn.00403038
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x41f721
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.00405e98
push eax
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x41f70b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x41f750
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x41f70b
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41f728
mov eax, dword [ebp - 0x10]
call fcn.00403054
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41f745
lea eax, [ebp - 4]
call fcn.00405dfc
ret

Function at 0x420913
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffdf8
mov ebx, eax
mov eax, ebx
call fcn.004053d0
mov ebp, eax
push 0
push 0
push ebp
push ebx
push 0
push 0xfde9
call sub.KERNEL32.DLL_MultiByteToWideChar
mov edi, eax
cmp edi, 0x104
jbe 0x420936
mov eax, edi
add eax, eax
call fcn.00403038
mov esi, eax
jmp 0x420938
mov esi, esp
push edi
push esi
push ebp
push ebx
push 0
push 0xfde9
call sub.KERNEL32.DLL_MultiByteToWideChar
push edi
push esi
call sub.user32.dll_CharUpperBuffW
xor ebx, ebx
mov eax, edi
dec eax
test eax, eax
jl 0x420971
inc eax
xor edx, edx
mov ecx, ebx
shl ecx, 5
shr ebx, 0x1b
or ecx, ebx
mov ebx, ecx
movzx ecx, word [esi + edx*2]
xor ebx, ecx
inc edx
dec eax
jne 0x42095b
mov eax, esp
cmp esi, eax
je 0x42097e
mov eax, esi
call fcn.00403054
mov eax, ebx
add esp, 0x208
pop ebp
pop edi
pop esi
pop ebx
ret
push esi
push ebx
mov esi, eax
xor eax, eax
push esi
rol eax, 5
mov bl, byte [esi]
test bl, 0x80
jne 0x4209b8
cmp bl, 0
je 0x4209b4
cmp bl, 0x41
jl 0x4209af
cmp bl, 0x5a
jg 0x4209af
or bl, 0x20
xor al, bl
inc esi
jmp 0x420993
pop ecx
pop ebx
pop esi
ret
pop eax
pop ebx
pop esi
jmp 0x4208f8

Function at 0x4407c4
Capabilities:
Resume thread

Disassembly:
push ebx
push esi
mov ebx, eax
mov eax, dword [ebx + 4]
push eax
call sub.KERNEL32.DLL_ResumeThread
mov esi, eax
test esi, esi
setge dl
mov eax, ebx
call fcn.004403c4
dec esi
jne 0x4407e6
mov byte [ebx + 0xe], 0
pop esi
pop ebx
ret
Function at 0x441990
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, 0x591ea0
cmp dword [edi], 0
jne 0x441a0c
push 0x40
push 0x1000
push 0x1000
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov esi, eax
mov eax, dword [0x591e9c]
mov dword [esi], eax
lea edx, [esi + 4]
mov eax, 0x582ce8
mov ecx, 2
call fcn.004031f0
mov edx, 0x441968
lea eax, [esi + 5]
call fcn.00441988
mov dword [esi + 6], eax
lea ebx, [esi + 0xa]
mov byte [ebx], 0xe8
lea edx, [esi + 4]
mov eax, ebx
call fcn.00441988
mov dword [ebx + 1], eax
mov eax, dword [edi]
mov dword [ebx + 5], eax
mov dword [edi], ebx
add ebx, 0xd
mov eax, ebx
sub eax, esi
cmp eax, 0xffc
jl 0x4419e1
mov dword [0x591e9c], esi
mov eax, dword [edi]
mov ebx, dword [edi]
mov edx, dword [ebx + 5]
mov dword [edi], edx
mov edx, dword [ebp + 8]
mov dword [ebx + 5], edx
mov edx, dword [ebp + 0xc]
mov dword [ebx + 9], edx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x445938
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 4]
push eax
push 0
mov eax, esi
call fcn.00405e98
push eax
mov eax, dword [ebx + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
je 0x445990
mov dword [ebp - 0xc], esi
mov byte [ebp - 8], 0x11
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [0x58c234]
mov dl, 1
mov eax, dword [0x4453b8]
call fcn.0041eb54
call fcn.004047c8
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
call fcn.00445540
mov edx, dword [ebp + 8]
mov byte [edx], al
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x446cd8
Capabilities:
Encode data using xor

Disassembly:
mov ecx, edx
mov edx, eax
xor eax, eax
rol ax, 5
xor al, byte [edx]
inc edx
dec ecx
jne 0x446cde
ret
Function at 0x465d50
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00405df4
xor eax, eax
push ebp
push 0x465ee5
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.user32.dll_OpenClipboard
test eax, eax
je 0x465eb3
xor edx, edx
push ebp
push 0x465eac
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00405e60
mov eax, dword [ebp - 8]
test eax, eax
je 0x465dbf
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x465dbf
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004051dc
test eax, eax
je 0x465dc8
sub eax, 4
mov eax, dword [eax]
add eax, eax
add eax, 2
push eax
push 0x2002
call sub.KERNEL32.DLL_GlobalAlloc
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x465e81
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_GlobalLock
mov ebx, eax
xor edx, edx
push ebp
push 0x465e70
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00405e60
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x465e2a
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x465e2a
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004051dc
test eax, eax
je 0x465e33
sub eax, 4
mov eax, dword [eax]
mov esi, eax
add esi, esi
mov eax, dword [ebp - 4]
call fcn.00405e98
lea ecx, [esi + 2]
mov edx, ebx
call fcn.004031f0
call sub.user32.dll_EmptyClipboard
mov eax, dword [ebp - 0x10]
push eax
push 0xd
call sub.user32.dll_SetClipboardData
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x465e77
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_GlobalUnlock
ret
mov ecx, dword [0x58bbe8]
mov dl, 1
mov eax, dword [0x4170ec]
call fcn.0041eb18
call fcn.004047c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x465eec
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00405e04
ret
Function at 0x4698f4
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
push edi
push ecx
mov byte [esp], cl
mov ebx, edx
mov esi, eax
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongW
mov edi, eax
test bl, bl
je 0x469915
test edi, 0x40000
je 0x46992f
test bl, bl
jne 0x4699b0
mov eax, edi
and eax, 0x40000
cmp eax, 0x40000
jne 0x4699b0
push esi
call sub.user32.dll_IsIconic
cmp eax, 1
sbb eax, eax
inc eax
mov byte [esp + 2], al
push esi
call sub.user32.dll_IsWindowVisible
cmp eax, 1
sbb eax, eax
inc eax
mov byte [esp + 1], al
movzx eax, byte [esp + 1]
or al, byte [esp + 2]
je 0x469962
push 0
push esi
call sub.user32.dll_ShowWindow
test bl, bl
je 0x469977
or edi, 0x40000
push edi
push 0xffffffffffffffec
push esi
call sub.user32.dll_SetWindowLongW
jmp 0x469986
and edi, 0xfffbffff
push edi
push 0xffffffffffffffec
push esi
call sub.user32.dll_SetWindowLongW
movzx eax, byte [esp]
and al, byte [esp + 1]
jne 0x469997
cmp byte [esp + 2], 0
je 0x4699b0
cmp byte [esp + 2], 0
je 0x4699a8
push 6
push esi
call sub.user32.dll_ShowWindow
jmp 0x4699b0
push 5
push esi
call sub.user32.dll_ShowWindow
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x469c5c
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
add esp, 0xfffffff8
mov ebx, eax
call sub.user32.dll_GetActiveWindow
mov dword [esp], eax
mov byte [esp + 4], 0
test bl, bl
je 0x469c82
mov eax, esp
push eax
push 0x469c24
call sub.user32.dll_EnumWindows
jmp 0x469c95
mov eax, esp
push eax
push 0x469c04
call sub.KERNEL32.DLL_GetCurrentThreadId
push eax
call sub.user32.dll_EnumThreadWindows
movzx eax, byte [esp + 4]
pop ecx
pop edx
pop ebx
ret

Function at 0x469d58
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, eax
movzx ebx, byte [0x469dac]
test si, 4
je 0x469d6d
or bl, 1
test si, 8
je 0x469d77
or bl, 4
test si, 1
je 0x469d81
or bl, 8
test si, 2
je 0x469d8b
or bl, 0x10
test si, 0x10
je 0x469d95
or bl, 0x20
push 0x12
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x469da4
or bl, 2
mov eax, ebx
pop esi
pop ebx
ret

Function at 0x469db0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, eax
movzx ebx, byte [0x469dec]
push 0x10
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x469dca
or bl, 1
push 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x469dd9
or bl, 4
test esi, 0x20000000
je 0x469de4
or bl, 2
mov eax, ebx
pop esi
pop ebx
ret
Function at 0x472230
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
test dl, dl
je 0x472242
add esp, 0xfffffff0
call fcn.00404224
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.004408d0
mov eax, dword [0x58bcac]
mov dword [eax + 4], ebx
mov dword [eax], 0x472644
mov eax, dword [0x58bcb8]
mov dword [eax + 4], ebx
mov dword [eax], 0x472650
mov eax, ebx
call fcn.0047265c
push 0
call sub.user32.dll_GetKeyboardLayout
mov dword [ebx + 0x3c], eax
mov dl, 1
mov eax, dword [0x435e24]
call fcn.00403da4
mov dword [ebx + 0x4c], eax
mov dl, 1
mov eax, dword [0x435e24]
call fcn.00403da4
mov dword [ebx + 0x50], eax
mov dl, 1
mov eax, dword [0x435e24]
call fcn.00403da4
mov dword [ebx + 0x54], eax
mov dl, 1
mov eax, dword [0x435e24]
call fcn.00403da4
mov dword [ebx + 0x58], eax
mov dl, 1
mov eax, dword [0x435e24]
call fcn.00403da4
mov dword [ebx + 0x74], eax
push 0
call sub.user32.dll_GetDC
mov esi, eax
push 0x5a
push esi
call sub.gdi32.dll_GetDeviceCaps
mov dword [ebx + 0x40], eax
push esi
push 0
call sub.user32.dll_ReleaseDC
mov eax, dword [ebx + 0x58]
push eax
mov eax, 0x46d574
push eax
push 0
push 0
mov eax, dword [0x58bef4]
mov eax, dword [eax]
call eax
mov dl, 1
mov eax, dword [0x445e88]
call fcn.00447d10
mov dword [ebx + 0x7c], eax
mov dl, 1
mov eax, dword [0x445e88]
call fcn.00447d10
mov dword [ebx + 0x80], eax
mov dl, 1
mov eax, dword [0x445e88]
call fcn.00447d10
mov dword [ebx + 0x78], eax
mov dl, 1
mov eax, dword [0x445e88]
call fcn.00447d10
mov dword [ebx + 0x84], eax
mov eax, ebx
call fcn.00472b54
mov eax, dword [ebx + 0x7c]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x472a2c
mov eax, dword [ebx + 0x80]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x472a2c
mov eax, dword [ebx + 0x78]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x472a2c
mov eax, dword [ebx + 0x84]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x472a2c
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x472395
call fcn.0040427c
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x4727cc
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc60
push ebx
xor edx, edx
mov dword [ebp - 0x3a0], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x472979
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x34], 0
jne 0x47295a
mov dl, 1
mov eax, dword [0x436508]
call fcn.0043b820
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
add eax, 0x38
xor edx, edx
call fcn.00405e0c
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x472949
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00497c48
test al, al
je 0x47293c
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x39c], eax
mov byte [ebp - 0x398], 0
lea ecx, [ebp - 0x39c]
mov edx, 0x472988
lea eax, [ebp - 0x394]
call fcn.0041aad8
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x47293c
xor eax, eax
push ebp
push 0x472935
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], 0x200
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x314]
push eax
push 0
push 0
push 0x4729f8
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x47291e
lea eax, [ebp - 0x3a0]
lea edx, [ebp - 0x314]
mov ecx, pe_nt_image_headers32
call fcn.0040601c
mov edx, dword [ebp - 0x3a0]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x3c]
jne 0x47291e
mov eax, dword [ebp - 4]
add eax, 0x38
lea edx, [ebp - 0x314]
mov ecx, pe_nt_image_headers32
call fcn.0040601c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47293c
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x47283f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov byte [eax + 0x29], 0
mov dl, 1
call fcn.0043b60c
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x472980
lea eax, [ebp - 0x3a0]
call fcn.00405dfc
ret

Function at 0x473368
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x592100]
cmp byte [eax + 0xa9], 0
jne 0x4733da
cmp dword [0x592118], 0
jne 0x47339a
call sub.KERNEL32.DLL_GetCurrentThreadId
push eax
push 0
mov eax, dword [0x586fd8]
push eax
push 3
call sub.user32.dll_SetWindowsHookExW
mov dword [0x592118], eax
cmp dword [0x592114], 0
jne 0x4733b5
push 0
push 0
push 0
push 0
call sub.KERNEL32.DLL_CreateEventW
mov dword [0x592114], eax
cmp dword [0x59211c], 0
jne 0x4733da
push esp
push 0
push 0
mov eax, dword [0x586fd4]
push eax
push 0x3e8
push 0
call sub.KERNEL32.DLL_CreateThread
mov dword [0x59211c], eax
pop edx
ret