Function at 0x407500
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using curve25519
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x429004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x20], 0
jne 0x407538
mov dword [edi + 0x24], 0xd
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a12a
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x20
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0xf0000000
push 0x18
push 0
mov dword [edi + 0x28], eax
lea eax, [ebp - 8]
push 0
push eax
mov dword [ebp - 8], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x40759b
push 0xf0000008
push 0x18
push 0
push 0
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40759b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [edi + 0x24], eax
xor eax, eax
jmp 0x40760d
push 0x20
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xe4], eax
test eax, eax
jne 0x4075ca
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [edi + 0x24], eax
xor eax, eax
jmp 0x40760d
push eax
push 0x20
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [ebp - 8]
test eax, eax
jne 0x407601
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xe4]
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [edi + 0x24], eax
xor eax, eax
jmp 0x40760d
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xe4]
push 0x20
push 0
mov dword [edi + 0x2c], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x40
push 0
mov dword [edi + 0x30], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x40
push 0
mov dword [edi + 0x34], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp dword [edi + 0x28], 0
mov dword [edi + 0x38], eax
je 0x4077b1
mov ecx, dword [edi + 0x2c]
test ecx, ecx
je 0x4077b1
cmp dword [edi + 0x30], 0
je 0x4077b1
cmp dword [edi + 0x34], 0
je 0x4077b1
test eax, eax
je 0x4077b1
and byte [ecx], 0xf8
mov eax, dword [edi + 0x2c]
push edi
and byte [eax + 0x1f], 0x7f
mov eax, dword [edi + 0x2c]
or byte [eax + 0x1f], 0x40
mov edx, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
call fcn.004048a0
mov edx, dword [edi + 0x2c]
add esp, 4
mov ecx, dword [edi + 0x30]
push dword [edi + 0x20]
call fcn.004048a0
movups xmm0, xmmword [0x426a70]
mov edx, dword [edi + 0x30]
lea ecx, [ebp - 0xe0]
mov esi, dword [edi + 0x34]
add esp, 4
movups xmmword [ebp - 0xe0], xmm0
mov dword [ebp - 0x20], 0
movups xmm0, xmmword [0x426a80]
push 0x20
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0xd0], xmm0
mov dword [ebp - 0x18], 0
movups xmm0, xmmword [0x426a90]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
movups xmmword [ebp - 0xc0], xmm0
movups xmm0, xmmword [0x426aa0]
movups xmmword [ebp - 0xb0], xmm0
call fcn.00409c40
add esp, 4
lea ecx, [ebp - 0xe0]
mov edx, esi
call fcn.00409dd0
movups xmm0, xmmword [0x426a70]
mov edx, dword [edi + 0x28]
lea ecx, [ebp - 0xe0]
mov esi, dword [edi + 0x38]
movups xmmword [ebp - 0xe0], xmm0
push 0x20
movups xmm0, xmmword [0x426a80]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0xd0], xmm0
mov dword [ebp - 0x18], 0
movups xmm0, xmmword [0x426a90]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
movups xmmword [ebp - 0xc0], xmm0
movups xmm0, xmmword [0x426aa0]
movups xmmword [ebp - 0xb0], xmm0
call fcn.00409c40
add esp, 4
lea ecx, [ebp - 0xe0]
mov edx, esi
call fcn.00409dd0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a12a
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x20]
test eax, eax
je 0x4077c0
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x4077cf
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [edi + 0x28]
test eax, eax
je 0x4077de
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [edi + 0x38]
test eax, eax
je 0x4077ed
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [edi + 0x30]
test eax, eax
je 0x4077fc
push eax
push 0
call esi
push eax
call ebx
mov eax, dword [edi + 0x34]
test eax, eax
je 0x40780b
push eax
push 0
call esi
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
mov dword [edi + 0x24], eax
xor ecx, ebp
pop edi
pop esi
xor al, al
pop ebx
call fcn.0040a12a
mov esp, ebp
pop ebp
ret