Function at 0x402d67
Capabilities:
Create new key via cryptacquirecontext
Print debug messages

Disassembly:
push 0x19c
push 0x4f6a78
call fcn.004bff10
xor ebx, ebx
mov byte [ebp - 0x12d], bl
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x138], ebx
mov edi, ebx
mov dword [ebp - 0x14c], edi
mov esi, ebx
mov dword [ebp - 0x148], esi
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x158], ebx
mov dword [ebp - 4], ebx
call fcn.00402cb0
test al, al
jne 0x4030a4
push 0x20
push 1
push ebx
push str.64Signer.4
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402e20
push 0x28
push 1
push ebx
push str.64Signer.4
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402e20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_create_key_container:_x_n
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4030ab
lea eax, [ebp - 0x144]
push eax
push 0x4000000
push 2
push dword [ebp - 0x134]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x402e4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_create_key_pair:_x_n
jmp 0x402dfe
mov dword [ebp - 0x13c], ebx
push ebx
lea eax, [ebp - 0x13c]
push eax
push ebx
push ebx
push 3
push str.CN64Signer.4
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
test eax, eax
je 0x4030ab
push dword [ebp - 0x13c]
call fcn.004a50ec
pop ecx
mov edi, eax
mov dword [ebp - 0x14c], edi
test edi, edi
je 0x4030ab
push ebx
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
push 3
push str.CN64Signer.4
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
test eax, eax
je 0x4030ab
push 8
push ebx
lea eax, [ebp - 0x154]
push eax
call fcn.004a4f60
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x150], edi
push 0x1c
push ebx
lea eax, [ebp - 0x184]
push eax
call fcn.004a4f60
mov dword [ebp - 0x184], str.64Signer.4
mov dword [ebp - 0x180], ebx
mov dword [ebp - 0x17c], 1
mov dword [ebp - 0x178], 0x20
mov dword [ebp - 0x174], ebx
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0x16c], 2
push 0xc
push ebx
lea eax, [ebp - 0x194]
push eax
call fcn.004a4f60
add esp, 0x24
mov dword [ebp - 0x194], str.1.2.840.113549.1.1.4
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [ebp - 0x12c]
add eax, 0x23
mov word [ebp - 0x12c], ax
push 8
push ebx
lea eax, [ebp - 0x160]
push eax
call fcn.004a4f60
push 0x10
push ebx
lea eax, [ebp - 0x1ac]
push eax
call fcn.004a4f60
add esp, 0x18
mov dword [ebp - 0x160], 1
lea eax, [ebp - 0x1ac]
mov dword [ebp - 0x15c], eax
mov dword [ebp - 0x1ac], str.1.3.6.1.5.5.7.3.3
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x12c]
push eax
push ebx
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x184]
push eax
push ebx
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x134]
call dword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
mov dword [ebp - 0x138], eax
test eax, eax
jne 0x402fe0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_create_self_sign_cert:_x_n
jmp 0x402dfe
mov dword [ebp - 0x19c], str.1.3.6.1.5.5.7.3.3
mov dword [ebp - 0x168], 1
lea ecx, [ebp - 0x19c]
mov dword [ebp - 0x164], ecx
lea ecx, [ebp - 0x168]
push ecx
push eax
call dword [sym.imp.CRYPT32.dll_CertSetEnhancedKeyUsage]
test eax, eax
je 0x4030ab
push str.Root
push 0x20000
push ebx
push ebx
push 0xa
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov esi, eax
mov dword [ebp - 0x148], esi
test esi, esi
jne 0x403047
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_open_system_store:_x_n
jmp 0x402dfe
push ebx
push 3
push dword [ebp - 0x138]
push esi
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
jne 0x40306c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_add_cert_to_store:_x_n
jmp 0x402dfe
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x140]
push eax
push ebx
push ebx
push dword [ebp - 0x138]
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
test eax, eax
jne 0x4030a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Cert:_failed_to_acquire_private_key:_x_n
jmp 0x402dfe
mov byte [ebp - 0x12d], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.004030d1
mov al, byte [ebp - 0x12d]
call fcn.004bff58
ret