Function at 0x10013380
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 0x100aad28
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x100d6084]
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
cmp dword [edi + 0x10], 0
je 0x10013412
cmp edi, 0x100df818
je 0x100133ce
push 0xffffffffffffffff
push 0
push edi
mov ecx, 0x100df818
call fcn.10002400
cmp dword [edi + 0x14], 0x10
jb 0x100133d8
mov eax, dword [edi]
jmp 0x100133da
mov eax, edi
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10013419
cmp dword [edi + 0x14], 0x10
jb 0x10013402
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 0x100135a8
push str..dstmp
mov edx, edi
lea ecx, [ebp - 0x2c]
call fcn.1000c530
add esp, 4
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
push eax
push esi
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jne 0x1001346c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.100909f2
add esp, 4
xor bl, bl
jmp 0x10013591
push ebx
call fcn.1006e7c4
add esp, 4
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push 0
push ecx
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x816
xor esi, esi
mov dword [ebp - 0x34], ecx
test ebx, ebx
je 0x100134e4
mov edi, dword [ebp - 0x38]
nop word [eax + eax]
mov edx, ecx
mov eax, 0x6081
movzx ecx, byte [esi + edi]
add cx, word [ebp - 0x34]
movzx ecx, cx
imul ecx, eax
mov eax, 0x7105
shr edx, 8
xor dl, byte [esi + edi]
mov byte [esi + edi], dl
inc esi
add cx, ax
movzx ecx, cx
mov dword [ebp - 0x34], ecx
cmp esi, ebx
jb 0x100134b0
mov edi, dword [ebp - 0x3c]
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
push 0
cmovae eax, dword [ebp - 0x2c]
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push ebx
mov ebx, dword [ebp - 0x38]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.1006e56a
add esp, 4
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 0x10
cmovae eax, dword [ebp - 0x2c]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push esi
call fcn.10014240
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x1001357d
cmp dword [edi + 0x14], 0x10
jb 0x1001356d
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], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.100909f2
add esp, 4
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x10
jb 0x100135a6
inc ecx
push ecx
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x2c]
call fcn.10002720
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.1006e1c5
mov esp, ebp
pop ebp
ret 4