Function at 0x10015d80
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 [0x1012507c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x10], 0x10
jb 0x10015d9d
mov esi, dword [esi]
test esi, esi
jne 0x10015db8
push 0x49d
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCincludexstring
push str.invalid_null_pointer
call fcn.10043280
add esp, 0xc
cmp byte [esi], 0
jne 0x10015dc1
xor ecx, ecx
jmp 0x10015dcf
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10015dc6
sub ecx, edx
push ecx
push esi
mov ecx, 0x1012ea98
call fcn.10007850
mov edx, dword [0x1012eaac]
test edx, edx
je 0x100160b9
cmp dword [0x1012eacc], 0x10
mov eax, 0x1012eab8
push dword [0x1012eac8]
cmovae eax, dword [0x1012eab8]
mov edi, 0x1012ea9c
cmp dword [0x1012eab0], 0x10
mov ecx, edi
push eax
cmovae ecx, dword [0x1012ea9c]
call fcn.10015c30
add esp, 8
test eax, eax
je 0x100160b9
mov bh, 2
mov dword [ebp - 0x18], 0x71662c02
mov word [ebp - 0x14], 0x76
xor esi, esi
nop dword [eax]
cmp esi, 5
jb 0x10015e5c
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10043280
add esp, 0xc
mov bl, byte [ebp + esi - 0x17]
xor bl, bh
cmp esi, 5
jb 0x10015e7e
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10043280
add esp, 0xc
mov byte [ebp + esi - 0x17], bl
inc esi
cmp esi, 4
jae 0x10015e8d
mov bh, byte [ebp - 0x18]
jmp 0x10015e40
push ecx
lea eax, [ebp - 0x17]
mov byte [ebp - 0x13], 0
push eax
call fcn.100165b0
cmp eax, 0xffffffff
je 0x100160b9
movaps xmm0, xmmword [0x10117150]
xor esi, esi
push dword [0x1012a74c]
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0x7d7e7e2f
mov dword [ebp - 0x24], 0x602a6b11
mov dword [ebp - 0x20], 0x3a3a29
nop dword [eax]
cmp esi, 0x1b
jb 0x10015eec
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10043280
add esp, 0xc
mov bl, byte [ebp + esi - 0x37]
xor bl, byte [ebp - 0x38]
cmp esi, 0x1b
jb 0x10015f0f
push 0x90
push str.C:Program_Files__x86_Microsoft_Visual_Studio_14.0VCinclude_array
push str.array_subscript_out_of_range
call fcn.10043280
add esp, 0xc
mov byte [ebp + esi - 0x37], bl
inc esi
cmp esi, 0x1a
jb 0x10015ed0
sub esp, 0x1c
mov byte [ebp - 0x1d], 0
lea eax, [ebp - 0x37]
mov ecx, esp
push eax
call fcn.10007970
lea eax, [ebp - 0x54]
push eax
call fcn.10006be0
add esp, 0x24
mov ecx, 0x1012eab4
push eax
call fcn.1000db40
lea ecx, [ebp - 0x54]
call fcn.10006d10
cmp dword [0x1012eab0], 0x10
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
cmovae edi, dword [0x1012ea9c]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push edi
call esi
cmp dword [0x1012eacc], 0x10
mov edi, eax
push 0
push 0x80
push 2
push 0
push 2
mov eax, 0x1012eab8
mov dword [ebp - 0x18], edi
cmovae eax, dword [0x1012eab8]
push 0x40000000
push eax
call esi
mov ebx, eax
mov dword [ebp - 0x1c], ebx
cmp edi, 0xffffffff
je 0x10016094
cmp ebx, 0xffffffff
je 0x10016094
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.1006b750
mov esi, eax
add esp, 4
test esi, esi
je 0x1001608e
push 0
lea eax, [ebp - 8]
push eax
push 4
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10016016
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push esi
call fcn.10058140
add esp, 0xc
mov dword [ebp - 8], 0
nop dword [eax]
push 0
lea eax, [ebp - 8]
push eax
push edi
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10016081
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 [0x1012a750]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10016081
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test bl, bl
je 0x10016030
push esi
call fcn.1006a920
add esp, 4
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x100160a1
push edi
call esi
test ebx, ebx
je 0x100160cc
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10052b20
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push 0
push 0x1012ea98
mov ecx, 0x1012eab4
call fcn.100071c0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10052b20
mov esp, ebp
pop ebp
ret