Function at 0x401420
Capabilities:
Create directory
Create process on windows
Delete file
Extract resource via kernel32 functions
Get common file path
Get program files directory
Get startup folder
Persist via lnk shortcut
Persist via run registry key
Query or enumerate registry value
Set registry value
Write and execute a file
Write file on windows
Write file to startup folder

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x411ef4
push eax
mov dword fs:[0], esp
sub esp, 0x240
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 1
call fcn.00401c50
test al, al
je 0x40147c
xor ebp, ebp
mov ecx, esi
push ebp
call fcn.00401c50
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test al, al
je 0x401473
push 0x320
call edi
push ebp
mov ecx, esi
call fcn.00401c50
test al, al
jne 0x401460
push 0x3e8
call edi
jmp 0x40147e
xor ebp, ebp
mov al, byte [0x41a730]
mov ecx, 0x40
mov byte [esp + 0x4c], al
xor eax, eax
lea edi, [esp + 0x4d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x41736c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x258], ebp
mov dword [esp + 0x30], eax
xor ebx, ebx
mov byte [esp + 0x27], 0
mov dword [esp + 0x38], ebx
lea ecx, [esp + 0x44]
lea edx, [esp + 0x14]
push ecx
push edx
push ebp
push 0xf003f
push ebp
push ebp
push ebp
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
mov byte [esp + 0x27c], 2
mov dword [esp + 0x38], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebp
jne 0x4014f1
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x38], ebx
lea eax, [esp + 0x40]
lea ecx, [esp + 0x150]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
push str.ProgramFilesDir
push ebx
mov dword [esp + 0x58], 0x100
mov dword [esp + 0x2c], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebp
jne 0x401565
lea eax, [esp + 0x150]
lea ecx, [esp + 0x10]
push eax
call fcn.0040c7a9
push str.FreshBook_
lea ecx, [esp + 0x14]
call fcn.0040c8e1
mov ecx, dword [esp + 0x10]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp ebx, ebp
je 0x401621
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x38], ebx
jmp 0x401621
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x401607
lea eax, [esp + 0x20]
push eax
push 0x26
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x4015e1
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x4c]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4015c6
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x10]
push eax
call fcn.0040c7a9
push str.FreshBook_
lea ecx, [esp + 0x14]
call fcn.0040c8e1
mov ecx, dword [esp + 0x10]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x401621
push str.C:FreshBook_
lea ecx, [esp + 0x14]
call fcn.0040c8e1
mov edx, dword [esp + 0x10]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x401621
push str.C:FreshBook_
lea ecx, [esp + 0x14]
call fcn.0040c8e1
mov edx, dword [esp + 0x10]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x4016a5
lea ecx, [esp + 0x20]
push ecx
push 7
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40169b
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x401664
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x34]
call fcn.0040c7a9
push ecx
lea eax, [esp + 0x34]
mov edx, esp
mov dword [esp + 0x48], esp
push 0x417198
push eax
push edx
call fcn.0040c80e
call fcn.004010a0
add esp, 4
cmp eax, ebp
jne 0x40168c
mov byte [esp + 0x27], 1
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea edx, [esp + 0x10]
lea ecx, [esp + 0x34]
push edx
call fcn.0040c3ff
push 0x41a730
lea ecx, [esp + 0x20]
mov byte [esp + 0x25c], 3
call fcn.0040c6da
push 0x41a730
lea ecx, [esp + 0x30]
mov byte [esp + 0x25c], 4
call fcn.0040c6da
lea eax, [esp + 0x10]
push str.Uninstall.exe
lea ecx, [esp + 0x18]
push eax
push ecx
mov byte [esp + 0x264], 5
call fcn.0040c80e
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x25c], 6
call fcn.0040c759
lea ecx, [esp + 0x14]
mov byte [esp + 0x258], 5
call fcn.0040c66c
push 0x4170c8
lea ecx, [esp + 0x14]
call fcn.0040c8e1
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.00410c0e
mov esi, dword [eax + 8]
push 0x417184
push str.booker
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebp, eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
push 0
push 2
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
jne 0x4017c5
lea ecx, [esp + 0x2c]
mov byte [esp + 0x258], 4
call fcn.0040c66c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x258], 3
call fcn.0040c66c
lea ecx, [esp + 0x34]
mov byte [esp + 0x258], 2
call fcn.0040c66c
test ebx, ebx
je 0x401890
jmp 0x401889
lea ecx, [esp + 0x48]
push 0
push ecx
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x1c]
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401785
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x417184
push str.uninst
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
push 0
push 2
mov ebp, eax
mov eax, dword [esp + 0x38]
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x401785
lea ecx, [esp + 0x48]
push 0
push ecx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4018bc
lea ecx, [esp + 0x2c]
mov byte [esp + 0x258], 4
call fcn.0040c66c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x258], 3
call fcn.0040c66c
lea ecx, [esp + 0x34]
mov byte [esp + 0x258], 2
call fcn.0040c66c
test ebx, ebx
je 0x401890
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x30]
mov byte [esp + 0x258], 0
call fcn.0040c66c
lea ecx, [esp + 0x10]
mov dword [esp + 0x258], 0xffffffff
call fcn.0040c66c
xor al, al
jmp 0x401c35
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x41736c]
mov dword [esp + 0x3c], edx
lea eax, [esp + 0x28]
mov byte [esp + 0x258], 7
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x401978
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea ecx, [esp + 0x20]
push ecx
push 0x10
push 0
call esi
test eax, eax
jl 0x40192e
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x40191f
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x40]
call fcn.0040c7a9
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
lea edx, [esp + 0x20]
push edx
push 0x17
push 0
call esi
test eax, eax
jl 0x40196e
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x4c]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x40195f
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040c7a9
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [esp + 0x34]
push 1
xor ebp, ebp
push edx
push ebp
push 0x4170c8
push 0x4170c0
push ebp
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [esp + 0x3c]
push 0x417198
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.0040c80e
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edx
mov byte [esp + 0x25c], 8
call esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push 0x417168
push eax
push ecx
call fcn.00401130
mov edx, dword [esp + 0x28]
add esp, 0xc
cmp dword [edx - 8], ebp
je 0x401aa4
push 0x41715c
lea ecx, [esp + 0x20]
call fcn.0040c8e1
mov eax, dword [esp + 0x1c]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x1c]
push 0x417198
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.0040c80e
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x25c], 9
call fcn.0040c759
lea ecx, [esp + 0x14]
mov byte [esp + 0x258], 8
call fcn.0040c66c
mov eax, dword [esp + 0x18]
push eax
call esi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push 0x417168
push ecx
push edx
call fcn.00401130
add esp, 0xc
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0x41714c
push eax
push ecx
call fcn.0040c80e
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x25c], 0xa
call fcn.0040c759
lea ecx, [esp + 0x14]
mov byte [esp + 0x258], 8
call fcn.0040c66c
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
push str.Uninstall
push eax
push ecx
call fcn.00401130
add esp, 0xc
mov al, byte [esp + 0x27]
test al, al
je 0x401b01
lea edx, [esp + 0x30]
push 0x417198
lea eax, [esp + 0x18]
push edx
push eax
call fcn.0040c80e
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x25c], 0xb
call fcn.0040c759
lea ecx, [esp + 0x14]
mov byte [esp + 0x258], 8
call fcn.0040c66c
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push 0x417168
push edx
push eax
call fcn.00401130
add esp, 0xc
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x150]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x14], ebp
push ecx
push edx
push ebp
push 0xf003f
push ebp
push ebp
push ebp
push 0x417110
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebp
jne 0x401b4f
cmp ebx, ebp
je 0x401b47
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x38], ebx
lea eax, [esp + 0x40]
lea ecx, [esp + 0x150]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
push 0x417108
push ebx
mov dword [esp + 0x58], 0x100
mov dword [esp + 0x2c], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebp
jne 0x401b9d
mov eax, dword [esp + 0x10]
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push esi
push 1
push ebp
push 0x417108
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp ebx, ebp
je 0x401bae
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x38], ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x258], 7
call fcn.0040c66c
lea ecx, [esp + 0x3c]
mov byte [esp + 0x258], 5
call fcn.0040c66c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x258], 4
call fcn.0040c66c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x258], 3
call fcn.0040c66c
lea ecx, [esp + 0x34]
mov byte [esp + 0x258], 2
call fcn.0040c66c
cmp ebx, ebp
je 0x401c0e
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x30]
mov byte [esp + 0x258], 0
call fcn.0040c66c
lea ecx, [esp + 0x10]
mov dword [esp + 0x258], 0xffffffff
call fcn.0040c66c
mov al, 1
mov ecx, dword [esp + 0x250]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x24c
ret