joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40399d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x408290
cmp edx, dword [eax]
je 0x4039bf
add eax, 8
inc ecx
cmp eax, 0x408320
jl 0x4039b0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x408290]
jne 0x403aed
mov eax, dword [0x408a70]
cmp eax, 1
je 0x403ac7
test eax, eax
jne 0x4039f0
cmp dword [0x4081e4], 1
je 0x403ac7
cmp edx, 0xfc
je 0x403aed
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403a27
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004045e0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00403e60
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x403a6a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00403e60
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x407470
push edi
call fcn.00405360
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004045e0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004045f0
lea eax, [ebp - 0xa0]
push 0x407450
push eax
call fcn.004045f0
push dword [esi + 0x408294]
lea eax, [ebp - 0xa0]
push eax
call fcn.004045f0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004052ce
add esp, 0x2c
pop edi
jmp 0x403aed
lea eax, [ebp + 8]
lea esi, [esi + 0x408294]
push 0
push eax
push dword [esi]
call fcn.00403e60
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4013fc
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
jmp 0x40140e
mov eax, dword [0x4af08b]
shl eax, 2
mov dword [0x4af08f], eax
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
call fcn.0049d498
pop edx
call fcn.0049d3fc
call fcn.0049d4d8
push 0
call fcn.0049ec28
pop ecx
push 0x4af034
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x4af093], eax
push 0
jmp fcn.004a8f94

Function at 0x40154c
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push esi
push edi
mov esi, 0x4afe58
lea edi, [ebp - 0x10c]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push str.InstallHook___...
call sub.KERNEL32.DLL_OutputDebugStringA
push 0x4b35ce
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jne 0x4015b9
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x4b3609
push str.InstallHook__:_LoadLibrary__s__fail__error:__lu
lea edx, [ebp - 0x10c]
push edx
call fcn.004a16bc
add esp, 0x10
lea ecx, [ebp - 0x10c]
push ecx
call sub.KERNEL32.DLL_OutputDebugStringA
xor eax, eax
jmp 0x401655
push 0x4b3614
push dword [ebp - 4]
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
test edx, edx
jne 0x4015ff
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x4b3651
push str.InstallHook__:_GetProcAddress__s__fail__error:__lu
lea ecx, [ebp - 0x10c]
push ecx
call fcn.004a16bc
add esp, 0x10
lea eax, [ebp - 0x10c]
push eax
call sub.KERNEL32.DLL_OutputDebugStringA
xor eax, eax
jmp 0x401655
call dword [ebp - 8]
test eax, eax
je 0x40162d
push str.InstallHook___succeed.
lea edx, [ebp - 0x10c]
push edx
call fcn.004a16bc
add esp, 8
lea ecx, [ebp - 0x10c]
push ecx
call sub.KERNEL32.DLL_OutputDebugStringA
mov eax, 1
jmp 0x401655
call sub.KERNEL32.DLL_GetLastError
push eax
push str.InstallHook__:_StartHook___fail__error:__lu
lea edx, [ebp - 0x10c]
push edx
call fcn.004a16bc
add esp, 0xc
lea ecx, [ebp - 0x10c]
push ecx
call sub.KERNEL32.DLL_OutputDebugStringA
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40ae5c
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov dword [ebp - 4], eax
mov byte [ebp - 5], 0
push 0x78
push 0
mov eax, dword [ebp - 4]
add eax, 0x75c
push eax
call fcn.0049d948
add esp, 0xc
push 1
mov edx, dword [ebp - 4]
add edx, 0x75c
push edx
call fcn.0040f8e0
add esp, 8
test eax, eax
jne 0x40aea4
push 0x4c6fa9
call sub.KERNEL32.DLL_OutputDebugStringA
xor eax, eax
jmp 0x40aed5
mov dword [ebp - 0x10], 0x40ae2c
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
lea ecx, [ebp - 0x10]
push dword [ecx + 4]
push dword [ecx]
mov eax, dword [ebp - 4]
call fcn.00480160
mov edx, dword [ebp - 4]
mov cl, byte [edx + 0x7d4]
test cl, cl
je 0x40aed2
mov byte [ebp - 5], 1
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040cc58
add esp, 0x10
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jbe 0x40bffa
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 4]
call sub.WSOCK32.DLL_send
jmp 0x40c007
push dword [ebp - 4]
call sub.WSOCK32.DLL_closesocket
xor edx, edx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
pop ecx
pop ebp
ret

Function at 0x40c010
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
xor eax, eax
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 8], edx
push 0
push 0
push 3
push 0
push 7
push closesocket
push dword [ebp + 8]
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, 0xffffffff
je 0x40c069
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, 0xffffffff
jne 0x40c05c
xor edx, edx
mov dword [ebp - 8], edx
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 8]
jmp 0x40c06b
xor eax, eax
pop ecx
pop ecx
pop ebp
ret
Function at 0x40c070
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 8], edx
mov esi, 0x4c7a34
lea edi, [ebp - 0x3c]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dword [ebp - 0xc], eax
xor edx, edx
mov dword [ebp - 0x10], edx
xor ecx, ecx
mov dword [ebp - 0x14], ecx
push 0x4c7b96
push dword [ebp + 0xc]
call fcn.0049fcb8
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
jne 0x40c0d4
call sub.KERNEL32.DLL_GetLastError
push eax
push dword [ebp + 0xc]
push str.SendFile__:_fopen__s__fail__error:__lu
call fcn.0049ad0c
add esp, 0xc
xor eax, eax
jmp 0x40c23e
push dword [ebp + 0xc]
call fcn.0040c010
pop ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
shr edx, 0xa
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x10]
shl ecx, 0xa
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jbe 0x40c0f9
dec dword [ebp - 0x10]
mov edx, dword [ebp + 8]
test edx, edx
jg 0x40c117
push dword [ebp + 8]
push str.SendFile__:_nSocket___d
call fcn.0049ad0c
add esp, 8
xor eax, eax
jmp 0x40c23e
push 0
push 4
lea edx, [ebp - 0xc]
push edx
push dword [ebp + 8]
call sub.WSOCK32.DLL_send
test eax, eax
jg 0x40c145
call sub.KERNEL32.DLL_GetLastError
push eax
push str.SendFile__:_send_filesize_fail__error:__lu
call fcn.0049ad0c
add esp, 8
xor eax, eax
jmp 0x40c23e
mov dword [ebp - 0x14], 1
push 0x401
call fcn.0049cfe8
pop ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], 1
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
cmp edx, ecx
ja 0x40c1e0
push dword [ebp - 4]
push 0x400
push 1
push dword [ebp - 8]
call fcn.0049fef8
add esp, 0x10
mov eax, dword [ebp - 8]
mov byte [eax + 0x400], 0
mov edx, dword [ebp + 8]
test edx, edx
je 0x40c1d3
push 0
push 0x400
push dword [ebp - 8]
push dword [ebp + 8]
call sub.WSOCK32.DLL_send
test eax, eax
jge 0x40c1c1
call sub.KERNEL32.DLL_GetLastError
push eax
push str.SendFile__:_send_data_fail__error:__lu
call fcn.0049ad0c
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x14], ecx
jmp 0x40c1e0
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
shl eax, 0xa
push eax
call fcn.0040bfc0
add esp, 8
inc dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
cmp edx, ecx
jbe 0x40c16b
mov eax, dword [ebp - 0x10]
shl eax, 0xa
mov edx, dword [ebp - 0xc]
cmp eax, edx
jae 0x40c229
push dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
shl ecx, 0xa
mov eax, dword [ebp - 0xc]
sub eax, ecx
push eax
push 1
push dword [ebp - 8]
call fcn.0049fef8
add esp, 0x10
mov edx, dword [ebp + 8]
test edx, edx
je 0x40c229
push 0
mov ecx, dword [ebp - 0x10]
shl ecx, 0xa
mov eax, dword [ebp - 0xc]
sub eax, ecx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call sub.WSOCK32.DLL_send
push dword [ebp - 4]
call fcn.0049f94c
pop ecx
push dword [ebp - 8]
call fcn.0049ce20
pop ecx
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40c66c
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe70
lea eax, [ebp - 0x190]
push eax
push 0x101
call sub.WSOCK32.DLL_WSAStartup
test eax, eax
je 0x40c68f
or eax, 0xffffffff
jmp 0x40c69b
mov dword [0x4c7e38], 1
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x40ce4c
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
xor eax, eax
mov dword [ebp - 8], eax
mov edx, dword [ebp + 0x14]
cmp edx, 0x3e8
jae 0x40ce6c
imul ecx, dword [ebp + 0x14], 0x3e8
mov dword [ebp + 0x14], ecx
xor eax, eax
mov dword [ebp - 8], eax
call sub.KERNEL32.DLL_GetTickCount
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
cmp ecx, eax
jge 0x40cf46
mov edx, dword [ebp + 0x14]
test edx, edx
jbe 0x40cebe
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
sub ecx, eax
mov edx, dword [ebp + 0x14]
sub edx, ecx
push edx
push 0x4c7f03
push dword [ebp + 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jge 0x40cebe
mov eax, dword [ebp - 8]
jmp 0x40cf49
push 0
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
sub edx, ecx
push edx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
add eax, edx
push eax
push dword [ebp + 8]
call sub.WSOCK32.DLL_recv
mov dword [ebp - 4], eax
test eax, eax
jg 0x40cf16
call sub.KERNEL32.DLL_GetLastError
mov dword [0x4c7e3c], eax
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x40cf46
mov ecx, dword [ebp - 4]
inc ecx
jne 0x40cf11
mov eax, dword [0x4c7e3c]
cmp eax, 0x2733
jne 0x40cf11
call sub.KERNEL32.DLL_GetTickCount
mov dword [ebp - 0xc], eax
jmp 0x40ce7f
mov eax, dword [ebp - 8]
jmp 0x40cf49
mov edx, dword [ebp - 4]
add dword [ebp - 8], edx
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
sub ecx, eax
mov edx, dword [ebp + 0x14]
cmp ecx, edx
jbe 0x40cf30
mov eax, dword [ebp - 8]
jmp 0x40cf49
call sub.KERNEL32.DLL_GetTickCount
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
cmp edx, ecx
jl 0x40ce8d
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x40cf50
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push 0x32
lea eax, [ebp - 0x40]
push eax
call sub.WSOCK32.DLL_gethostname
test eax, eax
jge 0x40cf6d
or eax, 0xffffffff
jmp 0x40cffd
lea edx, [ebp - 0x40]
push edx
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x40cf85
or eax, 0xffffffff
jmp 0x40cffd
xor edx, edx
mov dword [ebp - 0xc], edx
jmp 0x40cfe8
mov ecx, dword [ebp - 8]
movsx eax, byte [ecx + 3]
and eax, 0xff
push eax
mov edx, dword [ebp - 8]
movsx ecx, byte [edx + 2]
and ecx, 0xff
push ecx
mov eax, dword [ebp - 8]
movsx edx, byte [eax + 1]
and edx, 0xff
push edx
mov ecx, dword [ebp - 8]
movsx eax, byte [ecx]
and eax, 0xff
push eax
push 0x4c7f07
push dword [ebp + 8]
call sub.USER32.DLL_wsprintfA
add esp, 0x18
push str.127.0.0.1
push dword [ebp + 8]
call fcn.0049da7c
add esp, 8
test eax, eax
jne 0x40cffb
inc dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xc]
mov eax, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 8], edx
test edx, edx
jne 0x40cf8c
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x40d088
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push dword [ebp + 8]
call sub.WSOCK32.DLL_inet_addr
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x40d0c8
push dword [ebp + 8]
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
test edx, edx
je 0x40d0ce
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 0xc]
mov edx, dword [eax]
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
jmp 0x40d0ce
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
push dword [ebp - 0x1c]
call sub.WSOCK32.DLL_inet_ntoa
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40d0f0
push dword [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.0049dac8
add esp, 8
jmp 0x40d0fe
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.0049dac8
add esp, 8
mov eax, dword [ebp + 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x40d5c4
Capabilities:
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc8
push esi
push edi
mov eax, 0x4cbcfc
call fcn.0049df88
mov esi, 0x4c876c
lea edi, [ebp - 0x134]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov esi, 0x4c8870
lea edi, [ebp - 0x238]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push 0x103
lea eax, [ebp - 0x238]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x238]
push edx
call fcn.0049dbfd
add esp, 8
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x40d648
mov eax, dword [ebp - 0x2c]
mov byte [eax + 1], 0
push 0x4cb99e
lea edx, [ebp - 0x238]
push edx
call fcn.0049d9ec
add esp, 8
jmp 0x40d65c
push 0x4cb9af
lea ecx, [ebp - 0x238]
push ecx
call fcn.0049dac8
add esp, 8
mov word [ebp - 0x18], 8
lea edx, [ebp - 0x238]
lea eax, [ebp - 4]
call fcn.004ad754
inc dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.00484140
xor edx, edx
mov dl, al
cmp edx, 1
sbb ecx, ecx
neg ecx
push ecx
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004ad880
pop ecx
test cl, cl
je 0x40d6d4
push 0x103
lea eax, [ebp - 0x238]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
push 0x4cb9c0
lea edx, [ebp - 0x238]
push edx
call fcn.0049d9ec
add esp, 8
push 0x4cb9c2
lea ecx, [ebp - 0x238]
push ecx
call fcn.0049d9ec
add esp, 8
lea eax, [ebp - 0x238]
push eax
push 0x103
lea edx, [ebp - 0x134]
push edx
push 0x4cb9e5
push 0x4cb9dc
push 0x4cb9d3
call sub.KERNEL32.DLL_GetPrivateProfileStringA
lea ecx, [ebp - 0x238]
push ecx
push 0x3ff
push dword [ebp + 0x10]
push 0x4cb9ed
push dword [ebp + 0xc]
lea eax, [ebp - 0x134]
push eax
call sub.KERNEL32.DLL_GetPrivateProfileStringA
push 0x4cb9ee
push dword [ebp + 0x10]
call fcn.0049dc09
add esp, 8
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x40d745
mov ecx, dword [ebp - 0x2c]
mov byte [ecx], 0x20
mov eax, dword [ebp - 0x2c]
mov byte [eax + 1], 0xa
lea edx, [ebp + 0x14]
mov dword [ebp - 0x30], edx
push dword [ebp - 0x30]
push dword [ebp + 0x10]
push 0x3ff
push dword [ebp + 8]
call fcn.004a1544
add esp, 0x10
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40d774
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 8]
push 0
push 1
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 4], eax
push 0xffffffffffffffff
push dword [ebp - 4]
call sub.KERNEL32.DLL_TerminateProcess
pop ecx
pop ebp
ret
Function at 0x40d9b0
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
lea eax, [ebp - 4]
push eax
push 0x28
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.ADVAPI32.DLL_OpenProcessToken
test eax, eax
jne 0x40d9cf
xor eax, eax
jmp 0x40da32
lea edx, [ebp - 0xc]
push edx
push 0x4cba9f
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueA
test eax, eax
jne 0x40d9ef
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x40da32
mov dword [ebp - 0x1c], 1
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], 2
push 0
push 0
push 0x10
lea ecx, [ebp - 0x1c]
push ecx
push 0
push dword [ebp - 4]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
test eax, eax
jne 0x40da2d
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x40da32
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x40da74
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0x4cbad4
push 1
push 0x1f0001
call sub.KERNEL32.DLL_OpenMutexA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x40da9d
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
jmp 0x40daac
call sub.KERNEL32.DLL_GetLastError
cmp eax, 5
je 0x40daac
xor eax, eax
pop ecx
pop ebp
ret
mov eax, 1
pop ecx
pop ebp
ret
Function at 0x40dab4
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffddc
push esi
push edi
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 4], eax
mov esi, 0x4cada4
lea edi, [ebp - 0x120]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x4caea9
lea edi, [ebp - 0x224]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push 0x5c
push dword [ebp + 0xc]
call fcn.0049dbf1
add esp, 8
test eax, eax
jne 0x40db35
push 0x2f
push dword [ebp + 0xc]
call fcn.0049dbf1
add esp, 8
test eax, eax
jne 0x40db35
push 0x104
lea eax, [ebp - 0x120]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
push 0x4cbadb
lea edx, [ebp - 0x120]
push edx
call fcn.0049d9ec
add esp, 8
push dword [ebp + 0xc]
lea ecx, [ebp - 0x120]
push ecx
call fcn.0049d9ec
add esp, 8
push dword [ebp + 8]
push 0x4cbadd
lea eax, [ebp - 0x224]
push eax
call fcn.004a16bc
add esp, 0xc
push 0x4cbae8
lea edx, [ebp - 0x224]
push edx
push dword [ebp - 4]
call sub.KERNEL32.DLL_FindResourceA
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
test ecx, ecx
jne 0x40db83
xor eax, eax
jmp 0x40dc5a
push dword [ebp - 8]
push dword [ebp - 4]
call sub.KERNEL32.DLL_LoadResource
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
test edx, edx
jne 0x40dba7
push dword [ebp - 8]
call sub.KERNEL32.DLL_FreeResource
xor eax, eax
jmp 0x40dc5a
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_LockResource
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
test edx, edx
jne 0x40dbc8
push dword [ebp - 8]
call sub.KERNEL32.DLL_FreeResource
xor eax, eax
jmp 0x40dc5a
push 0x80
lea edx, [ebp - 0x120]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
lea ecx, [ebp - 0x120]
push ecx
call sub.KERNEL32.DLL_DeleteFileA
push 0
lea eax, [ebp - 0x120]
push eax
call sub.KERNEL32.DLL__lcreat
mov dword [ebp - 0xc], eax
inc eax
jne 0x40dbfd
xor eax, eax
jmp 0x40dc5a
push dword [ebp - 0xc]
call sub.KERNEL32.DLL__lclose
push 1
lea edx, [ebp - 0x120]
push edx
call sub.KERNEL32.DLL__lopen
mov dword [ebp - 0xc], eax
inc eax
jne 0x40dc1d
xor eax, eax
jmp 0x40dc5a
push dword [ebp - 8]
push dword [ebp - 4]
call sub.KERNEL32.DLL_SizeofResource
mov dword [ebp - 0x18], eax
push 0
push 0
push dword [ebp - 0xc]
call sub.KERNEL32.DLL__llseek
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push dword [ebp - 0xc]
call sub.KERNEL32.DLL__lwrite
push dword [ebp - 0xc]
call sub.KERNEL32.DLL__lclose
push dword [ebp - 8]
call sub.KERNEL32.DLL_FreeResource
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40dcb4
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff6c
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call sub.KERNEL32.DLL_GetVersionExA
test eax, eax
jne 0x40dcde
xor eax, eax
jmp 0x40dd86
mov edx, dword [ebp - 0x84]
test edx, edx
jne 0x40dcef
xor eax, eax
jmp 0x40dd86
mov edx, dword [ebp - 0x84]
cmp edx, 2
jne 0x40dd71
mov ecx, dword [ebp - 0x90]
cmp ecx, 4
ja 0x40dd19
push str.Windows_NT_4.0
push dword [ebp + 8]
call fcn.0049dac8
add esp, 8
xor eax, eax
jmp 0x40dd86
mov edx, dword [ebp - 0x90]
cmp edx, 5
jne 0x40dd53
mov ecx, dword [ebp - 0x8c]
cmp ecx, 1
jae 0x40dd41
push str.Windows_2000
push dword [ebp + 8]
call fcn.0049dac8
add esp, 8
jmp 0x40dd81
push str.Windows_XP_2003
push dword [ebp + 8]
call fcn.0049dac8
add esp, 8
jmp 0x40dd81
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
push str.Windows_NT__d._d
push dword [ebp + 8]
call fcn.004a0978
add esp, 0x10
jmp 0x40dd81
push str.Windows_95_98
push dword [ebp + 8]
call fcn.0049dac8
add esp, 8
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x40dee8
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push 0xf01ff
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40df0c
xor eax, eax
jmp 0x40df56
push 0
push 0
push dword [ebp - 4]
call sub.ADVAPI32.DLL_StartServiceA
mov dword [ebp - 8], eax
xor edx, edx
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 8]
test ecx, ecx
jne 0x40df4b
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0x420
je 0x40df44
mov edx, dword [ebp - 0xc]
cmp edx, 0xb7
jne 0x40df4b
mov dword [ebp - 8], 1
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x40dfe0
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push 0xf01ff
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40e004
xor eax, eax
jmp 0x40e020
lea edx, [ebp - 0x24]
push edx
push 1
push dword [ebp - 4]
call sub.ADVAPI32.DLL_ControlService
mov dword [ebp - 8], eax
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x40e024
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0xf01ff
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40e048
xor eax, eax
jmp 0x40e05e
push dword [ebp - 4]
call sub.ADVAPI32.DLL_DeleteService
mov dword [ebp - 8], eax
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov eax, dword [ebp - 8]
pop ecx
pop ecx
pop ebp
ret
Function at 0x40e064
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push esi
push edi
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.KERNEL32.DLL_DeviceIoControl
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
test edx, edx
jne 0x40e0cc
mov esi, 0x4cc028
lea edi, [ebp - 0x10c]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.DLL_GetLastError
push eax
push str.Failed_to_call_DeviceIoControl____error_code:__lu
lea eax, [ebp - 0x10c]
push eax
call fcn.004a16bc
add esp, 0xc
lea edx, [ebp - 0x10c]
push edx
call sub.KERNEL32.DLL_OutputDebugStringA
mov eax, dword [ebp - 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret