Function at 0x6800b220
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 0x6800b2d8
ja 0x6800b290
cmp eax, 2
je 0x6800b24f
cmp eax, 3
jne 0x6800b300
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 0x6800b300
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 dword [sym.imp.crypt32.dll_CertSaveStore]
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 0x6800b2b1
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 4]
cmp eax, 3
je 0x6800b5d0
ja 0x6800b4d0
cmp eax, 1
je 0x6800b24f
cmp eax, 2
jne 0x6800b5b8
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 dword [sym.imp.crypt32.dll_CertOpenStore]
mov dword [ebp - 0x70], eax
sub esp, 0x14
test eax, eax
je 0x6800b5c5
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 0x6800b878
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x58], 0
test edx, edx
je 0x6800b86b
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 dword [sym.imp.crypt32.dll_CertCreateCertificateChainEngine]
sub esp, 8
test eax, eax
je 0x6800b725
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 [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x48], 0x10
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [sym.imp.crypt32.dll_CertGetCertificateChain]
sub esp, 0x20
test eax, eax
je 0x6800b725
mov dword [ebp - 0x74], esi
mov ecx, dword [ebp - 0x54]
xor edi, edi
lea esi, [esi]
nop
cmp dword [ecx + 0xc], edi
jbe 0x6800b710
lea esi, [edi*4]
xor ebx, ebx
jmp 0x6800b49e
lea eax, [ebp - 0x5c]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0x10]
mov eax, dword [eax]
mov eax, dword [eax + 4]
inc ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x70]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
mov ecx, dword [ebp - 0x54]
sub esp, 0x10
test eax, eax
je 0x6800b710
mov edx, dword [ecx + 0x10]
mov edx, dword [edx + esi]
cmp dword [edx + 0xc], ebx
jbe 0x6800b708
mov eax, edi
or eax, ebx
je 0x6800b468
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [edx + 0x10]
mov eax, dword [eax + ebx*4]
jmp 0x6800b47c
cmp eax, 4
jne 0x6800b5b8
mov eax, dword [ebx + 0xc]
lea ebx, [ebp - 0x48]
mov edi, dword [eax + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x48], 0
mov dword [esp + 0x10], ebx
mov dword [ebp - 0x70], eax
mov dword [esp], eax
mov eax, dword [sym.imp.crypt32.dll_CryptBinaryToStringA]
mov dword [ebp - 0x6c], edi
mov dword [esp + 4], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [ebp - 0x74], eax
call eax
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x6800b27d
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 0x6800bb7f
mov dword [esp + 0xc], eax
mov dword [ebp - 0x78], 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
mov eax, dword [ebp - 0x74]
call eax
mov edx, dword [ebp - 0x78]
sub esp, 0x14
test eax, eax
mov edi, eax
jne 0x6800baa9
mov dword [esp + 8], edx
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 0x6800b27d
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80004005
xor edi, edi
jmp 0x6800b27d
mov eax, dword [ebp - 0x6c]
mov edi, dword [sym.imp.crypt32.dll_CertOpenStore]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2000
mov dword [ebp - 0x70], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 2
call edi
mov dword [ebp - 0x6c], eax
sub esp, 0x14
test eax, eax
je 0x6800b5c5
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x6800b838
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xb
call edi
xor edx, edx
mov dword [ebp - 0x70], eax
sub esp, 0x14
test eax, eax
je 0x6800bad9
mov edi, dword [ebp - 0x70]
mov dword [ebp - 0x74], esi
mov esi, ebx
mov ebx, edx
cmp dword [esi + 0x10], ebx
jbe 0x6800b9b4
mov dword [esp + 0xc], 0
inc ebx
mov dword [esp + 8], 0
mov eax, dword [esi + 0x14]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.crypt32.dll_CertAddStoreToCollection]
sub esp, 0x10
test eax, eax
jne 0x6800b660
mov esi, dword [ebp - 0x74]
mov edi, eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 4], 0
mov ebx, dword [sym.imp.crypt32.dll_CertCloseStore]
mov dword [esp], eax
call ebx
sub esp, 8
test edi, edi
jne 0x6800b6cd
xor edi, edi
mov eax, dword [ebp - 0x6c]
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
sub esp, 8
jmp 0x6800b27d
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 dword [sym.imp.crypt32.dll_CertSaveStore]
sub esp, 0x18
mov edi, eax
jmp 0x6800b6b5
inc edi
jmp 0x6800b450
mov esi, dword [ebp - 0x74]
mov dword [esp], ecx
mov dword [ebp - 0x74], eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
mov eax, dword [ebp - 0x74]
sub esp, 4
mov edx, dword [ebp - 0x58]
test edx, edx
je 0x6800b73e
mov dword [ebp - 0x74], eax
mov dword [esp], edx
call dword [sym.imp.crypt32.dll_CertFreeCertificateChainEngine]
mov eax, dword [ebp - 0x74]
sub esp, 4
test eax, eax
je 0x6800b830
mov eax, dword [ebp - 0x6c]
mov ebx, dword [eax + 0xc]
test ebx, ebx
je 0x6800b8a2
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5c]
test edx, edx
je 0x6800bae4
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 dword [sym.imp.crypt32.dll_CertSetCertificateContextProperty]
sub esp, 0x10
test eax, eax
je 0x6800b830
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
mov eax, dword [sym.imp.crypt32.dll_PFXExportCertStore]
mov dword [ebp - 0x78], eax
call eax
sub esp, 0x10
mov edi, eax
test eax, eax
jne 0x6800b8d9
lea esi, [esi]
nop
test ebx, ebx
je 0x6800b7fb
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 dword [sym.imp.crypt32.dll_CertFreeCertificateContext]
mov eax, dword [ebp - 0x70]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertCloseStore]
sub esp, 8
jmp 0x6800b27d
xor edi, edi
jmp 0x6800b7fb
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 dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
mov ebx, dword [sym.imp.crypt32.dll_CertCloseStore]
sub esp, 0x10
mov edi, eax
jmp 0x6800b6af
lea eax, [ebp - 0x48]
xor edx, edx
mov dword [ebp - 0x74], eax
jmp 0x6800b3da
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 dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
jmp 0x6800b73e
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
mov eax, dword [sym.imp.crypt32.dll_PFXExportCertStore]
mov dword [ebp - 0x78], eax
call eax
sub esp, 0x10
test eax, eax
je 0x6800b830
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 0x6800bb5d
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
mov eax, dword [ebp - 0x78]
call eax
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x6800b7d0
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 0x6800b7d0
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x48]
test eax, eax
je 0x6800b7d0
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 dword [sym.imp.advapi32.dll_CryptAcquireContextW]
sub esp, 0x14
jmp 0x6800b7d0
lea eax, [ebp - 0x48]
mov ebx, esi
mov dword [esp + 0x18], 0
mov esi, dword [ebp - 0x74]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x70]
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 dword [sym.imp.crypt32.dll_CertGetCertificateChain]
sub esp, 0x20
test eax, eax
je 0x6800bb30
mov edx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x6c]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x78], esi
lea esi, [esi]
lea esi, [esi]
mov esi, dword [ebp - 0x74]
cmp dword [edx + 0xc], esi
jbe 0x6800bb6b
shl esi, 2
xor ebx, ebx
jmp 0x6800ba3b
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + esi]
cmp dword [ecx + 0xc], ebx
jbe 0x6800baa1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebx*4]
inc ebx
mov eax, dword [eax + 4]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
test eax, eax
jne 0x6800ba38
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
mov eax, dword [ebp - 0x70]
mov ebx, dword [sym.imp.crypt32.dll_CertCloseStore]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
sub esp, 8
jmp 0x6800b6b3
inc dword [ebp - 0x74]
jmp 0x6800ba20
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], edx
mov dword [ebp - 0x6c], edx
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 edx, dword [ebp - 0x6c]
sub esp, 0x14
mov edi, eax
jmp 0x6800b589
mov ebx, dword [sym.imp.crypt32.dll_CertCloseStore]
jmp 0x6800b6b3
call sym._export_get_private_key_info
mov dword [ebp + 8], eax
test eax, eax
je 0x6800b830
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 dword [sym.imp.crypt32.dll_CertSetCertificateContextProperty]
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x6800b7d4
mov ebx, 1
jmp 0x6800b78f
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 dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
mov edi, eax
jmp 0x6800b696
mov dword [edi + 0x34], 0xe
xor edi, edi
jmp 0x6800b7d0
mov dword [esp], edx
mov esi, dword [ebp - 0x78]
mov edi, eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
push ebx
jmp 0x6800b696
mov dword [edi + 0x34], 0xe
xor edi, edi
jmp 0x6800b27d