joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4087c0
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 0x408892
cmp byte [eax], bl
je 0x408892
cmp dword [ebp + 8], 0xffffffff
je 0x408892
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
cmp edi, ebx
jbe 0x40888c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x14
lea eax, [ebp - 0x18]
push ebx
push eax
call fcn.004168c0
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 0x40882c
call esi
cmp eax, 0x3e5
jne 0x40887a
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x408865
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 0x40887a
mov eax, dword [ebp + 0x10]
add dword [ebp + 0xc], eax
sub edi, eax
cmp edi, ebx
ja 0x4087fe
mov esi, ebx
jmp 0x40888c
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov esi, 0x800705b4
call fcn.00408797
pop ecx
pop ecx
jmp 0x40888c
call esi
cmp eax, ebx
jle 0x40888a
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
pop edi
mov eax, esi
pop esi
jmp 0x408897
mov eax, 0x80070057
pop ebx
leave
ret 0x10

Function at 0x40889c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0
push esi
push edi
je 0x408934
mov edi, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x408934
push 0x14
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.004168c0
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 0x4088fe
call esi
cmp eax, 0x3e5
je 0x4088fe
call esi
test eax, eax
jle 0x408939
and eax, 0xffff
or eax, 0x80070000
jmp 0x408939
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
lea eax, [ebp - 0x14]
je 0x40891f
push eax
push edi
call fcn.00408797
pop ecx
pop ecx
mov eax, 0x800705b4
jmp 0x408939
push 0
push dword [ebp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4088ec
xor eax, eax
jmp 0x408939
mov eax, 0x80070057
pop edi
pop esi
leave
ret 0x14

Function at 0x40a8d1
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x43114c]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x110
lea eax, [ebp - 0x114]
push 0
push eax
mov dword [ebp - 0x118], 0x114
call fcn.004168c0
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x114], 6
mov ecx, dword [ebp - 4]
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.004168ab
leave
ret
Function at 0x40ac0e
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x43114c]
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 0x40ac31
xor eax, eax
jmp 0x40accf
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.00416700
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 0x40ac69
push dword [ebp - 0x18]
jmp 0x40acc6
mov edi, dword [ebp - 0x18]
mov esi, dword [edi]
cmp esi, ebx
je 0x40acc5
push esi
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x40acc5
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 0x40acc5
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 fcn.00417c6b
mov eax, esi
jmp 0x40accd
push edi
call fcn.00417c6b
xor eax, eax
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004168ab
leave
ret

Function at 0x40add2
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, ecx
call fcn.0040a8d1
test eax, eax
jne 0x40adeb
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
neg eax
sbb eax, eax
inc eax
pop esi
ret
mov ecx, esi
call fcn.0040ab85
cmp eax, 2
je 0x40ae02
cmp eax, 3
je 0x40ae02
pop esi
jmp fcn.0040a927
xor eax, eax
inc eax
pop esi
ret
Function at 0x40b309
Capabilities:
Enumerate processes

Disassembly:
push 0x83c
mov eax, 0x42489a
call fcn.00417706
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x848], edi
mov dword [ebp - 0x844], edi
mov dword [ebp - 0x840], edi
mov dword [ebp - 4], edi
cmp ebx, edi
je 0x40b3f8
cmp word [ebx], di
je 0x40b3f8
push 0x820
lea eax, [ebp - 0x830]
push edi
push eax
mov dword [ebp - 0x834], 0x824
call fcn.004168c0
add esp, 0xc
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x838], eax
mov byte [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40b3f8
lea ecx, [ebp - 0x834]
push ecx
push eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40b3bf
lea eax, [ebp - 0x848]
push eax
mov ecx, esi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.0040b2d6
cmp dword [ebp - 0x838], edi
je 0x40b40e
push dword [ebp - 0x838]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b40e
lea eax, [ebp - 0x810]
push ebx
push eax
call fcn.004178e9
pop ecx
pop ecx
test eax, eax
jne 0x40b3e4
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x848]
call fcn.004019d9
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0x838]
call sub.KERNEL32.dll_Process32NextW
jmp 0x40b38f
lea eax, [ebp - 0x848]
push eax
mov ecx, esi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.0040b2d6
lea ecx, [ebp - 0x848]
call fcn.00410116
mov eax, esi
call fcn.00417750
ret

Function at 0x40bac1
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x43114c]
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 0x40bb1b
cmp dword [ebp - 0x1c], 1
je 0x40bb1f
cmp esi, dword [ebp + 0xc]
ja 0x40bb1f
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 0x40baf5
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.004168ab
leave
ret 8
Function at 0x40bb39
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x43114c]
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 0x40bbca
cmp dword [ebp - 0x24], 0
jle 0x40bbd5
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x40bbab
cmp eax, 2
je 0x40bb9c
cmp eax, 3
jbe 0x40bbbc
cmp eax, 7
ja 0x40bbbc
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40bbbc
push dword [ebp - 0x28]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40bbf1
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 0x40bb7f
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.004168ab
leave
ret 0x10
xor eax, eax
jmp 0x40bbe1

Function at 0x40bbf5
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x43114c]
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 0x40bc55
cmp dword [ebp - 0x24], 0
jle 0x40bc68
cmp dword [ebp - 0x1c], 1
je 0x40bc62
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 0x40bc3f
jmp 0x40bc68
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.004168ab
leave
ret 8
Function at 0x40bdc8
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 fcn.004168c0
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 0x40be06
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x40be14
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 0x40be73
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 0x40be60
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
mov dword [ebp + 8], eax
cmp dword [ebp - 4], esi
je 0x40be6e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
jmp 0x40be7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
pop esi
leave
ret

Function at 0x40be82
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.0040e067
test al, al
je 0x40bed0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
shl esi, 0x10
or esi, 5
test ebx, ebx
je 0x40bec9
cmp ebx, 0xffffffff
je 0x40bec9
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40bf83
push edi
push 0xf01ff
push 0x426450
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
lea ecx, [ebp - 8]
mov dword [ebp - 8], edi
call fcn.0040e067
test al, al
je 0x40bf28
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 0x40bf13
cmp edi, 0xffffffff
je 0x40bf13
push edi
call ebx
cmp dword [ebp - 4], 0
je 0x40bf24
cmp dword [ebp - 4], 0xffffffff
je 0x40bf24
push dword [ebp - 4]
call ebx
mov eax, esi
jmp 0x40bf82
push 0x1388
push edi
mov ecx, esi
call fcn.0040bac1
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40bf50
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 0x40bf73
cmp edi, 0xffffffff
je 0x40bf73
push edi
call esi
test ebx, ebx
je 0x40bf7f
cmp ebx, 0xffffffff
je 0x40bf7f
push ebx
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c15c
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43114c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push ecx
lea eax, [ebp - 0x20]
push 0x65
push eax
call fcn.0040d91e
mov eax, dword [ebp - 0x20]
add esp, 0xc
cmp dword [ebp - 0xc], 8
jae 0x40c18b
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push 0
push 1
lea ecx, [ebp - 0x20]
mov esi, eax
call fcn.0040139d
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004168ab
leave
ret 4

Function at 0x40c281
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x828
mov eax, 0x4249a5
call fcn.00417706
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.00401c39
push 0xffffffffffffffff
push esi
push edi
lea ecx, [ebp - 0x82c]
mov dword [ebp - 4], esi
call fcn.00403655
xor eax, eax
push 0x7fe
mov word [ebp - 0x810], ax
lea eax, [ebp - 0x80e]
push esi
push eax
call fcn.004168c0
mov eax, dword [ebp - 0x82c]
add esp, 0xc
cmp dword [ebp - 0x818], 8
mov dword [ebp - 0x830], esi
jae 0x40c2f9
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 0x40c34d
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.00401c39
push esi
push 1
lea ecx, [ebp - 0x82c]
call fcn.0040139d
mov eax, ebx
call fcn.00417750
ret

Function at 0x40c371
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x2c
mov eax, 0x424c07
call fcn.00417706
mov edi, dword [ebp + 8]
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x2c]
call fcn.00401c39
push 0xffffffffffffffff
xor esi, esi
push esi
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], esi
call fcn.00403655
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
jae 0x40c3b0
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 0x40c3f2
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.0040139d
mov eax, edi
call fcn.00417750
ret
Function at 0x40c4f7
Capabilities:
Check if file exists
Query service status

Disassembly:
push 0x68
mov eax, 0x424a22
call fcn.00417706
mov dword [ebp - 0x70], ecx
push 5
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x68], edi
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], esi
call fcn.0040e067
test al, al
je 0x40c53e
cmp edi, esi
je 0x40c536
cmp edi, 0xffffffff
je 0x40c536
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xa
pop eax
jmp 0x40c6ce
push 0x14
mov ebx, 0x426450
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x74], esi
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
call fcn.0040e067
test al, al
je 0x40c582
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40c574
cmp esi, 0xffffffff
je 0x40c574
push esi
call ebx
test edi, edi
je 0x40c536
cmp edi, 0xffffffff
je 0x40c536
push edi
call ebx
jmp 0x40c536
and dword [ebp - 0x48], 0
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x48]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40c5cf
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40c5b1
cmp esi, 0xffffffff
je 0x40c5b1
push esi
call edi
cmp dword [ebp - 0x68], 0
je 0x40c536
cmp dword [ebp - 0x68], 0xffffffff
je 0x40c536
push dword [ebp - 0x68]
call edi
jmp 0x40c536
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x70]
cmp eax, dword [ecx + 0x20]
jne 0x40c59f
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00401c39
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 2
call fcn.0040c371
pop ecx
push 0
cmp eax, 4
push 1
lea ecx, [ebp - 0x2c]
sete byte [ebp - 0x69]
mov byte [ebp - 4], 1
call fcn.0040139d
cmp byte [ebp - 0x69], 0
je 0x40c638
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40c620
cmp esi, 0xffffffff
je 0x40c620
push esi
call edi
cmp dword [ebp - 0x68], 0
je 0x40c631
cmp dword [ebp - 0x68], 0xffffffff
je 0x40c631
push dword [ebp - 0x68]
call edi
push 0xb
jmp 0x40c538
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00401c39
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x64]
push eax
mov byte [ebp - 4], 3
call fcn.0040c45c
cmp dword [eax + 0x14], 8
pop ecx
pop ecx
jb 0x40c65c
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
push 0
neg ebx
push 1
lea ecx, [ebp - 0x64]
sbb bl, bl
call fcn.0040139d
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040139d
inc bl
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x40c6af
test esi, esi
je 0x40c697
cmp esi, 0xffffffff
je 0x40c697
push esi
call edi
cmp dword [ebp - 0x68], 0
je 0x40c6a8
cmp dword [ebp - 0x68], 0xffffffff
je 0x40c6a8
push dword [ebp - 0x68]
call edi
push 0xd
jmp 0x40c538
test esi, esi
je 0x40c6bb
cmp esi, 0xffffffff
je 0x40c6bb
push esi
call edi
cmp dword [ebp - 0x68], 0
je 0x40c6cc
cmp dword [ebp - 0x68], 0xffffffff
je 0x40c6cc
push dword [ebp - 0x68]
call edi
xor eax, eax
call fcn.00417750
ret
Function at 0x40c948
Capabilities:
Check if file exists
Copy file

Disassembly:
push 0x858
mov eax, 0x424b02
call fcn.00417706
xor eax, eax
push 0x7fe
mov word [ebp - 0x810], ax
xor edi, edi
lea eax, [ebp - 0x80e]
push edi
push eax
mov ebx, ecx
call fcn.004168c0
add esp, 0xc
push 0x400
lea eax, [ebp - 0x810]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x848]
call fcn.00401c39
xor eax, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x818], 7
mov dword [ebp - 0x81c], edi
mov word [ebp - 0x82c], ax
mov esi, 0x426450
push esi
mov byte [ebp - 4], 1
call fcn.004171b1
pop ecx
push eax
push edi
push esi
lea ecx, [ebp - 0x848]
call fcn.00403242
cmp eax, 0xffffffff
je 0x40ca86
lea eax, [ebp - 0x864]
push eax
mov ecx, ebx
call fcn.0040c6d4
push eax
lea ecx, [ebp - 0x82c]
mov byte [ebp - 4], 2
call fcn.00401bdd
push edi
push 1
lea ecx, [ebp - 0x864]
call fcn.0040139d
cmp dword [ebp - 0x818], 8
mov eax, dword [ebp - 0x82c]
jae 0x40ca22
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ca86
cmp dword [ebp - 0x818], 8
mov ecx, dword [ebp - 0x82c]
jae 0x40ca42
lea ecx, [ebp - 0x82c]
cmp dword [ebp - 0x834], 8
mov eax, dword [ebp - 0x848]
jae 0x40ca57
lea eax, [ebp - 0x848]
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
push edi
push 1
lea ecx, [ebp - 0x82c]
call fcn.0040139d
push edi
push 1
lea ecx, [ebp - 0x848]
call fcn.0040139d
mov eax, esi
call fcn.00417750
ret
xor esi, esi
inc esi
jmp 0x40ca62
Function at 0x40d4af
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x84c
mov eax, 0x424baa
call fcn.00417706
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x850], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x858], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x84c], ebx
push 0x7fe
mov word [ebp - 0x810], ax
lea eax, [ebp - 0x80e]
push ebx
push eax
call fcn.004168c0
mov edi, 0x426500
push edi
mov dword [ebp - 0x84c], ebx
call fcn.004171b1
add esp, 0x10
push eax
push 0xffffffffffffffff
push edi
mov ecx, esi
call fcn.00401220
mov edi, eax
push edi
push ebx
lea eax, [ebp - 0x82c]
push eax
mov ecx, esi
call fcn.00401b50
mov eax, dword [esi + 0x10]
sub eax, edi
dec eax
push eax
inc edi
push edi
lea eax, [ebp - 0x848]
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00401b50
cmp dword [ebp - 0x818], 8
mov eax, dword [ebp - 0x82c]
mov byte [ebp - 4], 1
jae 0x40d55a
lea eax, [ebp - 0x82c]
lea ecx, [ebp - 0x84c]
push ecx
push 0x20019
push ebx
push eax
push dword [ebp - 0x858]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d5c0
cmp dword [ebp - 0x834], 8
mov eax, dword [ebp - 0x848]
mov dword [ebp - 0x854], 0x800
jae 0x40d597
lea eax, [ebp - 0x848]
lea ecx, [ebp - 0x854]
push ecx
lea ecx, [ebp - 0x810]
push ecx
push ebx
push ebx
push eax
push dword [ebp - 0x84c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x84c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x850]
lea eax, [ebp - 0x810]
push eax
call fcn.00401c39
push ebx
push 1
lea ecx, [ebp - 0x848]
call fcn.0040139d
push ebx
push 1
lea ecx, [ebp - 0x82c]
call fcn.0040139d
mov eax, dword [ebp - 0x850]
call fcn.00417750
ret

Function at 0x40e081
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
lea eax, [ebp - 4]
push eax
push 0x20019
xor edi, edi
push edi
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e0f8
lea ecx, [ebp - 4]
call fcn.0040e067
test al, al
jne 0x40e0f8
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push dword [ebp + 0x10]
mov dword [ebp - 8], esi
push dword [ebp - 4]
mov dword [ebp - 0xc], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40e0f3
cmp dword [ebp - 4], edi
je 0x40e0ef
cmp dword [ebp - 4], 0xffffffff
je 0x40e0ef
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x40e10f
mov esi, dword [ebp - 8]
jmp 0x40e0db
cmp dword [ebp - 4], edi
je 0x40e10c
cmp dword [ebp - 4], 0xffffffff
je 0x40e10c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x14]
pop edi
pop esi
leave
ret