Function at 0x42adcc
Capabilities:
Check if file exists
Encode data using xor
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2be4
call fcn.0042d810
push ebx
xor ebx, ebx
cmp dword [0x51f40c], ebx
push esi
push edi
mov dword [ebp - 0x18], ebx
je 0x42b275
cmp dword [0x51f410], ebx
je 0x42adf9
push 0xfffffffffffffff6
jmp 0x42ae65
push 1
mov byte [ebp - 0x38], bl
pop edi
mov byte [ebp - 0x37], bl
push ebx
push ebx
push 3
push ebx
push 3
push 0xc0000000
push 0x51f594
mov dword [0x51f410], edi
mov word [ebp - 0x36], bx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov word [ebp - 0x2c], bx
mov word [ebp - 0x2a], bx
mov word [ebp - 0x28], bx
mov word [ebp - 0x26], bx
mov word [ebp - 0x24], bx
mov dword [ebp - 0x22], ebx
mov dword [ebp - 0x1e], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 4], esi
jne 0x42ae6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [0x51f410], ebx
je 0x42ae6b
cmp eax, 3
je 0x42ae6b
push 0xffffffffffffffde
pop eax
jmp 0x42b280
push 0xffffffffffffffe0
jmp 0x42ae65
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push eax
push ebx
push ebx
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
jne 0x42aebd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x21
je 0x42ae9b
cmp eax, 0xd4
jne 0x42aea3
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp di, 0x14
jle 0x42ae6f
cmp esi, ebx
je 0x42aeb5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffdf
pop esi
jmp 0x42b278
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x40]
push ebx
push eax
lea eax, [ebp - 0x38]
push 0x1e
push eax
push esi
call edi
test eax, eax
jne 0x42af00
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push dword [ebp - 8]
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp esi, ebx
je 0x42b1c9
push esi
jmp 0x42b1c3
lea eax, [ebp - 0x38]
xor esi, esi
cmp si, 0xe
jl 0x42af11
cmp si, 0x11
jle 0x42af1d
mov cl, byte [eax]
add cl, byte [ebp - 0x2a]
inc cl
xor cl, byte [ebp - 0x28]
mov byte [eax], cl
inc eax
inc esi
cmp si, 0x1e
jb 0x42af05
call fcn.0042c33b
cmp word [ebp - 0x36], bx
je 0x42b287
cmp dword [ebp - 0x34], ebx
je 0x42b287
mov ecx, eax
sub ecx, dword [ebp - 0x34]
movsx esi, word [ebp - 0x36]
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
lea edx, [esi + 5]
imul edx, edx, 0x3c
cmp eax, edx
jg 0x42b287
cmp word [ebp + 0x1c], 0x21
jl 0x42afdc
cmp word [ebp + 0x1c], 0x24
jg 0x42afdc
movsx eax, word [ebp + 0x1c]
sub eax, 0x21
je 0x42af98
dec eax
je 0x42afb6
dec eax
je 0x42af86
dec eax
je 0x42af80
push 0xfffffffffffffff9
pop esi
jmp 0x42afb6
movsx esi, word [ebp - 0x26]
jmp 0x42afb6
mov eax, ecx
push 0x3c
cdq
pop ecx
idiv ecx
mov esi, eax
cmp esi, ebx
jge 0x42afb6
neg esi
jmp 0x42afb6
movsx ecx, byte [ebp - 0x37]
mov eax, ecx
push 0xa
cdq
pop esi
idiv esi
lea edx, [eax + eax*4]
shl edx, 1
sub ecx, edx
movsx eax, ax
movzx esi, cx
shl eax, 0x10
or esi, eax
push ebx
push dword [ebp - 8]
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 4], ebx
je 0x42b278
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42b278
mov ax, word [ebp - 0x2c]
cmp word [ebp + 0x18], ax
jle 0x42b00b
push ebx
push dword [ebp - 8]
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 4], ebx
je 0x42b003
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
jmp 0x42b278
movsx esi, ax
lea eax, [ebp - 0x40]
push ebx
lea esi, [esi + esi*2]
push eax
shl esi, 2
lea eax, [ebp - 0xb10]
push esi
push eax
push dword [ebp - 4]
call edi
test eax, eax
je 0x42b1a6
xor edi, edi
cmp esi, ebx
lea eax, [ebp - 0xb10]
jle 0x42b04f
mov cl, byte [eax]
add cl, byte [ebp - 0x2a]
inc cl
xor cl, byte [ebp - 0x28]
mov byte [eax], cl
inc eax
inc edi
movsx ecx, di
cmp ecx, esi
jl 0x42b03a
mov ax, word [ebp + 0x1c]
mov dword [ebp - 0x18], ebx
cmp ax, 9
je 0x42b0cb
cmp ax, 7
je 0x42b0cb
cmp ax, 8
je 0x42b0cb
movsx eax, ax
dec eax
je 0x42b0c2
dec eax
je 0x42b0c2
dec eax
je 0x42b0c2
dec eax
je 0x42b0ab
dec eax
je 0x42b098
dec eax
je 0x42b084
xor esi, esi
jmp 0x42afb6
movsx eax, word [ebp + 0x18]
lea eax, [eax + eax*2]
movsx esi, word [ebp + eax*4 - 0xb1a]
jmp 0x42afb6
movsx eax, word [ebp + 0x18]
lea eax, [eax + eax*2]
mov esi, dword [ebp + eax*4 - 0xb18]
jmp 0x42afb6
movsx eax, word [ebp + 0x18]
lea eax, [eax + eax*2]
movsx esi, word [ebp + eax*4 - 0xb1c]
sub esi, 4
jmp 0x42afb6
movsx esi, word [ebp - 0x2c]
jmp 0x42afb6
cmp word [ebp - 0x2c], bx
mov dword [ebp - 0xc], ebx
jle 0x42b258
push 1
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movsx esi, word [ebp - 0xc]
mov dword [ebp - 0x14], eax
push ebx
lea eax, [esi + esi*2]
lea edi, [ebp + eax*4 - 0xb10]
lea eax, [ebp - 0x40]
push eax
movsx eax, word [edi]
push eax
lea eax, [ebp - 0x2be4]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42b1a6
movsx eax, word [ebp + 0x18]
dec eax
cmp esi, eax
mov dword [ebp - 0x48], eax
jl 0x42b190
movsx ecx, word [edi]
xor eax, eax
cmp ecx, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x44], ecx
jle 0x42b187
mov edx, dword [ebp - 0x14]
mov ecx, edx
imul ecx, ecx, 0x11
imul edx, edx, 0xb
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x3c], edx
lea esi, [ebp + eax - 0x2be4]
mov eax, dword [ebp - 0x3c]
cdq
mov edi, 0xff
mov cl, byte [esi]
idiv edi
add cl, byte [ebp - 0x2a]
mov eax, dword [ebp - 0x14]
inc cl
xor cl, byte [ebp - 0x28]
add cl, dl
cdq
idiv edi
inc cl
mov eax, dword [ebp - 0x10]
xor cl, dl
inc eax
mov byte [esi], cl
mov dword [ebp - 0x10], eax
movsx ecx, word [ebp - 0x2a]
add dword [ebp - 0x3c], ecx
movsx ecx, word [ebp - 0x28]
add dword [ebp - 0x14], ecx
cmp eax, dword [ebp - 0x44]
jl 0x42b143
movsx eax, word [ebp - 0xc]
cmp eax, dword [ebp - 0x48]
je 0x42b1d0
inc dword [ebp - 0xc]
mov ax, word [ebp - 0xc]
cmp ax, word [ebp - 0x2c]
jl 0x42b0d8
jmp 0x42b258
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push dword [ebp - 8]
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 4], ebx
je 0x42b1c9
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffde
jmp 0x42aeb7
mov eax, dword [ebp - 0x2be4]
cmp eax, dword [ebp + 8]
je 0x42b1e4
mov dword [ebp - 0x18], 0xfffffffe
jmp 0x42b258
cmp word [ebp + 0x1c], 9
jne 0x42b1fb
movsx eax, word [ebp - 0xc]
lea eax, [eax + eax*2]
mov eax, dword [ebp + eax*4 - 0xb08]
jmp 0x42b255
mov eax, dword [ebp + 0x10]
dec eax
cmp ax, bx
jge 0x42b206
xor eax, eax
movsx ecx, ax
movsx eax, word [ebp + 0x14]
add eax, ecx
mov dword [ebp - 0x10], ebx
cmp ecx, eax
mov dword [ebp + 0x18], eax
jge 0x42b252
movsx eax, word [ebp - 0xc]
push 4
lea eax, [eax + eax*2]
pop esi
movsx eax, word [ebp + eax*4 - 0xb10]
cdq
idiv esi
lea edx, [ebp + ecx*4 - 0x2be0]
lea esi, [eax - 1]
mov eax, dword [ebp + 0xc]
cmp ecx, esi
jg 0x42b252
mov edi, dword [edx]
inc dword [ebp - 0x10]
mov dword [eax], edi
add eax, 4
inc ecx
add edx, 4
cmp ecx, dword [ebp + 0x18]
jl 0x42b23b
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
push ebx
push dword [ebp - 8]
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 4], ebx
je 0x42b275
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x18]
mov dword [0x51f410], ebx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x18
push ebx
push dword [ebp - 8]
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
cmp dword [ebp - 4], ebx
je 0x42b2a4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffdd
jmp 0x42aeb7