Function at 0x100f6ad0
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 0x10181cfd
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101dadb0]
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 ebx, dword [ebp + 8]
mov dword [ebp - 0x3c], ebx
mov ecx, dword [ebx + 0x14]
test ecx, ecx
je 0x100f6b6c
cmp ebx, 0x102249fc
je 0x100f6b27
cmp dword [ebx + 0x18], 0x10
lea eax, [ebx + 4]
jb 0x100f6b1b
mov eax, dword [eax]
push ecx
push eax
mov ecx, 0x102249fc
call fcn.10047890
cmp dword [ebx + 0x18], 0x10
lea edi, [ebx + 4]
mov eax, edi
jb 0x100f6b34
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 esi, eax
cmp esi, 0xffffffff
jne 0x100f6b73
cmp dword [ebx + 0x18], 0x10
jb 0x100f6b5c
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 eax, eax
jmp 0x100f6d44
mov ecx, dword [ebx + 0x14]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 4
jb 0x100f6d62
cmp dword [ebx + 0x18], 0x10
mov eax, edi
jb 0x100f6b90
mov eax, dword [edi]
push 4
push str..tmp
push ecx
push eax
push ecx
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
call fcn.10048790
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
push esi
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x100f6bde
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
xor esi, esi
jmp 0x100f6cf5
push eax
call fcn.101204d0
mov edi, dword [ebp - 0x30]
lea ecx, [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x34]
mov ebx, 0x816
xor esi, esi
mov al, byte [esi + eax]
mov edx, ebx
movzx ecx, al
add cx, bx
shr edx, 8
xor dl, al
movzx ecx, cx
mov eax, 0x6081
imul ecx, eax
mov eax, 0x1608
add cx, ax
mov eax, dword [ebp - 0x34]
movzx ebx, cx
mov byte [esi + eax], dl
inc esi
cmp esi, edi
jb 0x100f6c14
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
cmovae eax, dword [ebp - 0x28]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call edi
mov ebx, dword [ebp - 0x34]
mov esi, eax
push 0
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x30]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.1011f890
add esp, 4
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae eax, dword [ebp - 0x28]
push 0
push 0x80
push 3
push 0
push 0
push connect
push eax
call edi
mov esi, eax
push esi
call fcn.100f7350
mov ebx, eax
push esi
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
mov ebx, dword [ebp - 0x3c]
lea edi, [ebx + 4]
jne 0x100f6ce7
cmp dword [ebx + 0x18], 0x10
jb 0x100f6cd7
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 - 0x14], 0x10
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.1013ff10
add esp, 4
lea ecx, [ebp - 0x2c]
call fcn.10043e40
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x100f6d1b
inc eax
push eax
push dword [ebp - 0x28]
call fcn.10048530
add esp, 8
mov ecx, dword [ebp - 0x2c]
push 8
push ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
call fcn.10048530
add esp, 8
mov eax, esi
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.1011f880
mov esp, ebp
pop ebp
ret 4
call fcn.10043e90
int3