Function at 0x40c670
Capabilities:
Terminate process

Disassembly:
sub esp, 0xbc
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0xb4], eax
mov eax, dword [0x62b11c]
xorps xmm0, xmm0
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], 0xc00
mov dword [esp + 0x1c], 0
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x14], edi
movq qword [esp + 0x34], xmm0
test eax, eax
je 0x40c6c9
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [0x62b11c], edi
mov eax, dword [0x62b120]
mov ebp, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
test eax, eax
je 0x40c6e1
push eax
call ebp
mov dword [0x62b120], edi
mov eax, dword [0x62b124]
test eax, eax
je 0x40c6f9
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov dword [0x62b124], edi
mov ebx, dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
mov esi, 0x5edc84
mov eax, dword [esi]
test eax, eax
je 0x40c728
push 0
mov edi, eax
push edi
push 0x62b120
call ebx
xor eax, eax
cmp dword [0x62b120], eax
cmove edi, eax
add esi, 4
test edi, edi
je 0x40c704
cmp dword [0x62b120], 0
mov ebx, 1
je 0x40cb5f
mov esi, dword [sym.imp.CRYPT32.dll_CertStrToNameA]
lea eax, [esp + 0x24]
push 0
push eax
push 0
push 0
push 3
push str.CNMeshNodeCertificate
push ebx
call esi
test eax, eax
je 0x40cb5f
push dword [esp + 0x24]
call fcn.0058db11
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40cbd1
push 0
lea eax, [esp + 0x28]
push eax
push ebp
push 0
push 3
push str.CNMeshNodeCertificate
push ebx
call esi
test eax, eax
je 0x40cb59
mov eax, dword [esp + 0x24]
push 0x5ed67c
push 0x14000
push dword [0x62b120]
mov dword [esp + 0x48], eax
push 0x10001
push 0xa
mov dword [esp + 0x54], ebp
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov dword [0x62b124], eax
test eax, eax
je 0x40cb59
push 0
lea ecx, [esp + 0x40]
push ecx
push 0x20007
push 0
push 0x10001
push eax
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [0x62b11c], eax
test eax, eax
je 0x40c874
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x24]
push ecx
push 0
push 0x10040
push eax
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
mov ecx, dword [esp + 0x20]
test eax, eax
mov edx, dword [esp + 0x2c]
cmove ecx, ebx
cmp edx, 0xffffffff
cmovne ecx, ebx
cmp dword [esp + 0x30], 0
mov dword [esp + 0x20], ecx
je 0x40c84a
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c84a
cmp edx, 0xffffffff
jne 0x40c83d
push eax
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
jmp 0x40c846
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [esp + 0x20]
mov eax, dword [0x62b11c]
test eax, eax
je 0x40c874
test ecx, ecx
je 0x40cb47
push eax
call dword [sym.imp.CRYPT32.dll_CertDeleteCertificateFromStore]
test eax, eax
je 0x40cb59
mov dword [0x62b11c], 0
push 0x80
push 0
push str.MeshAgentContainer
push 0x5ed684
lea eax, [esp + 0x2c]
push eax
push dword [0x62b120]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
js 0x40cb59
mov esi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x28]
push 0x80000040
push 4
push eax
push 0x5ed68c
push dword [esp + 0x2c]
call esi
test eax, eax
jns 0x40c8e6
push 0x80000040
push 4
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x800
push eax
push 0x5ed69c
push dword [esp + 0x2c]
call esi
test eax, eax
js 0x40cb59
push 0x40
push dword [esp + 0x20]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
js 0x40cb59
xorps xmm0, xmm0
mov dword [esp + 0x94], 0
movq qword [esp + 0x44], xmm0
lea eax, [esp + 0x1b]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], ebx
mov ebx, dword [sym.imp.CRYPT32.dll_CryptEncodeObject]
push eax
movups xmmword [esp + 0x88], xmm0
push 0xe
push 1
movq qword [esp + 0xa0], xmm0
mov dword [esp + 0x90], str.MeshAgentContainer
mov dword [esp + 0x94], edi
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa8], 0
movups xmmword [esp + 0x64], xmm0
mov byte [esp + 0x2f], 6
movups xmmword [esp + 0x74], xmm0
mov dword [esp + 0x60], 0
call ebx
test eax, eax
je 0x40cb47
push dword [esp + 0x14]
call fcn.0058db11
mov esi, eax
add esp, 4
test esi, esi
je 0x40cc12
lea eax, [esp + 0x14]
push eax
push esi
lea eax, [esp + 0x4c]
push eax
push 0xe
push 1
call ebx
test eax, eax
je 0x40cb47
mov eax, dword [esp + 0x14]
xorps xmm0, xmm0
mov dword [esp + 0x58], eax
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0xa0]
movq qword [esp + 0xa0], xmm0
push eax
push 0xf
mov dword [esp + 0xb0], 0
push 1
mov dword [esp + 0x64], 0x5ed708
mov dword [esp + 0x68], 0
mov dword [esp + 0x70], esi
mov dword [esp + 0xac], 1
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0
call ebx
test eax, eax
je 0x40cb47
push dword [esp + 0x14]
call fcn.0058db11
mov esi, eax
add esp, 4
test esi, esi
je 0x40cc53
lea eax, [esp + 0x14]
push eax
push esi
lea eax, [esp + 0xa0]
push eax
push 0xf
push 1
call ebx
test eax, eax
je 0x40cb47
mov eax, dword [esp + 0x14]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x38], eax
lea eax, [esp + 0xb4]
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 + 0x68], 0
mov dword [esp + 0x38], 2
call esi
lea eax, [esp + 0xa4]
push eax
call esi
add word [esp + 0xa4], 0x1e
mov eax, 0xffff
add word [esp + 0xb4], ax
xorps xmm0, xmm0
lea eax, [esp + 0x34]
movq qword [esp + 0x70], xmm0
push eax
lea eax, [esp + 0xa8]
mov dword [esp + 0x7c], 0
push eax
lea eax, [esp + 0xbc]
mov dword [esp + 0x78], 0x5ed77c
push eax
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x8c]
push eax
push 0
lea eax, [esp + 0x54]
push eax
push 0
call dword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
mov dword [0x62b11c], eax
test eax, eax
je 0x40cb54
push 0x62b11c
push 3
push eax
push dword [0x62b124]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x40cb54
cmp dword [0x62b11c], 0
je 0x40cb54
test edi, edi
je 0x40cb47
mov edx, edi
mov ecx, 0x5ed794
call fcn.0040c610
push ebp
call fcn.0058c812
add esp, 4
xor eax, eax
jmp 0x40cbb8
mov ebx, 1
mov ebp, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40cb6a
push eax
call ebp
mov eax, dword [0x62b11c]
test eax, eax
je 0x40cb84
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [0x62b11c], 0
mov eax, dword [0x62b120]
test eax, eax
je 0x40cb9a
push eax
call ebp
mov dword [0x62b120], 0
mov eax, dword [0x62b124]
test eax, eax
je 0x40cbb6
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov dword [0x62b124], 0
mov eax, ebx
mov ecx, dword [esp + 0xc4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005852a8
add esp, 0xbc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0xb7
mov edx, 0x5ed620
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xb7
push 0x5ed63c
push 0x5ed658
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0xf1
mov edx, 0x5ed6ac
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xf1
push 0x5ed6c8
push 0x5ed6e4
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x103
mov edx, 0x5ed714
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0x103
push 0x5ed730
push 0x5ed74c
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.005885bd
int3