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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x1014b084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x10154aa0]
push edi
cmp dword [esi + 0x14], 0
je 0x10017eef
call fcn.10018310
test al, al
je 0x10017eef
mov bh, 0x5d
mov dword [ebp - 0x18], 0x2e39735d
mov word [ebp - 0x14], 0x29
xor esi, esi
cmp esi, 5
jb 0x10017c8d
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10064930
add esp, 0xc
mov bl, byte [ebp + esi - 0x17]
xor bl, bh
cmp esi, 5
jb 0x10017caf
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10064930
add esp, 0xc
mov byte [ebp + esi - 0x17], bl
inc esi
cmp esi, 4
jae 0x10017cbe
mov bh, byte [ebp - 0x18]
jmp 0x10017c71
push ecx
lea eax, [ebp - 0x17]
mov byte [ebp - 0x13], 0
push eax
call fcn.100182a0
cmp eax, 0xffffffff
je 0x10017ee9
movaps xmm0, xmmword [0x1013b650]
xor esi, esi
push dword [0x1015074c]
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0x4d4e4e1f
mov dword [ebp - 0x24], 0x501a5b21
mov dword [ebp - 0x20], 0xa0a19
nop dword [eax]
cmp esi, 0x1b
jb 0x10017d1c
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10064930
add esp, 0xc
mov bl, byte [ebp + esi - 0x37]
xor bl, byte [ebp - 0x38]
cmp esi, 0x1b
jb 0x10017d3f
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10064930
add esp, 0xc
mov byte [ebp + esi - 0x37], bl
inc esi
cmp esi, 0x1a
jb 0x10017d00
sub esp, 0x1c
mov byte [ebp - 0x1d], 0
lea eax, [ebp - 0x37]
mov ecx, esp
push eax
call fcn.10007690
lea eax, [ebp - 0x54]
push eax
call fcn.10012e80
add esp, 0x24
mov ecx, 0x10154aa4
push eax
call fcn.1000d360
lea ecx, [ebp - 0x54]
call fcn.10006b40
mov eax, dword [0x10154aa0]
cmp dword [eax + 0x18], 0x10
jb 0x10017d8a
mov eax, dword [eax + 4]
jmp 0x10017d8d
add eax, 4
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call esi
cmp dword [0x10154abc], 0x10
mov ecx, 0x10154aa8
push 0
cmovae ecx, dword [0x10154aa8]
mov edi, eax
push 0x80
push 2
push 0
push 2
push 0x40000000
push ecx
mov dword [ebp - 0x1c], edi
call esi
mov ebx, eax
mov dword [ebp - 0x18], ebx
cmp edi, 0xffffffff
je 0x10017ec4
cmp ebx, 0xffffffff
je 0x10017ec4
lea eax, [ebp - 0x10]
xor bl, bl
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0xc]
xor ecx, ecx
or ecx, dword [ebp - 0x10]
and cl, 1
cdq
movzx edi, cl
neg edi
sbb edi, edi
add edi, 0x20
push edi
call fcn.1008cff0
mov esi, eax
add esp, 4
test esi, esi
je 0x10017ebe
push 0
lea eax, [ebp - 8]
push eax
push 4
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10017e4b
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push esi
call fcn.10079b70
add esp, 0xc
mov dword [ebp - 8], 0
nop
push 0
lea eax, [ebp - 8]
push eax
push edi
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10017eb1
cmp dword [ebp - 8], edi
mov eax, 1
movzx ebx, bl
cmovb ebx, eax
lea eax, [ebp - 8]
push eax
push esi
push 0
push 1
push 0
push dword [0x10150750]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10017eb1
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test bl, bl
je 0x10017e60
push esi
call fcn.1008c190
add esp, 4
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x10017ed1
push edi
call esi
test ebx, ebx
je 0x10017f06
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10074510
mov esp, ebp
pop ebp
ret
mov esi, dword [0x10154aa0]
cmp esi, 0x10154aa4
je 0x10017f06
push 0xffffffffffffffff
push 0
push esi
mov ecx, 0x10154aa4
call fcn.10006ee0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10074510
mov esp, ebp
pop ebp
ret