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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp + 8], eax
push 0x14
lea eax, [edi + 0x14]
push eax
lea ebx, [esi + 0x28]
push ebx
call fcn.00011dd0
push 8
lea ecx, [edi + 0x2e]
lea eax, [esi + 0x64]
push ecx
push eax
call fcn.00011dd0
push 0x28
lea ecx, [edi + 0x36]
lea eax, [esi + 0x3c]
push ecx
push eax
call fcn.00011dd0
push 0xa
pop ecx
mov edx, ebx
mov eax, ebx
call fcn.0001e856
push 4
lea eax, [esi + 0x64]
pop ecx
mov edx, eax
call fcn.0001e856
push 0x14
lea eax, [esi + 0x3c]
pop ecx
mov edx, eax
call fcn.0001e856
and word [esi + 0xc], 0
and word [esi + 0xe], 0
test byte [edi + 0xa7], 4
je 0x1e8fe
mov word [esi + 0xc], 1
lea eax, [edi + 0xa4]
test byte [eax], 1
je 0x1e91c
or byte [esi + 0xc], 2
test byte [edi + 0xaa], 1
je 0x1e91c
mov word [esi + 0xe], 1
test byte [eax], 0x20
je 0x1e932
or byte [esi + 0xc], 4
test byte [edi + 0xaa], 0x20
je 0x1e932
or byte [esi + 0xe], 2
test byte [edi + 0x99], 1
je 0x1e94b
mov ax, word [esi + 0xc]
test al, 1
je 0x1e94b
or ax, 8
mov word [esi + 0xc], ax
test byte [edi + 0xa8], 0x20
je 0x1e961
test byte [edi + 0xae], 0x20
je 0x1e961
or byte [esi + 0xc], 0x40
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x14]
add eax, 0x28
push eax
call sub.SCSIPORT.SYS_ScsiPortReadRegisterUlong
shr eax, 4
and eax, 0xf
cmp eax, 1
jne 0x1e981
or byte [esi + 0xc], 0x10
jmp 0x1e98a
cmp eax, 2
jne 0x1e98a
or byte [esi + 0xc], 0x20
mov eax, dword [ebx + 0x14]
push 0xb
add eax, 0x78
push eax
call sub.SCSIPORT.SYS_ScsiPortWriteRegisterUlong
mov eax, dword [ebx + 0x14]
add eax, 0x7c
push eax
call sub.SCSIPORT.SYS_ScsiPortReadRegisterUlong
and eax, 0xfffff7ff
test byte [esi + 0xc], 0x10
je 0x1e9b4
or eax, 0x1000
push eax
mov eax, dword [ebx + 0x14]
add eax, 0x7c
push eax
call sub.SCSIPORT.SYS_ScsiPortWriteRegisterUlong
test byte [esi + 0xc], 1
je 0x1e9db
mov eax, dword [edi + 0xc8]
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0xcc]
mov dword [esi + 0x1c], eax
jmp 0x1e9e5
mov eax, dword [edi + 0x78]
and dword [esi + 0x1c], 0
mov dword [esi + 0x18], eax
test byte [edi + 0x6a], 2
je 0x1ea03
lea eax, [edi + 0x80]
test byte [eax], 0xf
je 0x1ea03
cmp byte [eax], 2
sbb al, al
add eax, 4
mov byte [esi + 0x11], al
jmp 0x1ea07
mov byte [esi + 0x11], 2
mov byte [esi + 0x12], 0xff
mov ax, word [edi + 0x7e]
test al, 4
je 0x1ea19
mov byte [esi + 0x12], 2
jmp 0x1ea2b
test al, 2
je 0x1ea23
mov byte [esi + 0x12], 1
jmp 0x1ea2b
test al, 1
je 0x1ea2b
mov byte [esi + 0x12], 0
mov byte [esi + 0x13], 0xff
test byte [edi + 0x6a], 4
je 0x1ea53
xor al, al
xor ecx, ecx
movzx ebx, word [edi + 0xb0]
xor edx, edx
inc edx
shl edx, cl
test ebx, edx
je 0x1ea4c
mov byte [esi + 0x13], al
inc al
inc ecx
cmp al, 7
jb 0x1ea39
push 0x200
push edi
call fcn.00012018
pop edi
mov dword [esi + 0x6c], eax
pop esi
pop ebx
pop ebp
ret 8
Function at 0x1ee32
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ax, word [edi + 8]
push 4
pop esi
mov ebx, dword [ebp + 8]
mov ecx, eax
movzx eax, ax
cdq
idiv esi
shr ecx, 2
movzx eax, cl
imul eax, eax, 0xc78
lea eax, [eax + ebx + 0x38]
movzx edx, dl
imul edx, edx, 0x2e0
add eax, edx
cmp cl, 5
lea esi, [eax + 0xd0]
mov eax, dword [eax + 0x140]
jb 0x1ee7e
int3
mov cl, byte [edi + 0x1e]
cmp cl, 1
jne 0x1eea1
push eax
push esi
call fcn.0001e87e
cmp byte [esi + 3], 1
je 0x1ee94
int3
mov byte [esi + 3], 2
push esi
push ebx
call fcn.0001ed74
jmp 0x1eee2
cmp cl, 2
jne 0x1eeac
mov byte [esi + 3], 3
jmp 0x1ee98
cmp cl, 3
jne 0x1eeb7
mov byte [esi + 3], 4
jmp 0x1ee98
cmp cl, 4
jne 0x1eec2
mov byte [esi + 3], 5
jmp 0x1ee98
cmp cl, 0xa
jne 0x1eecd
mov byte [esi + 3], 6
jmp 0x1ee98
cmp cl, 0xc
jne 0x1eee2
movzx eax, word [esi]
push eax
push 0x1ee02
call sub.ntoskrnl.exe_DbgPrint
pop ecx
pop ecx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x1ef18
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0x260
lea esi, [edi + 0x80]
push esi
call fcn.00011d26
movzx eax, word [edi]
push eax
push 0x1eeea
call sub.ntoskrnl.exe_DbgPrint
and byte [edi + 0xc], 0xf7
mov ebx, dword [ebp + 8]
mov byte [esi + 0x1c], 0xe1
mov byte [esi + 0x1d], 1
mov byte [esi + 0x1e], 0xc
mov ax, word [edi]
mov word [esi + 8], ax
mov eax, dword [ebx]
pop ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], 0x200
mov eax, dword [edi + 0x70]
pop ecx
mov dword [esi + 0x2c], eax
push 0
lea eax, [esi + 0x34]
push eax
mov dword [esi + 0x258], fcn.0001ee32
call fcn.00011ea2
push dword [esi + 0x18]
lea eax, [esi + 0x34]
push dword [edi + 0x7c]
push dword [edi + 0x78]
push eax
call fcn.00011ec4
push esi
push dword [ebx]
call fcn.0001b7f4
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x20185
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [0x1f870]
test eax, eax
mov ecx, 0xbb40
je 0x2019c
cmp eax, ecx
jne 0x201bf
mov edx, dword [sym.imp.ntoskrnl.exe_KeTickCount]
mov eax, 0x1f870
shr eax, 8
xor eax, dword [edx]
and eax, 0xffff
mov dword [0x1f870], eax
jne 0x201bf
mov eax, ecx
mov dword [0x1f870], eax
not eax
mov dword [0x1f86c], eax
pop ebp
jmp 0x10c3a
Function at 0x10002916
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
push 1
push 0
call sub.kernel32.dll_CreateMutexA
mov ebx, dword [ebp + 0x10]
mov dword [ebx], eax
call sub.kernel32.dll_GetLastError
cmp eax, 0xb7
jne 0x10002945
push dword [ebp + 0x10]
call fcn.100028f2
mov eax, 0
jmp 0x10002958
cmp dword [ebp + 0xc], 1
jne 0x10002953
push dword [ebp + 0x10]
call fcn.100028f2
mov eax, 1
leave
ret 0xc

Function at 0x10002cfc
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push 0
pop dword [ebp - 4]
push 0
pop dword [ebp - 8]
mov ebx, 8
or ebx, 0x20019
or ebx, 0x20006
lea eax, [ebp - 8]
push eax
push ebx
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.advapi32.dll_RegOpenKeyExA
or eax, eax
jne 0x10002dc0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
push dword [ebp - 8]
call sub.advapi32.dll_RegQueryInfoKeyA
or eax, eax
jne 0x10002dc0
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push 0x40
call sub.kernel32.dll_GlobalAlloc
or eax, eax
je 0x10002db8
mov dword [ebp - 4], eax
push dword [ebp - 0x10]
pop dword [ebp - 0x14]
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 4]
push 0
push dword [ebp - 8]
call sub.advapi32.dll_RegEnumKeyExA
or eax, eax
jne 0x10002da5
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.10002cfc
jmp 0x10002d73
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.advapi32.dll_RegDeleteKeyA
push dword [ebp - 4]
call sub.kernel32.dll_GlobalFree
push dword [ebp - 8]
call sub.advapi32.dll_RegCloseKey
leave
ret 8

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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push 0
pop dword [ebp - 0xc]
cmp dword [ebp + 0xc], 0xffffffff
je 0x10003282
push 0
push dword [ebp + 0xc]
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 4], eax
push dword [ebp + 8]
call fcn.10003a11
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.1000319d
cmp eax, 1
jne 0x1000327a
push dword [ebp + 8]
call fcn.10003092
or edx, edx
je 0x1000327a
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push edx
push dword [ebp + 0xc]
call sub.kernel32.dll_ReadFile
push 1
pop dword [ebp - 0xc]
push dword [ebp + 0xc]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0xc]
leave
ret 8

Function at 0x100032c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0
pop dword [ebp - 4]
cmp dword [ebp + 0xc], 0xffffffff
je 0x10003310
cmp dword [ebp + 0x10], 4
jne 0x100032e5
push 2
push 0
push 0
push dword [ebp + 0xc]
call sub.kernel32.dll_SetFilePointer
push dword [ebp + 8]
call fcn.10003092
or edx, edx
je 0x10003308
mov ebx, eax
push 0
lea eax, [ebp - 8]
push eax
push ebx
push edx
push dword [ebp + 0xc]
call sub.kernel32.dll_WriteFile
push 1
pop dword [ebp - 4]
push dword [ebp + 0xc]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 4]
leave
ret 0xc
Function at 0x100043ec
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push 0x10009322
call sub.kernel32.dll_GetModuleHandleA
cmp eax, 0
je 0x100045dd
mov dword [ebp - 4], eax
push str.ZwQuerySystemInformation
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009345], eax
push str.ZwQueryInformationProcess
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009363], eax
push 0x10009388
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009384], eax
push str.LdrGetDllHandle
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009393], eax
push str.LdrGetProcedureAddress
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100093a7], eax
push str.RtlInitUnicodeString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100093c2], eax
push str.RtlUnicodeStringToAnsiString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100093db], eax
push str.RtlFreeAnsiString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100093fc], eax
push str.ZwQueueApcThread
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x1000945e], eax
push str.ZwQueryInformationThread
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009380], eax
push str.ZwTerminateProcess
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009473], eax
push str.ZwResumeThread
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x1000948a], eax
push str.RtlInitString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009412], eax
push str.RtlAnsiStringToUnicodeString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009424], eax
push str.RtlFreeUnicodeString
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x10009445], eax
push str.ZwProtectVirtualMemory
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x1000949d], eax
push str.RtlCreateUserThread
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100094b8], eax
push str.ZwClose
push dword [ebp - 4]
call sub.kernel32.dll_GetProcAddress
cmp eax, 0
je 0x100045dd
mov dword [0x100094d0], eax
mov eax, 1
leave
ret
mov eax, 0
leave
ret
Function at 0x1000481c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0x40
push 0x3000
push dword [ebp + 0x10]
push 0
push dword [ebp + 8]
call sub.kernel32.dll_VirtualAllocEx
or eax, eax
je 0x10004855
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
push dword [ebp + 8]
call sub.kernel32.dll_WriteProcessMemory
mov eax, dword [ebp - 4]
leave
ret 0xc

Function at 0x10004859
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push 0
pop dword [ebp - 0xc]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.1000481c
or eax, eax
je 0x1000497a
mov dword [ebp - 4], eax
push dword [ebp + 0xc]
call fcn.100047c8
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1000481c
or eax, eax
je 0x1000497a
mov dword [ebp - 8], eax
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
push 0
push 0
push dword [ebp + 8]
call sub.kernel32.dll_CreateRemoteThread
or eax, eax
je 0x1000497a
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x18], 2
jne 0x100048d5
push dword [ebp - 0x10]
call sub.kernel32.dll_CloseHandle
push 1
pop dword [ebp - 0xc]
jmp 0x1000497a
cmp dword [ebp + 0x18], 0
jne 0x100048e6
push dword [ebp - 0x10]
pop dword [ebp - 0xc]
jmp 0x1000497a
cmp dword [ebp + 0x18], 1
jne 0x10004939
push 0xffffffffffffffff
push dword [ebp - 0x10]
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call sub.kernel32.dll_GetExitCodeThread
or eax, eax
jne 0x1000490b
push 0
pop dword [ebp - 0xc]
push dword [ebp - 0x10]
call sub.kernel32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 4]
push dword [ebp + 8]
call sub.kernel32.dll_VirtualFreeEx
push 0x8000
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call sub.kernel32.dll_VirtualFreeEx
jmp 0x1000497a
cmp dword [ebp + 0x18], 3
jne 0x1000497a
push 0xffffffffffffffff
push dword [ebp - 0x10]
call sub.kernel32.dll_WaitForSingleObject
push dword [ebp - 0x10]
call sub.kernel32.dll_CloseHandle
push 0x8000
push 0
push dword [ebp - 4]
push dword [ebp + 8]
call sub.kernel32.dll_VirtualFreeEx
push 0x8000
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call sub.kernel32.dll_VirtualFreeEx
push 1
pop dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
leave
ret 0x14
Function at 0x10004cab
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push 0
pop dword [ebp - 4]
push 0x30
lea eax, [ebp - 0x54]
push eax
call fcn.100010ec
push 0x10000000
pop dword [ebp - 8]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.10002493
cmp eax, 0
je 0x10004e88
push dword [eax + 0x1c]
pop dword [ebp - 0xc]
push dword [eax + 0x38]
pop dword [ebp - 0x10]
mov eax, dword [ebp - 8]
add eax, 0x10000
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
push 0x40
push 0x3000
push dword [ebp - 0x10]
push dword [ebp - 0x18]
call sub.kernel32.dll_VirtualAlloc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x10004d3f
push 0x8000
push 0
push dword [ebp - 0x14]
call sub.kernel32.dll_VirtualFree
push 0x40
push 0x3000
push dword [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp + 8]
call sub.kernel32.dll_VirtualAllocEx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x30000000
jae 0x10004d50
mov eax, dword [ebp - 0x14]
cmp eax, 0
je 0x10004ce9
mov eax, dword [ebp - 0x14]
cmp eax, 0
je 0x10004e88
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.100051b6
cmp eax, 0
je 0x10004e88
push 0
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push dword [ebp - 0x14]
push dword [ebp + 8]
call sub.kernel32.dll_WriteProcessMemory
cmp eax, 0
je 0x10004e88
push 0x10004ea4
call fcn.100047c8
push eax
push 0x10004ea4
push dword [ebp + 8]
call fcn.1000481c
cmp eax, 0
je 0x10004e88
mov dword [ebp - 0x48], eax
push 0x100050d7
call fcn.100047c8
push eax
push 0x100050d7
push dword [ebp + 8]
call fcn.1000481c
cmp eax, 0
je 0x10004e88
mov dword [ebp - 0x44], eax
push dword [0x10009384]
pop dword [ebp - 0x40]
push dword [0x10009393]
pop dword [ebp - 0x3c]
push dword [0x100093a7]
pop dword [ebp - 0x38]
push dword [0x10009412]
pop dword [ebp - 0x34]
push dword [0x10009424]
pop dword [ebp - 0x30]
push dword [0x10009445]
pop dword [ebp - 0x2c]
push dword [0x1000949d]
pop dword [ebp - 0x28]
cmp dword [ebp + 0xc], 0
je 0x10004e70
push 0x10004c27
call fcn.100047c8
push eax
push 0x10004c27
push dword [ebp + 8]
call fcn.1000481c
cmp eax, 0
je 0x10004e88
mov dword [ebp - 0x20], eax
push 0x30
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 8]
call fcn.1000481c
cmp eax, 0
je 0x10004e88
mov dword [ebp - 0x1c], eax
push 0
push 0
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp + 0xc]
call fcn.10004635
mov dword [ebp - 4], eax
jmp 0x10004e88
push 3
push 0x30
lea eax, [ebp - 0x54]
push eax
push 0x10004c27
push dword [ebp + 8]
call fcn.10004859
mov dword [ebp - 4], eax
cmp dword [ebp - 0x54], 0
je 0x10004e9d
push 0x8000
push 0
push dword [ebp - 0x54]
call sub.kernel32.dll_VirtualFree
mov eax, dword [ebp - 4]
leave
ret 0x10
Function at 0x10005321
Capabilities:
Enumerate threads
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push 0
pop dword [ebp - 0x28]
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebp - 0x2c], eax
push 0
push 4
call sub.kernel32.dll_CreateToolhelp32Snapshot
cmp eax, 0xffffffff
je 0x100053c8
mov dword [ebp - 4], eax
mov eax, 0x1c
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call sub.kernel32.dll_Thread32First
or eax, eax
je 0x100053bb
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
jne 0x100053aa
cmp ebx, dword [ebp - 0x2c]
je 0x100053aa
push dword [ebp - 0x1c]
push 0
push 2
call sub.kernel32.dll_OpenThread
or eax, eax
je 0x100053aa
mov dword [ebp - 8], eax
cmp dword [ebp + 0xc], 0
jne 0x10005394
push dword [ebp - 8]
call sub.kernel32.dll_SuspendThread
jmp 0x100053a2
cmp dword [ebp + 0xc], 1
jne 0x100053a2
push dword [ebp - 8]
call sub.kernel32.dll_ResumeThread
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call sub.kernel32.dll_Thread32Next
cmp eax, 0
jne 0x10005361
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
push 1
pop dword [ebp - 0x28]
mov eax, dword [ebp - 0x28]
leave
ret 8

Function at 0x1000541c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push 0
pop dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
push 0
pop dword [eax]
lea eax, [ebp - 0xc]
push eax
push 0x40
push 0xa
push dword [ebp + 8]
call sub.kernel32.dll_VirtualProtect
or eax, eax
je 0x100054f5
push 5
push dword [ebp + 8]
call fcn.100053eb
mov dword [ebp - 4], eax
or eax, eax
je 0x100054e4
mov eax, 0xa
add eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
push 0x40
push 0x1000
push dword [ebp - 0x18]
push 0
call sub.kernel32.dll_VirtualAlloc
or eax, eax
je 0x100054e4
mov dword [ebp - 8], eax
mov esi, eax
push dword [ebp + 8]
pop dword [esi]
add esi, 4
mov eax, dword [ebp - 4]
mov byte [esi], al
inc esi
push 0
push dword [ebp - 4]
push esi
push dword [ebp + 8]
call fcn.10001104
add esi, dword [ebp - 4]
mov al, 0xe9
mov byte [esi], al
inc esi
mov eax, dword [ebp + 8]
sub eax, dword [ebp - 8]
sub eax, 0xa
mov dword [esi], eax
mov esi, dword [ebp + 8]
mov al, 0xe9
mov byte [esi], al
inc esi
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp + 8]
sub eax, 5
mov dword [esi], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp - 8]
add ebx, 5
mov dword [eax], ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp - 8]
call sub.kernel32.dll_VirtualProtect
push 1
pop dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push 0xa
push dword [ebp + 8]
call sub.kernel32.dll_VirtualProtect
mov eax, dword [ebp - 0x14]
leave
ret 0xc
Function at 0x10005543
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push esi
push edi
push ebx
push ecx
push edx
push 0
pop dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x100055bb
mov eax, dword [ebp + 8]
sub eax, 5
mov dword [ebp - 4], eax
mov bl, byte [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 8], eax
movzx eax, bl
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push 0x40
push dword [ebp - 0xc]
push dword [ebp - 8]
call sub.kernel32.dll_VirtualProtect
or eax, eax
je 0x1000559a
push 0
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.10001104
push 1
pop dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 8]
call sub.kernel32.dll_VirtualProtect
push 0x8000
push 0
push dword [ebp - 4]
call sub.kernel32.dll_VirtualFree
mov eax, dword [ebp - 0x18]
pop edx
pop ecx
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x10005670
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push esi
push edi
push ebx
push ecx
push 0
pop dword [ebp - 4]
push 0x10
push dword [ebp + 0xc]
call fcn.100010ec
push dword [ebp + 8]
push 0
push 4
call sub.kernel32.dll_OpenFileMappingA
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
cmp dword [esi], 0
je 0x100056cd
push 0
push 0
push 0
push 4
push dword [esi]
call sub.kernel32.dll_MapViewOfFile
or eax, eax
je 0x100056cd
mov esi, dword [ebp + 0xc]
push dword [eax]
pop dword [esi + 0xc]
add eax, 4
push dword [eax]
pop dword [esi + 8]
add eax, 4
mov dword [esi + 4], eax
push 1
pop dword [ebp - 4]
mov eax, dword [ebp - 4]
pop ecx
pop ebx
pop edi
pop esi
leave
ret 8
Function at 0x10005725
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe68
push esi
push ecx
push edi
push ebx
push edx
push 0
push 2
call sub.kernel32.dll_CreateToolhelp32Snapshot
cmp eax, 0xffffffff
je 0x10005852
mov dword [ebp - 0x12c], eax
push 0x128
pop dword [ebp - 0x128]
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x12c]
call sub.kernel32.dll_Process32First
or eax, eax
je 0x10005847
mov eax, 0
or eax, eax
jne 0x1000582c
mov eax, dword [ebp - 0x120]
cmp dword [0x10009558], eax
je 0x1000582c
lea eax, [ebp - 0x198]
push eax
push dword [ebp - 0x120]
push str.GlobalSYSTEM_DEMETRA_HOOK_
call fcn.100020f2
lea eax, [ebp - 0x134]
push eax
push 0
lea eax, [ebp - 0x198]
push eax
call fcn.10002916
or eax, eax
je 0x1000582c
lea eax, [ebp - 0x198]
push eax
push dword [ebp - 0x120]
push str.GlobalSYSTEM_DEMETRA_UNIQ_
call fcn.100020f2
lea eax, [ebp - 0x198]
push eax
call fcn.100028cf
or eax, eax
jne 0x10005820
push dword [ebp - 0x120]
push 0
push 0x1f0fff
call sub.kernel32.dll_OpenProcess
or eax, eax
je 0x10005820
mov dword [ebp - 0x130], eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push dword [ebp - 0x130]
call fcn.10004cab
push dword [ebp - 0x130]
call sub.kernel32.dll_CloseHandle
lea eax, [ebp - 0x134]
push eax
call fcn.100028f2
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x12c]
call sub.kernel32.dll_Process32Next
cmp eax, 0
jne 0x10005770
push dword [ebp - 0x12c]
call sub.kernel32.dll_CloseHandle
pop edx
pop ebx
pop edi
pop ecx
pop esi
leave
ret 8

Function at 0x10006dbb
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
cmp dword [ebp + 0xc], 1
jne 0x10006e1e
push dword [ebp + 8]
pop dword [0x100098bc]
call sub.kernel32.dll_GetCurrentProcessId
mov ebx, eax
lea eax, [ebp - 0x64]
push eax
push ebx
push str.GlobalSYSTEM_DEMETRA_UNIQ_
call fcn.100020f2
push 0x10009808
push 0
lea eax, [ebp - 0x64]
push eax
call fcn.10002916
or eax, eax
je 0x10006e17
mov dword [ebp - 0x68], 0
lea eax, [ebp - 0x68]
push eax
push 0
push 0
push 0x10006f0b
push 0
push 0
call sub.kernel32.dll_CreateThread
mov eax, 1
jmp 0x10006e39
cmp dword [ebp + 0xc], 0
jne 0x10006e2b
call fcn.10006e9e
jmp 0x10006e39
cmp dword [ebp + 0xc], 2
jne 0x10006e33
jmp 0x10006e39
cmp dword [ebp + 0xc], 3
jne 0x10006e39
leave
ret 0xc