Function at 0x401000
Capabilities:
Accept command line arguments
Create process on windows
Delete file
Get common file path
Read file via mapping
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5ac
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x42c], 0
push 0x104
lea eax, [ebp - 0x550]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x104
lea ecx, [ebp - 0x550]
push ecx
lea edx, [ebp - 0x550]
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x554], eax
cmp dword [ebp - 0x554], 0xffffffff
je 0x4011e1
lea ecx, [ebp - 0x428]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [ebp - 0x108]
push edx
push 0
push 0x40205c
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x55c], 0xffffffff
je 0x4011e1
push 0
push 0
push 0
push 2
push 0
mov edx, dword [ebp - 0x554]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x444], eax
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
mov dword [ebp - 0x114], ecx
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
mov dword [ebp - 0x558], 1
jmp 0x401155
mov eax, dword [ebp - 0x558]
add eax, 1
mov dword [ebp - 0x558], eax
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
cmp dword [ebp - 0x558], 0x8000
jge 0x40118e
mov edx, dword [ebp - 0x114]
cmp dword [edx], 0x9a5a4d
je 0x40117d
mov eax, dword [ebp - 0x114]
cmp dword [eax], 0x905a4d
jne 0x40118c
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx + 4]
cmp edx, 3
je 0x40118e
jmp 0x401137
mov dword [ebp - 0x42c], 1
push 0
lea eax, [ebp - 0x118]
push eax
push 0x11800
mov ecx, dword [ebp - 0x114]
push ecx
mov edx, dword [ebp - 0x55c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x444]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x55c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x42c], 0
je 0x4013b0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x5ac], eax
lea eax, [ebp - 0x5a8]
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x440], 0
jmp 0x401221
mov ecx, dword [ebp - 0x440]
add ecx, 1
mov dword [ebp - 0x440], ecx
cmp dword [ebp - 0x440], 0x44
jae 0x401244
mov edx, dword [ebp - 0x114]
mov byte [edx], 0
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x114], eax
jmp 0x401212
mov dword [ebp - 0x5a8], 0x44
push 0x104
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov eax, dword [ebp - 0x5ac]
mov dword [ebp - 0x114], eax
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx]
cmp edx, 0x22
jne 0x4012dd
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x114], eax
jmp 0x4012a1
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
test eax, eax
je 0x4012be
mov ecx, dword [ebp - 0x114]
movsx edx, byte [ecx]
cmp edx, 0x22
je 0x4012be
jmp 0x401292
mov eax, dword [ebp - 0x114]
movsx ecx, byte [eax]
cmp ecx, 0x22
jne 0x4012db
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
jmp 0x401309
mov eax, dword [ebp - 0x114]
movsx ecx, byte [eax]
test ecx, ecx
je 0x401309
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
cmp eax, 0x20
je 0x401309
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
jmp 0x4012dd
mov edx, dword [ebp - 0x114]
movsx eax, byte [edx]
cmp eax, 0x20
jne 0x401328
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
jmp 0x401309
lea edx, [ebp - 0x550]
push edx
mov eax, dword [ebp - 0x558]
push eax
push 0x7f
mov ecx, dword [ebp - 0x114]
push ecx
lea edx, [ebp - 0x108]
push edx
push str._s__s_c_d__s
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea ecx, [ebp - 0x43c]
push ecx
lea edx, [ebp - 0x5a8]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x320]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4013b0
push 0xffffffffffffffff
mov edx, dword [ebp - 0x43c]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x10c]
push eax
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]