Function at 0x405785
Capabilities:
Create directory
Get common file path
Get hostname
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x748
mov eax, dword [0x601ff0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x738], eax
mov ebx, 0x60d3e0
lea eax, [ebp - 0x734]
mov dword [ebp - 0x72c], edx
push eax
push ebx
mov dword [ebp - 0x734], 0x400
mov byte [0x60d3e0], 0
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov ecx, ebx
xor edx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4057d5
sub ecx, esi
je 0x405808
mov al, byte [edx + 0x60d3e0]
cmp al, 0x7a
ja 0x4057ee
cmp al, 0x2c
jae 0x4057f5
mov byte [edx + 0x60d3e0], 0x20
mov ecx, ebx
inc edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4057fb
sub ecx, esi
cmp edx, ecx
jb 0x4057e0
push 0
call fcn.0057aec6
mov ebx, eax
mov dword [ebp - 0x728], edx
push 0xa
lea eax, [ebp - 0x314]
push eax
push ebx
call fcn.0057ccba
add esp, 0x10
lea eax, [ebp - 0x114]
push eax
xor eax, eax
push eax
push eax
push 0x23
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea edi, [ebp - 0x114]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405844
push 6
pop ecx
lea eax, [ebp - 0x114]
mov esi, str.StardockRegistrations
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0057ceee
lea edi, [ebp - 0x114]
pop ecx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40586a
push 5
pop ecx
mov esi, str.ModernMixTrial2.bin
lea eax, [ebp - 0x114]
rep movsd dword es:[edi], dword [esi]
push 0x5d928c
push eax
movsb byte es:[edi], byte [esi]
call fcn.0057b0a1
pop ecx
pop ecx
lea ecx, [ebp - 0x314]
mov esi, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40589b
push esi
sub ecx, edx
lea eax, [ebp - 0x314]
push 1
push ecx
push eax
call fcn.0057b2f0
push esi
call fcn.0057b3be
add esp, 0x14
lea ecx, [ebp - 0x514]
call fcn.00405105
mov eax, dword [ebp - 0x728]
add ebx, 0xb6109100
adc eax, 2
xor esi, esi
push esi
push 0x989680
push eax
push ebx
call fcn.00571bf0
mov dword [ebp - 0x744], eax
lea eax, [ebp - 0x724]
push eax
lea eax, [ebp - 0x744]
mov dword [ebp - 0x740], edx
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov edi, 0xff
lea eax, [ebp - 0x214]
push edi
push esi
push eax
call fcn.005744c0
push edi
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.005744c0
mov ebx, 0x200
lea eax, [ebp - 0x714]
push ebx
push esi
push eax
call fcn.005744c0
add esp, 0x24
lea ecx, [ebp - 0x214]
call fcn.00405607
cmp byte [ebp - 0x214], 0
je 0x4059f4
push 0x2000
lea eax, [ebp - 0x728]
mov dword [ebp - 0x728], edi
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_UrlEscapeA]
mov ecx, dword [ebp - 0x738]
mov edx, ecx
mov dword [ebp - 0x730], ebx
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40598c
lea eax, [ebp - 0x730]
sub edx, esi
push eax
lea eax, [ebp - 0x714]
push eax
call fcn.004056e4
lea eax, [ebp - 0x714]
push eax
lea eax, [ebp - 0x414]
push eax
movzx eax, word [ebp - 0x71e]
push eax
movzx eax, word [ebp - 0x722]
push eax
movzx eax, word [ebp - 0x724]
push eax
push 0x60d3e0
lea eax, [ebp - 0x514]
push eax
push 0xa3c
push str.AppId_dMachineSID_sCPUName_sTrialBeginDate_d__02d__02dSource_sEncodedEmail_sformattext
push dword [ebp - 0x72c]
call fcn.00405081
add esp, 0x30
jmp 0x405a30
movzx eax, word [ebp - 0x71e]
push eax
movzx eax, word [ebp - 0x722]
push eax
movzx eax, word [ebp - 0x724]
push eax
push 0x60d3e0
lea eax, [ebp - 0x514]
push eax
push 0xa3c
push str.AppId_dMachineSID_sCPUName_sTrialBeginDate_d__02d__02dformattext
push dword [ebp - 0x72c]
call fcn.00405081
add esp, 0x20
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00570fd6
mov esp, ebp
pop ebp
ret