Function at 0x68009cd0
Capabilities:
Encode data using base64 via winapi
Get process heap flags
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x8c
mov eax, dword [edx + 8]
mov dword [ebp - 0x6c], ecx
cmp eax, 4
je 0x68009d88
ja 0x68009d40
cmp eax, 2
je 0x68009cff
cmp eax, 3
jne 0x68009db0
mov eax, dword [ebx + 0xc]
lea edx, [ebp - 0x48]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, dword [eax + 8]
mov dword [esp + 8], edx
mov eax, dword [eax + 4]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov edi, eax
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 5
jne 0x68009db0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 2
mov dword [esp + 4], 0x10001
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sym._CertSaveStore_24
mov edi, eax
sub esp, 0x18
lea esp, [ebp - 0xc]
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
jmp 0x68009d61
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 4]
cmp eax, 3
je 0x6800a080
ja 0x68009f98
cmp eax, 1
je 0x68009cff
cmp eax, 2
jne 0x68009f80
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._CertOpenStore_20
mov dword [ebp - 0x70], eax
sub esp, 0x14
test eax, eax
je 0x68009f8d
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov ecx, dword [eax + 8]
mov dword [ebp - 0x5c], 0
test ecx, ecx
je 0x6800a309
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x58], 0
test edx, edx
je 0x6800a2fc
lea eax, [ebp - 0x48]
mov ecx, 0xb
lea edi, [ebp - 0x44]
mov dword [ebp - 0x74], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x48], 0x30
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x74]
mov dword [esp], eax
call sym._CertCreateCertificateChainEngine_8
sub esp, 8
mov edi, eax
test eax, eax
je 0x6800a1d0
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0x54]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x74]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebx + 0xc]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x48], 0x10
call sym._CertGetCertificateChain_32
sub esp, 0x20
mov edi, eax
test eax, eax
je 0x6800a1d0
xor ebx, ebx
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x74], esi
mov esi, ebx
lea esi, [esi]
cmp dword [edx + 0xc], esi
jbe 0x6800a1c0
lea edi, [esi*4]
xor ebx, ebx
jmp 0x68009f4f
lea eax, [ebp - 0x5c]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
mov eax, dword [ecx + 0x10]
mov eax, dword [eax]
mov eax, dword [eax + 4]
add ebx, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call sym._CertAddCertificateContextToStore_16
mov edx, dword [ebp - 0x54]
sub esp, 0x10
test eax, eax
je 0x6800a1c0
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + edi]
cmp dword [ecx + 0xc], ebx
jbe 0x6800a078
mov eax, esi
or eax, ebx
je 0x68009f18
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebx*4]
jmp 0x68009f2c
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80004005
xor edi, edi
jmp 0x68009d2d
cmp eax, 4
jne 0x68009f80
mov eax, dword [ebx + 0xc]
lea ebx, [ebp - 0x48]
mov edi, dword [eax + 8]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp], eax
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x48], 0
call sym._CryptBinaryToStringA_20
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x68009d2d
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
test eax, eax
je 0x6800a5f5
mov dword [esp + 0xc], eax
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x10], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], 1
mov dword [esp], eax
call sym._CryptBinaryToStringA_20
mov ecx, dword [ebp - 0x74]
sub esp, 0x14
test eax, eax
mov edi, eax
jne 0x6800a539
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x68009d2d
add esi, 1
jmp 0x68009f00
mov eax, dword [ebp - 0x6c]
mov edi, dword [eax + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 2
call sym._CertOpenStore_20
mov dword [ebp - 0x6c], eax
sub esp, 0x14
test eax, eax
je 0x68009f8d
test edi, edi
je 0x6800a2d0
mov dword [esp + 0x10], 0
xor edi, edi
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xb
call sym._CertOpenStore_20
mov dword [ebp - 0x74], eax
sub esp, 0x14
test eax, eax
je 0x6800a167
mov dword [ebp - 0x70], esi
mov esi, ebx
mov ebx, edi
mov edi, dword [ebp - 0x74]
lea esi, [esi]
cmp dword [esi + 0x10], ebx
jbe 0x6800a440
mov dword [esp + 0xc], 0
add ebx, 1
mov dword [esp + 8], 0
mov eax, dword [esi + 0x14]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._CertAddStoreToCollection_16
sub esp, 0x10
test eax, eax
jne 0x6800a110
mov esi, dword [ebp - 0x70]
mov ecx, eax
mov eax, dword [ebp - 0x74]
mov dword [esp + 4], 0
mov dword [ebp - 0x70], ecx
mov dword [esp], eax
call sym._CertCloseStore_8
mov ecx, dword [ebp - 0x70]
sub esp, 8
test ecx, ecx
jne 0x6800a184
xor edi, edi
mov eax, dword [ebp - 0x6c]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CertCloseStore_8
sub esp, 8
jmp 0x68009d2d
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 2
mov dword [esp + 4], 0x10001
mov dword [esp], eax
call sym._CertSaveStore_24
sub esp, 0x18
mov edi, eax
jmp 0x6800a169
mov dword [esp], edx
mov esi, dword [ebp - 0x74]
mov edi, eax
call sym._CertFreeCertificateChain_4
sub esp, 4
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x6800a1e2
mov dword [esp], eax
call sym._CertFreeCertificateChainEngine_4
sub esp, 4
test edi, edi
je 0x6800a2c8
mov eax, dword [ebp - 0x6c]
mov ebx, dword [eax + 0xc]
test ebx, ebx
je 0x6800a334
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5c]
test edx, edx
je 0x6800a569
mov edi, dword [ebp + 8]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sym._CertSetCertificateContextProperty_16
sub esp, 0x10
test eax, eax
je 0x6800a2c8
xor ebx, ebx
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], 6
mov eax, dword [eax + 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x74], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call sym._PFXExportCertStore_16
sub esp, 0x10
mov edi, eax
test eax, eax
jne 0x6800a366
lea esi, [esi]
lea edi, [edi]
test ebx, ebx
je 0x6800a29b
mov esi, dword [ebp + 8]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call sym._CertFreeCertificateContext_4
mov eax, dword [ebp - 0x70]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CertCloseStore_8
sub esp, 8
jmp 0x68009d2d
xor edi, edi
jmp 0x6800a29b
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CertAddCertificateContextToStore_16
sub esp, 0x10
mov ecx, eax
jmp 0x6800a163
lea eax, [ebp - 0x48]
xor edx, edx
mov dword [ebp - 0x74], eax
jmp 0x68009e8a
lea eax, [ebp - 0x5c]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call sym._CertAddCertificateContextToStore_16
sub esp, 0x10
mov edi, eax
jmp 0x6800a1e2
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], 6
mov eax, dword [eax + 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x74], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call sym._PFXExportCertStore_16
sub esp, 0x10
test eax, eax
je 0x6800a2c8
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x4c], eax
sub esp, 0xc
test eax, eax
je 0x6800a603
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], 6
mov eax, dword [eax + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x74]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call sym._PFXExportCertStore_16
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x6800a270
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x48]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x6800a270
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x48]
test eax, eax
je 0x6800a270
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], 0x10
mov eax, dword [eax + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._CryptAcquireContextW_20
sub esp, 0x14
jmp 0x6800a270
lea eax, [ebp - 0x48]
mov ebx, esi
mov dword [esp + 0x18], 0
mov esi, dword [ebp - 0x70]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x74]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [ebx + 0xc]
mov dword [esp], 0
mov dword [esp + 4], eax
call sym._CertGetCertificateChain_32
sub esp, 0x20
mov ecx, eax
test eax, eax
je 0x6800a5c9
mov edx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x6c]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x78], esi
nop
lea esi, [esi]
mov eax, dword [ebp - 0x70]
cmp dword [edx + 0xc], eax
jbe 0x6800a5b0
mov eax, dword [ebp - 0x70]
xor ebx, ebx
lea esi, [eax*4]
mov eax, ecx
jmp 0x6800a4cb
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + esi]
cmp dword [ecx + 0xc], ebx
jbe 0x6800a52e
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebx*4]
add ebx, 1
mov eax, dword [eax + 4]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._CertAddCertificateContextToStore_16
sub esp, 0x10
test eax, eax
jne 0x6800a4c8
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sym._CertFreeCertificateChain_4
mov eax, dword [ebp - 0x74]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._CertCloseStore_8
sub esp, 8
jmp 0x6800a167
add dword [ebp - 0x70], 1
mov ecx, eax
jmp 0x6800a4a8
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], ecx
mov dword [ebp - 0x6c], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_WriteFile]
mov ecx, dword [ebp - 0x6c]
sub esp, 0x14
mov edi, eax
jmp 0x6800a048
call sym._export_get_private_key_info
mov dword [ebp + 8], eax
test eax, eax
je 0x6800a2c8
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], eax
call sym._CertSetCertificateContextProperty_16
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x6800a274
mov ebx, 1
jmp 0x6800a232
mov dword [esp], edx
mov esi, dword [ebp - 0x78]
mov dword [ebp - 0x70], ecx
call sym._CertFreeCertificateChain_4
mov ecx, dword [ebp - 0x70]
sub esp, 4
jmp 0x6800a147
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CertAddCertificateContextToStore_16
sub esp, 0x10
mov ecx, eax
jmp 0x6800a147
mov dword [edi + 0x34], 0xe
xor edi, edi
jmp 0x68009d2d
mov dword [edi + 0x34], 0xe
xor edi, edi
jmp 0x6800a270