Function at 0x420960
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x4e500c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x28], 0xc00000e5
mov dword [ebp - 0x2c], 0
cmp dword [ebp + 8], 0
jne 0x4209bf
mov eax, 0xc000000d
jmp 0x420b50
push 0
push 0x4e5be8
push 0x4e5be0
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x4209e3
jmp 0x420b13
push 0
push 0x20
push 0x4e5bc0
push 0x4e5ba4
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x420a09
jmp 0x420b13
push 0
lea edx, [ebp - 8]
push edx
push 4
lea eax, [ebp - 0x20]
push eax
push 0x4e5b88
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x420a32
jmp 0x420b13
push 0
lea edx, [ebp - 8]
push edx
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x4e5b70
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x420a5b
jmp 0x420b13
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x24]
push eax
call fcn.00420e40
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x420a80
mov dword [ebp - 0x28], 0xc0000017
jmp 0x420b13
mov ecx, dword [ebp - 0x10]
shr ecx, 3
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x200]
cmp eax, dword [ebp - 0x30]
jae 0x420aa0
mov dword [ebp - 0x28], 0xc0000023
jmp 0x420b13
push 0
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x420acb
jmp 0x420b13
push 1
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x404]
push edx
mov eax, dword [ebp + 8]
add eax, 0x204
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x420b0b
jmp 0x420b13
xor ecx, ecx
jne 0x4209bf
cmp dword [ebp - 0x1c], 0
je 0x420b26
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x24], 0
je 0x420b38
mov eax, dword [ebp - 0x24]
push eax
call fcn.00420e80
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x420b4d
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043a792
mov esp, ebp
pop ebp
ret