Function at 0x401780
Capabilities:
Allocate or change rwx memory
Enumerate process modules
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1334
call fcn.00403dd0
mov eax, dword [0x6b7040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x1334], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
je 0x401a1a
cmp eax, 0x3f
jbe 0x4017cc
pop edi
pop esi
mov eax, 0xb
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessId]
push eax
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
test ebx, ebx
jne 0x401802
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x6b7290], eax
mov eax, 0x80000004
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
push 0x220
lea eax, [ebp - 0x1328]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x132c], 0x224
lea eax, [ebp - 0x132c]
xor esi, esi
push eax
push ebx
call sub.KERNEL32.dll_Module32First
mov dword [ebp - 0x1330], eax
test eax, eax
je 0x4018d7
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
nop word [eax + eax]
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
push dword [ebp - 0x1318]
push edi
call sub.KERNEL32.dll_K32GetModuleFileNameExA
mov ecx, dword [ebp - 0x1334]
mov al, byte [ebp - 0x105]
cmp al, byte [ecx + 3]
jne 0x40189d
lea eax, [ebp - 0x108]
push eax
push ecx
call esi
test eax, eax
je 0x4018d1
lea eax, [ebp - 0x132c]
push eax
push ebx
call sub.KERNEL32.dll_Module32Next
mov dword [ebp - 0x1330], eax
test eax, eax
jne 0x401850
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 0xc
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x1310]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1330], 0
jne 0x4018ff
test esi, esi
jne 0x4018ff
pop edi
lea eax, [esi + 0xc]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test al, 1
je 0x4019a4
push 0x1000
lea eax, [ebp - 0x1108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1334], 0
lea eax, [ebp - 0x1334]
push eax
push 0x40
push 0x1000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x401965
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x6b7290], eax
mov eax, 0x80000009
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
push 0
push 0x1000
lea eax, [ebp - 0x1108]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401a1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x6b7290], eax
mov eax, 0x80000003
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
test al, 2
je 0x401a1a
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [ebp - 0x1334], eax
lea eax, [ebp - 0x1330]
push eax
push 0x40
push 0x1000
push esi
push edi
mov dword [ebp - 0x1330], 0
call ebx
test eax, eax
je 0x401944
push 0
push 0x1000
push dword [ebp - 0x1334]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x401983
lea eax, [ebp - 0x1330]
push eax
push dword [ebp - 0x1330]
push 0x1000
push esi
push edi
call ebx
test eax, eax
je 0x401944
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403dbb
mov esp, ebp
pop ebp
ret