Function at 0x40be20
Capabilities:
Terminate process

Disassembly:
sub esp, 0xbc
mov eax, dword [0x6009e4]
xor eax, esp
mov dword [esp + 0xb4], eax
mov eax, dword [0x62349c]
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 0x40be79
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [0x62349c], edi
mov eax, dword [0x6234a0]
mov ebp, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
test eax, eax
je 0x40be91
push eax
call ebp
mov dword [0x6234a0], edi
mov eax, dword [0x6234a4]
test eax, eax
je 0x40bea9
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov dword [0x6234a4], edi
mov ebx, dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
mov esi, 0x5ecc84
mov eax, dword [esi]
test eax, eax
je 0x40bed8
push 0
mov edi, eax
push edi
push 0x6234a0
call ebx
xor eax, eax
cmp dword [0x6234a0], eax
cmove edi, eax
add esi, 4
test edi, edi
je 0x40beb4
cmp dword [0x6234a0], 0
mov ebx, 1
je 0x40c30f
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 0x40c30f
push dword [esp + 0x24]
call fcn.0058d200
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40c381
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 0x40c309
mov eax, dword [esp + 0x24]
push 0x5ec67c
push 0x14000
push dword [0x6234a0]
mov dword [esp + 0x48], eax
push 0x10001
push 0xa
mov dword [esp + 0x54], ebp
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov dword [0x6234a4], eax
test eax, eax
je 0x40c309
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 [0x62349c], eax
test eax, eax
je 0x40c024
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 0x40bffa
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40bffa
cmp edx, 0xffffffff
jne 0x40bfed
push eax
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
jmp 0x40bff6
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [esp + 0x20]
mov eax, dword [0x62349c]
test eax, eax
je 0x40c024
test ecx, ecx
je 0x40c2f7
push eax
call dword [sym.imp.CRYPT32.dll_CertDeleteCertificateFromStore]
test eax, eax
je 0x40c309
mov dword [0x62349c], 0
push 0x80
push 0
push str.MeshAgentContainer
push 0x5ec684
lea eax, [esp + 0x2c]
push eax
push dword [0x6234a0]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
js 0x40c309
mov esi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x28]
push 0x80000040
push 4
push eax
push 0x5ec68c
push dword [esp + 0x2c]
call esi
test eax, eax
jns 0x40c096
push 0x80000040
push 4
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x800
push eax
push 0x5ec69c
push dword [esp + 0x2c]
call esi
test eax, eax
js 0x40c309
push 0x40
push dword [esp + 0x20]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
js 0x40c309
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 0x40c2f7
push dword [esp + 0x14]
call fcn.0058d200
mov esi, eax
add esp, 4
test esi, esi
je 0x40c3c2
lea eax, [esp + 0x14]
push eax
push esi
lea eax, [esp + 0x4c]
push eax
push 0xe
push 1
call ebx
test eax, eax
je 0x40c2f7
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], 0x5ec708
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 0x40c2f7
push dword [esp + 0x14]
call fcn.0058d200
mov esi, eax
add esp, 4
test esi, esi
je 0x40c403
lea eax, [esp + 0x14]
push eax
push esi
lea eax, [esp + 0xa0]
push eax
push 0xf
push 1
call ebx
test eax, eax
je 0x40c2f7
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], 0x5ec77c
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 [0x62349c], eax
test eax, eax
je 0x40c304
push 0x62349c
push 3
push eax
push dword [0x6234a4]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x40c304
cmp dword [0x62349c], 0
je 0x40c304
test edi, edi
je 0x40c2f7
mov edx, edi
mov ecx, 0x5ec794
call fcn.0040bdb0
push ebp
call fcn.0058bf82
add esp, 4
xor eax, eax
jmp 0x40c368
mov ebx, 1
mov ebp, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c31a
push eax
call ebp
mov eax, dword [0x62349c]
test eax, eax
je 0x40c334
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [0x62349c], 0
mov eax, dword [0x6234a0]
test eax, eax
je 0x40c34a
push eax
call ebp
mov dword [0x6234a0], 0
mov eax, dword [0x6234a4]
test eax, eax
je 0x40c366
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov dword [0x6234a4], 0
mov eax, ebx
mov ecx, dword [esp + 0xc4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00584a28
add esp, 0xbc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0xb7
mov edx, 0x5ec620
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0xb7
push 0x5ec63c
push 0x5ec658
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0xf1
mov edx, 0x5ec6ac
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0xf1
push 0x5ec6c8
push 0x5ec6e4
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfe
push 0x103
mov edx, 0x5ec714
xor ecx, ecx
call fcn.004b47e0
add esp, 0xc
push 0x103
push 0x5ec730
push 0x5ec74c
call fcn.004010e0
add esp, 0xc
push 0xfe
call fcn.00587d2d
int3