Function at 0x405333
Capabilities:
Get common file path
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53e0c9
mov eax, dword fs:[0]
push eax
mov eax, 0x2940
call fcn.0051cee0
mov eax, dword [0x592bb0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2940], eax
mov dword [eax], 0x63
lea eax, [ebp - 0x191c]
push eax
mov byte [ebp - 0x191c], 0
call fcn.00404f99
pop ecx
push 0xc
pop ecx
mov esi, str.https:__services.stardock.net_apptrials_activate_
lea edi, [ebp - 0x291c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x191c]
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4053a2
lea edi, [ebp - 0x291c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4053b2
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x291c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
xor esi, esi
mov dword [ebp - 0x2924], 0xf
mov dword [ebp - 0x2928], esi
mov byte [ebp - 0x2938], 0
lea eax, [ebp - 0x2938]
push eax
lea ecx, [ebp - 0x291c]
mov dword [ebp - 4], esi
call fcn.00404d2c
pop ecx
test eax, eax
je 0x4056d0
cmp dword [ebp - 0x2924], 0x10
mov eax, dword [ebp - 0x2938]
jae 0x405425
lea eax, [ebp - 0x2938]
push eax
lea ecx, [ebp - 0x293c]
call fcn.0040733f
push esi
mov edi, 0x56c820
push edi
lea ecx, [ebp - 0x293c]
mov byte [ebp - 4], 1
call fcn.00406f60
push dword [ebp - 0x293c]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x2948], eax
call esi
cmp dword [ebp - 0x2948], 0
jge 0x405491
push str.Code_returned_is_less_than_0
call ebx
xor ebx, ebx
mov ecx, dword [ebp - 0x293c]
add ecx, 0xfffffff0
call fcn.004014d0
push 1
xor edi, edi
lea esi, [ebp - 0x2938]
call fcn.00407126
mov eax, ebx
jmp 0x4056ed
push dword [ebp - 0x2948]
lea eax, [ebp - 0x2944]
push eax
lea ecx, [ebp - 0x293c]
call fcn.00402b1b
mov byte [ebp - 4], 2
push dword [ebp - 0x2944]
call fcn.005191c4
pop ecx
mov ecx, dword [ebp - 0x2940]
push dword [ebp - 0x2944]
mov dword [ecx], eax
call fcn.005191c4
pop ecx
test eax, eax
jne 0x4056bb
push str.Code_returned_is_0
call ebx
mov eax, dword [ebp - 0x293c]
mov eax, dword [eax - 0xc]
sub eax, dword [ebp - 0x2948]
lea ecx, [ebp - 0x293c]
dec eax
push eax
lea eax, [ebp - 0x2940]
push eax
call fcn.004049ca
push eax
lea ecx, [ebp - 0x293c]
mov byte [ebp - 4], 3
call fcn.00403196
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x2940]
add ecx, 0xfffffff0
call fcn.004014d0
push dword [ebp - 0x293c]
call esi
xor ebx, ebx
push ebx
push edi
lea ecx, [ebp - 0x293c]
call fcn.00406f60
mov ecx, dword [ebp - 0x293c]
mov ecx, dword [ecx - 0xc]
sub ecx, eax
dec ecx
push ecx
lea eax, [ebp - 0x2940]
push eax
lea ecx, [ebp - 0x293c]
call fcn.004049ca
push eax
lea ecx, [ebp - 0x293c]
mov byte [ebp - 4], 4
call fcn.00403196
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x2940]
add ecx, 0xfffffff0
call fcn.004014d0
push dword [ebp - 0x293c]
call esi
push ebx
push edi
lea ecx, [ebp - 0x293c]
call fcn.00406f60
cmp eax, ebx
jl 0x4055c9
push eax
lea eax, [ebp - 0x2940]
push eax
lea ecx, [ebp - 0x293c]
call fcn.00402b1b
push eax
lea ecx, [ebp - 0x2944]
mov byte [ebp - 4], 5
call fcn.00403196
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x2940]
add ecx, 0xfffffff0
call fcn.004014d0
jmp 0x4055db
lea eax, [ebp - 0x293c]
push eax
lea ecx, [ebp - 0x2944]
call fcn.00403196
lea eax, [ebp - 0x11c]
push eax
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea edi, [ebp - 0x11c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4055f4
push 6
pop ecx
lea eax, [ebp - 0x11c]
mov esi, str.StardockRegistrations
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.005319fa
lea edi, [ebp - 0x11c]
pop ecx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40561a
mov esi, str._start8Trial.bin
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x11c]
push 0x56c748
push eax
movsb byte es:[edi], byte [esi]
call fcn.00518ee5
mov esi, dword [ebp - 0x2944]
pop ecx
mov edi, eax
mov eax, dword [esi - 0xc]
pop ecx
xor ecx, ecx
cmp eax, ebx
jle 0x40566a
cmp ecx, ebx
jl 0x4056b1
cmp ecx, eax
jg 0x4056b1
mov al, byte [esi + ecx*2]
mov byte [ebp + ecx - 0x91c], al
mov eax, dword [esi - 0xc]
inc ecx
cmp ecx, eax
jl 0x405650
mov eax, dword [esi - 0xc]
push edi
mov byte [ebp + eax - 0x91c], 0
push 1
push dword [esi - 0xc]
lea eax, [ebp - 0x91c]
push eax
call fcn.00519053
push edi
call fcn.0051913a
lea eax, [ebp - 0x2940]
add esp, 0x14
push eax
call fcn.00405707
pop ecx
test eax, eax
je 0x4056c3
lea ecx, [esi - 0x10]
call fcn.004014d0
xor ebx, ebx
inc ebx
jmp 0x40546d
push 0x80070057
call fcn.00401611
mov esi, dword [ebp - 0x2944]
xor ebx, ebx
lea ecx, [esi - 0x10]
call fcn.004014d0
jmp 0x40546d
mov eax, dword [ebp - 0x2940]
push 1
xor edi, edi
lea esi, [ebp - 0x2938]
mov dword [eax], 0x378
call fcn.00407126
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005182a2
leave
ret