Function at 0x401519
Capabilities:
Encode data using xor
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x1d4
lea eax, [esp + 0x18]
push ebx
push ebp
push esi
push edi
push 0x40
pop edi
push edi
xor ebx, ebx
push ebx
push eax
call fcn.0041c3f0
add esp, 0xc
lea eax, [esp + 0x68]
push 0xf8
push ebx
push eax
call fcn.0041c3f0
mov eax, dword [esp + 0x1f8]
add esp, 0xc
or ebp, 0xffffffff
mov dword [eax], ebx
cmp dword [esp + 0x1e8], ebx
je 0x4017ea
push ebx
push 0x80
push 3
push ebx
push 3
push SysReAllocStringLen
push dword [esp + 0x200]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4017ea
mov esi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esp + 0x34]
add eax, esi
push eax
push ebp
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017ea
cmp dword [esp + 0x14], ebx
je 0x4015c0
add esi, dword [esp + 0x14]
cmp esi, edi
jb 0x40158d
cmp esi, edi
jne 0x4017ea
mov eax, 0x5a4d
cmp word [esp + 0x28], ax
jne 0x4017ea
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x1c]
push ebx
cdq
push ecx
push eax
push ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x401604
call edi
mov esi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, 0xf8
sub eax, esi
push eax
lea eax, [esp + 0x74]
add eax, esi
push eax
push ebp
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017ea
cmp dword [esp + 0x14], ebx
je 0x401640
add esi, dword [esp + 0x14]
cmp esi, 0xf8
jb 0x401606
cmp esi, 0xf8
jne 0x4017ea
cmp dword [esp + 0x68], 0x4550
jne 0x4017ea
mov esi, dword [esp + 0x70]
test esi, esi
je 0x4017ea
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
push ebp
movlpd qword [esp + 0x20], xmm0
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
jne 0x401688
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
cmp ebx, eax
ja 0x4017ea
jb 0x4016a2
cmp esi, ecx
ja 0x4017ea
push ebx
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], esi
push eax
push esi
push ebp
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x4016d3
call edi
test eax, eax
je 0x4016cf
or eax, 0xffffffff
or ecx, 0xffffffff
jmp 0x4016d7
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
cmp eax, esi
jne 0x4017ea
cmp ecx, ebx
jne 0x4017ea
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
mov esi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push 8
pop eax
sub eax, esi
push eax
lea eax, [esp + 0x2c]
add eax, esi
push eax
push ebp
call edi
test eax, eax
je 0x4017ea
cmp dword [esp + 0x14], ebx
je 0x401720
add esi, dword [esp + 0x14]
cmp esi, 8
jb 0x4016ef
cmp esi, 8
jne 0x4017ea
cmp dword [esp + 0x20], 0x12d84cb
jne 0x4017ea
mov esi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, 0x80
sub eax, esi
push eax
lea eax, [esp + 0x16c]
add eax, esi
push eax
push ebp
call edi
test eax, eax
je 0x4017ea
cmp dword [esp + 0x14], ebx
je 0x401772
add esi, dword [esp + 0x14]
cmp esi, 0x80
jb 0x401739
cmp esi, 0x80
jne 0x4017ea
push 4
push 0x3000
push dword [esp + 0x2c]
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x4017ea
mov esi, dword [esp + 0x24]
mov ecx, ebx
cmp esi, 1
jb 0x4017d9
mov dword [esp + 0x14], ebx
push ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
mov eax, esi
sub eax, ecx
push eax
lea eax, [ecx + edi]
push eax
push ebp
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x4017d5
cmp dword [esp + 0x18], ebx
je 0x4017d5
add ecx, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
cmp ecx, esi
jb 0x4017a1
mov esi, dword [esp + 0x24]
cmp ecx, esi
je 0x401807
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
mov edi, ebx
cmp ebp, 0xffffffff
je 0x4017f8
push ebp
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d4
ret 8
mov eax, dword [esp + 0x1ec]
mov dword [eax], esi
test esi, esi
je 0x4017f1
mov dl, bl
mov cl, byte [ebx + edi]
mov eax, ebx
and eax, 0x7f
mov al, byte [esp + eax + 0x160]
add al, dl
mov dl, cl
xor al, cl
mov byte [ebx + edi], al
inc ebx
cmp ebx, esi
jb 0x401816
jmp 0x4017f1