Function at 0x6e8ca560
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Get process heap force flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x78
mov eax, dword [ecx]
mov edi, dword [ecx + 0x10]
mov edx, dword [ecx + 0x14]
test byte [0x6e926040], 8
mov dword [ebp - 0x40], eax
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x48], edi
mov eax, dword [ecx + 8]
mov dword [ebp - 0x4c], edx
mov esi, dword [ecx + 0xc]
jne 0x6e8ca7f0
test bl, 2
jne 0x6e8ca750
mov dword [ebp - 0x3c], 0
mov eax, ebx
xor edx, edx
and eax, 1
mov dword [ebp - 0x44], eax
mov dword [esi], 0
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jne 0x6e8ca6c0
mov dword [ebp - 0x44], 0
mov ecx, edx
mov dword [ebp - 0x28], 0
test edx, edx
je 0x6e8ca99d
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x58], edx
and ebx, 0x40
mov dword [esp + 0x10], ebx
mov dword [ebp - 0x54], ecx
mov eax, dword [ecx + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
mov eax, dword [ecx]
mov dword [esp + 4], eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sub.advapi32.dll_CryptAcquireContextW
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x58]
sub esp, 0x14
test eax, eax
mov edi, eax
je 0x6e8ca880
mov ebx, dword [ecx + 0x10]
test ebx, ebx
je 0x6e8ca67a
mov dword [ebp - 0x58], esi
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x54], edx
lea esi, [esi]
lea edi, [edi]
mov edx, dword [esi + 0x14]
mov eax, ebx
inc ebx
shl eax, 4
add eax, edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0xc], edx
mov edx, dword [eax + 4]
mov dword [esp + 8], edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.advapi32.dll_CryptSetProvParam
sub esp, 0x10
cmp ebx, dword [esi + 0x10]
jb 0x6e8ca640
mov ecx, esi
mov edx, dword [ebp - 0x54]
mov esi, dword [ebp - 0x58]
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x50]
test eax, eax
jne 0x6e8caa20
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x20]
mov dword [esi], eax
mov esi, dword [ebp - 0x48]
test esi, esi
je 0x6e8ca6a2
mov eax, dword [ebp - 0x1c]
mov dword [esi], eax
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x6e8caac0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x6e8ca70c
mov dword [eax], 1
jmp 0x6e8ca70c
mov dword [ebp - 0x50], edx
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov eax, 5
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x2c], 0xc
mov dword [esp], eax
call sym.crypt32.dll_CertGetCertificateContextProperty
mov edx, dword [ebp - 0x50]
sub esp, 0x10
test eax, eax
mov edi, eax
jne 0x6e8ca840
mov eax, dword [esi]
test eax, eax
je 0x6e8cab1f
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], edx
xor esi, esi
mov dword [esp + 4], esi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
je 0x6e8ca73c
mov dword [esp], eax
call sym.crypt32.dll_CertFreeCertificateContext
sub esp, 4
lea esp, [ebp - 0x10]
mov eax, edi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
xor eax, eax
mov edx, 2
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x40]
lea edi, [ebp - 0x24]
mov dword [esp + 0xc], edi
mov dword [esp + 4], edx
mov dword [ebp - 0x24], 0
mov dword [esp], eax
call sym.crypt32.dll_CertGetCertificateContextProperty
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], eax
sub esp, 0x10
test eax, eax
je 0x6e8ca8d0
mov edx, dword [ebp - 0x24]
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, 2
mov dword [ebp - 0x44], eax
sub esp, 0xc
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym.crypt32.dll_CertGetCertificateContextProperty
mov edx, dword [ebp - 0x44]
sub esp, 0x10
test eax, eax
je 0x6e8ca870
mov eax, dword [edx + 0xc]
and eax, 1
mov dword [ebp - 0x44], eax
jmp 0x6e8ca5b5
mov dword [esp + 0x18], eax
mov edi, dword [ebp - 0x48]
mov ecx, 0x6e92adc4
mov dword [esp + 0x24], edx
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], edi
mov edi, str.CryptAcquireCertificatePrivateKey
mov dword [esp + 0x10], eax
mov eax, 0x6e926040
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], 3
call fcn.6e8c5b50
jmp 0x6e8ca59b
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x20]
test ecx, ecx
mov dword [esi], eax
je 0x6e8ca851
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x6e8ca6fc
mov dword [eax], 0
jmp 0x6e8ca6fc
mov dword [esi], 0
jmp 0x6e8ca5c6
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x8009200b
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x6e8ca706
mov dword [esp + 8], ecx
xor ecx, ecx
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], ecx
xor edi, edi
mov eax, dword fs:[0x18]
mov dword [ebp - 0x40], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x40]
sub esp, 0xc
jmp 0x6e8ca70c
mov dword [esp], 0xa
mov eax, 0x6e92ade0
mov dword [esp + 0x10], eax
mov eax, 0x10000
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call sym.crypt32.dll_CertOpenStore
mov dword [ebp - 0x3c], eax
sub esp, 0x14
test eax, eax
je 0x6e8ca990
xor eax, eax
mov edx, 0xd0000
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x40]
xor ecx, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 0x10], eax
mov eax, dword [eax]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym.crypt32.dll_CertFindCertificateInStore
sub esp, 0x18
test eax, eax
mov edx, eax
je 0x6e8ca9f3
mov dword [esp], edx
xor eax, eax
mov dword [esp + 8], eax
mov eax, 2
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov dword [ebp - 0x50], edx
call sym.crypt32.dll_CertGetCertificateContextProperty
mov edx, dword [ebp - 0x50]
sub esp, 0x10
test eax, eax
je 0x6e8ca9e8
mov dword [ebp - 0x40], edx
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym.crypt32.dll_CertCloseStore
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x3c], edx
sub esp, 8
jmp 0x6e8ca78d
mov dword [esi], 0
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.crypt32.dll_CertGetCertificateContextProperty
sub esp, 0x10
test eax, eax
mov edi, eax
jne 0x6e8caa50
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x8009200b
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
xor edx, edx
jmp 0x6e8ca70c
mov dword [esp], edx
call sym.crypt32.dll_CertFreeCertificateContext
sub esp, 4
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym.crypt32.dll_CertCloseStore
mov dword [esi], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], 0
sub esp, 8
jmp 0x6e8ca99d
mov dword [ebp - 0x50], edx
xor edx, edx
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x50]
sub esp, 0xc
jmp 0x6e8ca691
mov eax, dword [ebp - 0x28]
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], 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
mov ecx, eax
je 0x6e8cab0f
mov dword [esp + 8], ecx
lea eax, [ebp - 0x28]
mov edi, 2
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], edi
mov dword [ebp - 0x50], ecx
mov dword [esp], eax
call sym.crypt32.dll_CertGetCertificateContextProperty
xor edx, edx
mov ecx, dword [ebp - 0x50]
sub esp, 0x10
test eax, eax
je 0x6e8ca898
mov dword [ebp - 0x50], 1
jmp 0x6e8ca5e5
mov dword [ebp - 0x44], edx
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 5
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], 0xc
mov dword [esp], eax
call sym.crypt32.dll_CertSetCertificateContextProperty
mov esi, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
sub esp, 0x10
test esi, esi
je 0x6e8ca70c
test eax, eax
je 0x6e8ca70c
mov dword [esi], 0
jmp 0x6e8ca70c
mov dword [edi + 0x34], 0xe
xor edx, edx
xor edi, edi
jmp 0x6e8ca706
mov ecx, edx
jmp 0x6e8ca5cf