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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101b1654
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x10226180]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x88], 0
mov eax, dword [0x102b0e20]
push eax
mov ecx, 0x102b0e34
call fcn.10008e30
nop
mov ecx, dword [0x102b0e20]
call fcn.10008c10
movzx ecx, al
test ecx, ecx
jne 0x100f83da
movzx edx, byte [ebp - 0x8d]
push edx
push str..rpguard
lea ecx, [ebp - 0x38]
call fcn.1001b690
mov ecx, eax
call fcn.100111e0
push eax
lea ecx, [ebp - 0x2c]
call fcn.10008f80
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x88]
or eax, 1
mov dword [ebp - 0x88], eax
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [0x102b0e20]
push edx
call fcn.100f82b0
add esp, 8
movzx eax, al
test eax, eax
je 0x100f83da
mov dword [ebp - 0x98], 1
jmp 0x100f83e4
mov dword [ebp - 0x98], 0
mov cl, byte [ebp - 0x98]
mov byte [ebp - 0x7d], cl
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x88]
and edx, 1
je 0x100f840f
and dword [ebp - 0x88], 0xfffffffe
lea ecx, [ebp - 0x2c]
call fcn.10008ea0
nop
movzx eax, byte [ebp - 0x7d]
test eax, eax
je 0x100f868d
mov ecx, dword [0x10229c30]
push ecx
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0xb8], esp
movzx edx, byte [ebp - 0x8e]
push edx
push str.Misc_river_nxacs__d.dxt
lea ecx, [ebp - 0x70]
call fcn.100fadf0
mov ecx, eax
call fcn.10006c80
push eax
mov ecx, esi
call fcn.10008f80
lea eax, [ebp - 0x54]
push eax
call fcn.10010a70
add esp, 0x24
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0xa8], ecx
mov edx, dword [ebp - 0xa8]
push edx
mov ecx, 0x102b0e34
call fcn.10012020
lea ecx, [ebp - 0x54]
call fcn.10008ea0
nop
mov dword [ebp - 0x78], 0
push 0
push 0x80
push 3
push 0
push 1
push 1
mov ecx, dword [0x102b0e20]
call fcn.10008c60
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x84], eax
push 0
push 0x80
push 4
push 0
push 1
push 2
mov ecx, 0x102b0e34
call fcn.10008c60
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x84], 0xffffffff
je 0x100f864d
cmp dword [ebp - 0x8c], 0xffffffff
je 0x100f864d
mov byte [ebp - 0x71], 0
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp - 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edx, dword [ebp - 0xb0]
shl edx, 0x20
or edx, dword [ebp - 0xb4]
mov dword [ebp - 0xac], edx
mov eax, dword [ebp - 0xac]
and eax, 0x80000001
jns 0x100f8536
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x100f8546
mov dword [ebp - 0x9c], 0x20
jmp 0x100f8550
mov dword [ebp - 0x9c], 0x1f
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0x94], ecx
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa0]
push eax
call fcn.10172960
add esp, 4
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
je 0x100f864d
push 0
lea ecx, [ebp - 0x7c]
push ecx
push 4
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100f85bd
push 0
lea ecx, [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x7c]
push edx
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov edx, dword [ebp - 0xa0]
push edx
push 0
mov eax, dword [ebp - 0x78]
push eax
call fcn.10153ba0
add esp, 0xc
mov dword [ebp - 0x7c], 0
push 0
lea ecx, [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100f8645
mov edx, dword [ebp - 0x7c]
cmp edx, dword [ebp - 0x94]
jae 0x100f860a
mov byte [ebp - 0x71], 1
lea eax, [ebp - 0x7c]
push eax
mov ecx, dword [ebp - 0x78]
push ecx
push 0
push 1
push 0
mov edx, dword [0x10229c44]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x100f8645
push 0
lea eax, [ebp - 0x7c]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp - 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
nop
movzx ecx, byte [ebp - 0x71]
test ecx, ecx
je 0x100f85d9
cmp dword [ebp - 0x78], 0
je 0x100f865f
mov edx, dword [ebp - 0x78]
push edx
call fcn.10170a70
add esp, 4
cmp dword [ebp - 0x84], 0
je 0x100f8676
mov eax, dword [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [ebp - 0x8c], 0
je 0x100f868d
mov ecx, dword [ebp - 0x8c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10150c60
mov esp, ebp
pop ebp
ret