Function at 0x411750
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f8
mov eax, dword [0x448d60]
xor eax, ebp
mov dword [ebp - 0x58], eax
push esi
push edi
mov byte [ebp - 5], 0xc4
mov dword [ebp - 0x30], 1
lea eax, [ebp - 5]
mov dword [ebp - 0x2c], eax
xor ecx, ecx
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x30]
push eax
push 0xe
call fcn.004116e0
add esp, 0xc
mov dword [ebp - 0x50], eax
xor ecx, ecx
cmp dword [ebp - 0x50], 0
setne cl
cmp ecx, 1
je 0x4117b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x56e
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov dword [ebp - 0x24], str.1.3.6.1.5.5.7.3.1
mov dword [ebp - 0x20], str.1.3.6.1.5.5.7.3.3
mov dword [ebp - 0x4c], 2
lea edx, [ebp - 0x24]
mov dword [ebp - 0x48], edx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x4c]
push ecx
push 0x24
call fcn.004116e0
add esp, 0xc
mov dword [ebp - 0x6c], eax
xor edx, edx
cmp dword [ebp - 0x6c], 0
setne dl
cmp edx, 1
je 0x411812
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x575
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov dword [ebp - 0x114], str.2.5.29.15
mov dword [ebp - 0x110], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10c], eax
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x104], str.2.5.29.37
mov dword [ebp - 0x100], 0
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0x1c], 0
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x44], str.1.2.840.113549.1.1.5
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov dword [ebp - 0xf0], 0
push 0x6c
push 0
lea edx, [ebp - 0xec]
push edx
call fcn.0042adc0
add esp, 0xc
mov dword [ebp - 0xf0], 0
mov dword [ebp - 0xec], 0x10
lea eax, [ebp - 0x68]
mov dword [ebp - 0xe8], eax
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0xe4], ecx
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0xe0], edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0xdc], eax
lea ecx, [ebp - 0x114]
mov dword [ebp - 0x84], ecx
lea edx, [ebp - 0xd0]
push edx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
movzx ecx, word [ebp - 0x68]
add ecx, 0xa
mov word [ebp - 0x68], cx
lea edx, [ebp - 0xc8]
push edx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
push 0
push 0x4383e0
push 0x80007
push 0
push 1
mov ecx, dword [0x451e44]
push ecx
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x411947
mov dword [ebp - 0x1f4], 0x438438
jmp 0x411951
mov dword [ebp - 0x1f4], 0x438440
push 0x43840c
mov edx, dword [ebp - 0x1f4]
push edx
push str._s_root_cert___ls__n
call fcn.0040e130
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x411dad
mov ecx, 0x18
mov esi, str.CNContinentTLS_proxy_CA__O_Security_Code_Ltd._
lea edi, [ebp - 0x1a8]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0
lea eax, [ebp - 0x70]
push eax
push 0
push 0
push 2
lea ecx, [ebp - 0x1a8]
push ecx
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
cmp eax, 1
je 0x4119c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x596
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov edx, dword [ebp - 0x70]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x13c], eax
xor eax, eax
cmp dword [ebp - 0x13c], 0
setne al
cmp eax, 1
je 0x411a01
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x598
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
push 0
lea ecx, [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x13c]
push edx
push 0
push 2
lea eax, [ebp - 0x1a8]
push eax
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
cmp eax, 1
je 0x411a41
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x59a
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
push 0
push 1
push 0
push 0x43845c
lea ecx, [ebp - 0x78]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x411a8f
push 8
push 1
push 0
push 0x4384ec
lea edx, [ebp - 0x78]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp eax, 1
je 0x411a8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x59f
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea eax, [ebp - 0x14]
push eax
push 0
push 1
mov ecx, dword [ebp - 0x78]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
cmp eax, 1
je 0x411ac1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5a1
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea edx, [ebp - 0x38]
push edx
push 0
push 1
push 1
mov eax, dword [ebp - 0x78]
push eax
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
cmp eax, 1
je 0x411af5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5a4
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov ecx, dword [ebp - 0x38]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
xor edx, edx
cmp dword [ebp - 0x10], 0
setne dl
cmp edx, 1
je 0x411b2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5a6
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 1
push 1
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
cmp eax, 1
je 0x411b63
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5a8
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0x13c]
mov dword [ebp - 0xbc], ecx
mov edx, dword [ebp - 0xc0]
mov dword [ebp - 0xd8], edx
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0xd4], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov dword [ebp - 0xb8], edx
mov eax, dword [ecx + 4]
mov dword [ebp - 0xb4], eax
mov edx, dword [ecx + 8]
mov dword [ebp - 0xb0], edx
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0xac], eax
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0xa8], edx
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x88], 1
lea ecx, [ebp - 0x134]
push ecx
push 0
push 0
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0xf0]
push eax
push 2
push 1
push 1
mov ecx, dword [ebp - 0x78]
push ecx
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
cmp eax, 1
je 0x411c18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5b3
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov edx, dword [ebp - 0x134]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x138], eax
xor eax, eax
cmp dword [ebp - 0x138], 0
setne al
cmp eax, 1
je 0x411c59
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5b5
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea ecx, [ebp - 0x134]
push ecx
mov edx, dword [ebp - 0x138]
push edx
push 0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0xf0]
push ecx
push 2
push 1
push 1
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
cmp eax, 1
je 0x411ca4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5b8
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea eax, [ebp - 4]
push eax
push 1
mov ecx, dword [ebp - 0x134]
push ecx
mov edx, dword [ebp - 0x138]
push edx
push 1
mov eax, dword [0x451e44]
push eax
call dword [sym.imp.CRYPT32.dll_CertAddEncodedCertificateToStore]
cmp eax, 1
je 0x411ce6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5bb
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov dword [ebp - 0x130], 0
xor ecx, ecx
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x130], 0x438518
mov dword [ebp - 0x128], 1
lea edx, [ebp - 0x130]
push edx
push 0
push 2
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
cmp eax, 1
je 0x411d5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5c1
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push str.ContinentTLS_proxy_CA
push 0x80007
push 0
push 1
mov edx, dword [0x451e44]
push edx
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x78]
push ecx
push 0
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
cmp eax, 1
je 0x411de5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5cc
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx + 0x30]
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0xd8], edx
mov dword [ebp - 0xd4], eax
push 0x438570
push 0x20000
push 0
push 0
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov dword [ebp - 0x74], eax
xor ecx, ecx
cmp dword [ebp - 0x74], 0
setne cl
cmp ecx, 1
je 0x411e3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5d2
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
push 0
mov edx, dword [ebp + 8]
push edx
push 0x70007
push 0
push 1
mov eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [ebp - 0xf4], eax
cmp dword [ebp - 0xf4], 0
je 0x411e73
mov dword [ebp - 0x1f8], str.Found
jmp 0x411e7d
mov dword [ebp - 0x1f8], str.Create
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x1f8]
push edx
push str._s_cert___s__n
call fcn.0040e130
add esp, 0xc
cmp dword [ebp - 0xf4], 0
jne 0x412298
mov dword [ebp - 0x1e8], str.2.5.4.3
mov dword [ebp - 0x1e4], 4
mov eax, dword [ebp + 8]
push eax
call fcn.0042ad30
add esp, 4
mov dword [ebp - 0x1e0], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1dc], ecx
mov dword [ebp - 0x1f0], 1
lea edx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], edx
mov dword [ebp - 0x1d4], 1
lea eax, [ebp - 0x1f0]
mov dword [ebp - 0x1d0], eax
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0x1d4]
push edx
push 7
call fcn.004116e0
add esp, 0xc
mov dword [ebp - 0x1d8], eax
xor eax, eax
cmp dword [ebp - 0x1d8], 0
setne al
cmp eax, 1
je 0x411f44
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5de
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
push 0
push 1
push 0
push 0x4385a0
lea ecx, [ebp - 0x1c8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x411f98
push 8
push 1
push 0
push 0x4385b4
lea edx, [ebp - 0x1c8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp eax, 1
je 0x411f98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5e2
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea eax, [ebp - 0x14]
push eax
push 0x4000001
push 1
mov ecx, dword [ebp - 0x1c8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
cmp eax, 1
je 0x411fd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5e4
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea edx, [ebp - 0x38]
push edx
push 0
push 1
push 1
mov eax, dword [ebp - 0x1c8]
push eax
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
cmp eax, 1
je 0x412007
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5e7
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov ecx, dword [ebp - 0x38]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
xor edx, edx
cmp dword [ebp - 0x10], 0
setne dl
cmp edx, 1
je 0x41203f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5e9
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 1
push 1
mov edx, dword [ebp - 0x1c8]
push edx
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
cmp eax, 1
je 0x412078
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5eb
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0x1d8]
mov dword [ebp - 0xbc], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov dword [ebp - 0xb8], eax
mov ecx, dword [edx + 4]
mov dword [ebp - 0xb4], ecx
mov eax, dword [edx + 8]
mov dword [ebp - 0xb0], eax
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0xac], ecx
mov eax, dword [edx + 0x10]
mov dword [ebp - 0xa8], eax
mov ecx, dword [edx + 0x14]
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0x88], 2
lea edx, [ebp - 0xc]
push edx
push 0
push 0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0xf0]
push ecx
push 2
push 1
push 1
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
cmp eax, 1
je 0x412112
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5f4
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov eax, dword [ebp - 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1cc], eax
xor ecx, ecx
cmp dword [ebp - 0x1cc], 0
setne cl
cmp ecx, 1
je 0x412150
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5f6
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x1cc]
push eax
push 0
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0xf0]
push edx
push 2
push 1
push 1
mov eax, dword [ebp - 0x78]
push eax
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
cmp eax, 1
je 0x412198
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5f9
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
lea ecx, [ebp - 0xf4]
push ecx
push 1
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x1cc]
push eax
push 1
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.CRYPT32.dll_CertAddEncodedCertificateToStore]
cmp eax, 1
je 0x4121d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5fc
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov dword [ebp - 0x1c4], 0
xor edx, edx
mov dword [ebp - 0x1c0], edx
mov dword [ebp - 0x1bc], edx
mov dword [ebp - 0x1b8], edx
mov dword [ebp - 0x1b4], edx
mov dword [ebp - 0x1b0], edx
mov dword [ebp - 0x1ac], edx
mov dword [ebp - 0x1c4], str.ContinentTLS_proxy
mov dword [ebp - 0x1bc], 0xc
lea eax, [ebp - 0x1c4]
push eax
push 0
push 2
mov ecx, dword [ebp - 0xf4]
push ecx
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
cmp eax, 1
je 0x412251
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x602
call fcn.0040e300
add esp, 8
xor eax, eax
jmp 0x4122c0
mov edx, dword [ebp - 0x1cc]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x1d8]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
mov ecx, dword [ebp - 0x1c8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, dword [ebp - 0xf4]
pop edi
pop esi
mov ecx, dword [ebp - 0x58]
xor ecx, ebp
call fcn.0042a637
mov esp, ebp
pop ebp
ret