Function at 0x4017c0
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4171a6
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x420004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], 0
xorps xmm0, xmm0
movq qword [ebp - 0x58], xmm0
mov dword [ebp - 0x50], 0
mov byte [ebp - 0x75], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov esi, 0x20
mov dword [ebp - 4], 0
lea edi, [ebp - 0x30]
lea ebx, [esi - 0x18]
nop dword [eax + eax]
lea eax, [ebp - 0x5c]
push eax
call fcn.004093d4
mov eax, dword [ebp - 0x5c]
add esp, 4
mov dword [edi], eax
sub esi, 4
add edi, 4
sub ebx, 1
jne 0x401840
test esi, esi
je 0x401881
lea eax, [ebp - 0x5c]
push eax
call fcn.004093d4
mov eax, 4
cmp esi, eax
cmova esi, eax
lea eax, [ebp - 0x5c]
push esi
push eax
push edi
call fcn.00405030
add esp, 0x10
mov byte [ebp - 4], 1
xor eax, eax
mov edi, dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x74], 0
mov word [ebp - 0x74], ax
lea eax, [ebp - 0x5c]
push eax
push 0
push 0x40000001
push 0x20
lea eax, [ebp - 0x30]
mov dword [ebp - 0x64], 0
push eax
mov dword [ebp - 0x60], 7
mov dword [ebp - 0x80], 1
call edi
test eax, eax
je 0x401912
mov eax, dword [ebp - 0x5c]
add eax, eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x5c]
push eax
push esi
push 0x40000001
push 0x20
lea eax, [ebp - 0x30]
push eax
call edi
test eax, eax
je 0x40190b
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4018f2
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x74]
call fcn.00401f00
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x74]
push eax
call fcn.00401e70
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x60]
cmp edx, 8
jb 0x40195c
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401952
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401b54
push edx
push ecx
call fcn.004027d8
add esp, 8
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x58]
call fcn.00401270
mov esi, dword [ebp - 0x58]
test al, al
je 0x401b03
push 0
push str.Microsoft_Platform_Crypto_Provider
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
test eax, eax
jne 0x401af0
lea ecx, [ebp - 0x9c]
call fcn.00401430
mov ebx, dword [ebp - 0x84]
mov ecx, ebx
push eax
call fcn.00401e70
mov edx, dword [ebp - 0x88]
cmp edx, 8
jb 0x4019e4
mov ecx, dword [ebp - 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4019da
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401b4f
push edx
push ecx
call fcn.004027d8
add esp, 8
cmp dword [ebx + 0x14], 8
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x3c], 8
mov dword [ebp - 0x38], 0x2b
mov dword [ebp - 0x34], 0x41d980
lea eax, [eax*2 + 2]
mov dword [ebp - 0x44], 0x2d
mov dword [ebp - 0x48], eax
jb 0x401a15
mov ebx, dword [ebx]
push 0x480
lea eax, [ebp - 0x48]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x54]
sub eax, esi
mov dword [ebp - 0x68], 0
push eax
push esi
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x64], 2
push eax
lea eax, [ebp - 0x68]
push eax
push str.RSAPRIVATEBLOB
push 0
push dword [ebp - 0x4c]
call dword [sym.imp.ncrypt.dll_NCryptImportKey]
mov edi, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
test eax, eax
jne 0x401ad6
mov eax, dword [ebp - 0x7c]
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x401a67
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
push 0
lea eax, [eax*2 + 2]
push eax
push ecx
push 0x41dbc8
push dword [ebp - 0x5c]
call dword [sym.imp.ncrypt.dll_NCryptSetProperty]
test eax, eax
jne 0x401ab7
push eax
push dword [ebp - 0x5c]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
jne 0x401aaf
push eax
push dword [ebp - 0x5c]
mov byte [ebp - 0x75], 1
call dword [sym.imp.ncrypt.dll_NCryptDeleteKey]
push dword [ebp - 0x5c]
call edi
push dword [ebp - 0x4c]
call edi
jmp 0x401b03
push eax
push str.NCryptFinalizeKey_failed.
jmp 0x401abd
push eax
push str.NCryptSetProperty_PIN_failed.
push str._s._Error:_0x_.8X_n
call fcn.00401010
add esp, 0xc
push dword [ebp - 0x5c]
call edi
push dword [ebp - 0x4c]
call edi
jmp 0x401b03
push eax
push str.NCryptImportKey_failed.
push str._s._Error:_0x_.8X_n
call fcn.00401010
add esp, 0xc
push dword [ebp - 0x4c]
call edi
jmp 0x401b03
push eax
push str.NCryptOpenStorageProvider_failed.
push str._s._Error:_0x_.8X_n
call fcn.00401010
add esp, 0xc
test esi, esi
je 0x401b30
mov ecx, dword [ebp - 0x50]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x401b26
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401b54
push ecx
push esi
call fcn.004027d8
add esp, 8
mov al, byte [ebp - 0x75]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040279a
mov esp, ebp
pop ebp
ret
call fcn.004096b9
call fcn.004096b9
int3