Function at 0x40f9bd
Capabilities:
Generate random numbers via winapi
Terminate process

Disassembly:
sub esp, 0x15c
mov eax, dword [0x6ccd44]
xor eax, esp
mov dword [esp + 0x154], eax
mov eax, dword [esp + 0x160]
or dword [esp + 0x10], 0xffffffff
push ebx
push ebp
push esi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x174]
push edi
xor edi, edi
mov dword [esp + 0x50], eax
mov eax, edi
mov dword [esp + 0x1c], edx
mov esi, edi
mov edx, dword [esp + 0x17c]
mov ebp, edi
mov dword [esp + 0x6c], ecx
mov ebx, edi
mov dword [esp + 0x70], edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], 0xc00
mov dword [esp + 0x74], 1
mov dword [esp + 0x60], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x64], edi
cmp dword [ecx], edi
je 0x4101d4
cmp dword [ecx + 4], edi
je 0x4101d4
cmp dword [ecx + 8], edi
je 0x4101d4
push 8
pop ecx
mov dword [edx], edi
lea edi, [esp + 0x9c]
push ebx
rep stosd dword es:[edi], eax
push 0x6b5218
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
test eax, eax
js 0x410147
push 0x80
push 1
push 0x6b5204
push 0x6b5268
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x38]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
js 0x410147
mov edi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x30]
push 0x80000040
push 4
push eax
push 0x6b5270
push dword [esp + 0x28]
call edi
test eax, eax
jns 0x40fafa
push 0x80000040
push 4
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0x800
push eax
push str.Length
push dword [esp + 0x28]
call edi
test eax, eax
js 0x410147
push 0x80000040
push 4
lea eax, [esp + 0x7c]
push eax
push str.Export_Policy
push dword [esp + 0x28]
call edi
test eax, eax
js 0x410147
push 0x40
push dword [esp + 0x1c]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
js 0x410147
lea eax, [esp + 0x10]
push eax
push 0
push 1
push 1
push dword [esp + 0x28]
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
test eax, eax
je 0x410147
push dword [esp + 0x10]
call fcn.005eae30
mov edi, eax
mov dword [esp + 0x60], edi
pop ecx
test edi, edi
je 0x4101f1
lea eax, [esp + 0x10]
push eax
push edi
push 1
push 1
push dword [esp + 0x28]
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
test eax, eax
je 0x410147
xor ecx, ecx
lea eax, [esp + 0x34]
push ecx
push eax
push ecx
push ecx
push 3
push dword [esp + 0x30]
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameA]
test eax, eax
je 0x410147
push dword [esp + 0x34]
call fcn.005eae30
mov dword [esp + 0x44], eax
pop ecx
test eax, eax
jne 0x40fbdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x25f
push esi
push edi
mov edx, 0x6b5308
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b5324
push 0x6b5340
jmp 0x41021b
push 0
lea ecx, [esp + 0x38]
push ecx
push eax
push 0
push 3
push dword [esp + 0x30]
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameA]
test eax, eax
je 0x410147
mov eax, dword [esp + 0x34]
xor ecx, ecx
push ecx
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x3c]
push eax
push ecx
push ecx
push 3
push dword [esp + 0x40]
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
test eax, eax
je 0x410147
push dword [esp + 0x38]
call fcn.005eae30
mov dword [esp + 0x48], eax
pop ecx
test eax, eax
jne 0x40fc68
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x266
push esi
push edi
mov edx, 0x6b5364
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b5380
push 0x6b539c
jmp 0x41021b
push 0
lea ecx, [esp + 0x3c]
push ecx
push eax
push 0
push 3
push dword [esp + 0x40]
push 1
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
test eax, eax
je 0x410147
mov eax, dword [esp + 0x38]
push 0x70
mov dword [esp + 0x30], eax
lea eax, [esp + 0xdc]
push 0
push eax
call fcn.005b5fd0
add esp, 0xc
lea eax, [esp + 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, 0xffff
add word [esp + 0x14c], ax
lea eax, [esp + 0x8c]
push eax
lea eax, [esp + 0x150]
push eax
call esi
add word [esp + 0x14c], 0x1e
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x150]
push eax
call esi
xor esi, esi
lea eax, [esp + 0x1c]
push esi
push esi
push 0x6b50e8
push eax
mov dword [esp + 0x2c], esi
call dword [sym.imp.ncrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x40fd24
push 1
push 8
lea eax, [esp + 0x164]
push eax
push dword [esp + 0x28]
call dword [sym.imp.ncrypt.dll_BCryptGenRandom]
cmp dword [esp + 0x1c], ebx
je 0x40fd35
push esi
push dword [esp + 0x20]
call dword [sym.imp.ncrypt.dll_BCryptCloseAlgorithmProvider]
lea eax, [esp + 0x15c]
mov dword [esp + 0xd8], 2
mov dword [esp + 0xe0], eax
mov esi, edi
mov eax, dword [esp + 0x68]
lea edi, [esp + 0x110]
mov dword [esp + 0xf0], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xf8], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0xfc], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x100], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x44]
push 6
mov dword [esp + 0x110], eax
xor eax, eax
pop ecx
mov dword [esp + 0xdc], 8
mov dword [esp + 0xe4], str.1.2.840.113549.1.1.12
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x80]
mov dword [esp + 0x78], 4
stosd dword es:[edi], eax
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x7c], 0x6d2618
inc ecx
mov byte [esp + 0x17], 0xa8
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x17]
mov edi, dword [sym.imp.CRYPT32.dll_CryptEncodeObject]
mov dword [esp + 0x84], eax
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x88]
mov dword [esp + 0x88], ecx
push eax
push 0xe
push ecx
call edi
test eax, eax
je 0x410145
push dword [esp + 0x10]
call fcn.005eae30
mov ebp, eax
pop ecx
test ebp, ebp
jne 0x40fe6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2a0
push esi
push edi
mov edx, 0x6b53d8
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b53f4
push 0x6b5410
jmp 0x41021b
lea eax, [esp + 0x10]
push eax
push ebp
lea eax, [esp + 0x88]
push eax
push 0xe
push 1
call edi
test eax, eax
je 0x410145
mov eax, dword [esp + 0x10]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x80]
mov dword [esp + 0xa4], str.2.5.29.15
push eax
push 0x24
push 1
mov dword [esp + 0xb4], esi
mov dword [esp + 0xbc], ebp
call edi
test eax, eax
je 0x410145
push dword [esp + 0x10]
call fcn.005eae30
mov esi, eax
pop ecx
test esi, esi
jne 0x40ff09
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2a9
push esi
push edi
mov edx, 0x6b5440
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b545c
push 0x6b5478
jmp 0x41021b
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x80]
push eax
push 0x24
push 1
call edi
test eax, eax
je 0x410147
mov eax, dword [esp + 0x10]
xor edi, edi
mov dword [esp + 0xb4], eax
lea eax, [esp + 0x9c]
mov dword [esp + 0x144], eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x5c]
mov dword [esp + 0xb0], str.2.5.29.37
push eax
lea eax, [esp + 0x30]
mov dword [esp + 0xb8], edi
push eax
mov eax, dword [esp + 0x78]
push edi
push 0x10040
mov dword [esp + 0xcc], esi
push dword [eax + 8]
mov dword [esp + 0x158], 2
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
test eax, eax
je 0x410147
lea eax, [esp + 0x20]
push eax
push edi
push edi
lea eax, [esp + 0xf0]
push eax
lea eax, [esp + 0xe8]
push eax
push 2
push 1
push 1
push dword [esp + 0x48]
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x410147
push dword [esp + 0x20]
call fcn.005eae30
mov edi, eax
pop ecx
test edi, edi
jne 0x40fffc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2b7
push esi
push edi
mov edx, 0x6b54a8
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b54c4
push 0x6b54e0
jmp 0x41021b
lea eax, [esp + 0x20]
push eax
push edi
push 0
lea eax, [esp + 0xf0]
push eax
lea eax, [esp + 0xe8]
push eax
push 2
push 1
push 1
push dword [esp + 0x48]
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x410147
push 0
push 0x2000
push 0
push 1
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov ebx, eax
test ebx, ebx
je 0x410147
lea eax, [esp + 0x64]
push eax
push 1
push dword [esp + 0x28]
push edi
push 1
push ebx
call dword [sym.imp.CRYPT32.dll_CertAddEncodedCertificateToStore]
test eax, eax
je 0x410147
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0xbc]
rep stosd dword es:[edi], eax
xor edi, edi
mov dword [esp + 0xbc], str.MeshDummy
lea eax, [esp + 0xbc]
mov dword [esp + 0xc0], str.Microsoft_Software_Key_Storage_Provider
push eax
push edi
push 2
push dword [esp + 0x70]
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd8], edi
mov dword [esp + 0xe4], edi
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x410147
push 4
push dword [esp + 0x54]
lea eax, [esp + 0x50]
mov dword [esp + 0x50], edi
push eax
mov dword [esp + 0x58], edi
mov edi, dword [sym.imp.CRYPT32.dll_PFXExportCertStore]
push ebx
call edi
test eax, eax
je 0x410147
push dword [esp + 0x48]
call fcn.005eae30
mov dword [esp + 0x50], eax
pop ecx
test eax, eax
jne 0x41011f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2d2
push esi
push edi
mov edx, 0x6b5568
xor ecx, ecx
call fcn.00488a50
push edi
push str...meshcorewincrypto.cpp
push 0x6b55a0
jmp 0x41021b
push 4
push dword [esp + 0x54]
lea eax, [esp + 0x50]
push eax
push ebx
call edi
test eax, eax
je 0x410147
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x4c]
mov dword [ecx], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x60], eax
jmp 0x410147
mov esi, ebx
cmp dword [esp + 0x24], 0
mov edi, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
je 0x41015a
push dword [esp + 0x24]
call edi
cmp dword [esp + 0x54], 0
je 0x41017e
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41017e
cmp dword [esp + 0x58], 0xffffffff
jne 0x410175
push eax
call edi
jmp 0x41017e
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x41018d
push eax
call fcn.005eae10
pop ecx
mov eax, dword [esp + 0x40]
test eax, eax
je 0x41019c
push eax
call fcn.005eae10
pop ecx
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4101ab
push eax
call fcn.005eae10
pop ecx
test ebx, ebx
je 0x4101b8
push 0
push ebx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
test esi, esi
je 0x4101c3
push esi
call fcn.005eae10
pop ecx
test ebp, ebp
je 0x4101ce
push ebp
call fcn.005eae10
pop ecx
mov eax, dword [esp + 0x60]
jmp 0x4101d6
xor eax, eax
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b35b0
add esp, 0x15c
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x25a
push esi
push edi
mov edx, 0x6b52ac
xor ecx, ecx
call fcn.00488a50
push edi
push 0x6b52c8
push 0x6b52e4
call fcn.00401109
add esp, 0x18
push esi
call fcn.005c3000
int3