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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
test eax, eax
push esi
mov dword [ebp - 0x10], ecx
je 0x1001421b
cmp dword [ebp + 0xc], 0
je 0x1001421b
xor esi, esi
jmp 0x10014220
mov esi, 0x80070057
test esi, esi
mov dword [ebp - 8], 0
jl 0x10014416
cmp dword [ecx + 4], 0
jne 0x10014241
mov eax, 0x80070005
pop esi
mov esp, ebp
pop ebp
ret 8
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 4], edi
jne 0x1001427b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10014279
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x10014400
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1001433a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100142ac
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x100143ff
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
jne 0x100142de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100142dc
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x100143c7
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
jne 0x10014309
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10014307
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1001439b
mov ecx, dword [ebp - 4]
push 0
lea eax, [ebp - 0xc]
push eax
push ebx
push edi
push ecx
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001434c
cmp dword [ebp - 0xc], ebx
je 0x10014362
mov esi, 0x8000ffff
jmp 0x1001439b
test ebx, ebx
jne 0x100142ae
mov esi, 0x800710d2
jmp 0x100143ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10014360
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1001439b
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
lea edx, [ebp - 8]
push edx
push edi
push 0
push 1
push 0
push ecx
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x1001439b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10014399
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test edi, edi
je 0x100143a9
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test esi, esi
jl 0x100143c4
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
push 2
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
je 0x100143d6
mov dword [ebp + 8], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x100143fc
test esi, esi
jl 0x100143f5
mov edx, dword [ebp + 0xc]
mov dword [edx], edi
jmp 0x100143fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov edi, dword [ebp + 8]
jg 0x100143e7
mov esi, eax
jmp 0x100143c7
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x100143c7
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, dword [ebp - 4]
pop ebx
cmp edi, 0xffffffff
je 0x1001440c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 8