Function at 0x100106b0
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 0x100106cb
cmp dword [ebp + 0xc], 0
je 0x100106cb
xor esi, esi
jmp 0x100106d0
mov esi, 0x80070057
test esi, esi
mov dword [ebp - 8], 0
jl 0x100108c6
cmp dword [ecx + 4], 0
jne 0x100106f1
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 0x1001072b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10010729
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x100108b0
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100107ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1001075c
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x100108af
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
jne 0x1001078e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1001078c
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x10010877
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
jne 0x100107b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100107b7
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1001084b
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 0x100107fc
cmp dword [ebp - 0xc], ebx
je 0x10010812
mov esi, 0x8000ffff
jmp 0x1001084b
test ebx, ebx
jne 0x1001075e
mov esi, 0x800710d2
jmp 0x100108af
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10010810
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x1001084b
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 0x1001084b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10010849
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test edi, edi
je 0x10010859
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test esi, esi
jl 0x10010874
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 0x10010886
mov dword [ebp + 8], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x100108ac
test esi, esi
jl 0x100108a5
mov edx, dword [ebp + 0xc]
mov dword [edx], edi
jmp 0x100108ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov edi, dword [ebp + 8]
jg 0x10010897
mov esi, eax
jmp 0x10010877
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x10010877
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, dword [ebp - 4]
pop ebx
cmp edi, 0xffffffff
je 0x100108bc
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