Function at 0x405707
Capabilities:
Create new key via cryptacquirecontext
Decode data using base64 via winapi
Get common file path
Get hostname
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1b5c
call fcn.0051cee0
mov eax, dword [0x592bb0]
xor eax, esp
mov dword [esp + 0x1b58], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [eax], 0xfffffffe
push edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x44]
push eax
mov esi, 0x59ad38
xor ebx, ebx
push esi
mov dword [esp + 0x4c], 0x400
mov byte [0x59ad38], bl
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov eax, esi
xor ecx, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40575d
sub eax, edi
je 0x405792
mov dl, byte [ecx + 0x59ad38]
cmp dl, 0x7a
ja 0x405778
cmp dl, 0x2c
jae 0x40577f
mov byte [ecx + 0x59ad38], 0x20
mov eax, esi
inc ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405785
sub eax, edi
cmp ecx, eax
jb 0x405768
lea eax, [esp + 0x58]
push eax
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea edi, [esp + 0x58]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x4057a7
push 6
pop ecx
lea eax, [esp + 0x58]
mov esi, str.StardockRegistrations
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.005319fa
lea edi, [esp + 0x5c]
pop ecx
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x4057c9
mov esi, str._start8Trial2.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, [esp + 0x58]
push 0x56c86c
push eax
movsw word es:[edi], word [esi]
call fcn.00518ee5
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x405bd8
push 2
push ebx
push edi
call fcn.00519259
add esp, 0xc
push edi
call fcn.00519469
mov esi, eax
mov eax, 0xfe
pop ecx
cmp esi, eax
jbe 0x405817
mov esi, eax
push ebx
push ebx
push edi
call fcn.00519259
add esp, 0xc
push edi
push esi
lea eax, [esp + 0x168]
push 1
push eax
call fcn.00519718
push edi
mov byte [esp + esi + 0x174], bl
call fcn.0051913a
lea eax, [esp + 0x174]
add esp, 0x14
push eax
call fcn.0051868b
cdq
pop ecx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x58]
push eax
push ebx
push ebx
push 0x23
push ebx
mov dword [esp + 0x38], edx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea edi, [esp + 0x58]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x40586f
push 6
pop ecx
lea eax, [esp + 0x58]
mov esi, str.StardockRegistrations
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.005319fa
lea edi, [esp + 0x5c]
pop ecx
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x405891
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, [esp + 0x58]
push 0x56c86c
push eax
movsb byte es:[edi], byte [esi]
call fcn.00518ee5
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
je 0x405bd8
push 2
push ebx
push edi
call fcn.00519259
add esp, 0xc
push edi
call fcn.00519469
mov esi, eax
pop ecx
cmp esi, ebx
jne 0x4058e3
push edi
call fcn.0051913a
pop ecx
jmp 0x405bd8
mov eax, 0x7ff
cmp esi, eax
jbe 0x4058ee
mov esi, eax
push ebx
push ebx
push edi
call fcn.00519259
add esp, 0xc
push edi
push esi
lea eax, [esp + 0x368]
push 1
push eax
call fcn.00519718
push edi
mov byte [esp + esi + 0x374], bl
call fcn.0051913a
add esp, 0x14
lea eax, [esp + 0x260]
push eax
call fcn.00404a58
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push ebx
add eax, 0xb6109100
push 0x989680
adc ecx, 2
push ecx
push eax
call fcn.0051d660
mov dword [esp + 0x10], eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
call fcn.00404a39
mov edi, 0xc9
push edi
mov esi, 0x2a69c000
push esi
push edx
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
call fcn.00523120
push edi
push esi
push dword [esp + 0x1c]
mov dword [esp + 0x44], eax
push dword [esp + 0x1c]
mov dword [esp + 0x4c], edx
call fcn.00523120
cmp edx, dword [esp + 0x3c]
jb 0x4059ad
ja 0x4059a1
cmp eax, dword [esp + 0x38]
jbe 0x4059ad
mov eax, dword [esp + 0x2c]
or dword [eax], 0xffffffff
jmp 0x405bd8
add dword [esp + 0x10], 0xf8648000
mov eax, dword [esp + 0x24]
adc dword [esp + 0x14], 0x1792
cmp dword [esp + 0x14], eax
ja 0x405a04
jb 0x4059d3
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x20]
jae 0x405a04
add dword [esp + 0x10], 0xd9f68000
adc dword [esp + 0x14], 0x75de
cmp dword [esp + 0x14], eax
ja 0x4059a1
jb 0x4059f5
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x10], eax
jae 0x4059a1
mov eax, dword [esp + 0x2c]
mov dword [eax], 0xfffffffe
jmp 0x405bd8
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
movzx eax, word [esp + 0x4e]
push eax
movzx eax, word [esp + 0x4e]
push eax
movzx eax, word [esp + 0x50]
push eax
push 0x59ad38
lea eax, [esp + 0x270]
push eax
push 0x8db
lea eax, [esp + 0x1378]
push str._d_s_s_d__02d__02d
push eax
call fcn.00518c5f
lea eax, [esp + 0x1380]
add esp, 0x20
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a4e
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push 0xf0000000
push 1
sub eax, esi
push str.Microsoft_Strong_Cryptographic_Provider
mov dword [esp + 0x2c], eax
push ebx
lea eax, [esp + 0x1c]
mov esi, 0x800
push eax
mov dword [esp + 0x44], esi
call edi
test eax, eax
jne 0x405aab
push 0xf0000008
push 1
push str.Microsoft_Strong_Cryptographic_Provider
push ebx
lea eax, [esp + 0x1c]
push eax
call edi
test eax, eax
jne 0x405aab
push 8
push 1
push str.Microsoft_Strong_Cryptographic_Provider
push ebx
lea eax, [esp + 0x1c]
push eax
call edi
mov edi, dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
push ebx
push ebx
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xb6c]
push eax
push 1
push ebx
lea eax, [esp + 0x378]
push eax
call edi
push esi
call fcn.00518d5b
pop ecx
push ebx
push ebx
lea ecx, [esp + 0x3c]
push ecx
push eax
push 1
push ebx
push str.BgIAAACkAABSU0ExAAgAAAEAAQC7G6QgREGEFXvpwQ5pgRRbTfhRZ8Xl026FdST84rB1od1ye5hZp7SLoGXtUVc3qTimZrsi4ctbs2Ou2_zfF9BIGMOfmXdIpoIT_RM7dAplL03KHxBRRFT07a_cWyL8tGzpAAVULptN92F5aKBEOWcHk0u5IDoU3jnetVDkqYBxUX5rtxI_2HborDOIo205nN07ldFlnCm8agWzXY06yzsY6lm4_j3jIqzXcYATXIfd3dtMQX_R56NbzCVU96TSx8xYeiYgJSUqgS6ebw4p9YJI680zP4kHxUmEpCO_1AmXJizW24bzcJUIZ2AgRToTeSpGqg9frqsZrF
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], esi
call edi
lea eax, [esp + 0x40]
push eax
push ebx
push ebx
push dword [esp + 0x40]
push dword [esp + 0x48]
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push 0x8004
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push ebx
push dword [esp + 0x24]
lea eax, [esp + 0x1368]
push eax
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov ecx, dword [esp + 0x30]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
xor edi, edi
mov dword [esp + 0x20], eax
cmp eax, ebx
jle 0x405b67
lea esi, [esp + ecx + 0xb5f]
mov al, byte [esi]
lea ecx, [esp + edi + 0xb60]
mov dl, byte [ecx]
mov byte [ecx], al
mov byte [esi], dl
dec esi
inc edi
cmp edi, dword [esp + 0x20]
jl 0x405b50
push ebx
push ebx
push dword [esp + 0x48]
lea eax, [esp + 0xb6c]
push dword [esp + 0x3c]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureW]
test eax, eax
je 0x405bb7
mov eax, dword [esp + 0x2c]
mov dword [eax], 2
cmp dword [esp + 0x1c], ebx
je 0x405ba1
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [esp + 0xc], ebx
je 0x405bb2
push ebx
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
inc eax
jmp 0x405bda
cmp dword [esp + 0x1c], ebx
je 0x405bc7
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [esp + 0xc], ebx
je 0x405bd8
push ebx
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov ecx, dword [esp + 0x1b64]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005182a2
mov esp, ebp
pop ebp
ret