joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4efe2a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x52e028]
jne 0x4efe34
repz ret
jmp 0x4f03ce
aaa
sbb al, 0x40
add byte [edi - 1], bl
xlatb
nop
nop
nop
nop
mov dword [0x531bd0], eax
mov dword [0x531bcc], ecx
mov dword [0x531bc8], edx
mov dword [0x531bc4], ebx
mov dword [0x531bc0], esi
mov dword [0x531bbc], edi
mov word [0x531be8], ss
mov word [0x531bdc], cs
mov word [0x531bb8], ds
mov word [0x531bb4], es
mov word [0x531bb0], fs
mov word [0x531bac], gs
pushfd
pop dword [0x531be0]
mov eax, dword [ebp]
mov dword [0x531bd4], eax
mov eax, dword [ebp + 4]
mov dword [0x531bd8], eax
lea eax, [ebp + 8]
mov dword [0x531be4], eax
mov eax, dword [ebp - 0x320]
mov dword [0x531b20], 0x10001
mov eax, dword [0x531bd8]
mov dword [0x531ad4], eax
mov dword [0x531ac8], 0xc0000409
mov dword [0x531acc], 1
mov eax, dword [0x52e028]
mov dword [ebp - 0x328], eax
mov eax, dword [0x52e02c]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x531b18], eax
push 1
call fcn.004f04fe
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x500074
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x531b18], 0
jne 0x4f04c0
push 1
call fcn.004f04fe
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret

Function at 0x4f03ce
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x52e028]
jne 0x4efe34
repz ret
jmp 0x4f03ce
aaa
sbb al, 0x40
add byte [edi - 1], bl
xlatb
nop
nop
nop
nop
mov dword [0x531bd0], eax
mov dword [0x531bcc], ecx
mov dword [0x531bc8], edx
mov dword [0x531bc4], ebx
mov dword [0x531bc0], esi
mov dword [0x531bbc], edi
mov word [0x531be8], ss
mov word [0x531bdc], cs
mov word [0x531bb8], ds
mov word [0x531bb4], es
mov word [0x531bb0], fs
mov word [0x531bac], gs
pushfd
pop dword [0x531be0]
mov eax, dword [ebp]
mov dword [0x531bd4], eax
mov eax, dword [ebp + 4]
mov dword [0x531bd8], eax
lea eax, [ebp + 8]
mov dword [0x531be4], eax
mov eax, dword [ebp - 0x320]
mov dword [0x531b20], 0x10001
mov eax, dword [0x531bd8]
mov dword [0x531ad4], eax
mov dword [0x531ac8], 0xc0000409
mov dword [0x531acc], 1
mov eax, dword [0x52e028]
mov dword [ebp - 0x328], eax
mov eax, dword [0x52e02c]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x531b18], eax
push 1
call fcn.004f04fe
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x500074
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x531b18], 0
jne 0x4f04c0
push 1
call fcn.004f04fe
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret
Function at 0x4027c4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00403ee4
test esi, esi
jne 0x4027fa
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA_1
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00403fd4
jmp 0x402818
call sub.KERNEL32.DLL_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004026d8
mov edi, eax
test esi, esi
je 0x402818
cmp dword [ebx], 0
je 0x402818
dec esi
jmp 0x402801
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x402d48
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x40d008], 0x8088405
inc edx
mov dword [ebx + 0x40d008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403424
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40d018]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4034bc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40349c
xor eax, eax
push ebp
push 0x403495
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 0x4034d8
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 0x40349c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x40d018]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40d018], ax
mov esp, ebp
pop ebp
ret

Function at 0x403d68
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40e044], 0
je 0x403dc9
cmp word [0x40e218], 0xd7b2
jne 0x403d91
cmp dword [0x40e220], 0
jbe 0x403d91
mov eax, 0x40e214
call dword [0x40e230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40d084
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle_1
push eax
call sub.KERNEL32.DLL_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403df0
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle_1
push eax
call sub.KERNEL32.DLL_WriteFile_1
pop edx
ret
cmp byte [0x40d024], 0
jne 0x403de5
push 0
push 0x40d07c
push 0x40d084
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4049a8
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA_1
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404bd8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404a2b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404bd8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404a2b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404bf4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404ab4
xor eax, eax
push ebp
push 0x404aad
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004047f0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404a92
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404c14
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404a92
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404ab4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.KERNEL32.DLL_GetThreadLocale_1
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA_1
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x404bce
cmp byte [ebp - 0xd], 0
jne 0x404afb
cmp byte [ebp - 0x12], 0
je 0x404bce
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404b14
dec ebx
cmp byte [ebx], 0x2e
je 0x404b23
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404b13
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x404bce
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404b60
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404bce
cmp byte [ebp - 0xd], 0
je 0x404bce
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404bce
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404d64
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 0x404dca
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_1
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.0040412c
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402ebc
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404db4
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404dd1
lea eax, [ebp - 0x10]
call fcn.00403ee4
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404358
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40628d
test al, 0x10
jne 0x406291
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x406298
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.00404358
push eax
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
jne 0x4062ba
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40709c
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
test eax, eax
jle 0x4070d5
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403fd4
jmp 0x4070de
mov eax, ebx
mov edx, esi
call fcn.00403f38
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4070e8
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
test eax, eax
jle 0x407109
mov al, byte [esp]
jmp 0x40710b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x4082d8
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 0x40833c
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
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.0040412c
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_GetACP
mov edx, eax
pop eax
call fcn.004061cc
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408343
lea eax, [ebp - 0xc]
call fcn.00403ee4
ret

Function at 0x409228
Capabilities:
Encrypt data using des

Disassembly:
push ebx
mov ecx, edx
and cl, 0x20
mov ebx, edx
and bl, 0x1e
and ebx, 0xff
shr ebx, 1
or cl, bl
and dl, 1
shl edx, 4
or cl, dl
mov edx, ecx
and edx, 0xff
and eax, 0xff
shl eax, 3
lea eax, [eax*8 + 0x40d41c]
mov al, byte [eax + edx]
and al, 0xf
pop ebx
ret
Function at 0x409524
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
mov ebx, dword [ebp + 0x10]
test ebx, ebx
js 0x40953d
shr ebx, 2
mov esi, dword [ecx + ebx*4]
dec ebx
push esi
jns 0x409536
mov ecx, esp
mov ebx, edx
test ebx, ebx
js 0x40954f
shr ebx, 2
mov esi, dword [eax + ebx*4]
dec ebx
push esi
jns 0x409548
mov eax, esp
mov dword [ebp - 4], ecx
push 5
lea ecx, [ebp - 0xa]
call fcn.00409118
mov ebx, 6
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xa]
mov cl, byte [eax]
xor byte [edx], cl
inc edx
inc eax
dec ebx
jne 0x409569
mov al, byte [ebp - 0xa]
xor edx, edx
mov dl, al
shr edx, 2
mov byte [ebp - 0x12], dl
and al, 3
shl eax, 4
mov dl, byte [ebp - 9]
xor ecx, ecx
mov cl, dl
shr ecx, 4
or al, cl
mov byte [ebp - 0x11], al
and dl, 0xf
shl edx, 2
mov al, byte [ebp - 8]
xor ecx, ecx
mov cl, al
shr ecx, 6
or dl, cl
mov byte [ebp - 0x10], dl
and al, 0x3f
mov byte [ebp - 0xf], al
mov al, byte [ebp - 7]
xor edx, edx
mov dl, al
shr edx, 2
mov byte [ebp - 0xe], dl
and al, 3
shl eax, 4
xor edx, edx
mov dl, byte [ebp - 6]
shr edx, 4
or al, dl
mov byte [ebp - 0xd], al
mov al, byte [ebp - 6]
and al, 0xf
shl eax, 2
xor edx, edx
mov dl, byte [ebp - 5]
shr edx, 6
or al, dl
mov byte [ebp - 0xc], al
mov al, byte [ebp - 5]
and al, 0x3f
mov byte [ebp - 0xb], al
xor ebx, ebx
lea esi, [ebp - 0x12]
mov eax, ebx
mov dl, byte [esi]
call fcn.00409228
mov byte [esi], al
inc ebx
inc esi
cmp ebx, 8
jne 0x4095ee
mov ebx, 4
lea eax, [ebp - 0x12]
lea edx, [ebp - 0xa]
mov cl, byte [eax]
shl ecx, 4
or cl, byte [eax + 1]
mov byte [edx], cl
inc edx
add eax, 2
dec ebx
jne 0x40960b
lea eax, [ebp - 0xa]
mov edx, 5
call fcn.004091a8
mov ebx, 4
lea eax, [ebp - 0xa]
mov edx, dword [ebp + 0xc]
mov cl, byte [eax]
mov byte [edx], cl
inc edx
inc eax
dec ebx
jne 0x409634
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40964c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov ebx, ecx
test ebx, ebx
js 0x409665
shr ebx, 2
mov esi, dword [edx + ebx*4]
dec ebx
push esi
jns 0x40965e
mov edx, esp
mov dword [ebp - 4], edx
mov ebx, eax
mov dword [ebp - 8], 8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov dl, byte [eax]
mov byte [ecx], dl
inc ecx
inc eax
dec dword [ebp - 8]
jne 0x409679
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
call fcn.00409010
test bl, bl
jne 0x40974c
mov dword [ebp - 8], 0x10
mov dword [ebp - 0x14], 0x40e7a0
mov eax, 4
mov edx, dword [ebp + 0xc]
lea esi, [ebp - 0xc]
mov cl, byte [edx]
mov byte [esi], cl
inc esi
inc edx
dec eax
jne 0x4096b0
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
mov cl, byte [edx]
mov byte [edx - 4], cl
inc edx
dec eax
jne 0x4096c4
push 5
lea eax, [ebp - 0x10]
push eax
push 3
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
call fcn.00409524
mov eax, 4
lea edx, [ebp - 0xc]
lea esi, [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
add ecx, 4
mov bl, byte [edx]
xor bl, byte [esi]
mov byte [ecx], bl
inc ecx
inc esi
inc edx
dec eax
jne 0x4096f6
add dword [ebp - 0x14], 6
dec dword [ebp - 8]
jne 0x4096a5
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
lea ecx, [ebp - 0xc]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x409719
mov eax, 4
mov edx, dword [ebp + 0xc]
mov cl, byte [edx]
mov byte [edx + 4], cl
inc edx
dec eax
jne 0x40972a
mov eax, 4
lea edx, [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
mov bl, byte [edx]
mov byte [ecx], bl
inc ecx
inc edx
dec eax
jne 0x40973e
jmp 0x409807
cmp bl, 1
jne 0x409807
mov dword [ebp - 8], 0xfffffff0
mov ebx, 0x40e7fa
mov eax, 4
mov edx, dword [ebp + 0xc]
lea esi, [ebp - 0xc]
mov cl, byte [edx]
mov byte [esi], cl
inc esi
inc edx
dec eax
jne 0x40976c
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
mov cl, byte [edx]
mov byte [edx - 4], cl
inc edx
dec eax
jne 0x409780
push 5
lea eax, [ebp - 0x10]
push eax
push 3
mov ecx, ebx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
call fcn.00409524
mov eax, 4
lea edx, [ebp - 0xc]
lea esi, [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
add ecx, 4
mov dword [ebp - 0x18], ecx
mov cl, byte [edx]
xor cl, byte [esi]
mov edi, dword [ebp - 0x18]
mov byte [edi], cl
inc dword [ebp - 0x18]
inc esi
inc edx
dec eax
jne 0x4097b2
sub ebx, 6
inc dword [ebp - 8]
jne 0x409761
mov eax, 4
mov edx, dword [ebp + 0xc]
add edx, 4
lea ebx, [ebp - 0xc]
mov cl, byte [edx]
mov byte [ebx], cl
inc ebx
inc edx
dec eax
jne 0x4097d9
mov eax, 4
mov ebx, dword [ebp + 0xc]
mov dl, byte [ebx]
mov byte [ebx + 4], dl
inc ebx
dec eax
jne 0x4097ea
mov eax, 4
lea ebx, [ebp - 0xc]
mov edx, dword [ebp + 0xc]
mov cl, byte [ebx]
mov byte [edx], cl
inc edx
inc ebx
dec eax
jne 0x4097fe
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
call fcn.00409094
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret 8
Function at 0x409fe4
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404348
mov eax, dword [ebp - 8]
call fcn.00404348
xor eax, eax
push ebp
push 0x40a083
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
push 1
push 0
mov eax, dword [ebp - 4]
call fcn.00404358
push eax
call sub.advapi32.dll_OpenSCManagerA
mov ebx, eax
test ebx, ebx
jbe 0x40a063
push 4
mov eax, dword [ebp - 8]
call fcn.00404358
push eax
push ebx
call sub.advapi32.dll_OpenServiceA
mov edi, eax
test edi, edi
jbe 0x40a059
lea eax, [ebp - 0x24]
push eax
push edi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x40a053
mov esi, dword [ebp - 0x20]
push edi
call sub.advapi32.dll_CloseServiceHandle
push ebx
call sub.advapi32.dll_CloseServiceHandle
mov ebx, esi
jmp 0x40a068
mov ebx, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a08a
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403f08
ret

Function at 0x40a0fc
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404348
mov eax, dword [ebp - 8]
call fcn.00404348
xor eax, eax
push ebp
push 0x40a1cb
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0
mov eax, dword [ebp - 4]
call fcn.00404358
push eax
call sub.advapi32.dll_OpenSCManagerA
mov ebx, eax
test ebx, ebx
jbe 0x40a1a9
push 0x24
mov eax, dword [ebp - 8]
call fcn.00404358
push eax
push ebx
call sub.advapi32.dll_OpenServiceA
mov esi, eax
test esi, esi
jbe 0x40a1a3
lea eax, [ebp - 0x24]
push eax
push 1
push esi
call sub.advapi32.dll_ControlService
test eax, eax
je 0x40a19d
lea eax, [ebp - 0x24]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x40a19d
jmp 0x40a197
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_Sleep
lea eax, [ebp - 0x24]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x40a19d
cmp edi, dword [ebp - 0x10]
ja 0x40a19d
cmp dword [ebp - 0x20], 1
jne 0x40a178
push esi
call sub.advapi32.dll_CloseServiceHandle
push ebx
call sub.advapi32.dll_CloseServiceHandle
cmp dword [ebp - 0x20], 1
sete bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a1d2
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403f08
ret
Function at 0x40a1dc
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404348
mov eax, dword [ebp + 8]
call fcn.00404348
xor eax, eax
push ebp
push 0x40a351
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
push 0xf003f
push 0
push 0x40a364
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40a32b
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00404358
push eax
push 0
push 2
push 0x110
push 0xf01ff
push esi
push ebx
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CreateServiceA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40a32b
mov byte [ebp - 5], 1
mov eax, dword [0x40d7e8]
cmp dword [eax], 0
je 0x40a305
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x400
mov edx, 1
mov eax, dword [ebp + 8]
call fcn.004043b8
mov eax, 4
call fcn.00402548
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
call fcn.00404158
inc eax
call fcn.00402548
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [eax], ebx
xor eax, eax
push ebp
push 0x40a2fe
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
mov edx, dword [ebp - 0x18]
call fcn.00406574
mov eax, dword [ebp - 0x14]
push eax
push 1
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x40d7e8]
mov eax, dword [eax]
call eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a305
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00402568
mov eax, dword [ebp - 0x14]
call fcn.00402568
ret
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_StartServiceA
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a358
lea eax, [ebp - 0x18]
call fcn.00403ee4
lea eax, [ebp - 4]
call fcn.00403ee4
lea eax, [ebp + 8]
call fcn.00403ee4
ret
Function at 0x40a368
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404348
xor eax, eax
push ebp
push 0x40a432
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x40a412
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
xor eax, eax
call fcn.0040a094
test al, al
je 0x40a3b0
mov edx, dword [ebp - 4]
xor eax, eax
call fcn.0040a0fc
xor esi, esi
push 0xf003f
push 0
push 0x40a444
call sub.advapi32.dll_OpenSCManagerA
mov ebx, eax
test ebx, ebx
je 0x40a3fa
push 0xf01ff
mov eax, dword [ebp - 4]
call fcn.00404358
push eax
push ebx
call sub.advapi32.dll_OpenServiceA
mov edi, eax
test edi, edi
je 0x40a3f4
push edi
call sub.advapi32.dll_DeleteService
mov esi, 1
push edi
call sub.advapi32.dll_CloseServiceHandle
push ebx
call sub.advapi32.dll_CloseServiceHandle
test esi, esi
jle 0x40a404
mov byte [ebp - 5], 1
jmp 0x40a408
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40a41c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a439
lea eax, [ebp - 4]
call fcn.00403ee4
ret

Function at 0x40a4c8
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov edi, ecx
mov dword [ebp - 4], edx
mov esi, dword [ebp + 8]
xor edx, edx
push ebp
push 0x40a5e2
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x40a5c2
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, dword [ebp - 4]
call fcn.0040a480
mov ebx, eax
lea eax, [ebp - 0x2c]
mov edx, dword [ebp + 0xc]
call fcn.004040c0
mov eax, dword [ebp - 0x2c]
call fcn.00404158
mov dword [ebp - 8], 1
cmp esi, 1
jne 0x40a533
push eax
mov eax, dword [ebp + 0xc]
push eax
push 1
push 0
push edi
push ebx
call sub.advapi32.dll_RegSetValueExA
cmp esi, 2
jne 0x40a549
push 4
lea eax, [ebp - 8]
push eax
push 4
push 0
push edi
push ebx
call sub.advapi32.dll_RegSetValueExA
cmp esi, 3
jne 0x40a564
xor eax, eax
mov dword [ebp - 8], eax
push 4
lea eax, [ebp - 8]
push eax
push 4
push 0
push edi
push ebx
call sub.advapi32.dll_RegSetValueExA
cmp esi, 4
jne 0x40a5b2
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
push 4
lea eax, [ebp - 0x28]
push eax
push 3
push 0
push edi
push ebx
call sub.advapi32.dll_RegSetValueExA
push ebx
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40a5cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a5e9
lea eax, [ebp - 0x2c]
call fcn.00403ee4
ret