Function at 0x401670
Capabilities:
Create directory
Execute command
Extract resource via kernel32 functions
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x450
call sym.___main
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x124]
mov dword [esp + 4], eax
mov dword [esp], str._TEMP_gta7.69420
mov eax, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
call eax
sub esp, 0xc
mov dword [esp + 4], 0
lea eax, [ebp - 0x124]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call eax
sub esp, 8
mov dword [ebp - 0xc], 1
jmp 0x401873
mov eax, dword [ebp - 0xc]
movzx eax, ax
mov dword [esp + 8], 0xa
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_FindResourceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40187f
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_LoadResource]
call eax
sub esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LockResource]
call eax
sub esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
add eax, 0x2710
mov ebx, eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call eax
sub esp, 4
mov dword [esp + 0xc], 0x100
lea edx, [ebp - 0x430]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_LoadStringA]
call eax
sub esp, 0x10
lea eax, [ebp - 0x430]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x124]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_s
lea eax, [ebp - 0x330]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x330]
mov dword [esp], eax
call sym._puts
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
lea eax, [ebp - 0x330]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0x20], eax
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x22c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
lea eax, [ebp - 0x430]
mov dword [esp + 4], eax
mov dword [esp], str.Wrote:___s_n
call sym._printf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_FreeResource]
call eax
sub esp, 4
add dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0x3f
jle 0x4016d4
jmp 0x401880
nop
lea eax, [ebp - 0x124]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_frontend.exe
lea eax, [ebp - 0x228]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x228]
mov dword [esp], eax
call sym._system
mov eax, 0
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret