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

Disassembly:
jmp 0x485570
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x559b1d
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x589780]
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], edi
mov eax, dword [ebp + 0x410]
lea esi, [edi + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x418]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x420]
push esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x64], esi
call fcn.00403373
add esp, 4
test eax, eax
jne 0x485a3a
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
je 0x485a41
xor ecx, ecx
mov dword [ebp - 4], 0
xor ebx, ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], ebx
xor eax, eax
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x485848
push 1
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 8]
push edx
push ebx
push ebx
push dword [eax + 4]
push dword [edi + 0x10]
push ebx
push dword [ebp + 0x414]
push ecx
push dword [edi + 0xc]
call sub.bcrypt.dll_BCryptEncrypt
mov dword [ebp - 0x14], eax
test eax, eax
jns 0x4856a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push dword [ebp - 0x14]
push edi
push eax
push 0x42
push str.C:projectsentryprotect_srccore._include_entryprotect_encrypteddrivercontrol.h
lea eax, [ebp]
push str._s__d_:___u__u__status0x_x__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp]
push eax
call fcn.0040946c
add esp, 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [ebp - 0x18]
mov byte [ebp - 0xd], 0
jmp 0x4859ac
jne 0x48590e
mov ecx, dword [ebp - 0x2c]
xor eax, eax
xor edi, edi
mov dword [ebp - 0x18], ecx
xor ebx, ebx
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x24], ebx
test ecx, ecx
je 0x48570d
cmp ecx, 0x7fffffff
ja 0x485a4c
push ecx
cmp ecx, 0x1000
jb 0x4856e4
call fcn.00402ced
jmp 0x4856e9
call fcn.00403972
mov ebx, dword [ebp - 0x18]
mov edi, eax
add esp, 4
mov dword [ebp - 0x54], edi
add ebx, edi
mov eax, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], eax
push eax
push edi
call fcn.004043ea
mov edx, ebx
add esp, 8
mov dword [ebp - 0x50], edx
movq xmm0, qword [ebp - 0x54]
lea ecx, [ebp - 0x54]
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
call fcn.0040bf4b
mov edx, dword [ebp - 0x20]
lea ebx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
push 1
push ebx
mov eax, dword [edx + 8]
sub ecx, edi
push ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x38]
push ecx
push dword [eax + 4]
mov dword [ebp - 0x18], ecx
push dword [edx + 0x10]
push 0
push dword [ebp + 0x414]
push dword [ebp - 0x1c]
push dword [edx + 0xc]
call sub.bcrypt.dll_BCryptEncrypt
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
test eax, eax
jns 0x4857c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push dword [ebp - 0x1c]
push edi
push eax
push 0x51
push str.C:projectsentryprotect_srccore._include_entryprotect_encrypteddrivercontrol.h
lea eax, [ebp]
push str._s__d_:___u__u__status0x_x__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp]
push eax
call fcn.0040946c
add esp, 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [ebp - 0x18]
mov byte [ebp - 0xd], 0
jmp 0x4859ac
jne 0x48590e
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
cmp ecx, edx
jae 0x4857e8
mov ebx, dword [ebp - 0x18]
add ecx, edi
mov edi, dword [ebp - 0x20]
xor eax, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x34], ecx
jmp 0x48584a
jbe 0x485838
sub ebx, edi
cmp ecx, ebx
jbe 0x485816
lea eax, [ebp - 0xd]
push eax
push ecx
lea ecx, [ebp - 0x38]
call fcn.00402748
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ebx
jmp 0x48584a
mov eax, dword [ebp - 0x34]
sub ecx, edx
lea edi, [eax + ecx]
push edi
push eax
mov dword [ebp - 0x14], edi
call fcn.004043ea
mov ebx, dword [ebp - 0x18]
add esp, 8
mov dword [ebp - 0x34], edi
xor eax, eax
mov edi, dword [ebp - 0x20]
jmp 0x48584a
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
xor eax, eax
jmp 0x48584a
xor ebx, ebx
cmp dword [ebp - 0x28], 0
je 0x48587d
mov eax, dword [edi + 8]
xor edx, edx
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 0x41c]
div ecx
sub ecx, edx
add ecx, dword [ebp + 0x41c]
push ecx
lea ecx, [ebp - 0x60]
call fcn.00402329
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x5c]
mov edx, eax
mov ecx, dword [ebp - 0x14]
sub edi, eax
cmp eax, dword [ebp - 0x5c]
mov eax, ebx
mov dword [ebp - 0x1c], 0
cmove edx, dword [ebp - 0x1c]
sub ecx, ebx
cmp ebx, dword [ebp - 0x14]
lea ebx, [ebp - 0x40]
push ebx
push edi
mov edi, dword [ebp - 0x20]
push edx
push ecx
mov dword [ebp - 0x1c], 0
mov ecx, edi
cmove eax, dword [ebp - 0x1c]
push eax
push dword [ebp + 0x40c]
mov dword [ebp - 0x40], 0
call fcn.0040c09f
mov ebx, dword [ebp - 0x18]
test al, al
jne 0x48591a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push eax
push 0x62
push str.C:projectsentryprotect_srccore._include_entryprotect_encrypteddrivercontrol.h
lea eax, [ebp]
push str._s__d_:___u__u__assert_failed__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp]
push eax
call fcn.0040946c
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [ebp - 0x18]
mov byte [ebp - 0xd], 0
jmp 0x4859ac
mov ecx, dword [ebp - 0x40]
test ecx, ecx
jne 0x485930
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x48592a
mov dword [eax], ecx
mov byte [ebp - 0xd], 1
jmp 0x4859ac
mov eax, dword [edi + 8]
push 1
push dword [ebp - 0x44]
push dword [ebp + 0x41c]
push dword [ebp - 0x28]
push dword [eax + 4]
push dword [edi + 0x10]
push 0
push ecx
push dword [ebp - 0x3c]
push dword [edi + 0xc]
call sub.bcrypt.dll_BCryptDecrypt
mov dword [ebp - 0x28], eax
test eax, eax
jns 0x4859a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push dword [ebp - 0x28]
push edi
push eax
push 0x75
push str.C:projectsentryprotect_srccore._include_entryprotect_encrypteddrivercontrol.h
lea eax, [ebp]
push str._s__d_:___u__u__status0x_x__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp]
push eax
call fcn.0040946c
add esp, 0x20
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x28]
test eax, eax
mov ebx, dword [ebp - 0x18]
sete byte [ebp - 0xd]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4859dc
mov edx, dword [ebp - 0x48]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4859d2
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x485a51
push edx
push ecx
call fcn.0040246e
add esp, 8
test ebx, ebx
je 0x485a09
mov ecx, dword [ebp - 0x24]
mov eax, ebx
sub ecx, ebx
cmp ecx, 0x1000
jb 0x4859ff
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x485a51
push ecx
push ebx
call fcn.0040246e
add esp, 8
push esi
call fcn.004019ab
mov al, byte [ebp - 0xd]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.0040512d
lea esp, [ebp + 0x404]
pop ebp
ret 0x18
push 5
call fcn.004032dd
dec eax
push 6
mov dword [esi + 0x2c], eax
call fcn.004032dd
call fcn.00403fbc
call fcn.00408139
int3