joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404c90
Capabilities:
Query environment variable

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
jne 0x404ccd
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push ebx
push 0xc00003fe
push 1
call fcn.004050e0
add esp, 0x14
pop edi
xor eax, eax
pop ebx
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
lea eax, [edi + edi]
push eax
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x404d0b
push eax
push str.expand_environment_string
push str.ExpandEnvironmentStrings__
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
ret
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x404d4c
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push ebx
push 0xc00003fe
push 1
call fcn.004050e0
add esp, 0x14
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
ret
mov eax, esi
pop esi
pop ebp
pop edi
pop ebx
ret

Function at 0x404d60
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, dword [esp + 8]
xor eax, eax
mov dword [esp + 8], eax
cmp word [ebp], ax
je 0x404e1e
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
push edi
mov edi, edi
cmp word [ebp], 0
mov esi, ebp
je 0x404d9f
lea esp, [esp]
cmp word [esi], 0x3d
je 0x404da5
add esi, 2
cmp word [esi], 0
jne 0x404d90
cmp word [esi], 0x3d
jne 0x404e09
xor eax, eax
mov word [esi], ax
cmp byte [esp + 0x18], al
je 0x404de3
add esi, 2
push esi
call fcn.00404c90
mov edi, eax
add esp, 4
test edi, edi
je 0x404de0
push edi
push ebp
call ebx
test eax, eax
jne 0x404dce
inc dword [esp + 0x14]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x404df0
push esi
jmp 0x404de5
push 0
push ebp
call ebx
test eax, eax
jne 0x404df0
inc dword [esp + 0x14]
add esi, 2
cmp word [esi], 0
je 0x404e09
lea esp, [esp]
add esi, 2
cmp word [esi], 0
jne 0x404e00
cmp word [esi + 2], 0
lea ebp, [esi + 2]
jne 0x404d80
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x404e40
Capabilities:
Query environment variable

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
push esi
call fcn.00404c50
add esp, 4
call fcn.00404e30
mov edi, eax
test esi, esi
je 0x404e67
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop esi
ret
Function at 0x4050e0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x40
push esi
push str.nssm
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x405146
mov ecx, dword [esp + 0x50]
xor eax, eax
test ecx, ecx
je 0x405118
lea edx, [esp + 0x50]
cmp eax, 0xf
jge 0x405118
add edx, 4
mov dword [esp + eax*4 + 4], ecx
mov ecx, dword [edx]
inc eax
test ecx, ecx
jne 0x405105
mov edx, dword [esp + 0x4c]
push 0
lea ecx, [esp + 8]
push ecx
push 0
push eax
push 0
push edx
mov dword [esp + eax*4 + 0x1c], 0
mov eax, dword [esp + 0x60]
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
add esp, 0x40
ret

Function at 0x405310
Capabilities:
Extract resource via kernel32 functions
Identify system language via api

Disassembly:
push edi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceExW]
movzx eax, ax
push eax
push esi
push 5
push 0
call edi
test eax, eax
jne 0x40534a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x717
je 0x40533d
xor eax, eax
pop edi
ret
push 0
push esi
push 5
push 0
call edi
test eax, eax
je 0x405339
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405339
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
push edx
push ecx
push eax
push 0
call dword [sym.imp.USER32.dll_CreateDialogIndirectParamW]
pop edi
ret
Function at 0x4084f0
Capabilities:
Delete registry value

Disassembly:
sub esp, 0x40
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
push esi
mov esi, dword [esp + 0x50]
push edi
mov edi, dword [esp + 0x4c]
push esi
push eax
push str._s_s
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push 0x1d
push eax
call fcn.004126d2
add esp, 0x18
test eax, eax
jge 0x408555
push 0
push str.delete_createfile_parameter__
push esi
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004126f3
add esp, 0x40
ret
lea ecx, [esp + 8]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ecx, dword [esp + 0x44]
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, esp
inc eax
call fcn.004126f3
add esp, 0x40
ret
Function at 0x4086c0
Capabilities:
Check if file exists
Move file

Disassembly:
mov eax, 0x10054
call fcn.00412710
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x10050], eax
push ebx
mov ebx, dword [esp + 0x1005c]
push ebp
push esi
mov esi, dword [esp + 0x10068]
push edi
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor ebp, ebp
push ebp
push 0x80
push 3
push ebp
push 7
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, ebp
je 0x40882d
lea ecx, [esp + 0x2c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x40874a
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x20]
xor ebx, ebx
push eax
mov dword [esp + 0x10080], ebx
mov dword [esp + 0x1007c], ebp
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
jmp 0x408758
mov ebp, dword [esp + 0x10070]
mov ebx, dword [esp + 0x10078]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x4087b5
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
push 0xffffffffffffffff
push 0xff676980
push 0
push ebp
call fcn.00413130
add edi, eax
adc ebx, edx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jg 0x4088a5
mov ebx, dword [esp + 0x10078]
mov ecx, dword [esp + 0x10074]
test ecx, ecx
jne 0x4087c4
test ebx, ebx
je 0x4087dc
mov eax, dword [esp + 0x4c]
cmp eax, ebx
jb 0x4088a5
jne 0x4087dc
cmp dword [esp + 0x50], ecx
jb 0x4088a5
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push 0x7fff
lea edx, [esp + 0x20]
lea ebx, [esp + 0x64]
mov ecx, esi
call fcn.004085f0
add esp, 4
mov eax, ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40886f
mov edx, dword [esp + 0x10]
push 0
mov ecx, ebx
push ecx
push esi
push edx
push 0x40000435
push 4
call fcn.004050e0
add esp, 0x18
jmp 0x4088a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4088a5
push ebp
push eax
call fcn.00404fa0
add esp, 4
push eax
push esi
push str.CreateFile__
push esi
push ebx
push 0xc0000427
push 1
call fcn.004050e0
add esp, 0x20
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
jmp 0x4087dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4088a5
push 0
push eax
call fcn.00404fa0
mov ecx, dword [esp + 0x18]
add esp, 4
push eax
lea eax, [esp + 0x68]
push eax
push str.MoveFile__
push esi
push ecx
push 0xc0000427
push 1
call fcn.004050e0
add esp, 0x20
mov ecx, dword [esp + 0x10060]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004126f3
add esp, 0x10054
ret
Function at 0x4088f0
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov ebx, 0x7d0
lea ecx, [ecx]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 0
push eax
mov eax, dword [ebp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40895d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x6d
je 0x40896b
cmp edi, 0x3e3
je 0x408964
cmp edi, 0x718
je 0x408941
or esi, 0xffffffff
jmp 0x40894d
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
add ebx, 0xbb8
cmp ebx, 0x4268
jl 0x408900
jmp 0x40896e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov esi, 1
jmp 0x40896e
or esi, 0xffffffff
mov ecx, dword [ebp + 0x2c]
cmp dword [ecx], 1
jne 0x4089a5
mov ebx, dword [esp + 0x24]
test byte [ebx], 1
jne 0x4089a2
push 0
push edi
call fcn.00404fa0
mov edx, dword [ebp + 4]
add esp, 4
push eax
mov eax, dword [ebp]
push edx
push eax
push 0xc0000432
push 1
call fcn.004050e0
add esp, 0x18
or dword [ebx], 1
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret

Function at 0x4089b0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov ebx, 0x7d0
lea ecx, [ecx]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 0
push eax
mov eax, dword [ebp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408a1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
je 0x408a1d
cmp esi, 0x6d
je 0x408a24
cmp esi, 0x70
je 0x408a01
cmp esi, 0x718
jne 0x408a08
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 0xbb8
cmp ebx, 0x4268
mov edi, 1
jl 0x4089c0
jmp 0x408a27
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
or edi, 0xffffffff
mov ebx, dword [esp + 0x24]
test byte [ebx], 2
jne 0x408a53
push 0
push esi
call fcn.00404fa0
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
add esp, 4
push eax
push ecx
push edx
push 0xc0000433
push 1
call fcn.004050e0
add esp, 0x18
or dword [ebx], 2
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x408e40
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, eax
mov dword [edi], 0
test ebx, ebx
je 0x408e82
cmp dword [ebx], 0
jne 0x408e82
test esi, esi
je 0x408e82
cmp dword [esi], 0
jne 0x408e82
push 0
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x408eb9
mov eax, dword [esi]
push 1
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x30
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x408ee1
push eax
push str.create_logging_thread__
push str.logger
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
pop edi
pop esi
xor eax, eax
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
mov ecx, dword [esp + 0x14]
push eax
push ebp
push ecx
push 0xc0000431
push 1
call fcn.004050e0
add esp, 0x18
pop edi
pop esi
xor eax, eax
pop ebp
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esi], edx
mov edx, dword [esp + 0x20]
push edi
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x28]
push 0
mov dword [esi + 8], eax
mov dword [esi + 0x10], edx
mov dword [esi + 4], ebp
mov eax, dword [ebx]
push esi
mov dword [esi + 0x14], eax
mov edx, dword [ecx]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
push 0x408a60
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x44]
push 0
push 0
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
jne 0x408f6d
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push 0xc0000424
push 1
call fcn.004050e0
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x409630
Capabilities:
Get token membership

Disassembly:
sub esp, 0x10
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0xc], eax
push ebx
xor ebx, ebx
lea eax, [esp + 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea ecx, [esp + 0x30]
push ecx
mov byte [0x42340d], bl
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], bl
mov byte [esp + 0x36], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x38], bl
mov byte [esp + 0x39], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40969f
mov edx, dword [esp + 4]
push 0x42340d
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [esp + 0x10]
pop ebx
xor ecx, esp
call fcn.004126f3
add esp, 0x10
ret
Function at 0x4096b0
Capabilities:
Accept command line arguments
Create process on windows

Disassembly:
sub esp, 0x3c
push ebx
push esi
push eax
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
push 0x3c
lea ecx, [esp + 0x14]
push 0
push ecx
call fcn.00412740
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0x14
push 0x7fff
push 0
mov dword [esp + 0x10], 0x3c
mov dword [esp + 0x1c], str.runas
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov dword [esp + 0x18], eax
test eax, eax
jne 0x409730
push str.elevate__
push str.GetModuleFileName__
push 0xc00001fa
call fcn.00412306
add eax, 0x40
push eax
call fcn.00405150
add esp, 0x10
pop esi
mov eax, 0x6f
pop ebx
add esp, 0x3c
ret
push 0x7fff
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xfffe
push 8
call ebx
push eax
call esi
mov esi, eax
test esi, esi
jne 0x40976b
mov edx, dword [esp + 0x18]
push edx
push eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push str.elevate__
push str.GetCommandLine__
jmp 0x40970f
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0x41d488
push 0xffffffffffffffff
push 0x7fff
push esi
call fcn.004126d2
mov eax, dword [esp + 0x5c]
mov eax, dword [eax]
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409790
sub eax, edx
push ebp
sar eax, 1
cmp word [esi], 0x22
push edi
lea edi, [eax + 1]
jne 0x4097ad
add edi, 2
movzx ecx, word [esi + edi*2]
push ecx
call fcn.004133db
add esp, 4
test eax, eax
je 0x4097d3
mov edi, edi
movzx edx, word [esi + edi*2 + 2]
inc edi
push edx
call fcn.004133db
add esp, 4
test eax, eax
jne 0x4097c0
lea ecx, [esp + 0x10]
lea eax, [esi + edi*2]
push ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 5
xor ebp, ebp
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x4097f6
lea ebp, [eax + 0x64]
mov edx, dword [esp + 0x20]
push edx
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push esi
push 0
call ebx
push eax
call edi
pop edi
mov eax, ebp
pop ebp
pop esi
pop ebx
add esp, 0x3c
ret
Function at 0x409fb0
Capabilities:
Enumerate threads

Disassembly:
sub esp, 0x1c
push ebp
push edi
xor edi, edi
push edi
push 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebp, eax
test ebp, ebp
jne 0x409ff2
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
mov eax, dword [esp + 0x30]
push eax
push 0xc0000408
push 1
call fcn.004050e0
add esp, 0x14
pop edi
xor eax, eax
pop ebp
add esp, 0x1c
ret
xor eax, eax
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0xc], eax
push ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], 0x1c
call sub.KERNEL32.dll_Thread32First
test eax, eax
jne 0x40a05b
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
mov edx, dword [esp + 0x30]
add esp, 4
push eax
push edx
push 0xc0000409
push 1
call fcn.004050e0
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebp
add esp, 0x1c
ret
mov eax, dword [esp + 0x14]
push ebx
mov ebx, dword [sym.imp.USER32.dll_PostThreadMessageW]
push esi
mov esi, dword [esp + 0x34]
cmp eax, dword [esi]
jne 0x40a080
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x18]
push 0
push ecx
push 0x12
push edx
call ebx
mov edi, eax
lea eax, [esp + 0x10]
push eax
push ebp
call sub.KERNEL32.dll_Thread32Next
test eax, eax
je 0x40a0b8
nop
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esi]
jne 0x40a0a9
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x18]
push 0
push edx
push 0x12
push eax
call ebx
or edi, eax
lea ecx, [esp + 0x10]
push ecx
push ebp
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x40a090
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x12
je 0x40a0e7
push 0
call esi
push eax
call fcn.00404fa0
mov edx, dword [esp + 0x38]
add esp, 4
push eax
push edx
push 0xc0000409
push 1
call fcn.004050e0
add esp, 0x14
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x1c
ret
Function at 0x40a230
Capabilities:
Enumerate gui resources
Terminate process

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x40a244
lea eax, [esi + 1]
pop esi
add esp, 0xc
ret
push edi
mov edi, dword [esp + 0x20]
test edi, edi
je 0x40a31a
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40a31a
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40a27b
cmp dword [esp + 0x18], 0x103
jne 0x40a31a
test byte [esi + 0x70484], 1
mov dword [esp + 8], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], 0
je 0x40a2aa
lea edx, [esp + 8]
push edx
push esi
call fcn.0040a100
add esp, 8
test eax, eax
je 0x40a31a
test byte [esi + 0x70484], 2
je 0x40a2e3
lea eax, [esp + 8]
push eax
push 0x409f50
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [esp + 0x10], 0
je 0x40a2e3
mov ecx, dword [esi + 0x7048c]
push ecx
push str.kill_process
push esi
call fcn.0040e7e0
add esp, 0xc
test eax, eax
je 0x40a31a
test byte [esi + 0x70484], 4
je 0x40a325
lea edx, [esp + 8]
push edx
lea eax, [esi + 2]
push eax
call fcn.00409fb0
add esp, 8
test eax, eax
je 0x40a325
mov ecx, dword [esi + 0x70490]
push ecx
push str.kill_process
push esi
call fcn.0040e7e0
add esp, 0xc
test eax, eax
jne 0x40a325
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret
test byte [esi + 0x70484], 8
je 0x40a342
mov edx, dword [esi + 0x704b8]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
add esp, 0xc
ret
pop edi
xor eax, eax
pop esi
add esp, 0xc
ret
Function at 0x40a630
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov eax, 0x1020c
call fcn.00412710
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x10208], eax
push str.NSSM
push str.SYSTEMCurrentControlSetServicesEventLogApplication_s
push 0xffffffffffffffff
lea eax, [esp + 0x14]
push 0xff
push eax
call fcn.004126d2
add esp, 0x14
push 0
test eax, eax
jge 0x40a69f
push str.create_messages__
push str.eventlog_registry
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 1
mov ecx, dword [esp + 0x10208]
xor ecx, esp
call fcn.004126f3
add esp, 0x1020c
ret
lea ecx, [esp + 4]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40a705
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
lea eax, [esp + 0x10]
push eax
push 0xc00003f9
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 2
mov ecx, dword [esp + 0x10208]
xor ecx, esp
call fcn.004126f3
add esp, 0x1020c
ret
push 0x7fff
lea ecx, [esp + 0x20c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x208]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a724
mov ecx, dword [esp]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x210]
push eax
push 1
push 0
push str.EventMessageFile
push ecx
call esi
mov eax, dword [esp + 4]
push 4
lea edx, [esp + 0xc]
push edx
push 4
push 0
push str.TypesSupported
push eax
mov dword [esp + 0x20], 7
call esi
mov ecx, dword [esp + 0x1020c]
pop esi
xor ecx, esp
xor eax, eax
call fcn.004126f3
add esp, 0x1020c
ret
Function at 0x40a790
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x20c
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x208], eax
mov eax, dword [esp + 0x210]
push esi
mov esi, dword [esp + 0x218]
push str.AppExit
push eax
push str.SYSTEMCurrentControlSetServices_sParameters_s
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push 0xff
push eax
call fcn.004126d2
add esp, 0x18
test eax, eax
jge 0x40a80c
push 0
push str.create_exit_action__
push str.NSSM_REG_EXIT
push 0xc00003eb
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 1
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004126f3
add esp, 0x20c
ret
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 8]
push edx
push 0
push 0x20006
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x40a878
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
lea ecx, [esp + 0x14]
push ecx
push 0xc00003f9
push 1
call fcn.004050e0
add esp, 0x14
mov eax, 2
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004126f3
add esp, 0x20c
ret
cmp dword [esp + 8], 2
jne 0x40a893
cmp byte [esp + 0x21c], 0
jne 0x40a893
mov edx, dword [esp + 4]
push edx
jmp 0x40a91b
mov eax, esi
lea edx, [eax + 2]
jmp 0x40a8a0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a8a0
mov ecx, dword [esp + 4]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push esi
push 1
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40a916
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404fa0
add esp, 4
push eax
push str.AppExit
push 0xc00003fb
push 1
call fcn.004050e0
mov edx, dword [esp + 0x18]
add esp, 0x14
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 3
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004126f3
add esp, 0x20c
ret
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20c]
pop esi
xor ecx, esp
xor eax, eax
call fcn.004126f3
add esp, 0x20c
ret