joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4080f0
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41c3fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push edi
lea ecx, [esp + 4]
call fcn.00409fa0
mov ax, word [0x428280]
mov ecx, 0x1f
mov word [esp + 0xc], ax
xor eax, eax
lea edi, [esp + 0xe]
lea edx, [esp + 0xc]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x94], 0
push ecx
push edx
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea eax, [esp + 0xc]
mov ecx, 0x40
pop edi
cmp word [eax], 0x5c
jne 0x408165
mov word [eax], 0x23
add eax, 2
dec ecx
jne 0x40815a
lea eax, [esp + 8]
lea ecx, [esp]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerMountPoints2_s
push ecx
call sub.MFC42u.DLL_CString::Format_1
mov eax, dword [esp + 0xc]
add esp, 0xc
lea edx, [esp + 4]
push edx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x408257
push esi
push 0x76
lea ecx, [esp + 8]
call sub.MFC42u.DLL_CString::LoadStringW
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [eax - 8]
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 1
push 0
push str._CommentFromDesktopINI
push edx
call esi
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [eax - 8]
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 1
push 0
push str._CommentFromReg
push edx
call esi
push 0x75
lea ecx, [esp + 8]
call sub.MFC42u.DLL_CString::LoadStringW
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x408211
cmp word [eax], 0
je 0x408211
push eax
lea ecx, [esp + 8]
call fcn.0040a0d8
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [eax - 8]
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 1
push 0
push str._LabelFromDesktopINI
push edx
call esi
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [eax - 8]
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push 1
push 0
push str._LabelFromReg
push edx
call esi
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
lea ecx, [esp]
mov dword [esp + 0x90], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x88]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x94
ret 0xc
Function at 0x408290
Capabilities:
Delete registry key

Disassembly:
push 0xffffffffffffffff
push 0x41c41b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push edi
lea ecx, [esp + 4]
call fcn.00409fa0
mov ax, word [0x428280]
mov ecx, 0x1f
mov word [esp + 8], ax
xor eax, eax
lea edi, [esp + 0xa]
mov dword [esp + 0x90], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x98]
pop edi
test eax, eax
je 0x40833c
cmp word [eax], 0
je 0x40833c
lea ecx, [esp + 4]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea eax, [esp + 4]
mov ecx, 0x40
cmp word [eax], 0x5c
jne 0x40830f
mov word [eax], 0x23
add eax, 2
dec ecx
jne 0x408304
lea edx, [esp + 4]
lea eax, [esp]
push edx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerMountPoints2_s
push eax
call sub.MFC42u.DLL_CString::Format_1
mov ecx, dword [esp + 0xc]
add esp, 0xc
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [esp]
mov dword [esp + 0x8c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x84]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x90
ret 8
Function at 0x408390
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41dc68
push 0x40a43e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x30], edi
push 0x250
call sub.MFC42u.DLL_operatornew
add esp, 4
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, edi
je 0x4083ed
push 0x208
call sub.MFC42u.DLL_operatornew
add esp, 4
mov ebx, eax
mov dword [ebp - 0x28], ebx
cmp eax, edi
jne 0x408400
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], edi
mov eax, dword [ebp + 8]
cmp eax, edi
je 0x40840f
call eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
je 0x40848a
mov edi, 2
mov dword [ebp - 0x34], edi
cmp edi, 0x1a
jge 0x40848a
mov eax, 1
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 0x30]
test ecx, eax
je 0x408487
push str.A:.
push ebx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea edx, [edi + 0x41]
mov word [ebx], dx
mov eax, dword [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
je 0x408487
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x408480
mov eax, dword [ebp - 0x24]
cmp eax, 3
jg 0x408480
inc eax
mov dword [ebp - 0x24], eax
jmp 0x408463
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
inc edi
jmp 0x40841a
lea esi, [ebx + 0x20]
push 0xf4
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40851e
mov dx, word [esi]
mov word [ebx + 0x22], dx
mov word [ebx + 0x26], 0
mov ecx, 8
mov esi, str.FGVDiskRLocal_
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x5c
lea eax, [ebx + 0x20]
push eax
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40851e
mov word [eax], 0
push str..
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov eax, dword [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
je 0x40851e
xor edi, edi
mov dword [ebp - 0x24], edi
mov ecx, dword [ebp - 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x408517
cmp edi, 3
jg 0x408517
inc edi
jmp 0x4084fd
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 4], 0xffffffff
call fcn.00408540
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4085e0
Capabilities:
Delete file
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebp, ebp
push edi
je 0x40871a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40871a
push eax
mov eax, dword [esp + 0x20]
and eax, 0xffff
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x40871a
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
je 0x40871a
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40871a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40871a
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 1
push 0
push 2
push 0x40000000
push ebp
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x408697
push 0
push 0x80
push 5
push 0
push 2
push 0x40000000
push ebp
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x40871a
mov ecx, dword [esp + 0x20]
xor ebp, ebp
xor ebx, ebx
cmp esi, ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ecx
jbe 0x4086fa
jmp 0x4086b1
mov esi, dword [esp + 0x10]
lea edx, [ebp + 0x10000]
cmp edx, esi
jae 0x4086c2
mov esi, 0x10000
jmp 0x4086c4
sub esi, ebp
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push 0
push eax
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test ebx, ebx
je 0x4086fa
mov eax, dword [esp + 0x1c]
cmp esi, eax
jne 0x4086fa
mov ecx, dword [esp + 0x20]
add ebp, eax
add ecx, eax
mov eax, dword [esp + 0x10]
cmp ebp, eax
mov dword [esp + 0x20], ecx
jb 0x4086ad
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x408710
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0xc

Function at 0x408730
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x208
mov ax, word [0x428280]
push ebp
mov ebp, ecx
push edi
mov word [esp + 8], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xa]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
push 0x104
push ecx
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4087ed
cmp word [esp + eax*2 + 6], 0x5c
push ebx
push esi
lea esi, [esp + eax*2 + 0xe]
je 0x408782
add esi, 2
mov word [esi], 0x5c
mov edi, dword [sym.imp.MSVCRT.dll_wcscpy]
add esi, 2
push 0x426f58
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 8
lea edx, [esp + 0x10]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x4087be
push str.FGDRIVERS
lea eax, [esp + 0x14]
push 0x93
push eax
mov ecx, ebp
call fcn.004085e0
push 0x426f3c
push esi
call edi
add esp, 8
lea ecx, [esp + 0x10]
push ecx
call ebx
pop esi
cmp eax, 0xffffffff
pop ebx
jne 0x4087ed
push str.FGDRIVERS
lea edx, [esp + 0xc]
push 0x94
push edx
mov ecx, ebp
call fcn.004085e0
pop edi
pop ebp
add esp, 0x208
ret
Function at 0x408840
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
sub esp, 8
push ebx
push esi
push edi
mov dword [esp + 0x10], ecx
push 0x208
call sub.MFC42u.DLL_operatornew
push 0x250
mov esi, eax
call sub.MFC42u.DLL_operatornew
mov ebx, eax
mov eax, dword [esp + 0x20]
push 0x104
push eax
push esi
call dword [sym.imp.MSVCRT.dll_wcsncpy]
push 0x104
push 0x426f94
push esi
call dword [sym.imp.MSVCRT.dll_wcsncat]
add esp, 0x20
mov ecx, 0x94
xor eax, eax
mov edi, ebx
push ebx
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x408958
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll__snwprintf]
lea edi, [ebx + 0x2c]
push 0x426f90
push edi
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
je 0x408938
push 0x426f88
push edi
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
je 0x408938
mov al, byte [ebx]
push edi
test al, 0x10
je 0x40890a
mov ecx, dword [esp + 0x20]
push ecx
push str._s_s_
push 0x104
push esi
call ebp
mov ecx, dword [esp + 0x28]
add esp, 0x14
push esi
call fcn.00408840
test eax, eax
je 0x408938
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x408938
mov edx, dword [esp + 0x20]
push edx
push str._s_s
push 0x104
push esi
call ebp
mov al, byte [ebx]
add esp, 0x14
test al, 7
je 0x408931
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4088b1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebp
push ebx
call sub.MFC42u.DLL_operatordelete
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 8
ret 4
Function at 0x408980
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
sub esp, 0x208
mov ax, word [0x428280]
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov word [esp + 0x10], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x104
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push 0x426fb8
stosw word es:[edi], ax
call esi
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 3
jle 0x408a23
cmp word [esp + eax*2 + 0xe], 0x5c
lea eax, [esp + eax*2 + 0xe]
jne 0x4089df
mov word [eax], 0
lea edx, [esp + 0x10]
push 0x426fa4
push edx
call edi
add esp, 8
lea eax, [esp + 0x10]
push eax
call ebp
cmp eax, 0xffffffff
jne 0x408a08
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call fcn.00408800
jmp 0x408a23
lea edx, [esp + 0x10]
push 0x426124
push edx
call edi
add esp, 8
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
call fcn.00408840
lea ecx, [esp + 0x10]
push 0x104
push ecx
push 0x426f9c
call esi
cmp eax, 3
jle 0x408a97
cmp word [esp + eax*2 + 0xe], 0x5c
lea eax, [esp + eax*2 + 0xe]
jne 0x408a4a
mov word [eax], 0
lea edx, [esp + 0x10]
push 0x426fa4
push edx
call edi
add esp, 8
lea eax, [esp + 0x10]
push eax
call ebp
cmp eax, 0xffffffff
jne 0x408a7c
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call fcn.00408800
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
lea edx, [esp + 0x10]
push 0x426124
push edx
call edi
add esp, 8
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
call fcn.00408840
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret

Function at 0x409250
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
ret 4
Function at 0x40b610
Capabilities:
Execute anti-debugging instructions

Disassembly:
push esi
rdtsc
mov ecx, edx
mov esi, eax
rdtsc
push edx
push eax
push ecx
push esi
push 0x427194
push 0x104
push 0x428b88
call dword [sym.imp.MSVCRT.dll__snwprintf]
push 0x428b88
push 0x428980
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [0x428d98]
add esp, 0x24
test eax, eax
pop esi
jne 0x40b665
push 0x42715c
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x428d98], eax
push 0x208
push 0x428d9c
call fcn.00410ec0
ret 4

Function at 0x40b790
Capabilities:
Create service
Query service status
Start service

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
jne 0x40b7c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push 0xf01ff
push 0x426928
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, ebx
jne 0x40b822
mov eax, dword [esp + 0x34]
push ebx
push ebx
push ebx
push ebx
push 0x4271b0
push eax
push 1
push 3
push 1
push 0xf01ff
push 0x426928
push 0x426928
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
cmp esi, ebx
jne 0x40b822
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40b85e
cmp dword [esp + 0x18], 4
jne 0x40b85e
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40b880
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
mov dword [esp + 0x10], eax
jne 0x40b880
mov dword [esp + 0x10], ebx
lea edx, [esp + 0x14]
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x14]
push edx
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40b8c5
mov eax, dword [esp + 0x18]
cmp eax, 4
je 0x40b8bb
cmp eax, 2
jne 0x40b8cf
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x40b880
jmp 0x40b8cf
mov dword [esp + 0x10], 0
jmp 0x40b8cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop edi
pop esi
mov eax, dword [esp + 8]
pop ebp
pop ebx
add esp, 0x20
ret 4
Function at 0x40b8f0
Capabilities:
Create service
Query service status
Start service

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
jne 0x40b920
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8
push 0xf01ff
push 0x4263c0
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, ebx
jne 0x40b982
mov eax, dword [esp + 0x34]
push ebx
push ebx
push ebx
push ebx
push 0x4271e4
push eax
push 1
push 3
push 1
push 0xf01ff
push 0x4263c0
push 0x4263c0
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
cmp esi, ebx
jne 0x40b982
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00412550
lea edx, [esp + 0x14]
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x14]
push edx
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40b9c8
cmp dword [esp + 0x18], 4
jne 0x40b9c8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 8
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40b9ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
mov dword [esp + 0x10], eax
jne 0x40b9ea
mov dword [esp + 0x10], ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40ba28
cmp dword [esp + 0x18], 4
je 0x40ba1e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x40b9ea
jmp 0x40ba32
mov dword [esp + 0x10], 0
jmp 0x40ba32
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop edi
pop esi
mov eax, dword [esp + 8]
pop ebp
pop ebx
add esp, 0x20
ret 8
Function at 0x40ba50
Capabilities:
Query service status
Start service

Disassembly:
sub esp, 0x24
push ebx
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0xc], edi
jne 0x40ba7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop ebx
add esp, 0x24
ret
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push esi
push 0xf01ff
push 0x4263c0
push edi
call ebp
mov esi, eax
cmp esi, ebx
je 0x40bb07
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x40babf
cmp eax, 4
je 0x40baf4
cmp eax, 2
je 0x40bae4
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40bae4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
mov dword [esp + 0x10], eax
je 0x40baf4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x40ba99
jmp 0x40bafc
mov dword [esp + 0x10], 0
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x14]
push 0xf01ff
push 0x426928
push edi
call ebp
mov esi, eax
test esi, esi
je 0x40bb8a
xor ebx, ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x40bb42
cmp eax, 4
je 0x40bb77
cmp eax, 2
je 0x40bb67
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40bb67
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
mov dword [esp + 0x10], eax
je 0x40bb77
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x32
jl 0x40bb1c
jmp 0x40bb7f
mov dword [esp + 0x10], 0
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebp
mov eax, dword [esp + 8]
pop edi
pop ebx
add esp, 0x24
ret

Function at 0x40bba0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push 0x426594
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40bc10
mov edx, dword [esp + 4]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [esp + 4]
push 4
push ecx
push 4
push eax
push 0x42651c
push edx
mov dword [esp + 0x1c], 4
call esi
lea eax, [esp + 4]
push 4
mov ecx, dword [esp + 0xc]
push eax
push 4
push 0
push 0x426504
push ecx
mov dword [esp + 0x1c], 1
call esi
mov esi, eax
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 8
ret
Function at 0x40bc20
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x14
lea eax, [esp]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
push eax
push 0x4264b0
push connect
call edi
test eax, eax
jne 0x40bd59
mov edx, dword [esp + 4]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
lea ecx, [esp + 0x14]
push 4
push ecx
push 4
push eax
push 0x42651c
push edx
mov dword [esp + 0x2c], 4
call ebx
lea eax, [esp + 0x14]
push 4
mov ecx, dword [esp + 0x10]
push eax
push 4
push 0
push 0x426504
push ecx
mov dword [esp + 0x2c], 1
call ebx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x2000
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
call sub.MFC42u.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
je 0x40bd53
lea eax, [esp + 0xc]
push eax
push 0x4263ec
push connect
call edi
test eax, eax
jne 0x40bd4a
mov ecx, 0x800
mov edi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0x2000
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push esi
push edx
push eax
mov eax, dword [esp + 0x1c]
push 0x4263d0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40bd3f
mov ecx, dword [esp + 0x10]
push esi
shr ecx, 1
mov word [esi + ecx*2], ax
call fcn.004121a0
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edx, dword [esp + 0x1c]
add esp, 4
lea eax, [eax + eax + 2]
push eax
push esi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
push edx
push 0
push 0x4263d0
push eax
call ebx
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x1c]
pop esi
pop ebx
pop edi
add esp, 0x14
ret

Function at 0x40c530
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push edi
mov ecx, 7
xor eax, eax
lea edi, [esp + 5]
mov byte [esp + 4], 0
mov edx, dword [esp + 0x28]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test edx, edx
stosb byte es:[edi], al
jne 0x40c55d
mov eax, 0x57
pop edi
add esp, 0x20
ret 0x1c
push ebp
mov ebp, dword [esp + 0x40]
push esi
mov ecx, 5
lea edi, [esp + 0xc]
mov esi, ebp
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40c5a1
mov ecx, 8
mov esi, 0x41ec78
lea edi, [esp + 0xc]
lea eax, [esp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov esi, ebp
xor ecx, ecx
push ebx
sub esi, eax
lea eax, [esp + ecx + 0x10]
mov bl, byte [esi + eax]
xor byte [eax], bl
inc ecx
cmp ecx, 0x14
jl 0x40c58f
pop ebx
jmp 0x40c5b1
mov ecx, 8
mov esi, 0x41ec78
lea edi, [esp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push ebp
push 1
push eax
mov eax, dword [esp + 0x48]
push ecx
push eax
lea ecx, [esp + 0x24]
push 0x20
push ecx
push edx
call fcn.0040c6d0
pop esi
pop ebp
pop edi
add esp, 0x20
ret 0x1c