Function at 0x10018610
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 [0x1014d084]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x10156aa0]
push edi
cmp dword [esi + 0x14], 0
je 0x100188cf
call fcn.10018d50
test al, al
je 0x100188cf
mov bh, 0x16
mov dword [ebp - 0x18], 0x65723816
mov word [ebp - 0x14], 0x62
xor esi, esi
cmp esi, 5
jb 0x1001866d
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10066030
add esp, 0xc
mov bl, byte [ebp + esi - 0x17]
xor bl, bh
cmp esi, 5
jb 0x1001868f
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10066030
add esp, 0xc
mov byte [ebp + esi - 0x17], bl
inc esi
cmp esi, 4
jae 0x1001869e
mov bh, byte [ebp - 0x18]
jmp 0x10018651
push ecx
lea eax, [ebp - 0x17]
mov byte [ebp - 0x13], 0
push eax
call fcn.10018ce0
cmp eax, 0xffffffff
je 0x100188c9
movaps xmm0, xmmword [0x1013df80]
xor esi, esi
push dword [0x1015274c]
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0x11121243
mov dword [ebp - 0x24], 0xc46077d
mov dword [ebp - 0x20], 0x565645
nop dword [eax]
cmp esi, 0x1b
jb 0x100186fc
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10066030
add esp, 0xc
mov bl, byte [ebp + esi - 0x37]
xor bl, byte [ebp - 0x38]
cmp esi, 0x1b
jb 0x1001871f
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10066030
add esp, 0xc
mov byte [ebp + esi - 0x37], bl
inc esi
cmp esi, 0x1a
jb 0x100186e0
sub esp, 0x1c
mov byte [ebp - 0x1d], 0
lea eax, [ebp - 0x37]
mov ecx, esp
push eax
call fcn.10007920
lea eax, [ebp - 0x54]
push eax
call fcn.10006ba0
add esp, 0x24
mov ecx, 0x10156aa4
push eax
call fcn.1000dc50
lea ecx, [ebp - 0x54]
call fcn.10006cd0
mov eax, dword [0x10156aa0]
cmp dword [eax + 0x18], 0x10
jb 0x1001876a
mov eax, dword [eax + 4]
jmp 0x1001876d
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 [0x10156abc], 0x10
mov ecx, 0x10156aa8
push 0
cmovae ecx, dword [0x10156aa8]
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 0x100188a4
cmp ebx, 0xffffffff
je 0x100188a4
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.1008e7f0
mov esi, eax
add esp, 4
test esi, esi
je 0x1001889e
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 0x1001882b
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.1007b2b0
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 0x10018891
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 [0x10152750]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10018891
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 0x10018840
push esi
call fcn.1008d9c0
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 0x100188b1
push edi
call esi
test ebx, ebx
je 0x100188e6
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10075bf0
mov esp, ebp
pop ebp
ret
mov esi, dword [0x10156aa0]
cmp esi, 0x10156aa4
je 0x100188e6
push 0xffffffffffffffff
push 0
push esi
mov ecx, 0x10156aa4
call fcn.10007170
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10075bf0
mov esp, ebp
pop ebp
ret