Function at 0x140009818
Capabilities:
Encrypt or decrypt via wincrypt
Get file size
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4f0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x140092690]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
mov r12, r9
mov r13, r8
mov rax, rdx
mov r15, rcx
xor r14d, r14d
mov dword [rsp + 0x40], r14d
mov qword [rsp + 0x48], r14
cmp qword [rcx + 0x10], r14
je 0x1400099d5
cmp qword [rcx + 8], r14
je 0x1400099f1
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r14 + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x140009a0d
mov dword [r12], r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
or ecx, 0xffffffff
cmp eax, ecx
je 0x140009a2e
cmp eax, 0xfffff82e
jae 0x140009a4f
add eax, 0x7d1
cmp eax, ecx
je 0x140009a70
mov edi, eax
mov ecx, eax
call sub.mfc140.dll_Ordinal_265
mov rbx, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140009a91
mov r8d, edi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov edi, r14d
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0x3e8
lea rdx, [rsp + 0xf0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140009ab2
mov eax, dword [rsp + 0x40]
cmp eax, 0x3e8
mov ecx, 1
cmovne edi, ecx
test eax, eax
je 0x140009998
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, edi
xor edx, edx
mov rcx, qword [r15 + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140009ad3
mov r8d, dword [rsp + 0x40]
mov ecx, r14d
add rcx, rbx
lea rdx, [rsp + 0xf0]
call sub.VCRUNTIME140.dll_memmove
add r14d, dword [rsp + 0x40]
test edi, edi
je 0x14000990b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov qword [r13], rbx
mov dword [r12], r14d
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.140059ef0
add rsp, 0x4f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
lea rcx, [rsp + 0x60]
call fcn.140008e8c
lea rdx, [0x14008d788]
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rsp + 0x70]
call fcn.140008de4
lea rdx, [0x14008d810]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rcx, [rsp + 0x80]
call fcn.140008f6c
lea rdx, [0x14008d8d0]
lea rcx, [rsp + 0x80]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0x90]
call fcn.140008f6c
lea rdx, [0x14008d8d0]
lea rcx, [rsp + 0x90]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0xa0]
call fcn.140008f6c
lea rdx, [0x14008d8d0]
lea rcx, [rsp + 0xa0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0xb0]
call fcn.140008f6c
lea rdx, [0x14008d8d0]
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0xc0]
call fcn.140008dac
lea rdx, [0x14008d930]
lea rcx, [rsp + 0xc0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0xd0]
call fcn.140008fdc
lea rdx, [0x14008db10]
lea rcx, [rsp + 0xd0]
call sub.VCRUNTIME140.dll__CxxThrowException
lea rcx, [rsp + 0xe0]
call fcn.140008e54
lea rdx, [0x14008dab0]
lea rcx, [rsp + 0xe0]
call sub.VCRUNTIME140.dll__CxxThrowException
int3