Function at 0x10013810
Capabilities:
Encode data using xor
Encrypt or decrypt via wincrypt
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [0x100a6040]
xor eax, esp
mov dword [esp + 0x58], eax
cmp dword [ecx + 0x18], 0x10
lea edx, [ecx + 4]
push ebx
push esi
push edi
jb 0x10013832
mov edx, dword [edx]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10013837
sub ecx, esi
push ecx
push edx
mov ecx, 0x100aa398
call fcn.10006800
mov esi, dword [0x100aa3ac]
mov edi, dword [0x100aa3b0]
mov ebx, dword [0x100aa39c]
test esi, esi
je 0x10013b23
call fcn.10011ef0
test al, al
jne 0x10013b23
mov dl, 0x66
mov dword [esp + 0x10], 0x15024866
mov word [esp + 0x14], 0x12
xor ecx, ecx
xor byte [esp + ecx + 0x11], dl
inc ecx
cmp ecx, 4
jae 0x10013896
mov dl, byte [esp + 0x10]
jmp 0x10013886
lea edx, [esp + 0x11]
mov byte [esp + 0x15], 0
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x100138a2
sub edx, ecx
lea eax, [esp + 0x11]
push edx
cmp edi, 0xf
mov ecx, 0x100aa39c
push eax
cmova ecx, ebx
mov edx, esi
push ecx
call fcn.10004290
add esp, 0xc
cmp eax, 0xffffffff
je 0x10013b23
movaps xmm0, xmmword [0x1009fc10]
xor ecx, ecx
push dword [0x100a9fb0]
movups xmmword [esp + 0x20], xmm0
mov dword [esp + 0x30], 0x70737322
mov dword [esp + 0x34], 0x6d27661c
mov dword [esp + 0x38], 0x373724
nop dword [eax]
mov al, byte [esp + ecx + 0x21]
xor al, byte [esp + 0x20]
mov byte [esp + ecx + 0x21], al
inc ecx
cmp ecx, 0x1a
jb 0x10013900
sub esp, 0x1c
mov byte [esp + 0x57], 0
mov edx, esp
lea ecx, [esp + 0x3d]
xorps xmm0, xmm0
lea esi, [ecx + 1]
mov dword [edx], 0
movups xmmword [edx + 4], xmm0
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10013940
sub ecx, esi
lea eax, [esp + 0x3d]
push ecx
push eax
mov ecx, edx
call fcn.10003350
lea eax, [esp + 0x58]
push eax
call fcn.1000d820
mov esi, eax
add esp, 0x24
cmp esi, 0x100aa3b4
je 0x10013982
mov ecx, 0x100aa3b4
call fcn.10002f50
push esi
mov ecx, 0x100aa3b4
call fcn.10007c30
lea ecx, [esp + 0x38]
call fcn.10002f50
mov eax, dword [esp + 0x38]
push 8
push eax
mov dword [esp + 0x40], 0
call fcn.10046080
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 8
cmp dword [0x100aa3b0], 0xf
mov eax, 0x100aa39c
cmova eax, dword [0x100aa39c]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call esi
cmp dword [0x100aa3cc], 0xf
mov ecx, 0x100aa3b8
push 0
cmova ecx, dword [0x100aa3b8]
mov edi, eax
push 0x80
push 2
push 0
push 2
push 0x40000000
push ecx
mov dword [esp + 0x2c], edi
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp edi, 0xffffffff
je 0x10013b07
cmp ebx, 0xffffffff
je 0x10013b03
lea eax, [esp + 0x58]
xor bl, bl
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
xor esi, esi
or esi, dword [esp + 0x58]
not esi
and esi, 1
add esi, 0x1f
push esi
call fcn.1005a490
mov edi, eax
add esp, 4
test edi, edi
je 0x10013af5
push 0
lea eax, [esp + 0x58]
push eax
push 4
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013a79
push 0
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x5c]
push edi
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push 0
push edi
call fcn.10048c00
add esp, 0xc
mov dword [esp + 0x54], 0
nop dword [eax]
push 0
lea eax, [esp + 0x58]
push eax
push esi
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013ae8
cmp dword [esp + 0x54], esi
mov eax, 1
movzx ebx, bl
cmovb ebx, eax
lea eax, [esp + 0x54]
push eax
push edi
push 0
push 1
push 0
push dword [0x100a9fb4]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x10013ae8
push 0
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x5c]
push edi
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test bl, bl
je 0x10013a90
push edi
call fcn.1004e410
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
test edi, edi
je 0x10013b0a
push edi
call esi
test ebx, ebx
je 0x10013b3a
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10045fd0
mov esp, ebp
pop ebp
ret
cmp edi, 0xf
mov eax, 0x100aa39c
push esi
cmova eax, ebx
mov ecx, 0x100aa3b4
push eax
call fcn.10006800
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10045fd0
mov esp, ebp
pop ebp
ret