Function at 0x40f144
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 0x2c4
mov eax, dword [0x6ccd44]
xor eax, esp
mov dword [esp + 0x2bc], eax
push ebx
push ebp
xor ebx, ebx
mov dword [esp + 0x24], ecx
push esi
mov esi, edx
mov dword [esp + 0x18], 0xc00
mov dword [esp + 0x10], ebx
mov ebp, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0xc], ebx
push edi
test esi, esi
je 0x40f247
mov edi, 0xff
push edi
push esi
call fcn.005ea5b0
pop ecx
pop ecx
cmp eax, 0x40
ja 0x40f247
push esi
push str._s_privatekey
lea eax, [esp + 0x1d0]
push edi
push eax
call fcn.0040117f
push 0x40
lea eax, [esp + 0x1dc]
push eax
push 0x7f
lea eax, [esp + 0xe4]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.005fc470
add esp, 0x24
test eax, eax
jne 0x40f247
push ebx
push ebx
push 0x1c
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call fcn.005eae30
pop ecx
push 0xc
pop edx
mov ecx, eax
call fcn.004811d1
pop ecx
pop ecx
mov ebx, eax
mov edi, 0x6b55c4
xor ecx, ecx
cmp dword [edi], 0
je 0x40f220
mov ebp, dword [edi]
push ecx
push ebp
push ebx
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
xor eax, eax
xor ecx, ecx
cmp dword [ebx], ecx
cmove ebp, eax
add edi, 4
test ebp, ebp
je 0x40f200
cmp dword [ebx], ecx
jne 0x40f262
push str.Could_not_find_suitable_CngProvider
call fcn.00488afe
pop ecx
cmp dword [esp + 0x14], 0
je 0x40f240
push dword [esp + 0x14]
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
mov ecx, ebx
call fcn.0040f10c
xor eax, eax
mov ecx, dword [esp + 0x2cc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b35b0
add esp, 0x2c4
ret
mov edi, dword [sym.imp.CRYPT32.dll_CertStrToNameA]
lea eax, [esp + 0x20]
push ecx
push eax
push ecx
push ecx
push 3
push esi
push 1
call edi
test eax, eax
je 0x40f22f
push dword [esp + 0x20]
call fcn.005eae30
mov dword [esp + 0x34], eax
pop ecx
test eax, eax
je 0x40f6de
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
push 0
push 3
push esi
push 1
call edi
test eax, eax
je 0x40f22f
mov eax, dword [esp + 0x20]
xor edi, edi
push 0x6b4e68
push 0x14000
push edi
mov esi, 0x10001
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x3c]
push esi
push 0xa
mov dword [esp + 0x54], eax
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov dword [ebx + 4], eax
test eax, eax
jne 0x40f2e2
push str.Failed_to_open_Windows_Cert_Store
jmp 0x40f229
push edi
lea ecx, [esp + 0x40]
push ecx
push 0x20007
push edi
push esi
push eax
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
lea esi, [ebx + 8]
mov dword [esi], eax
test eax, eax
je 0x40f376
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push edi
push 0x10040
push eax
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
test eax, eax
jne 0x40f32f
xor edi, edi
push str.CryptAcquireCertificatePrivateKey___Failed
inc edi
call fcn.00488afe
pop ecx
jmp 0x40f333
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x40f34e
xor edi, edi
push str.hKeyNodeSpec___CERT_NCRYPT_KEY_SPEC
inc edi
call fcn.00488afe
pop ecx
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x28], 0
je 0x40f37a
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40f37a
cmp ecx, 0xffffffff
jne 0x40f36b
push eax
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
jmp 0x40f37a
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40f37a
mov edi, dword [esp + 0x2c]
cmp dword [esi], 0
je 0x40f3a8
test edi, edi
je 0x40f6c3
cmp dword [esi], 0
je 0x40f3a8
push dword [esi]
call dword [sym.imp.CRYPT32.dll_CertDeleteCertificateFromStore]
test eax, eax
jne 0x40f3a2
push str.CertDeleteCertificateFromStore___Failed
jmp 0x40f229
xor edi, edi
mov dword [esi], edi
jmp 0x40f3aa
xor edi, edi
push 0x80
push edi
lea eax, [esp + 0xd0]
push eax
push 0x6b4f10
lea eax, [esp + 0x24]
push eax
push dword [ebx]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
jns 0x40f3fb
push edi
push edi
push 0x1000
mov esi, 0x72e000
push esi
push 0xffffffffffffffff
push ebp
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push str.NCryptCreatePersistedKey__s__failed
call fcn.00488afe
pop ecx
jmp 0x40f22e
mov esi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x1c]
mov edi, 0x80000040
push edi
push 4
push eax
push 0x6b4f3c
push dword [esp + 0x24]
call esi
test eax, eax
jns 0x40f447
push edi
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x800
push eax
push 0x6b4f4c
push dword [esp + 0x24]
call esi
test eax, eax
jns 0x40f447
push dword [esp + 0x1c]
push str.NCryptSetProperty__u__failed
jmp 0x40f3f0
push 0x40
push dword [esp + 0x18]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
jns 0x40f461
push str.NCryptFinalizeKey___failed
jmp 0x40f229
push 7
pop ecx
xor eax, eax
mov byte [esp + 0x1b], 6
push 8
lea edi, [esp + 0x84]
xor edx, edx
rep stosd dword es:[edi], eax
pop ecx
lea eax, [esp + 0xc8]
mov dword [esp + 0x84], ebp
mov dword [esp + 0x80], eax
lea edi, [esp + 0x50]
xor eax, eax
mov dword [esp + 0x88], edx
rep stosd dword es:[edi], eax
lea edi, [esp + 0x44]
mov dword [esp + 0x8c], edx
stosd dword es:[edi], eax
xor ecx, ecx
inc ecx
mov dword [esp + 0x98], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x1b]
mov edi, dword [sym.imp.CRYPT32.dll_CryptEncodeObject]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x10]
push eax
push edx
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], ecx
push eax
push 0xe
push ecx
call edi
test eax, eax
je 0x40f6c3
push dword [esp + 0x10]
call fcn.005eae30
mov esi, eax
pop ecx
test esi, esi
jne 0x40f51c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6b4f98
push eax
push esi
xor ecx, ecx
lea edi, [esi + 0x1e]
push edi
call fcn.00488a50
push edi
push 0x6b4fb4
push 0x6b4fd0
jmp 0x40f706
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x4c]
push eax
push 0xe
push 1
call edi
test eax, eax
je 0x40f6c3
mov eax, dword [esp + 0x10]
lea edi, [esp + 0x9c]
mov dword [esp + 0x58], eax
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x50], 0x6b4ff4
stosd dword es:[edi], eax
xor edx, edx
inc edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov edi, dword [sym.imp.CRYPT32.dll_CryptEncodeObject]
push eax
push ecx
lea eax, [esp + 0xa4]
mov dword [esp + 0xa4], edx
push eax
push 0xf
push edx
mov dword [esp + 0xb4], ecx
mov dword [esp + 0xb8], ecx
call edi
test eax, eax
je 0x40f6c3
push dword [esp + 0x10]
call fcn.005eae30
mov esi, eax
pop ecx
test esi, esi
jne 0x40f5d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6b5000
push eax
push esi
xor ecx, ecx
lea edi, [esi + 0x30]
push edi
call fcn.00488a50
push edi
push 0x6b501c
push 0x6b5038
jmp 0x40f706
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0xa4]
push eax
push 0xf
push 1
call edi
test eax, eax
je 0x40f6c3
mov eax, dword [esp + 0x10]
and dword [esp + 0x64], 0
mov dword [esp + 0x68], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x38], eax
lea eax, [esp + 0xb8]
mov dword [esp + 0x6c], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemTime]
push eax
mov dword [esp + 0x64], str.2.5.29.19
mov dword [esp + 0x38], 2
call esi
lea eax, [esp + 0xa8]
push eax
call esi
mov eax, 0xffff
add word [esp + 0xa8], 0x1e
add word [esp + 0xb8], ax
lea edi, [esp + 0x74]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0xac]
mov dword [esp + 0x78], 0x6b5068
push eax
lea eax, [esp + 0xc0]
xor edi, edi
push eax
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x90]
push eax
push edi
lea eax, [esp + 0x54]
push eax
push edi
call dword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
lea esi, [ebx + 8]
mov dword [esi], eax
test eax, eax
jne 0x40f69e
push str.CertCreateSelfSignCertificate___failed
jmp 0x40f229
push esi
push 3
push eax
push dword [ebx + 4]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x40f6d4
cmp dword [esi], edi
je 0x40f6d4
test ebp, ebp
je 0x40f6c3
mov edx, ebp
mov ecx, 0x6b50d4
call fcn.0040f09f
push dword [esp + 0x30]
call fcn.005eae10
pop ecx
mov eax, ebx
jmp 0x40f249
push str.CertAddCertificateContextToStore___failed
jmp 0x40f229
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6b4e0c
push eax
push esi
xor ecx, ecx
lea edi, [esi - 0x35]
push edi
call fcn.00488a50
push edi
push 0x6b4e28
push 0x6b4e44
call fcn.00401109
add esp, 0x18
push esi
call fcn.005c3000
int3