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

Disassembly:
sub esp, 0x2c4
mov eax, dword [0x6d1d44]
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 0x40f9b8
mov edi, 0xff
push edi
push esi
call fcn.005f01d0
pop ecx
pop ecx
cmp eax, 0x40
ja 0x40f9b8
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.00602040
add esp, 0x24
test eax, eax
jne 0x40f9b8
push ebx
push ebx
push 0x1c
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call fcn.005f0a50
pop ecx
push 0xc
pop edx
mov ecx, eax
call fcn.00484c1e
pop ecx
pop ecx
mov ebx, eax
mov edi, 0x6ba614
xor ecx, ecx
cmp dword [edi], 0
je 0x40f991
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 0x40f971
cmp dword [ebx], ecx
jne 0x40f9d3
push str.Could_not_find_suitable_CngProvider
call fcn.0048cb75
pop ecx
cmp dword [esp + 0x14], 0
je 0x40f9b1
push dword [esp + 0x14]
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
mov ecx, ebx
call fcn.0040f87d
xor eax, eax
mov ecx, dword [esp + 0x2cc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b8900
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 0x40f9a0
push dword [esp + 0x20]
call fcn.005f0a50
mov dword [esp + 0x34], eax
pop ecx
test eax, eax
je 0x40fe55
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
push 0
push 3
push esi
push 1
call edi
test eax, eax
je 0x40f9a0
mov eax, dword [esp + 0x20]
xor edi, edi
push 0x6b9eb8
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 0x40fa53
push str.Failed_to_open_Windows_Cert_Store
jmp 0x40f99a
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 0x40fae7
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 0x40faa0
xor edi, edi
push str.CryptAcquireCertificatePrivateKey___Failed
inc edi
call fcn.0048cb75
pop ecx
jmp 0x40faa4
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x40fabf
xor edi, edi
push str.hKeyNodeSpec___CERT_NCRYPT_KEY_SPEC
inc edi
call fcn.0048cb75
pop ecx
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x28], 0
je 0x40faeb
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40faeb
cmp ecx, 0xffffffff
jne 0x40fadc
push eax
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
jmp 0x40faeb
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40faeb
mov edi, dword [esp + 0x2c]
cmp dword [esi], 0
je 0x40fb19
test edi, edi
je 0x40fe3a
cmp dword [esi], 0
je 0x40fb19
push dword [esi]
call dword [sym.imp.CRYPT32.dll_CertDeleteCertificateFromStore]
test eax, eax
jne 0x40fb13
push str.CertDeleteCertificateFromStore___Failed
jmp 0x40f99a
xor edi, edi
mov dword [esi], edi
jmp 0x40fb1b
xor edi, edi
push 0x80
push edi
lea eax, [esp + 0xd0]
push eax
push 0x6b9f60
lea eax, [esp + 0x24]
push eax
push dword [ebx]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
jns 0x40fb6c
push edi
push edi
push 0x1000
mov esi, 0x750940
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.0048cb75
pop ecx
jmp 0x40f99f
mov esi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x1c]
mov edi, 0x80000040
push edi
push 4
push eax
push 0x6b9f8c
push dword [esp + 0x24]
call esi
test eax, eax
jns 0x40fbb8
push edi
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x800
push eax
push 0x6b9f9c
push dword [esp + 0x24]
call esi
test eax, eax
jns 0x40fbb8
push dword [esp + 0x1c]
push str.NCryptSetProperty__u__failed
jmp 0x40fb61
push 0x40
push dword [esp + 0x18]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
jns 0x40fbd2
push str.NCryptFinalizeKey___failed
jmp 0x40f99a
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 0x40fe3a
push dword [esp + 0x10]
call fcn.005f0a50
mov esi, eax
pop ecx
test esi, esi
jne 0x40fc90
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6b9fe8
push eax
push esi
xor ecx, ecx
lea edi, [esi + 0x1e]
push edi
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba004
push 0x6ba020
jmp 0x40fe80
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x4c]
push eax
push 0xe
push 1
call edi
test eax, eax
je 0x40fe3a
mov eax, dword [esp + 0x10]
lea edi, [esp + 0x9c]
mov dword [esp + 0x58], eax
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x50], 0x6ba044
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 0x40fe3a
push dword [esp + 0x10]
call fcn.005f0a50
mov esi, eax
pop ecx
test esi, esi
jne 0x40fd48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6ba050
push eax
push esi
xor ecx, ecx
lea edi, [esi + 0x30]
push edi
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba06c
push 0x6ba088
jmp 0x40fe80
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0xa4]
push eax
push 0xf
push 1
call edi
test eax, eax
je 0x40fe3a
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], 0x6ba0b8
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 0x40fe15
push str.CertCreateSelfSignCertificate___failed
jmp 0x40f99a
push esi
push 3
push eax
push dword [ebx + 4]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x40fe4b
cmp dword [esi], edi
je 0x40fe4b
test ebp, ebp
je 0x40fe3a
mov edx, ebp
mov ecx, 0x6ba124
call fcn.0040f810
push dword [esp + 0x30]
call fcn.005f0a30
pop ecx
mov eax, ebx
jmp 0x40f9ba
push str.CertAddCertificateContextToStore___failed
jmp 0x40f99a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfe
mov edx, 0x6b9e5c
push eax
push esi
xor ecx, ecx
lea edi, [esi - 0x35]
push edi
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6b9e78
push 0x6b9e94
call fcn.00401109
add esp, 0xc
push esi
call fcn.005c8390
int3