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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
xor eax, eax
jne 0x4c2899
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
shl edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4c28dc
mov eax, dword [ebp - 8]
jmp 0x4c2942
cmp dword [ebp - 0xc], 1
je 0x4c28ef
cmp dword [ebp - 0xc], 2
je 0x4c28ef
mov eax, 0xd
jmp 0x4c2942
cmp dword [ebp + 0xc], 0
je 0x4c2936
cmp dword [ebp - 4], 0
je 0x4c2925
mov eax, dword [ebp - 4]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x4c291c
mov edx, dword [ebp - 4]
shr edx, 1
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x4c2923
mov eax, 0xd
jmp 0x4c2942
jmp 0x4c2936
mov edx, 2
imul eax, edx, 0
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov word [edx + eax], cx
mov eax, dword [ebp - 4]
shr eax, 1
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4c3380
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50039c
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x541a34]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x21c], ecx
mov ecx, dword [ebp - 0x21c]
call fcn.004c2ed0
push 0x250
push 0
mov eax, dword [ebp - 0x21c]
push eax
call fcn.004d64c0
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x224]
call fcn.0044ddc0
mov dword [ebp - 4], 0
push 0
push 0x511cf0
lea ecx, [ebp - 0x224]
call fcn.0045a4a0
cmp eax, 1
je 0x4c342b
push 0
push 0x507cb0
lea ecx, [ebp - 0x224]
call fcn.0045a4a0
test eax, eax
je 0x4c342b
push 0
push 0x505f5c
lea ecx, [ebp - 0x224]
call fcn.0045a4a0
test eax, eax
jne 0x4c3490
push 0x5c
lea ecx, [ebp - 0x224]
call fcn.004613e0
add eax, 1
push eax
lea edx, [ebp - 0x230]
push edx
lea ecx, [ebp - 0x224]
call fcn.0045eda0
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x22c]
push ecx
mov ecx, dword [ebp - 0x21c]
add ecx, 0x254
call fcn.00457750
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x230]
call fcn.0044e100
jmp 0x4c3577
push 0x104
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.004d64c0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [ebp - 0x218]
push ecx
mov ecx, dword [ebp - 0x21c]
add ecx, 0x254
call fcn.00457780
push 0x5c
lea ecx, [ebp - 0x248]
call fcn.004c2cf0
mov dword [ebp - 0x234], eax
mov edx, dword [ebp - 0x234]
mov dword [ebp - 0x238], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x238]
push eax
push 1
lea ecx, [ebp - 0x244]
push ecx
mov ecx, dword [ebp - 0x21c]
add ecx, 0x254
call fcn.00461440
mov dword [ebp - 0x23c], eax
mov edx, dword [ebp - 0x23c]
mov dword [ebp - 0x240], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x240]
call fcn.0048c7f0
mov byte [ebp - 0x21d], al
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x244]
call fcn.0044e100
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x248]
call fcn.0044e100
movzx eax, byte [ebp - 0x21d]
test eax, eax
je 0x4c3577
push 0x5c
mov ecx, dword [ebp - 0x21c]
add ecx, 0x254
call fcn.00458a10
mov ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, dword [ebp - 0x21c]
mov dword [ecx + 0x250], eax
mov edx, dword [ebp - 0x21c]
cmp dword [edx + 0x250], 0xffffffff
jne 0x4c35c7
mov dword [ebp - 0x24c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x224]
call fcn.0044e100
mov eax, dword [ebp - 0x24c]
jmp 0x4c35e9
mov dword [ebp - 0x250], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x224]
call fcn.0044e100
mov eax, dword [ebp - 0x250]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret 4
Function at 0x4c4fc0
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fee50
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x541a34]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.0044ddc0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0045ea70
test eax, eax
je 0x4c503d
push 0
call fcn.0044f2c0
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.0045ba20
add esp, 0xc
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x10]
call fcn.00457750
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.0044e100
lea ecx, [ebp - 0x10]
call fcn.00443490
push eax
push 0x5128d0
push closesocket
call fcn.004c5080
add esp, 0xc
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0044e100
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret

Function at 0x4c51a0
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x541a34]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x210], 0
xor eax, eax
mov word [ebp - 0x20c], ax
push 0x206
push 0
lea ecx, [ebp - 0x20a]
push ecx
call fcn.004d64c0
add esp, 0xc
mov dword [ebp - 0x214], 0x103
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea ecx, [ebp - 0x20c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0044ddc0
mov edx, dword [ebp - 0x210]
or edx, 1
mov dword [ebp - 0x210], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret
Function at 0x4c8b80
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x500cb8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x541a34]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x10]
call fcn.0044ddc0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0045ea70
test eax, eax
je 0x4c8bd2
call fcn.0044f2c0
push eax
lea ecx, [ebp - 0x10]
call fcn.00457780
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x14]
call fcn.0044ddc0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.0045ea70
test eax, eax
je 0x4c8c2a
push 0
lea ecx, [ebp - 0x10]
call fcn.00443490
push eax
lea edx, [ebp - 0x20]
push edx
call fcn.0045ba20
add esp, 0xc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00457750
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.0044e100
lea ecx, [ebp - 0x10]
call fcn.00443490
push eax
lea ecx, [ebp - 0x14]
call fcn.00443490
push eax
push 0x5128d0
push closesocket
call fcn.004c8c80
add esp, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.0044e100
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0044e100
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret

Function at 0x4c8d50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x4c8d65
xor eax, eax
jmp 0x4c8db5
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4c8d99
mov dword [ebp - 8], 1
jmp 0x4c8da0
mov dword [ebp - 8], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4cb990
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 4]
call fcn.004cb810
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0
push 0x67
call fcn.0044f370
mov ecx, eax
call fcn.0049a310
mov esp, ebp
pop ebp
ret
Function at 0x4f16a3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004f1522
Function at 0x401750
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x210
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x20c], eax
cmp dword [0x42a2c8], 0
push esi
mov esi, dword [esp + 0x218]
je 0x4017e0
push str.SYSTEMControlSet001Services_
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x421518
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 4]
push edx
push 0x20019
push 0
lea eax, [esp + 0x1c]
push eax
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40184f
mov ecx, dword [esp + 0x21c]
lea edx, [esp + 8]
push edx
push esi
lea eax, [esp + 0x14]
push eax
push 0
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], ecx
push str.ImagePath
jmp 0x401835
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 4]
push edx
push 0x20019
push 0
lea eax, [esp + 0x1c]
push eax
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40184f
mov ecx, dword [esp + 0x21c]
lea edx, [esp + 0xc]
push edx
push esi
lea eax, [esp + 0x10]
push eax
push 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], ecx
push 0x421518
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x401867
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0040fac6
add esp, 0x210
ret
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x210]
pop esi
xor ecx, esp
mov eax, 1
call fcn.0040fac6
add esp, 0x210
ret
Function at 0x401890
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x39c
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x398], eax
push ebx
push esi
xor ebx, ebx
push 0x257
lea eax, [esp + 0x14d]
push ebx
push eax
mov byte [esp + 0x154], bl
call fcn.0040fd40
push 0x103
lea ecx, [esp + 0x19]
push ebx
push ecx
mov byte [esp + 0x20], bl
call fcn.0040fd40
add esp, 0x18
push 0x104
lea edx, [esp + 0xc]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4018f1
sub eax, edx
add eax, 0xffffffff
mov cl, 0x5c
cmp byte [esp + eax + 8], cl
je 0x401910
sub eax, 1
cmp byte [esp + eax + 8], cl
jne 0x401907
mov byte [esp + eax + 9], bl
lea eax, [esp + 8]
add eax, 0xffffffff
jmp 0x401920
mov cl, byte [eax + 1]
add eax, 1
cmp cl, bl
jne 0x401920
mov ecx, dword [str.Rockey_Service.ini]
mov edx, dword [0x42157c]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
mov dword [eax], ecx
mov ecx, dword [0x421580]
mov dword [eax + 4], edx
mov edx, dword [0x421584]
mov dword [eax + 8], ecx
mov cx, word [0x421588]
mov dword [eax + 0xc], edx
mov dl, byte [0x42158a]
mov word [eax + 0x10], cx
mov byte [eax + 0x12], dl
mov eax, dword [esp + 0x3a8]
sub eax, 1
je 0x4019e8
sub eax, 1
je 0x4019b5
sub eax, 1
jne 0x401a25
mov ecx, dword [0x4293b8]
push 0x200
lea eax, [esp + 0x14c]
push eax
push 0x8009
push ecx
call esi
lea edx, [esp + 8]
push edx
push 0x64
lea eax, [esp + 0x150]
push eax
mov ecx, eax
push ecx
push str.ERROR
jmp 0x401a1a
mov eax, dword [0x4293b8]
push 0x200
lea edx, [esp + 0x14c]
push edx
push 0x8007
push eax
call esi
lea ecx, [esp + 8]
push ecx
push 0x64
lea edx, [esp + 0x150]
push edx
mov eax, edx
push eax
push str.OVERLOOK
jmp 0x401a1a
mov edx, dword [0x4293b8]
push 0x200
lea ecx, [esp + 0x14c]
push ecx
push 0x8008
push edx
call esi
lea eax, [esp + 8]
push eax
push 0x64
lea ecx, [esp + 0x150]
push ecx
mov edx, ecx
push edx
push str.FIND
push 0x421554
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [0x4293d4], 1
je 0x401a6e
mov ecx, dword [0x4293b8]
push 0x28
lea eax, [esp + 0x110]
push eax
push 0x8006
push ecx
mov dword [0x4293d4], 1
call esi
push ebx
lea edx, [esp + 0x110]
push edx
lea eax, [esp + 0x150]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x4293d4], ebx
mov ecx, dword [esp + 0x3a0]
pop esi
pop ebx
xor ecx, esp
call fcn.0040fac6
add esp, 0x39c
ret
Function at 0x402590
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x204
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x200], eax
push ebp
mov ebp, dword [esp + 0x20c]
push esi
push str.FTSERVICE_SYTSTRAY_ICON_ATOM
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
movzx esi, ax
test si, si
je 0x402616
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [esp + 0xc]
push eax
push 0x1f5
push ebp
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 8]
push ecx
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
jne 0x40270e
push esi
call dword [sym.imp.KERNEL32.dll_GlobalDeleteAtom]
push 0
push str.Error
push str.The_service_was_not_shutdown_properly_last_time__please_restart_the_service_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40270e
push ebx
push edi
push str.FTSERVICE_SYTSTRAY_ICON_ATOM
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
movzx ebx, ax
call fcn.00401000
push 0x200
lea edx, [esp + 0x14]
push edx
push 0
mov dword [0x4293d0], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str.__start
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
lea esp, [esp]
push 0x1f4
add esi, 1
call edi
call fcn.00401000
test eax, eax
mov dword [0x4293d0], eax
jne 0x40268d
cmp esi, 0x14
jl 0x402670
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
lea edx, [esp + 0x10]
push 0x200
push edx
mov dword [0x4293b8], ebp
call fcn.00401750
add esp, 8
test eax, eax
je 0x4026dc
lea eax, [esp + 0x10]
push 0x5c
push eax
call fcn.0040fa10
add esp, 8
test eax, eax
je 0x4026c5
mov byte [eax], 0
push 0x42163c
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push edx
jmp 0x4026e1
push str..SvrCfg.ini
mov ecx, 0x4293d8
call fcn.00405160
push 0
push fcn.00401d20
push 0
push 0x81
push ebp
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalDeleteAtom]
call fcn.00401050
pop edi
pop ebx
mov ecx, dword [esp + 0x208]
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0040fac6
add esp, 0x204
ret 0x10

Function at 0x402730
Capabilities:
Hide graphical window

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
push 0
push 0
push 0
push bind
push 0
push bind
push 0xcf0000
push 0x42a150
push 0x42a1c0
push 0
mov dword [0x42a1b4], eax
call dword [sym.imp.USER32.dll_CreateWindowExA]
test eax, eax
jne 0x40276a
ret
push 0
push eax
mov dword [0x42a2c4], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, 1
ret
Function at 0x403210
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x10c
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x108], eax
cmp dword [0x42a7f8], 0
push edi
mov edi, dword [esp + 0x114]
jne 0x40329f
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.FTSafeNetRockey4SMTService
push 0
mov dword [0x42a7f4], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x42a7f4]
push eax
push str.FTSafeNetRockey4SMTService
lea ecx, [esp + 0x18]
push str._s_error:__d
push ecx
call fcn.0040fdff
add esp, 0x10
test esi, esi
lea edx, [esp + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
je 0x40329e
push 0
lea eax, [esp + 0xc]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov ecx, dword [esp + 0x10c]
pop edi
xor ecx, esp
call fcn.0040fac6
add esp, 0x10c
ret

Function at 0x4032c0
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
sub esp, 0x208
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x204], eax
push 0x200
lea eax, [esp + 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40330c
push 0x1ff
call fcn.00402d40
add esp, 4
mov ecx, dword [esp + 0x204]
xor ecx, esp
call fcn.0040fac6
add esp, 0x208
ret
push edi
push str.__dispatch
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40341a
push ebp
push esi
push 0xf01ff
push str.FTSafeNetRockey4SMTService
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x40335f
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call ebp
push 0
push 0
push 0x421781
push 0
push 0
lea edx, [esp + 0x24]
push edx
push 1
push 2
push 0x10
push 0xf01ff
push str.FTSafe_Net_Rockey4SMT_Service
push str.FTSafeNetRockey4SMTService
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
je 0x4033f2
push ebx
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x4033d3
push str.ChangeServiceConfig2A
push ebx
mov dword [esp + 0x18], str.FTSafe_Net_Service
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [0x42a7f0], eax
je 0x4033cc
lea ecx, [esp + 0x10]
push ecx
push 1
push esi
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call ebp
pop ebx
push edi
call ebp
pop esi
pop ebp
pop edi
mov ecx, dword [esp + 0x204]
xor ecx, esp
call fcn.0040fac6
add esp, 0x208
ret
push 0x200
call fcn.00402d40
add esp, 4
push edi
call ebp
pop esi
pop ebp
pop edi
mov ecx, dword [esp + 0x204]
xor ecx, esp
call fcn.0040fac6
add esp, 0x208
ret
push 0x201
call fcn.00402d40
mov ecx, dword [esp + 0x20c]
add esp, 4
pop edi
xor ecx, esp
call fcn.0040fac6
add esp, 0x208
ret
Function at 0x403440
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x118
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x114], eax
push esi
push 0x100
lea eax, [esp + 0x1c]
push eax
push 0x207
push 0
mov esi, 1
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x34
push 0x421610
lea ecx, [esp + 0x20]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x4034ee
lea edx, [esp + 4]
push edx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4034a4
xor esi, esi
lea eax, [esp + 0xc]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov edx, dword [esp + 4]
push 0
push 0
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push edx
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x4034e4
xor esi, esi
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov ecx, dword [esp + 0x118]
mov eax, esi
pop esi
xor ecx, esp
call fcn.0040fac6
add esp, 0x118
ret
Function at 0x403570
Capabilities:
Modify service
Print debug messages
Start service

Disassembly:
sub esp, 0x204
mov eax, dword [0x427da0]
xor eax, esp
mov dword [esp + 0x200], eax
push ebp
mov ebp, dword [esp + 0x210]
push esi
push 0xf003f
push 0
push 0
mov dword [0x42a7fc], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x40372c
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push edi
push 0xf003f
push str.FTSafeNetRockey4SMTService
push esi
call ebx
mov edi, eax
test edi, edi
je 0x4036e6
push 0x200
lea eax, [esp + 0x14]
push 0
push eax
call fcn.0040fd40
add esp, 0xc
push 0x200
lea ecx, [esp + 0x14]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40361f
push 0x1ff
call fcn.00402d40
add esp, 4
pop edi
pop ebx
pop esi
pop ebp
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.0040fac6
add esp, 0x204
ret
push str.__dispatch
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
je 0x403658
push str.change_service_config
jmp 0x4036bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x421
ja 0x403692
je 0x40368b
sub eax, 5
je 0x403684
sub eax, 1
je 0x40367d
sub eax, 0x51
jne 0x4036a3
push 0x4217e0
jmp 0x4036bd
push 0x4217dc
jmp 0x4036bd
push 0x4217d8
jmp 0x4036bd
push 0x4217d4
jmp 0x4036bd
sub eax, 0x423
je 0x4036b8
sub eax, 0xd
je 0x4036b1
sub eax, 6
je 0x4036aa
push 0x4217d0
jmp 0x4036bd
push 0x4217cc
jmp 0x4036bd
push 0x4217c8
jmp 0x4036bd
push 0x4217c4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push 0x20000000
push str.FTSafeNetRockey4SMTService
push esi
call ebx
mov ecx, dword [esp + 0x218]
push ebp
mov ebx, eax
push ecx
jmp 0x403711
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
call edi
call fcn.004032c0
push 0x20000000
push str.FTSafeNetRockey4SMTService
push esi
call ebx
mov ebx, eax
test ebx, ebx
je 0x403724
mov edx, dword [esp + 0x218]
push ebp
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x403721
call fcn.00403510
push ebx
call edi
push esi
call edi
jmp 0x403606
push 0x201
call fcn.00402d40
mov ecx, dword [esp + 0x20c]
add esp, 4
pop esi
pop ebp
xor ecx, esp
call fcn.0040fac6
add esp, 0x204
ret