joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b68dc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebp
xor ebp, ebp
cmp dword [0x5aed04], ebp
je 0x4b6ac2
push ebx
mov ebx, dword [esp + 0x60]
push edi
test ebx, ebx
je 0x4b68fc
mov edi, ebx
jmp 0x4b690e
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
je 0x4b6ac0
lea eax, [esp + 0x18]
push eax
push 0x18
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x4b6ab5
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push esi
mov esi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call fcn.0045cb60
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], esi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x20
pop eax
push ecx
push ecx
mov word [esp + 0x4a], ax
lea eax, [esp + 0x18]
push eax
push ecx
lea eax, [esp + 0x44]
mov dword [esp + 0x54], ecx
push eax
push edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x4b6ab4
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push esi
push 0
push dword [esp + 0x78]
push edi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul esi, dword [esp + 0x14]
test esi, esi
jle 0x4b6ab4
cmp dword [esp + 0x6c], 0
je 0x4b6a61
mov ebp, dword [esp + 0x10]
push 0xa
pop ebx
movzx ecx, byte [ebp + 1]
xor edx, edx
movzx eax, byte [ebp + 2]
lea eax, [eax + ecx*2]
movzx ecx, byte [ebp]
imul eax, eax, 3
add eax, ecx
div ebx
mov cl, al
cmp cl, 0x40
jae 0x4b69f5
movzx eax, cl
sub eax, 0x40
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax + 0x40]
jmp 0x4b6a0b
cmp cl, 0xc0
jbe 0x4b6a0b
movzx eax, cl
sub eax, 0xc0
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax - 0x40]
movzx eax, byte [ebp + 3]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movzx eax, cl
movd xmm0, eax
divss xmm1, dword [0x56dd04]
cvtdq2ps xmm0, xmm0
mulss xmm1, xmm0
cvttss2si ecx, xmm1
mov byte [ebp], cl
mov eax, dword [esp + 0x10]
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x10]
mov al, byte [ecx]
mov byte [ecx + 2], al
mov ebp, dword [esp + 0x10]
add ebp, 4
mov dword [esp + 0x10], ebp
sub esi, 1
jne 0x4b69c5
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
jmp 0x4b6ab4
mov edx, dword [esp + 0x10]
mov al, byte [edx + 3]
cmp al, 0xff
jae 0x4b6aa8
movzx ecx, al
movzx eax, byte [edx]
imul ecx, eax
shr ecx, 8
mov byte [edx], cl
mov edx, dword [esp + 0x10]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 3]
imul ecx, eax
shr ecx, 8
mov byte [edx + 1], cl
mov edx, dword [esp + 0x10]
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
imul ecx, eax
shr ecx, 8
mov byte [edx + 2], cl
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x10], edx
sub esi, 1
jne 0x4b6a65
pop esi
test ebx, ebx
jne 0x4b6ac0
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x50
ret 0xc
Function at 0x4b7ed0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, dword [esp + 0x3c]
xor ebx, ebx
cmp esi, 1
je 0x4b7f00
cmp esi, 2
je 0x4b7f00
cmp esi, 4
je 0x4b7f00
cmp esi, 8
je 0x4b7f00
cmp esi, 0x18
je 0x4b7f00
cmp esi, 0x20
je 0x4b7f00
xor eax, eax
jmp 0x4b80cd
mov ecx, dword [0x5aed28]
push ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
test ecx, ecx
jle 0x4b80c9
mov edx, dword [esp + 0x28]
mov eax, dword [edi*4 + 0x5af580]
cmp dword [eax], edx
je 0x4b7f33
inc edi
mov dword [esp + 0x10], edi
cmp edi, ecx
jl 0x4b7f1a
jmp 0x4b80c9
cmp dword [esp + 0x38], 0x20
jne 0x4b80a0
mov eax, dword [eax + 8]
test eax, eax
je 0x4b7f73
cmp esi, 0x20
je 0x4b7f4f
cmp esi, 0xffffffff
jne 0x4b7f73
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call eax
jmp 0x4b80c7
mov eax, dword [esp + 0x2c]
inc eax
imul ebp, eax, 3
and ebp, 0xfffffffc
mov eax, ebp
mov dword [esp + 0x14], ebp
imul eax, dword [esp + 0x30]
push eax
push 0
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4b80c9
mov ebx, dword [esp + 0x30]
test ebx, ebx
jle 0x4b806b
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
mov esi, edx
test eax, eax
jle 0x4b804a
mov ebp, ecx
mov edi, eax
mov ecx, 0xff
movzx eax, byte [esi + 2]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 2], al
movzx eax, byte [esi + 1]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 1], al
movzx eax, byte [esi]
lea esi, [esi + 4]
sub eax, ecx
movzx ecx, byte [esi - 1]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp], al
lea ebp, [ebp + 3]
sub edi, 1
jne 0x4b7fd9
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add edx, dword [esp + 0x34]
add ecx, ebp
sub dword [esp + 0x24], 1
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ecx
jne 0x4b7fc6
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov eax, dword [edi*4 + 0x5af580]
push esi
push dword [esp + 0x44]
mov esi, dword [esp + 0x20]
push dword [esp + 0x44]
push ebp
push ebx
push dword [esp + 0x40]
push esi
push dword [esp + 0x3c]
call dword [eax + 4]
push esi
push 0
push dword [0x5acc94]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4b80c9
cmp dword [esp + 0x38], 0x18
jne 0x4b80c9
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call dword [eax + 4]
mov ebx, eax
pop edi
mov eax, ebx
pop ebp
pop esi
pop ebx
add esp, 0xc
ret 0x28
Function at 0x4bef0d
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x5aed44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x4bef6e
push esi
push dword [0x5aed40]
push 8
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x5aed44]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x5aed3c]
jmp 0x4bef5e
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4bef5c
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x4bef4c
push edi
push 0x4beeab
call fcn.005379d7
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x4bef78
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ecx, edi
and ecx, 3
je 0x4bef8e
push 4
pop eax
sub eax, ecx
add edi, eax
mov esi, dword [0x5aed40]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
jne 0x4befc7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push edi
push 8
push dword [0x5acc94]
mov dword [0x5aed44], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x5aed44]
call ebx
mov esi, dword [0x5aed40]
lea eax, [edi + esi]
push eax
push dword [0x5aed44]
mov dword [0x5aed40], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x5acc94]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x5aed44]
call ebx
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test edi, edi
jne 0x4bf006
test ebx, ebx
je 0x4bf027
push 0x14
push 0x5aed3c
call fcn.004bf832
pop ecx
pop ecx
mov dword [eax], esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
test edi, edi
je 0x4bf027
lea ecx, [esi + ebp]
push ecx
call edi
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x4bf9a0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x5a85d0]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
dec dword [eax + 0x19c]
mov ecx, dword [eax + 0x19c]
mov esi, dword [eax + ecx*4 + 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
ret

Function at 0x4bf9e0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
dec dword [edx + 0x19c]
mov ecx, dword [edx + 0x19c]
mov eax, dword [edx + ecx*4 + 0xc]
mov dword [edx + 8], eax
ret

Function at 0x4bfa10
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
dec dword [eax + 0x19c]
mov ecx, dword [eax + 0x19c]
mov ecx, dword [eax + ecx*4 + 0xc]
mov dword [eax + 8], ecx
mov eax, dword [eax]
add eax, ecx
ret
Function at 0x4bfa40
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
dec dword [edx + 0x19c]
mov ecx, dword [edx + 0x19c]
mov eax, dword [edx + ecx*4 + 0xc]
add eax, dword [edx]
ret

Function at 0x4bfa70
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [eax + 0x19c]
mov ecx, dword [eax + 8]
mov dword [eax + edx*4 + 0xc], ecx
inc dword [eax + 0x19c]
ret

Function at 0x4bfa90
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [esp + 0x18]
mov edi, eax
mov ebp, dword [esp + 0x14]
mov esi, dword [edi + 8]
mov ecx, dword [ebp]
sub esi, ebx
lea eax, [esi + 0xa]
push eax
test ecx, ecx
jne 0x4bfac9
push ecx
push dword [0x5af694]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x4bfad8
push ecx
push 0
push dword [0x5af694]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
shr esi, 1
mov dword [ebp], ecx
mov eax, dword [edi]
push esi
add eax, ebx
push eax
push ecx
call fcn.004bfe70
mov dword [edi + 8], ebx
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x4bfb30
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add dword [eax + 8], 2
ret

Function at 0x4bfd50
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [esp + 0x18]
mov esi, eax
cmp ebx, 0xffffffff
jne 0x4bfd6e
mov ebx, dword [esi + 8]
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 8]
lea ebp, [eax + eax]
add ecx, ebp
lea eax, [edx - 4]
cmp ecx, eax
jl 0x4bfd92
lea eax, [ecx + 0x4000]
mov dword [esi + 4], eax
add eax, 0xa
jmp 0x4bfdad
cmp edx, 0x100000
jle 0x4bfdc0
cmp ecx, 0x100000
jge 0x4bfda7
mov ecx, 0x100000
mov dword [esi + 4], ecx
lea eax, [ecx + 0xa]
push eax
push dword [esi]
push 0
push dword [0x5af694]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi], eax
lea eax, [ebx + ebp]
mov dword [esi + 8], eax
mov eax, dword [esi]
pop edi
pop esi
pop ebp
add eax, ebx
pop ebx
ret 8

Function at 0x4bfde0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 4]
neg ecx
add ecx, ecx
add dword [eax + 8], ecx
ret 4

Function at 0x4bfe20
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov eax, dword [esp + 4]
mov edx, dword [ecx]
cmp eax, edx
jb 0x4bfe47
mov ecx, dword [ecx + 8]
add ecx, edx
cmp eax, ecx
ja 0x4bfe47
sub eax, edx
inc eax
ret 4
xor eax, eax
ret 4

Function at 0x4bfe50
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
mov eax, dword [esp + 4]
dec eax
add eax, ecx
ret 4
Function at 0x4bfeb0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x5a85d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
add eax, dword [esp + 4]
ret 4

Function at 0x4c1d49
Capabilities:
Write clipboard data

Disassembly:
push ecx
push ecx
push edi
mov edi, ecx
push dword [edi + 0x2b8]
call fcn.004c52d0
pop ecx
test al, al
je 0x4c1e14
push ebx
push ebp
push esi
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push ebp
xor esi, esi
mov ecx, edi
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
call fcn.004c1e1a
mov ebx, dword [sym.imp.USER32.dll_SetClipboardData]
cmp dword [esp + 0x14], esi
je 0x4c1da4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [esp + 0x10]
push 0xd
call ebx
cmp byte [ebp + 0x18], 0
je 0x4c1def
movzx eax, word [edi + 0x866]
push esi
push eax
call ebx
push 1
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4c1def
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x4c1def
push dword [esp + 0x1c]
mov byte [eax], 2
movzx esi, word [edi + 0x868]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [esp + 0x1c]
push esi
call ebx
xor esi, esi
cmp byte [ebp + 0x19], 0
je 0x4c1e0b
movzx eax, word [edi + 0x86a]
push esi
push eax
call ebx
movzx eax, word [edi + 0x86c]
push esi
push eax
call ebx
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
pop ebp
pop ebx
pop edi
pop ecx
pop ecx
ret 4

Function at 0x4c337b
Capabilities:
Log keystrokes via input method manager

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
mov edi, ecx
push esi
push esi
push dword [ebp + 0xc]
push dword [edi + 4]
call sub.IMM32.dll_ImmGetCompositionStringW
mov ebx, eax
cdq
sub eax, edx
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
sar eax, 1
push eax
call fcn.004c0b64
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4c33b0
mov eax, dword [esi]
push ebx
push eax
push dword [ebp + 0xc]
push dword [edi + 4]
call sub.IMM32.dll_ImmGetCompositionStringW
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8
Function at 0x4c3fa4
Capabilities:
Log keystrokes via input method manager

Disassembly:
mov eax, 0x556f30
call fcn.00538504
sub esp, 0x60
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], edi
call fcn.004efb39
mov ecx, dword [edi + 0x2ac]
push eax
mov dword [ebp - 0x1c], eax
call fcn.004e0ab5
mov edx, dword [edi + 0x2ac]
mov esi, eax
add edx, 4
push esi
push edx
mov ecx, dword [edx]
call dword [ecx + 0x18]
mov edx, dword [edi + 0x2ac]
add edx, 4
mov dword [ebp - 0x14], eax
push esi
push edx
mov ecx, dword [edx]
call dword [ecx + 0x54]
mov ecx, edi
mov esi, eax
call fcn.004c1baf
push esi
push dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, edi
lea eax, [ebp - 0x54]
push eax
call fcn.004f7739
and dword [ebp - 4], 0
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x4c401a
mov ecx, dword [eax]
push dword [ebp - 0x18]
push dword [eax + 0x10]
lea eax, [ebp - 0x3c]
push ecx
push eax
call fcn.004c62e2
add esp, 0x10
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.004c7222
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp + 8]
lea edx, [eax + eax]
mov dword [ebp - 0x18], edx
lea esi, [edx + 0x22]
test edi, edi
je 0x4c410e
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
push edx
cmovae eax, dword [ebp - 0x3c]
lea ecx, [edi + 0x20]
push eax
push ecx
call fcn.0045c210
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov eax, dword [eax + 0x2b8]
push eax
mov dword [ebp - 0x24], eax
call sub.IMM32.dll_ImmGetContext
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 3
test eax, eax
jne 0x4c408d
xor esi, esi
jmp 0x4c410e
push 8
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x24]
call fcn.004c337b
lea ecx, [ebp - 0x6c]
mov esi, dword [eax + 0x10]
call fcn.004c7248
push 0
push 0
push 0x80
push dword [ebp - 0x20]
call sub.IMM32.dll_ImmGetCompositionStringW
neg eax
push eax
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x1c]
mov ecx, dword [eax + 0x2ac]
call fcn.004df156
push eax
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov ecx, dword [eax + 0x2ac]
call fcn.004dd3eb
mov ecx, dword [ebp - 0x2c]
push dword [ebp - 0x20]
and dword [edi + 4], 0
push dword [ebp - 0x24]
mov dword [edi + 0x10], esi
mov dword [edi + 0x18], esi
mov esi, dword [ebp - 0x18]
mov dword [edi + 8], ecx
add esi, 0x22
lea ecx, [eax + eax]
mov dword [edi + 0xc], 0x20
mov dword [edi + 0x14], ecx
mov dword [edi + 0x1c], ecx
call sub.IMM32.dll_ImmReleaseContext
lea ecx, [ebp - 0x3c]
call fcn.004c7248
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4
Function at 0x4c46f4
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
push ecx
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
push edi
mov edi, ecx
sub eax, 0x100
je 0x4c4807
sub eax, 1
je 0x4c47f8
sub eax, 1
je 0x4c476b
dec eax
sub eax, 1
je 0x4c4807
sub eax, 5
jne 0x4c4896
cmp dword [esp + 0x20], 0xffff
je 0x4c4763
cmp byte [edi + 0x818], al
jne 0x4c4763
lea esi, [esp + 0x10]
xor ebx, ebx
mov eax, esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x24]
mov word [esp + 0x1c], bx
call fcn.004e8fe4
pop ecx
pop ecx
push ebx
push eax
push esi
jmp 0x4c47ec
xor eax, eax
inc eax
jmp 0x4c4898
mov esi, dword [esp + 0x20]
cmp esi, 0x80
jae 0x4c478f
push esi
call fcn.0054a980
pop ecx
test eax, eax
je 0x4c478f
cmp byte [edi + 0x818], 0
jne 0x4c4896
xor ebx, ebx
mov word [esp + 0x10], si
mov dword [esp + 0x12], ebx
xor ecx, ecx
mov edx, dword [esp + 0x10]
mov ebp, 0x3ff
inc ecx
lea eax, [edx + 0x2800]
cmp ax, bp
ja 0x4c47bd
mov word [edi + 0x81a], si
jmp 0x4c4896
lea eax, [edx + 0x2400]
cmp ax, bp
ja 0x4c47e5
mov ax, word [edi + 0x81a]
mov word [esp + 0x10], ax
xor eax, eax
push 2
mov word [esp + 0x16], si
mov word [edi + 0x81a], ax
pop ecx
push ebx
lea eax, [esp + 0x14]
push ecx
push eax
mov ecx, edi
call fcn.004c120c
jmp 0x4c4896
push dword [esp + 0x24]
push dword [esp + 0x24]
push 0x101
jmp 0x4c4845
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
lea ebp, [edi + 0x818]
push 0x12
mov byte [ebp], 0
call esi
mov ebx, dword [esp + 0x20]
cwde
shr eax, 0x1f
mov dword [esp + 0x10], eax
test al, al
je 0x4c4853
push dword [esp + 0x24]
push ebx
call fcn.004c49cb
add esp, 8
test al, al
je 0x4c4853
push dword [esp + 0x24]
push ebx
push dword [esp + 0x24]
push dword [edi + 0x2b8]
call dword [sym.imp.USER32.dll_DefWindowProcW]
jmp 0x4c4898
push 0x11
call esi
movsx esi, ax
push 0x10
shr esi, 0x1f
call dword [sym.imp.USER32.dll_GetKeyState]
movsx ecx, ax
mov eax, dword [esp + 0x10]
movzx eax, al
shr ecx, 0x1f
shl eax, 2
or ecx, eax
lea eax, [esi + esi]
or ecx, eax
push ebp
push ecx
push ebx
call fcn.004c48a1
pop ecx
push eax
mov ecx, edi
call fcn.004f39a6
test eax, eax
jne 0x4c4896
cmp byte [ebp], al
je 0x4c483c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0xc

Function at 0x4c5040
Capabilities:
Log keystrokes via polling

Disassembly:
push 0x12
call dword [sym.imp.USER32.dll_GetKeyState]
mov edx, dword [esp + 4]
mov ecx, edx
cwde
shr eax, 0x1f
add eax, eax
shr ecx, 3
and ecx, 1
shr edx, 2
or eax, ecx
and edx, 1
add eax, eax
or eax, edx
ret

Function at 0x4c52d0
Capabilities:
Open clipboard

Disassembly:
push esi
xor esi, esi
test esi, esi
jle 0x4c52e6
xor eax, eax
lea ecx, [esi - 1]
inc eax
shl eax, cl
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [esp + 8]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x4c52fe
inc esi
cmp esi, 8
jl 0x4c52d3
xor al, al
pop esi
ret
mov al, 1
pop esi
ret
Function at 0x4c5495
Capabilities:
Read clipboard data

Disassembly:
mov eax, 0x557045
call fcn.00538504
sub esp, 0x30
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x2b8]
call fcn.004c52d0
pop ecx
test al, al
je 0x4c561f
mov eax, dword [esi + 0x2ac]
xor ecx, ecx
inc ecx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x20], cl
mov dword [ebp - 0x24], eax
lea ecx, [eax + 0x10]
call fcn.004d1347
xor ebx, ebx
mov ecx, esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
call fcn.004f853c
mov edi, dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test al, al
je 0x4c550d
movzx eax, word [esi + 0x86a]
push eax
call edi
test eax, eax
jne 0x4c550a
movzx eax, word [esi + 0x86c]
push eax
call edi
test eax, eax
je 0x4c550d
push 2
pop ebx
cmp dword [esi + 0x53c], 1
mov ecx, esi
sete al
movzx eax, al
push eax
call fcn.004ef386
movzx eax, word [esi + 0x866]
push eax
call edi
test eax, eax
setne byte [ebp - 0xd]
test eax, eax
jne 0x4c557f
movzx eax, word [esi + 0x868]
push eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x4c557f
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4c557f
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x4c5573
mov eax, dword [ebp - 0x14]
cmp byte [eax], 2
jne 0x4c5573
mov byte [ebp - 0xd], cl
jmp 0x4c5578
xor eax, eax
mov byte [ebp - 0xd], al
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp byte [ebp - 0xd], 0
push 1
pop eax
push 0xd
cmovne ebx, eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x4c5600
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, eax
test ecx, ecx
je 0x4c5600
push ecx
push ecx
mov edx, esp
lea eax, [ecx + 2]
mov dword [ebp - 0x14], eax
mov dword [edx], ecx
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x18]
jne 0x4c55b0
sub ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x3c]
sar ecx, 1
mov dword [edx + 4], ecx
mov ecx, esi
push eax
call fcn.004c29c2
xor eax, eax
mov ecx, esi
inc eax
cmp dword [ebp - 0x28], 0x10
mov byte [ebp - 4], al
lea eax, [ebp - 0x3c]
cmovae eax, dword [ebp - 0x3c]
push ebx
push dword [ebp - 0x2c]
push eax
call fcn.004f2e8d
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor eax, eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], al
call fcn.004c7222
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
mov ecx, dword [ebp - 0x1c]
add ecx, 0x10
mov dword [ebp - 4], 2
call fcn.004d178d
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret