joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a296
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x14
push 0
push esi
mov edi, ecx
mov dword [esi + 0x14], 1
call sub.MSVCR100.dll_memset
add esp, 0xc
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40a2f1
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
je 0x40a2dd
push 0
push esi
mov ecx, edi
call fcn.0040a2f7
jmp 0x40a2f0
call ebx
cmp eax, 0x217
jne 0x40a2f0
push 0
push esi
mov ecx, edi
call fcn.0040a438
pop ebx
pop edi
pop esi
pop ebp
ret 8

Function at 0x40a438
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
push edi
mov edi, 0x90
push edi
push 0
push dword [esi + 0x18]
mov ebx, ecx
mov dword [esi + 0x14], 2
call sub.MSVCR100.dll_memset
add esp, 0xc
push esi
lea eax, [ebp + 8]
push eax
push edi
push dword [esi + 0x18]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a498
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x3e5
je 0x40a498
call edi
cmp eax, 0xea
je 0x40a498
push 0
push esi
mov ecx, ebx
call fcn.0040a2f7
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x40a56b
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
and dword [ebp - 0xc], 0
push ebx
mov byte [ebp - 0x20], 0
push esi
push edi
mov ebx, ecx
mov dword [ebx + 4], eax
xor eax, eax
lea edi, [ebp - 0x1f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea esi, [ebp - 0xc]
lea edi, [ebp - 0x20]
call fcn.0040a272
xor esi, esi
mov edx, 0x40000003
cmp dword [ebp + 0x18], esi
je 0x40a5b3
mov edx, 0x40080003
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x14], 8
jb 0x40a5be
mov ecx, dword [ecx]
lea eax, [ebp - 0xc]
push eax
push esi
mov eax, 0x400
push eax
push eax
push 0xff
push 6
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x40a5e4
xor eax, eax
jmp 0x40a603
push esi
push ebx
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
cmp eax, dword [ebp + 0x10]
jne 0x40a5e0
push esi
push dword [ebp + 0x14]
mov ecx, ebx
call fcn.0040a296
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x40b0e3
Capabilities:
Create thread

Disassembly:
push 0xc
mov eax, 0x41247a
call fcn.00401651
mov esi, ecx
xor ebx, ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 0x20], eax
cmp eax, 0xffffffff
jne 0x40b10d
xor eax, eax
jmp 0x40b22e
mov eax, dword [esi + 0x1c]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041115a
xor edi, edi
pop ecx
mov dword [esi + 0x24], eax
cmp dword [esi + 0x1c], ebx
jle 0x40b159
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
push 0x40af35
push ebx
push ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x24]
mov dword [ecx + edi*4], eax
mov eax, dword [esi + 0x24]
cmp dword [eax + edi*4], ebx
je 0x40b106
inc edi
cmp edi, dword [esi + 0x1c]
jl 0x40b12f
mov edi, dword [esi + 0x1c]
xor ecx, ecx
push 8
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0041115a
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x40b1a9
push fcn.0040a263
push 0x40a259
push edi
mov dword [eax], edi
add eax, 4
push 8
push eax
mov dword [ebp - 0x10], eax
call fcn.00403adc
mov eax, dword [ebp - 0x10]
jmp 0x40b1ab
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x1c]
xor ecx, ecx
push 0x1c
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041115a
xor edi, edi
pop ecx
mov dword [esi + 0x28], eax
cmp dword [esi + 0x1c], ebx
jle 0x40b22b
mov dword [ebp - 0x10], ebx
push 0xa0
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
cmp eax, ebx
je 0x40b1ef
mov ecx, eax
call fcn.0040a40e
jmp 0x40b1f1
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [esi + 0x28]
mov dword [edx + ecx + 0x18], eax
xor eax, eax
cmp edi, ebx
sete al
push eax
mov eax, dword [esi + 0x28]
add eax, ecx
push eax
push dword [esi + 0x20]
mov eax, dword [esi + 0x2c]
push esi
push esi
lea ecx, [eax + edi*8]
call fcn.0040a56b
test eax, eax
je 0x40b106
add dword [ebp - 0x10], 0x1c
inc edi
cmp edi, dword [esi + 0x1c]
jl 0x40b1d7
xor eax, eax
inc eax
call fcn.00401cff
ret
Function at 0x40b588
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x40b65a
cmp byte [eax], bl
je 0x40b65a
cmp dword [ebp + 8], 0xffffffff
je 0x40b65a
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
cmp edi, ebx
jbe 0x40b654
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x14
lea eax, [ebp - 0x18]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b5f4
call esi
cmp eax, 0x3e5
jne 0x40b642
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40b62d
push ebx
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x40b642
mov eax, dword [ebp + 0x10]
add dword [ebp + 0xc], eax
sub edi, eax
cmp edi, ebx
ja 0x40b5c6
mov esi, ebx
jmp 0x40b654
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov esi, 0x800705b4
call fcn.0040b55f
pop ecx
pop ecx
jmp 0x40b654
call esi
cmp eax, ebx
jle 0x40b652
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
pop edi
mov eax, esi
pop esi
jmp 0x40b65f
mov eax, 0x80070057
pop ebx
leave
ret 0x10

Function at 0x40b664
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0
push esi
push edi
je 0x40b6fc
mov edi, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x40b6fc
push 0x14
lea eax, [ebp - 0x14]
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b6c6
call esi
cmp eax, 0x3e5
je 0x40b6c6
call esi
test eax, eax
jle 0x40b701
and eax, 0xffff
or eax, 0x80070000
jmp 0x40b701
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
lea eax, [ebp - 0x14]
je 0x40b6e7
push eax
push edi
call fcn.0040b55f
pop ecx
pop ecx
mov eax, 0x800705b4
jmp 0x40b701
push 0
push dword [ebp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x40b6b4
xor eax, eax
jmp 0x40b701
mov eax, 0x80070057
pop edi
pop esi
leave
ret 0x14
Function at 0x40bf38
Capabilities:
Terminate process

Disassembly:
push 0x3c
mov eax, 0x412621
call fcn.004019d4
mov eax, ecx
lea ecx, [ebp - 0x48]
push ecx
mov ecx, dword [eax + 4]
call fcn.00407009
mov eax, dword [ebp - 0x44]
xor ecx, ecx
push 4
pop edx
xor ebx, ebx
mov dword [ebp - 0x38], eax
mul edx
seto cl
mov dword [ebp - 4], ebx
neg ecx
or ecx, eax
push ecx
call fcn.0041115a
mov edi, eax
mov eax, dword [ebp - 0x48]
mov esi, dword [eax]
pop ecx
mov dword [ebp - 0x3c], edi
cmp esi, eax
je 0x40c038
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
lea ecx, [esi + 8]
mov dword [eax], ebx
call fcn.004065cb
test eax, eax
jne 0x40c026
lea ecx, [esi + 8]
call fcn.004086ae
push eax
push ebx
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x40c026
lea ecx, [esi + 8]
call fcn.004065dc
test eax, eax
jne 0x40c014
lea ecx, [esi + 8]
call fcn.0040db11
test eax, eax
je 0x40c014
lea eax, [ebp - 0x2c]
push eax
lea ecx, [esi + 8]
call fcn.00406921
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 1
jb 0x40bfe8
mov eax, dword [eax]
push ebx
push ebx
push ebx
push str._NOTIFY_EXIT_
push eax
call fcn.00405cd7
mov ecx, eax
call fcn.00405ce1
mov ecx, eax
call fcn.0040cfea
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.0040236a
jmp 0x40c01e
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov dword [ecx], eax
mov esi, dword [esi]
add dword [ebp - 0x34], 4
cmp esi, dword [ebp - 0x48]
jne 0x40bf87
mov edi, dword [ebp - 0x3c]
push 0x2710
push 1
push edi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor esi, esi
cmp dword [ebp - 0x38], ebx
jle 0x40c08b
mov eax, dword [edi + esi*4]
cmp eax, ebx
je 0x40c085
lea ecx, [ebp - 0x30]
push ecx
push eax
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40c07c
cmp dword [ebp - 0x30], 0x103
jne 0x40c07c
push ebx
push dword [edi + esi*4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [edi + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 0x38]
jl 0x40c050
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 2
call fcn.00406f0e
push dword [ebp - 0x48]
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
pop ecx
call fcn.00401d83
ret

Function at 0x40d5db
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x90
lea eax, [ebp - 0x94]
push 0
push eax
mov dword [ebp - 0x98], 0x94
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x94], 6
mov ecx, dword [ebp - 4]
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.00401d92
leave
ret
Function at 0x40d918
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov eax, dword [edi]
xor ebx, ebx
cmp eax, ebx
jne 0x40d93b
xor eax, eax
jmp 0x40d9d9
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [ebp - 0x10]
push ecx
push ebx
push ebx
push 1
push eax
mov dword [ebp - 0x10], ebx
call esi
push dword [ebp - 0x10]
call fcn.0041115a
pop ecx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
push eax
push 1
push dword [edi]
call esi
test eax, eax
jne 0x40d973
push dword [ebp - 0x18]
jmp 0x40d9d0
mov edi, dword [ebp - 0x18]
mov esi, dword [edi]
cmp esi, ebx
je 0x40d9cf
push esi
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x40d9cf
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40d9cf
push dword [ebp - 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
mov eax, esi
jmp 0x40d9d7
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
xor eax, eax
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00401d92
leave
ret

Function at 0x40dadc
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, ecx
call fcn.0040d5db
test eax, eax
jne 0x40daf5
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
neg eax
sbb eax, eax
inc eax
pop esi
ret
mov ecx, esi
call fcn.0040d88f
cmp eax, 2
je 0x40db0c
cmp eax, 3
je 0x40db0c
pop esi
jmp fcn.0040d631
xor eax, eax
inc eax
pop esi
ret
Function at 0x40e020
Capabilities:
Enumerate processes

Disassembly:
push 0x848
mov eax, 0x412b30
call fcn.004019d4
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x83c], ebx
mov dword [ebp - 0x854], esi
mov dword [ebp - 0x850], eax
mov dword [ebp - 0x84c], ebx
mov dword [ebp - 0x848], ebx
mov dword [ebp - 0x844], ebx
xor edi, edi
inc edi
mov dword [ebp - 4], edi
cmp eax, ebx
je 0x40e145
cmp word [eax], bx
je 0x40e145
push 0x820
lea eax, [ebp - 0x830]
push ebx
push eax
mov dword [ebp - 0x834], 0x824
call sub.MSVCR100.dll_memset
add esp, 0xc
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x838], eax
mov byte [ebp - 4], 2
cmp eax, 0xffffffff
jne 0x40e0c3
lea eax, [ebp - 0x84c]
push eax
mov ecx, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
call fcn.0040dfe4
jmp 0x40e15b
lea ecx, [ebp - 0x834]
push ecx
push eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40e106
lea eax, [ebp - 0x84c]
push eax
mov ecx, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
call fcn.0040dfe4
mov dword [ebp - 0x83c], edi
cmp dword [ebp - 0x838], ebx
je 0x40e161
push dword [ebp - 0x838]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e161
push dword [ebp - 0x850]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.MSVCR100.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40e131
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x84c]
call fcn.00405f03
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0x838]
call sub.KERNEL32.dll_Process32NextW
jmp 0x40e0d0
lea eax, [ebp - 0x84c]
push eax
mov ecx, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
call fcn.0040dfe4
mov dword [ebp - 0x83c], edi
lea ecx, [ebp - 0x84c]
mov byte [ebp - 4], bl
call fcn.004088ea
mov eax, esi
call fcn.00401d83
ret

Function at 0x40e81c
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 6
pop ecx
xor esi, esi
xor eax, eax
mov dword [ebp - 0x20], esi
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40e876
cmp dword [ebp - 0x1c], 1
je 0x40e87a
cmp esi, dword [ebp + 0xc]
ja 0x40e87a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 8]
lea esi, [esi + eax + 0xa]
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40e850
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x1c], 1
pop edi
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.00401d92
leave
ret 8
Function at 0x40e894
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
and dword [ebp - 0x20], 0
push esi
push edi
mov dword [ebp - 0x28], eax
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x3e8
xor edx, edx
mov ecx, 0xc8
div ecx
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x24], eax
jmp 0x40e925
cmp dword [ebp - 0x24], 0
jle 0x40e930
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x40e906
cmp eax, 2
je 0x40e8f7
cmp eax, 3
jbe 0x40e917
cmp eax, 7
ja 0x40e917
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40e917
push dword [ebp - 0x28]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40e94c
dec dword [ebp - 0x24]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push esi
call edi
test eax, eax
jne 0x40e8da
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00401d92
leave
ret 0x10
xor eax, eax
jmp 0x40e93c

Function at 0x40e950
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x20], 0
push ebx
push esi
push edi
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x3e8
mov edi, 0xc8
xor edx, edx
mov ecx, edi
div ecx
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x28], 0x16
mov dword [ebp - 0x24], eax
jmp 0x40e9b0
cmp dword [ebp - 0x24], 0
jle 0x40e9c3
cmp dword [ebp - 0x1c], 1
je 0x40e9bd
dec dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push ebx
call esi
test eax, eax
jne 0x40e99a
jmp 0x40e9c3
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401d92
leave
ret 8
Function at 0x40eab1
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
push 0x38
xor esi, esi
lea eax, [ebp - 0x38]
push esi
push eax
mov dword [ebp - 0x3c], 0x3c
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x38], 0x540
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], str.runas
jb 0x40eaef
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x40eafd
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40eb5c
push 0x1388
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp + 8]
push eax
push dword [ebp - 4]
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x40eb49
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
mov dword [ebp + 8], eax
cmp dword [ebp - 4], esi
je 0x40eb57
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
jmp 0x40eb68
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
pop esi
leave
ret

Function at 0x40eb6b
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
lea ecx, [ebp - 4]
mov dword [ebp - 4], ebx
call fcn.0040ea97
test al, al
je 0x40ebb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
shl esi, 0x10
or esi, 5
test ebx, ebx
je 0x40ebb2
cmp ebx, 0xffffffff
je 0x40ebb2
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40ec6c
push edi
push 0xf01ff
push str.wpscloudsvr
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
lea ecx, [ebp - 8]
mov dword [ebp - 8], edi
call fcn.0040ea97
test al, al
je 0x40ec11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
shl esi, 0x10
or esi, 5
test edi, edi
je 0x40ebfc
cmp edi, 0xffffffff
je 0x40ebfc
push edi
call ebx
cmp dword [ebp - 4], 0
je 0x40ec0d
cmp dword [ebp - 4], 0xffffffff
je 0x40ec0d
push dword [ebp - 4]
call ebx
mov eax, esi
jmp 0x40ec6b
push 0x1388
push edi
mov ecx, esi
call fcn.0040e81c
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40ec39
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x430
neg eax
sbb eax, eax
inc eax
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
neg eax
sbb eax, eax
and eax, 0xfffafffb
add eax, 0x50005
mov dword [ebp - 8], eax
test edi, edi
je 0x40ec5c
cmp edi, 0xffffffff
je 0x40ec5c
push edi
call esi
test ebx, ebx
je 0x40ec68
cmp ebx, 0xffffffff
je 0x40ec68
push ebx
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ee43
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x828
mov eax, 0x412c5e
call fcn.004019d4
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
xor esi, esi
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x82c]
mov dword [ebp - 0x830], esi
call fcn.004021b7
push 0xffffffffffffffff
push esi
push edi
lea ecx, [ebp - 0x82c]
mov dword [ebp - 4], esi
call fcn.004039b1
xor eax, eax
push 0x7fe
mov word [ebp - 0x810], ax
lea eax, [ebp - 0x80e]
push esi
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [ebp - 0x82c]
add esp, 0xc
cmp dword [ebp - 0x818], 8
mov dword [ebp - 0x830], esi
jae 0x40eebb
lea eax, [ebp - 0x82c]
lea ecx, [ebp - 0x830]
push ecx
push 0x20019
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ef0f
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x810]
push eax
push esi
push esi
push str.ImagePath
push dword [ebp - 0x830]
mov dword [ebp - 0x834], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x830]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x810]
push eax
mov ecx, ebx
call fcn.004021b7
push esi
push 1
lea ecx, [ebp - 0x82c]
call fcn.0040236a
mov eax, ebx
call fcn.00401d83
ret

Function at 0x40ef33
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x2c
mov eax, 0x412c8e
call fcn.004019d4
mov edi, dword [ebp + 8]
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x2c]
call fcn.004021b7
push 0xffffffffffffffff
xor esi, esi
push esi
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], esi
call fcn.004039b1
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
jae 0x40ef72
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x30]
push ecx
push 0x20019
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40efb4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
push esi
push str.Start
push dword [ebp - 0x30]
mov dword [ebp - 0x38], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x34]
push esi
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040236a
mov eax, edi
call fcn.00401d83
ret