Function at 0x10013b40
Capabilities:
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a89fd
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x100c90c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x3c], edi
mov eax, dword [edi + 0x10]
test eax, eax
je 0x10013bd8
cmp edi, 0x100c9c14
je 0x10013b96
cmp dword [edi + 0x14], 0xf
mov ecx, edi
jbe 0x10013b8a
mov ecx, dword [edi]
push eax
push ecx
mov ecx, 0x100c9c14
call fcn.10005f40
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x10013ba0
mov eax, dword [edi]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10013bdf
cmp dword [edi + 0x14], 0xf
jbe 0x10013bc8
mov edi, dword [edi]
push 0
push str.N3TableBase___Cant_open_file_read__File_Handle_error_n
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor al, al
jmp 0x10013d92
mov ecx, dword [edi + 0x10]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 6
jb 0x10013db0
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x10013bfc
mov eax, dword [edi]
push 6
push str..dstmp
push ecx
push eax
push ecx
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
call fcn.1000cfb0
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
push eax
push ebx
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x10013c4c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0xf
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
xor bl, bl
jmp 0x10013d57
push esi
call fcn.10085d23
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push 0
push ecx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x38]
mov edi, 0x816
mov eax, dword [ebp - 0x34]
xor esi, esi
movzx ecx, byte [eax + esi]
mov edx, edi
add cx, di
shr edx, 8
xor dl, byte [eax + esi]
mov eax, 0x6081
movzx ecx, cx
imul ecx, eax
mov eax, 0x7105
add cx, ax
mov eax, dword [ebp - 0x34]
movzx edi, cx
mov byte [eax + esi], dl
inc esi
cmp esi, ebx
jb 0x10013c82
cmp dword [ebp - 0x18], 0xf
lea eax, [ebp - 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
cmova eax, dword [ebp - 0x2c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call edi
push 0
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push ebx
mov ebx, dword [ebp - 0x34]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.10085d1e
add esp, 4
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 0xf
cmova eax, dword [ebp - 0x2c]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call edi
mov esi, eax
push esi
call fcn.100143f0
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x3c]
test bl, bl
jne 0x10013d4c
cmp dword [edi + 0x14], 0xf
jbe 0x10013d3c
mov edi, dword [edi]
push 0
push str.N3TableBase___incorrect_table_n
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [ebp - 0x18], 0xf
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
push eax
call fcn.1009162c
mov ecx, dword [ebp - 0x18]
add esp, 4
cmp ecx, 0xf
jbe 0x10013d90
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10013d86
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10013db5
push ecx
push edx
call fcn.100859f6
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10085995
mov esp, ebp
pop ebp
ret 4
call fcn.10002460
call fcn.1008ac0f
int3