joyce8/EMBER2024-capa huggingface dataset:
Function at 0x68f536ce
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x68f53726
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x68f73159
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x68f53719
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x68f53728
xor eax, eax
pop esi
leave
ret 4

Function at 0x68f53b0d
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
mov eax, dword [0x68f6edd8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - 0x474], eax
push 0x105
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor esi, esi
cmp eax, esi
jne 0x68f53b49
xor eax, eax
jmp 0x68f53c6f
add eax, eax
lea ecx, [ebp + eax - 0x260]
cmp word [ecx], 0x5c
je 0x68f53b65
mov word [ecx], 0x5c
mov word [ebp + eax - 0x25e], si
push ebx
push edi
push 0x106
lea eax, [ebp - 0x260]
push eax
mov edi, str.msi.dll
push edi
call fcn.68f53ae2
push 8
push esi
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
cmp ebx, esi
jne 0x68f53ba5
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
cmp ebx, esi
je 0x68f53c57
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MsiGetProductCodeW
push ebx
call edi
push str.MsiProvideQualifiedComponentExW
push ebx
mov dword [ebp - 0x478], eax
call edi
cmp eax, esi
mov dword [ebp - 0x470], eax
je 0x68f53c57
cmp dword [ebp - 0x474], esi
mov ebx, str.mso12.dll
mov edi, str.24AAE126_0911_478F_A019_07B875EB9996
je 0x68f53c2f
cmp dword [ebp - 0x478], esi
je 0x68f53c57
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x474]
call dword [ebp - 0x478]
cmp eax, esi
jne 0x68f53c28
lea eax, [ebp - 0x46c]
push eax
lea eax, [ebp - 0x468]
push eax
push esi
push esi
lea eax, [ebp - 0x54]
push eax
push esi
push ebx
push edi
mov dword [ebp - 0x46c], 0x104
call dword [ebp - 0x470]
cmp eax, esi
je 0x68f53c5b
cmp eax, 0x642
je 0x68f53c5b
lea eax, [ebp - 0x46c]
push eax
lea eax, [ebp - 0x468]
push eax
push esi
push esi
push esi
push esi
push ebx
push edi
mov dword [ebp - 0x46c], 0x104
call dword [ebp - 0x470]
test eax, eax
je 0x68f53c5b
xor eax, eax
jmp 0x68f53c6d
lea eax, [ebp - 0x468]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x68fa7c30], eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.68f53fd7
leave
ret 4
Function at 0x68f53d0c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x68f6edd8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x214]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftOffice12.0CommonFilesPaths
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x214], ebx
xor esi, esi
mov dword [ebp - 0x218], 0x208
mov word [ebp - 0x210], bx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
push ebx
push str.mso.dll
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x214], ebx
je 0x68f53d97
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x218]
cmp eax, ebx
je 0x68f53dc2
cmp eax, 0x208
ja 0x68f53dc2
shr eax, 1
mov esi, eax
je 0x68f53dc2
lea eax, [ebp + esi*2 - 0x212]
cmp word [eax], 0x5c
je 0x68f53dc2
dec esi
dec eax
dec eax
cmp esi, ebx
jne 0x68f53db5
push dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push eax
mov word [ebp + esi*2 - 0x210], bx
call fcn.68f53c7e
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.68f53fd7
leave
ret 4

Function at 0x68f53dec
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x68f6edd8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x214]
push eax
push 0x20019
xor esi, esi
push esi
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x218], 0x208
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x210]
push eax
push esi
push esi
push str.CommonFilesDir
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x218]
shr eax, 1
cmp dword [ebp - 0x214], esi
mov word [ebp + eax*2 - 0x210], si
je 0x68f53e74
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x105
lea eax, [ebp - 0x210]
push eax
push str.Microsoft_Sharedoffice12mso.dll
call fcn.68f53ae2
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, esi
pop esi
jne 0x68f53ea6
push 0x68f6ed84
call fcn.68f53d0c
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.68f53fd7
leave
ret
Function at 0x68f53f23
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push str.HeapSetInformation
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x68f53f58
push 0
push 0
push 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov esi, dword [ebp - 8]
xor esi, dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x10]
xor eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor esi, eax
lea eax, [ebp - 4]
push eax
push 0x40
push 4
mov ebx, 0x68f6edd8
push ebx
call edi
test esi, esi
mov dword [0x68f6edd8], esi
jne 0x68f53fbc
mov dword [0x68f6edd8], 0xbb40e64e
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push 4
push ebx
call edi
pop edi
pop esi
mov dword [section..data], 0x44bf19b1
pop ebx
leave
ret

Function at 0x68f53fd7
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x68f6edd8]
jne 0x68f53fe0
ret
jmp fcn.68f54559

Function at 0x68f54a1c
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x68f6edd8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.68f549b1
mov eax, 0x68ef0000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x68f54a6b
cmp dword [ebp - 0x1c], 5
jb 0x68f54a83
jmp 0x68f54a7f
cmp dword [ebp - 0x10], 1
jne 0x68f54a83
cmp dword [ebp - 0x1c], 4
ja 0x68f54a7f
jne 0x68f54a83
cmp dword [ebp - 0x18], 0
jbe 0x68f54a83
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x68f6ef94
call fcn.68ef1e84
test eax, eax
jge 0x68f54aa4
mov byte [0x68fac0a4], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.68f53fd7
add ebp, 0x78
leave
ret
Function at 0x68f54c56
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x68fa7ff8], 0
push esi
jne 0x68f54bc9
call fcn.68f54af4
test eax, eax
je 0x68f54c0c
mov eax, dword [0x68fa7ff8]
cmp eax, 1
jne 0x68f54bea
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x68f54c0c
pop esi
ret
push eax
call dword [0x68fa8000]
test eax, eax
jne 0x68f54c54
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x68f54c10
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x68fa7ff8]
call dword [0x68fa8000]
mov edi, eax
test edi, edi
je 0x68f54c37
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x68f54c53
lea edi, [esi + 0xff0]
push esi
push dword [0x68fa7ff8]
call dword [0x68fa7ffc]
add esi, 0x10
cmp esi, edi
jb 0x68f54c3d
mov eax, esi
pop edi
pop esi
ret
jmp 0x68f54bb6

Function at 0x432004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43200c
nop
nop
nop
nop
pop eax
nop
add eax, 0x40729f
nop
sub eax, 0x407245
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x432030
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43201e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x402eec
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40b014]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x402f84
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x402f64
xor eax, eax
push ebp
push 0x402f5d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x402fa0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402f64
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x40b014]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40b014], ax
mov esp, ebp
pop ebp
ret

Function at 0x403888
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40c044], 0
je 0x4038e9
cmp word [0x40c218], 0xd7b2
jne 0x4038b1
cmp dword [0x40c220], 0
jbe 0x4038b1
mov eax, 0x40c214
call dword [0x40c230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40b060
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403910
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40b024], 0
jne 0x403905
push 0
push 0x40b058
push 0x40b060
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x404788
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x4047ee
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00403c60
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402ae0
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x4047d8
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4047f5
lea eax, [ebp - 0x10]
call fcn.00403a0c
ret

Function at 0x40699c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x4069d5
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403afc
jmp 0x4069de
mov eax, ebx
mov edx, esi
call fcn.00403a60
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4069e8
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406a09
mov al, byte [esp]
jmp 0x406a0b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x407b40
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x407ba4
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00403c60
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00405b00
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407bab
lea eax, [ebp - 0xc]
call fcn.00403a0c
ret

Function at 0x4098f0
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov eax, ebx
mov edx, esp
mov ecx, 0x104
call fcn.00403c60
add esp, 0x104
pop ebx
ret

Function at 0x409920
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403dd8
xor eax, eax
push ebp
push 0x409968
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00403de8
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
setne bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40996f
lea eax, [ebp - 4]
call fcn.00403a0c
ret
Function at 0x409c30
Capabilities:
Encrypt data using rc6

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
lea edx, [esp + 4]
mov eax, dword [0x40c85c]
mov ecx, 0x40
call fcn.004029b8
mov dword [0x40c7a8], 0xb7e15163
mov ebx, 0x2b
mov eax, 0x40c7a8
mov edx, dword [eax]
add edx, 0x9e3779b9
mov dword [eax + 4], edx
add eax, 4
dec ebx
jne 0x409c5e
xor ebx, ebx
xor edi, edi
xor esi, esi
xor ebp, ebp
mov dword [esp], 0x84
mov eax, dword [ebx*4 + 0x40c7a8]
add eax, esi
add eax, ebp
mov edx, 3
call fcn.00409b10
mov esi, eax
mov dword [ebx*4 + 0x40c7a8], esi
lea edx, [ebp + esi]
mov eax, dword [esp + edi*4 + 4]
add eax, esi
add eax, ebp
call fcn.00409b10
mov ebp, eax
mov dword [esp + edi*4 + 4], ebp
lea eax, [ebx + 1]
mov ecx, 0x2c
cdq
idiv ecx
mov ebx, edx
inc edi
and edi, 0x8000000f
jns 0x409cce
dec edi
or edi, 0xfffffff0
inc edi
dec dword [esp]
jne 0x409c7e
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x409d58
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
mov ebx, eax
mov eax, dword [0x40c854]
sub dword [ebx + 8], eax
mov eax, dword [0x40c850]
sub dword [ebx], eax
mov esi, 0x14
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov dword [ebx + 0xc], edx
mov edx, dword [ebx + 4]
mov dword [ebx + 8], edx
mov edx, dword [ebx]
mov dword [ebx + 4], edx
mov dword [ebx], eax
mov eax, dword [ebx + 0xc]
mov edx, eax
add eax, eax
inc eax
imul edx, eax
mov eax, edx
mov edx, 5
call fcn.00409b10
mov ebp, eax
mov eax, dword [ebx + 4]
mov edx, eax
add eax, eax
inc eax
imul edx, eax
mov eax, edx
mov edx, 5
call fcn.00409b10
mov edi, eax
mov eax, dword [ebx + 8]
mov edx, esi
add edx, edx
sub eax, dword [edx*4 + 0x40c7ac]
mov edx, edi
call fcn.00409b18
xor eax, ebp
mov dword [ebx + 8], eax
mov eax, dword [ebx]
mov edx, esi
add edx, edx
sub eax, dword [edx*4 + 0x40c7a8]
mov edx, ebp
call fcn.00409b18
xor edi, eax
mov dword [ebx], edi
dec esi
test esi, esi
jne 0x409d72
mov eax, dword [0x40c7ac]
sub dword [ebx + 0xc], eax
mov eax, dword [0x40c7a8]
sub dword [ebx + 4], eax
mov al, 1
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x409f90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeec
push ebx
xor ebx, ebx
mov dword [ebp - 0x114], ebx
mov ebx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403dd8
mov eax, dword [ebp - 8]
call fcn.00403dd8
xor eax, eax
push ebp
push 0x40a030
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10d]
push eax
push 0
push 0x40a03c
mov eax, dword [ebp - 4]
call fcn.00403de8
push eax
call sub.kernel32.dll_GetTempFileNameA
lea eax, [ebp - 0x114]
lea edx, [ebp - 0x10d]
mov ecx, 0x105
call fcn.00403c60
mov eax, dword [ebp - 0x114]
mov ecx, ebx
mov edx, dword [ebp - 8]
call fcn.00405c9c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a037
lea eax, [ebp - 0x114]
call fcn.00403a0c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403a30
ret
Function at 0x401eb0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
xor eax, eax
jne 0x401eb9
xor ecx, ecx
jne 0x401eb9
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
shl eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401f00
mov eax, dword [ebp - 0xc]
jmp 0x401f5d
cmp dword [ebp - 4], 1
je 0x401f13
cmp dword [ebp - 4], 2
je 0x401f13
mov eax, 0xd
jmp 0x401f5d
cmp dword [ebp + 0xc], 0
je 0x401f51
cmp dword [ebp - 8], 0
je 0x401f49
mov eax, dword [ebp - 8]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x401f40
mov edx, dword [ebp - 8]
shr edx, 1
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x401f47
mov eax, 0xd
jmp 0x401f5d
jmp 0x401f51
xor edx, edx
mov eax, dword [ebp + 0xc]
mov word [eax], dx
mov ecx, dword [ebp - 8]
shr ecx, 1
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc

Function at 0x402060
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
xor eax, eax
jne 0x402069
xor ecx, ecx
jne 0x402069
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jne 0x40208a
mov eax, 0xd
jmp 0x4020e5
xor eax, eax
jne 0x402071
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], 1
jne 0x40209b
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 7
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 8
Function at 0x4020f0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x413018]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x230], ecx
lea ecx, [ebp - 0x14]
call fcn.00401b70
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 4]
or ecx, 0x2001f
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401de0
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40215b
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x224], edx
lea ecx, [ebp - 0x14]
call fcn.00401bd0
mov eax, dword [ebp - 0x224]
jmp 0x4021ec
mov dword [ebp - 4], 0x100
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x220]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x4021c1
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x14]
call fcn.004020f0
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4021b8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x228], edx
lea ecx, [ebp - 0x14]
call fcn.00401bd0
mov eax, dword [ebp - 0x228]
jmp 0x4021ec
mov dword [ebp - 4], 0x100
jmp 0x402162
lea ecx, [ebp - 0x14]
call fcn.00401d10
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x230]
call fcn.00401c50
mov dword [ebp - 0x22c], eax
lea ecx, [ebp - 0x14]
call fcn.00401bd0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00407f30
mov esp, ebp
pop ebp
ret 4
Function at 0x406720
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x413018]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x21c], ecx
mov ecx, dword [ebp - 0x21c]
call fcn.0040a490
test eax, eax
je 0x406752
mov eax, 1
jmp 0x4067f7
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x406771
xor eax, eax
jmp 0x4067f7
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push str.RPCSS
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
push 1
push 3
push 0x10
push 0xf01ff
mov edx, dword [ebp - 0x21c]
add edx, 0x230
push edx
mov eax, dword [ebp - 0x21c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4067de
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4067f7
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00407f30
mov esp, ebp
pop ebp
ret

Function at 0x406810
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
call fcn.0040a490
test eax, eax
jne 0x40682f
mov eax, 1
jmp 0x4068ba
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40684b
xor eax, eax
jmp 0x4068ba
push 0x10020
mov eax, dword [ebp - 0x2c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40687a
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4068ba
lea eax, [ebp - 0x28]
push eax
push 1
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x4068b8
mov eax, 1
jmp 0x4068ba
xor eax, eax
mov esp, ebp
pop ebp
ret