joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c1a0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
lea esp, [esp]
call fcn.00413411
mov dword [eax], 0
mov eax, dword [esp + 0x18]
push edi
push eax
push ebx
call fcn.0041b506
mov esi, eax
add esp, 0xc
cmp esi, edi
je 0x40c26a
call fcn.00413411
cmp dword [eax], 0
je 0x40c1e7
call fcn.00413411
mov ebp, dword [eax]
jmp 0x40c1ea
or ebp, 0xffffffff
call fcn.00408390
test esi, esi
mov dword [eax], ebp
jne 0x40c1ff
call fcn.00413411
cmp dword [eax], 4
je 0x40c1b0
mov al, byte [esp + 0x20]
test al, 0x1a
je 0x40c257
cmp esi, 0xffffffff
jne 0x40c231
call fcn.00408390
mov ecx, dword [eax]
push ecx
push ebx
call fcn.0040c460
add esp, 4
push eax
push 0x24
push 2
call fcn.004048d0
add esp, 0x10
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
test al, 6
je 0x40c257
call fcn.00408390
mov edx, dword [eax]
push edx
push ebx
call fcn.0040c460
add esp, 4
push eax
push 0x24
push 9
call fcn.004048d0
mov al, byte [esp + 0x30]
add esp, 0x10
cmp esi, 0xffffffff
je 0x40c260
test al, 6
je 0x40c274
pop edi
pop esi
pop ebp
mov eax, 0xffffffff
pop ebx
ret
mov al, byte [esp + 0x20]
test al, 6
je 0x40c274
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret

Function at 0x40c6e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x58]
test ebx, ebx
push edi
jge 0x40c731
cmp ebx, 0xffffffdc
jl 0x40c7fb
cmp ebx, 0xfffffffe
jg 0x40c7fb
mov ecx, dword [esp + 0x54]
test ecx, ecx
mov edi, dword [esp + 0x50]
jg 0x40c729
jl 0x40c711
test edi, edi
jae 0x40c729
mov edx, dword [esp + 0x58]
inc edx
mov byte [edx - 1], 0x2d
neg edi
adc ecx, 0
neg ecx
mov dword [esp + 0x58], edx
neg ebx
jmp 0x40c74f
mov edx, dword [esp + 0x58]
neg ebx
jmp 0x40c74f
cmp ebx, 0x24
jg 0x40c7fb
cmp ebx, 2
jl 0x40c7fb
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x50]
mov edx, dword [esp + 0x58]
mov eax, edi
or eax, ecx
jne 0x40c764
mov byte [edx], 0x30
inc edx
pop edi
mov byte [edx], 0
mov eax, edx
pop ebx
add esp, 0x44
ret
test ecx, ecx
push esi
lea esi, [esp + 0x4c]
mov byte [esp + 0x4c], 0
ja 0x40c77a
cmp edi, 0x7fffffff
jbe 0x40c7af
push ebp
xor ebp, ebp
lea ecx, [ecx]
push ebp
push ebx
push ecx
push edi
call fcn.00414180
mov ecx, eax
imul ecx, ebx
sub edi, ecx
mov cl, byte [edi + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]
dec esi
test edx, edx
mov byte [esi], cl
mov edi, eax
mov ecx, edx
ja 0x40c780
jb 0x40c7aa
cmp eax, 0x7fffffff
ja 0x40c780
mov edx, dword [esp + 0x60]
pop ebp
test edi, edi
mov dword [esp + 0x60], edi
je 0x40c7e7
mov eax, dword [esp + 0x60]
cdq
idiv ebx
xor edx, edx
mov dl, byte [esp + 0x60]
dec esi
mov ecx, eax
mov al, bl
imul cl
sub dl, al
mov dword [esp + 0x60], ecx
and edx, 0xff
test ecx, ecx
mov al, byte [edx + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ]
mov byte [esi], al
jne 0x40c7b7
mov edx, dword [esp + 0x5c]
mov al, byte [esi]
mov byte [edx], al
inc edx
inc esi
test al, al
jne 0x40c7e7
pop esi
pop edi
lea eax, [edx - 1]
pop ebx
add esp, 0x44
ret
pop edi
xor eax, eax
pop ebx
add esp, 0x44
ret
Function at 0x41ed30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41ed50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041339e
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x41ed73
test byte [esp + 8], 2
je 0x41ed73
call fcn.00413411
mov dword [eax], 0xd
call fcn.0041341a
mov dword [eax], 5
jmp 0x41ed4c
xor eax, eax
ret

Function at 0x3a2bc0
Capabilities:
Encode data using xor

Disassembly:
xor al, al
cmp dword [esp + 8], 0
push ebp
mov ebp, dword [esp + 8]
je 0x3a2c57
test ebp, ebp
je 0x3a2c57
mov eax, ebp
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x3a2be0
sub eax, edx
push ebx
sar eax, 1
shr eax, 1
push esi
mov ebx, eax
push edi
lea edi, [ebx + 2]
push edi
call fcn.003a374f
mov esi, eax
add esp, 4
test esi, esi
je 0x3a2c52
push edi
push 0
push esi
call fcn.003a6370
push esi
push ebp
mov eax, ebx
call fcn.003a20d0
add esp, 0x14
xor eax, eax
test ebx, ebx
jbe 0x3a2c2b
xor byte [eax + esi], bl
inc eax
cmp eax, ebx
jb 0x3a2c23
mov ecx, dword [esp + 0x18]
lea eax, [ebx + ebx]
push eax
push ecx
push ebx
push esi
push 0
push 0
call dword [0x3af018]
push esi
mov bl, 1
call fcn.003a574e
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret
Function at 0x4015d0
Capabilities:
Start service

Disassembly:
push esi
mov esi, ecx
call fcn.00401530
test al, al
je 0x4015fe
push str.start_serv_start_r_n
push 0xa0
push str.e:project_se_branches8.5_business_new_src_sesecuritycenter_sesecuritycenter_ntservice_ntservice.cpp
push 1
call fcn.00405450
mov ecx, dword [esi + 4]
add esp, 0x10
pop esi
jmp fcn.004059a0
xor al, al
pop esi
ret

Function at 0x402390
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424d50
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x6c]
call fcn.004078d0
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x4023d4
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push str.wmain_CmdLine__s__r_n_UserName__s_r_n
push 0xd7
push str.e:project_se_branches8.5_business_new_src_sesecuritycenter_sesecuritycentermain.cpp
push 1
call fcn.00405450
mov dword [ebp - 4], 0xffffffff
add esp, 0x18
mov eax, dword [ebp - 0x58]
cmp eax, 8
jb 0x402411
inc eax
lea ecx, [ebp - 0x6c]
push eax
push dword [ebp - 0x6c]
call fcn.00401b20
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
cmp esi, 1
jle 0x40243f
mov edx, edi
mov ecx, esi
call fcn.004022e0
test al, al
jne 0x402491
jmp 0x40252c
call fcn.00402220
test al, al
je 0x40252c
mov eax, dword [edi]
test eax, eax
je 0x402491
push eax
push 0x400
push 0x435968
call fcn.00418a2e
push 0x42b82c
push 0x104
push 0x435760
call fcn.00418a2e
add esp, 0x18
push 0x40e3c0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x40e3f0
call fcn.0041597c
add esp, 4
push 0x44
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.00414170
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 0x42b82c
add esp, 0xc
mov dword [ebp - 0x4c], 0x42bd54
mov dword [ebp - 0x48], str.:NOmhV_u7b
mov dword [ebp - 0x44], 0x84
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x1c], 0
mov dword [0x4356f8], eax
mov dword [ebp - 0x38], 0x10
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x54], vtable.SESecurityCenterSvr.0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push edi
push esi
mov ecx, eax
mov dword [ebp - 4], 1
call fcn.00401170
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x54], vtable.SESecurityCenterSvr.0
test eax, eax
je 0x402522
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4356f8], 0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411abb
mov esp, ebp
pop ebp
ret
Function at 0x404122
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x82c
mov eax, 0x424edb
call fcn.00412371
mov edi, ecx
mov dword [ebp - 0x834], edi
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x830]
mov ebx, dword [ebp + 0xc]
xor esi, esi
push ecx
push 1
push esi
push eax
push edx
mov dword [ebp - 0x838], esi
mov dword [ebp - 0x830], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [ebp - 0x830], esi
jne 0x40417e
push esi
mov ecx, edi
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], 7
call fcn.00401b80
jmp 0x40428b
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00414170
and dword [ebp - 0x818], esi
lea ecx, [ebp - 0x828]
add esp, 0xc
mov dword [ebp - 0x814], 7
push 0
call fcn.00401b80
xor ecx, ecx
lea eax, [ebp - 0x834]
push eax
push ecx
lea eax, [ebp - 0x82c]
mov dword [ebp - 4], ecx
push eax
push ecx
push ebx
push dword [ebp - 0x830]
mov dword [ebp - 0x82c], ecx
mov dword [ebp - 0x834], ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40424e
cmp dword [ebp - 0x82c], 1
je 0x4041fe
cmp dword [ebp - 0x82c], 2
je 0x4041fe
cmp dword [ebp - 0x82c], 7
jne 0x40424e
cmp dword [ebp - 0x834], 0x800
jae 0x404212
lea esi, [ebp - 0x810]
jmp 0x404220
push dword [ebp - 0x834]
call fcn.0041210f
pop ecx
mov esi, eax
lea eax, [ebp - 0x834]
push eax
push esi
lea eax, [ebp - 0x82c]
push eax
push 0
push ebx
push dword [ebp - 0x830]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40424e
push esi
lea ecx, [ebp - 0x828]
call fcn.00402f60
push dword [ebp - 0x830]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x404272
lea eax, [ebp - 0x810]
cmp esi, eax
je 0x404272
push 2
push esi
call fcn.00411acc
pop ecx
pop ecx
lea eax, [ebp - 0x828]
mov ecx, edi
push eax
call fcn.00403cc9
lea ecx, [ebp - 0x828]
call fcn.00401c20
mov eax, edi
call fcn.0041232c
ret
Function at 0x405720
Capabilities:
Check for time delay via gettickcount
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov ebx, ecx
mov esi, edx
push edi
push esi
mov dword [ebp - 0x14], ebx
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x405763
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatus_failed___E_d_r_n
push 0x30
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 8]
mov edi, dword [esi + 0x14]
mov eax, 0xcccccccd
mul dword [esi + 0x18]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x2710
shr edx, 3
cmp edx, 0x2710
mov dword [ebp - 8], edx
cmovbe eax, ecx
mov ecx, 0x3e8
mov eax, dword [eax]
cmp eax, ecx
cmovb eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x405836
mov ebx, dword [ebp + 8]
nop word [eax + eax]
cmp dword [esi + 4], ebx
setne cl
mov byte [ebp - 1], cl
cmp dword [esi + 4], ebx
jne 0x405856
cmp dword [esi + 0x14], edi
jbe 0x4057e5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esi + 0x14]
mov dword [ebp - 0xc], eax
jmp 0x4057f3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xc]
cmp eax, dword [esi + 0x18]
ja 0x405853
mov eax, 0xcccccccd
lea ecx, [ebp - 8]
mul dword [esi + 0x18]
lea eax, [ebp - 0x10]
shr edx, 3
cmp edx, 0x2710
mov dword [ebp - 8], edx
cmovbe eax, ecx
mov ecx, 0x3e8
mov eax, dword [eax]
cmp eax, 0x3e8
cmovb eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
push esi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4057c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatus_failed___E_d_r_n
push 0x48
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x14
mov cl, byte [ebp - 1]
pop edi
pop esi
mov al, cl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405860
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0xf003f
push 0
mov esi, edx
mov edi, ecx
push 0
mov dword [ebp - 0xc], esi
xor bl, bl
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x405891
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0
push dword [ebp + 0xc]
push 1
push 2
push 0x10
push 0xf01ff
push esi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x405953
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
je 0x4058f3
push eax
push edi
push str.CreateService_failed___lpServiceName__s__d.__r_n
push 0x79
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x18
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40598b
push 0
push 0
push 0
push 0
push 0
push 0
push dword [ebp + 0xc]
push 0xffffffffffffffff
push 2
push 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
cmp eax, 1
jne 0x40592e
mov bl, al
jmp 0x405984
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._s_installed._But_change_sevice_descfailed__d_r_n
push 0x96
push str.ServiceMgrServiceMgr.cpp
push 1
call fcn.00405450
add esp, 0x18
xor bl, bl
jmp 0x405984
mov eax, dword [ebp + 8]
mov bl, 1
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push dword [ebp - 0xc]
push str._s_installed._r_n
push 0x84
push str.ServiceMgrServiceMgr.cpp
push 1
call fcn.00405450
add esp, 0x14
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4059a0
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x28], 0
push 0xf003f
push esi
push esi
mov edi, ecx
mov dword [ebp - 0x24], esi
xor bl, bl
xor bh, bh
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x4059f0
push 0x14
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4059f0
mov bh, 1
jmp 0x4059f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x405a07
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test bh, bh
jne 0x405a2a
push dword [ebp - 0x28]
push edi
push str.get_scm_handle___s_Failure._E_u_r_n
push 0xfb
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x18
jmp 0x405a80
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x405a66
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x405a4a
mov bl, 1
jmp 0x405a80
push eax
push str.StartService_failed___E_d_r_n
push 0x105
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x14
jmp 0x405a80
push 2
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x24]
call fcn.00405720
mov esi, dword [ebp - 0x24]
add esp, 4
cmp dword [ebp - 0x1c], 4
sete bl
test esi, esi
je 0x405a8b
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
test bl, bl
je 0x405aa3
push str._s_started._r_n
push 0x116
push str.ServiceMgrServiceMgr.cpp
push 1
jmp 0x405ab4
push str._s_failed_to_start._r_n
push 0x118
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
mov ecx, dword [ebp - 4]
add esp, 0x14
mov al, bl
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00411abb
mov esp, ebp
pop ebp
ret
Function at 0x405ad0
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
xor eax, eax
push 0xf003f
push esi
push esi
mov edi, ecx
mov dword [ebp - 0x28], eax
xor bl, bl
mov dword [ebp - 0x24], esi
xor bh, bh
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x405b21
push 0xf01ff
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x405b21
mov bh, 1
jmp 0x405b2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x405b38
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test bh, bh
jne 0x405b67
mov eax, dword [ebp - 0x28]
cmp eax, 0x424
jne 0x405b4a
mov bl, 1
jmp 0x405bc5
push eax
push edi
push str.get_scm_handle__s_Failure._E_u_r_n
push 0x129
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x18
jmp 0x405bc5
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x405bab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jne 0x405b89
mov bl, 1
jmp 0x405bc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StopService_failed___E_d_r_n
push 0x134
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x14
jmp 0x405bc5
push 3
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x24]
call fcn.00405720
mov esi, dword [ebp - 0x24]
add esp, 4
cmp dword [ebp - 0x1c], 1
sete bl
test esi, esi
je 0x405bd0
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
test bl, bl
je 0x405be8
push str._s_stopped._r_n
push 0x144
push str.ServiceMgrServiceMgr.cpp
push 1
jmp 0x405bf9
push str._s_failed_to_stop._r_n
push 0x146
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
mov ecx, dword [ebp - 4]
add esp, 0x14
mov al, bl
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00411abb
mov esp, ebp
pop ebp
ret
Function at 0x405c20
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push 0xf003f
xor esi, esi
mov dword [ebp - 4], ecx
push esi
xor eax, eax
xor bl, bl
push esi
mov dword [ebp - 8], eax
xor bh, bh
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x405c63
push 0xf01ff
push dword [ebp - 4]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x405c63
mov bh, 1
jmp 0x405c6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
test edi, edi
je 0x405c77
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test bh, bh
jne 0x405c92
mov eax, dword [ebp - 8]
cmp eax, 0x424
je 0x405cda
push eax
push str.GetService_failed____d.__r_n
push 0x156
jmp 0x405cb5
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x405cda
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
je 0x405cda
push eax
push str.DeleteService_failed____d.__r_n
push 0x161
push str.ServiceMgrServiceMgr.cpp
push 4
call fcn.00405450
add esp, 0x14
push dword [ebp - 4]
push str._s_is_failed_to_remove._r_n
push 0x16b
push str.ServiceMgrServiceMgr.cpp
push 4
jmp 0x405cf0
push dword [ebp - 4]
mov bl, 1
push str._s_is_removed._r_n
push 0x169
push str.ServiceMgrServiceMgr.cpp
push 1
call fcn.00405450
add esp, 0x14
test esi, esi
je 0x405d03
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x405db0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov esi, edx
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004025a0
mov eax, dword [esi + 0x10]
lea edi, [ebp - 0x1c]
add esp, 4
mov dword [ebp - 0x28], eax
cmp dword [ebp - 8], 8
cmovae edi, dword [ebp - 0x1c]
cmp dword [esi + 0x14], 8
jb 0x405dec
mov esi, dword [esi]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 2
push 0
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 2
jne 0x405e33
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov ecx, dword [ebp - 0x24]
test eax, eax
je 0x405e2e
test ecx, ecx
je 0x405e33
mov dword [ebp - 0x20], ecx
jmp 0x405e36
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x405e3e
xor bl, bl
jmp 0x405e66
mov eax, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
push eax
push esi
push 1
push 0
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x20]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
sete bl
mov ecx, dword [ebp - 8]
cmp ecx, 8
jb 0x405e7b
inc ecx
push ecx
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x1c]
call fcn.00401b20
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411abb
mov esp, ebp
pop ebp
ret
Function at 0x4063d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x208
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], 0
mov esi, ecx
push 0
push eax
mov dword [ebp - 0x210], esi
call fcn.00414170
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp word [ebp - 0x20c], ax
jne 0x40643e
xor ecx, ecx
jmp 0x406456
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406447
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
call fcn.00402e30
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00411abb
mov esp, ebp
pop ebp
ret

Function at 0x406780
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4251c8
mov eax, dword fs:[0]
push eax
sub esp, 0x210
mov eax, dword [0x434008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
test ecx, ecx
je 0x4067f1
cmp ecx, 4
je 0x4067f1
push ecx
push 0
push 0x411
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x406825
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.open_proc_failed_E_d_r_n
push 0x10e
push str.ProcessProcess.cpp
push 4
call fcn.00405450
add esp, 0x14
xor bl, bl
mov ecx, dword [ebp + 0x1c]
cmp ecx, 8
jb 0x406808
inc ecx
push ecx
push dword [ebp + 8]
lea ecx, [ebp + 8]
call fcn.00401b20
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411abb
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00414170
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
push esi
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push 0x104
cmovae eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00415a62
add esp, 0xc
test eax, eax
jne 0x40687c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xc8
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
jmp 0x4067f3