Function at 0x10009110
Capabilities:
Encode data using base64 via winapi
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x74
mov dword [ebp - 0x54], eax
mov eax, dword [edx + 8]
cmp eax, 4
je 0x100091d0
mov esi, ecx
ja 0x10009180
cmp eax, 2
je 0x1000913c
cmp eax, 3
jne 0x100091f8
mov eax, dword [ebx + 0xc]
lea edx, [ebp - 0x3c]
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 + 4], eax
mov eax, dword [ebp - 0x54]
mov dword [esp], 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 0x100091f8
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
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 eax, dword [ebp - 0x54]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
jmp 0x100091a4
mov eax, dword [esi + 4]
cmp eax, 3
je 0x10009490
ja 0x100093d8
cmp eax, 1
je 0x1000913c
cmp eax, 2
jne 0x100093c0
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 - 0x58], eax
sub esp, 0x14
test eax, eax
je 0x100093cd
mov ecx, dword [esi + 8]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x50], 0
test ecx, ecx
je 0x10009770
mov edx, dword [ebx + 0x10]
mov dword [ebp - 0x4c], 0
test edx, edx
je 0x10009763
lea eax, [ebp - 0x3c]
mov ecx, 0xb
lea edi, [ebp - 0x38]
mov dword [ebp - 0x5c], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x3c], 0x30
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertCreateCertificateChainEngine]
sub esp, 8
test eax, eax
je 0x100095d5
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x5c]
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 - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x3c], 0x10
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [sym.imp.crypt32.dll_CertGetCertificateChain]
sub esp, 0x20
test eax, eax
je 0x100095d5
mov dword [ebp - 0x5c], esi
mov ecx, dword [ebp - 0x48]
xor edi, edi
lea esi, [esi]
cmp dword [ecx + 0xc], edi
jbe 0x100095c0
lea esi, [edi*4]
xor ebx, ebx
jmp 0x10009390
lea eax, [ebp - 0x50]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0x10]
mov eax, dword [eax]
mov eax, dword [eax + 4]
add ebx, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
mov ecx, dword [ebp - 0x48]
sub esp, 0x10
test eax, eax
je 0x100095c0
mov edx, dword [ecx + 0x10]
mov edx, dword [edx + esi]
cmp dword [edx + 0xc], ebx
jbe 0x10009480
mov eax, edi
or eax, ebx
je 0x10009358
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [edx + 0x10]
mov eax, dword [eax + ebx*4]
jmp 0x1000936c
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x80004005
xor edi, edi
jmp 0x1000916d
cmp eax, 4
jne 0x100093c0
mov eax, dword [ebx + 0xc]
lea ebx, [ebp - 0x3c]
mov edi, dword [eax + 8]
mov esi, dword [eax + 4]
mov dword [ebp - 0x3c], 0
mov eax, dword [sym.imp.crypt32.dll_CryptBinaryToStringA]
mov dword [esp + 0x10], ebx
mov dword [ebp - 0x58], edi
mov dword [esp + 4], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp], esi
mov dword [ebp - 0x5c], eax
call eax
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x1000916d
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x10009a08
mov dword [esp + 0xc], eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0x10], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 8], 1
mov dword [esp], esi
call eax
mov ecx, dword [ebp - 0x60]
sub esp, 0x14
test eax, eax
mov edi, eax
jne 0x10009811
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x1000916d
add edi, 1
jmp 0x10009340
mov esi, dword [esi + 8]
mov edi, dword [sym.imp.crypt32.dll_CertOpenStore]
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 edi
mov dword [ebp - 0x58], eax
sub esp, 0x14
test eax, eax
je 0x100093cd
test esi, esi
je 0x10009730
mov dword [esp + 0x10], 0
xor esi, esi
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xb
call edi
mov dword [ebp - 0x60], eax
sub esp, 0x14
mov edi, dword [ebp - 0x60]
test eax, eax
je 0x10009844
lea esi, [esi]
cmp dword [ebx + 0x10], esi
jbe 0x1000984f
mov dword [esp + 0xc], 0
add esi, 1
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x14]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.crypt32.dll_CertAddStoreToCollection]
sub esp, 0x10
test eax, eax
jne 0x10009518
mov edi, eax
mov eax, dword [ebp - 0x60]
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 0x10009584
xor edi, edi
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
sub esp, 8
jmp 0x1000916d
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x58]
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 0x1000956c
mov esi, dword [ebp - 0x5c]
mov dword [esp], ecx
mov dword [ebp - 0x5c], eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
mov eax, dword [ebp - 0x5c]
sub esp, 4
mov edx, dword [ebp - 0x4c]
test edx, edx
je 0x100095ee
mov dword [ebp - 0x5c], eax
mov dword [esp], edx
call dword [sym.imp.crypt32.dll_CertFreeCertificateChainEngine]
mov eax, dword [ebp - 0x5c]
sub esp, 4
test eax, eax
je 0x10009727
mov ebx, dword [esi + 0xc]
test ebx, ebx
je 0x100096f3
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x50]
test edx, edx
je 0x10009944
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 0x10009727
mov dword [esp + 0xc], 6
mov eax, dword [esi + 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x60], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
mov eax, dword [sym.imp.crypt32.dll_PFXExportCertStore]
mov dword [ebp - 0x5c], eax
call eax
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x100096c8
xor ebx, ebx
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x10009a1c
mov dword [esp + 0xc], 6
mov eax, dword [esi + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
sub esp, 0x10
mov edi, eax
test eax, eax
jne 0x1000979a
nop
lea esi, [esi]
test ebx, ebx
je 0x100096c8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateContext]
mov eax, dword [ebp - 0x58]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertCloseStore]
sub esp, 8
jmp 0x1000916d
mov dword [esp + 0xc], 6
mov eax, dword [esi + 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x60], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
mov eax, dword [sym.imp.crypt32.dll_PFXExportCertStore]
mov dword [ebp - 0x5c], eax
call eax
sub esp, 0x10
test eax, eax
jne 0x1000966e
xor edi, edi
jmp 0x100096c8
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
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 0x10009566
lea eax, [ebp - 0x3c]
xor edx, edx
mov dword [ebp - 0x5c], eax
jmp 0x100092cc
lea eax, [ebp - 0x50]
mov dword [esp + 8], 4
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
jmp 0x100095ee
mov eax, dword [ebp - 0x44]
lea esi, [ebp - 0x3c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov edi, eax
test eax, eax
je 0x100096b8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100096b8
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], esi
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_CryptAcquireContextW]
sub esp, 0x14
jmp 0x100096b8
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], ecx
mov dword [ebp - 0x58], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov ecx, dword [ebp - 0x58]
sub esp, 0x14
mov edi, eax
jmp 0x1000946b
mov ebx, dword [sym.imp.crypt32.dll_CertCloseStore]
jmp 0x1000956a
lea eax, [ebp - 0x3c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x60]
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 0x100099db
mov edx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x58]
mov dword [ebp - 0x5c], 0
lea esi, [esi]
mov esi, dword [ebp - 0x5c]
cmp dword [edx + 0xc], esi
jbe 0x100099c8
mov esi, dword [ebp - 0x5c]
xor ebx, ebx
shl esi, 2
jmp 0x100098d3
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + esi]
cmp dword [ecx + 0xc], ebx
jbe 0x1000993b
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 dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
test eax, eax
jne 0x100098d0
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
mov eax, dword [ebp - 0x60]
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 0x1000956a
add dword [ebp - 0x5c], 1
jmp 0x100098b0
call sym._export_get_private_key_info
mov dword [ebp + 8], eax
test eax, eax
je 0x10009727
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
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 0x100096bc
mov dword [esp + 0xc], 6
mov eax, dword [esi + 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x60], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
mov eax, dword [sym.imp.crypt32.dll_PFXExportCertStore]
mov dword [ebp - 0x5c], eax
call eax
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x100096bc
mov ebx, 1
jmp 0x1000966e
mov dword [esp], edx
mov edi, eax
call dword [sym.imp.crypt32.dll_CertFreeCertificateChain]
sub esp, 4
jmp 0x1000954d
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.crypt32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
mov edi, eax
jmp 0x1000954d
mov eax, dword fs:[0x18]
xor edi, edi
mov dword [eax + 0x34], 0xe
jmp 0x1000916d
mov eax, dword fs:[0x18]
xor edi, edi
mov dword [eax + 0x34], 0xe
jmp 0x100096b8