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

Disassembly:
sub esp, 0x15c
mov eax, dword [0x6d1d44]
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 0x410963
cmp dword [ecx + 4], edi
je 0x410963
cmp dword [ecx + 8], edi
je 0x410963
push 8
pop ecx
mov dword [edx], edi
lea edi, [esp + 0x9c]
push ebx
rep stosd dword es:[edi], eax
push 0x6ba268
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
test eax, eax
js 0x4108d6
push 0x80
push 1
push 0x6ba254
push 0x6ba2b8
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x38]
call dword [sym.imp.ncrypt.dll_NCryptCreatePersistedKey]
test eax, eax
js 0x4108d6
mov edi, dword [sym.imp.ncrypt.dll_NCryptSetProperty]
lea eax, [esp + 0x30]
push 0x80000040
push 4
push eax
push 0x6ba2c0
push dword [esp + 0x28]
call edi
test eax, eax
jns 0x410277
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 0x4108d6
push 0x80000040
push 4
lea eax, [esp + 0x7c]
push eax
push str.Export_Policy
push dword [esp + 0x28]
call edi
test eax, eax
js 0x4108d6
push 0x40
push dword [esp + 0x1c]
call dword [sym.imp.ncrypt.dll_NCryptFinalizeKey]
test eax, eax
js 0x4108d6
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 0x4108d6
push dword [esp + 0x10]
call fcn.005f0a50
mov edi, eax
mov dword [esp + 0x60], edi
pop ecx
test edi, edi
je 0x410980
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 0x4108d6
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 0x4108d6
push dword [esp + 0x34]
call fcn.005f0a50
mov dword [esp + 0x44], eax
pop ecx
test eax, eax
jne 0x41035f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x25f
push esi
push edi
mov edx, 0x6ba358
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba374
push 0x6ba390
jmp 0x4109ad
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 0x4108d6
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 0x4108d6
push dword [esp + 0x38]
call fcn.005f0a50
mov dword [esp + 0x48], eax
pop ecx
test eax, eax
jne 0x4103eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x266
push esi
push edi
mov edx, 0x6ba3b4
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba3d0
push 0x6ba3ec
jmp 0x4109ad
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 0x4108d6
mov eax, dword [esp + 0x38]
push 0x70
mov dword [esp + 0x30], eax
lea eax, [esp + 0xdc]
push 0
push eax
call fcn.005bb370
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 0x6ba138
push eax
mov dword [esp + 0x2c], esi
call dword [sym.imp.ncrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x4104a7
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 0x4104b8
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], 0x6d79f4
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 0x4108d4
push dword [esp + 0x10]
call fcn.005f0a50
mov ebp, eax
pop ecx
test ebp, ebp
jne 0x4105f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2a0
push esi
push edi
mov edx, 0x6ba428
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba444
push 0x6ba460
jmp 0x4109ad
lea eax, [esp + 0x10]
push eax
push ebp
lea eax, [esp + 0x88]
push eax
push 0xe
push 1
call edi
test eax, eax
je 0x4108d4
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 0x4108d4
push dword [esp + 0x10]
call fcn.005f0a50
mov esi, eax
pop ecx
test esi, esi
jne 0x410692
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2a9
push esi
push edi
mov edx, 0x6ba490
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba4ac
push 0x6ba4c8
jmp 0x4109ad
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [esp + 0x80]
push eax
push 0x24
push 1
call edi
test eax, eax
je 0x4108d6
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 0x4108d6
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 0x4108d6
push dword [esp + 0x20]
call fcn.005f0a50
mov edi, eax
pop ecx
test edi, edi
jne 0x410788
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2b7
push esi
push edi
mov edx, 0x6ba4f8
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba514
push 0x6ba530
jmp 0x4109ad
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 0x4108d6
push 0
push 0x2000
push 0
push 1
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov ebx, eax
test ebx, ebx
je 0x4108d6
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 0x4108d6
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 0x4108d6
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 0x4108d6
push dword [esp + 0x48]
call fcn.005f0a50
mov dword [esp + 0x50], eax
pop ecx
test eax, eax
jne 0x4108ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, 0xfe
mov edi, 0x2d2
push esi
push edi
mov edx, 0x6ba5b8
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push str...meshcorewincrypto.cpp
push 0x6ba5f0
jmp 0x4109ad
push 4
push dword [esp + 0x54]
lea eax, [esp + 0x50]
push eax
push ebx
call edi
test eax, eax
je 0x4108d6
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 0x4108d6
mov esi, ebx
cmp dword [esp + 0x24], 0
mov edi, dword [sym.imp.ncrypt.dll_NCryptFreeObject]
je 0x4108e9
push dword [esp + 0x24]
call edi
cmp dword [esp + 0x54], 0
je 0x41090d
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41090d
cmp dword [esp + 0x58], 0xffffffff
jne 0x410904
push eax
call edi
jmp 0x41090d
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x41091c
push eax
call fcn.005f0a30
pop ecx
mov eax, dword [esp + 0x40]
test eax, eax
je 0x41092b
push eax
call fcn.005f0a30
pop ecx
mov eax, dword [esp + 0x44]
test eax, eax
je 0x41093a
push eax
call fcn.005f0a30
pop ecx
test ebx, ebx
je 0x410947
push 0
push ebx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
test esi, esi
je 0x410952
push esi
call fcn.005f0a30
pop ecx
test ebp, ebp
je 0x41095d
push ebp
call fcn.005f0a30
pop ecx
mov eax, dword [esp + 0x60]
jmp 0x410965
xor eax, eax
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b8900
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, 0x6ba2fc
xor ecx, ecx
call fcn.0048cac3
add esp, 0xc
push edi
push 0x6ba318
push 0x6ba334
call fcn.00401109
add esp, 0xc
push esi
call fcn.005c8390
int3