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

Disassembly:
sub esp, 0x1d4
push ebx
push ebp
push esi
push edi
push 0x40
xor ebx, ebx
mov dword [esp + 0x1c], 0x4679a8
lea eax, [esp + 0x2c]
or ebp, 0xffffffff
push ebx
push eax
mov dword [esp + 0x28], ebp
call fcn.0041db90
add esp, 0xc
lea eax, [esp + 0x68]
push 0xf8
push ebx
push eax
call fcn.0041db90
mov eax, dword [esp + 0x1f8]
lea ecx, [esp + 0x24]
add esp, 8
mov dword [eax], ebx
push 3
push 3
push SysReAllocStringLen
push dword [esp + 0x1f8]
call fcn.00401442
mov esi, dword [esp + 0x1c]
test al, al
je 0x401846
cmp esi, ebp
je 0x401846
mov edi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push 0x40
pop eax
sub eax, edi
push eax
lea eax, [esp + 0x34]
add eax, edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4015fb
cmp dword [esp + 0x14], ebx
je 0x4015fb
add edi, dword [esp + 0x14]
cmp edi, 0x40
jb 0x4015ca
cmp edi, 0x40
jne 0x401846
mov eax, 0x5a4d
cmp word [esp + 0x28], ax
jne 0x401846
cmp esi, ebp
je 0x401846
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x1c]
push ebx
cdq
push ecx
push eax
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebp
mov dword [esp + 0x18], eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x401647
call ebp
mov edi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, 0xf8
sub eax, edi
push eax
lea eax, [esp + 0x74]
add eax, edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40167f
cmp dword [esp + 0x14], ebx
je 0x40167f
add edi, dword [esp + 0x14]
cmp edi, 0xf8
jb 0x401649
cmp edi, 0xf8
jne 0x401846
cmp dword [esp + 0x68], 0x4550
jne 0x401846
mov edi, dword [esp + 0x70]
test edi, edi
je 0x401846
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
cmp esi, 0xffffffff
je 0x4016c3
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4016cc
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
cmp ebx, eax
ja 0x401846
jb 0x4016e6
cmp edi, ecx
ja 0x401846
cmp esi, 0xffffffff
jne 0x4016f3
or eax, 0xffffffff
or ecx, 0xffffffff
jmp 0x401720
push ebx
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], edi
push eax
push edi
push esi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x40171c
call ebp
test eax, eax
jne 0x4016eb
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
cmp eax, edi
jne 0x401846
cmp ecx, ebx
jne 0x401846
cmp esi, 0xffffffff
je 0x401846
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
push 8
pop eax
sub eax, edi
push eax
lea eax, [esp + 0x2c]
add eax, edi
push eax
push esi
call ebp
test eax, eax
je 0x40176e
cmp dword [esp + 0x14], ebx
je 0x40176e
add edi, dword [esp + 0x14]
cmp edi, 8
jb 0x401741
cmp edi, 8
jne 0x401846
cmp dword [esp + 0x20], 0x12d84cb
jne 0x401846
cmp esi, 0xffffffff
je 0x401846
mov edi, ebx
push ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebx
push eax
mov eax, 0x80
sub eax, edi
push eax
lea eax, [esp + 0x16c]
add eax, edi
push eax
push esi
call ebp
test eax, eax
je 0x4017c5
cmp dword [esp + 0x14], ebx
je 0x4017c5
add edi, dword [esp + 0x14]
cmp edi, 0x80
jb 0x401790
cmp edi, 0x80
jne 0x401846
push 4
push 0x3000
push dword [esp + 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebp, eax
test ebp, ebp
je 0x401846
mov edi, dword [esp + 0x24]
cmp esi, 0xffffffff
je 0x401833
cmp edi, 1
jb 0x401833
mov ecx, ebx
mov dword [esp + 0x14], ebx
push ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
mov eax, edi
sub eax, ecx
push eax
lea eax, [ecx + ebp]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x40182d
cmp dword [esp + 0x18], ebx
je 0x40182d
add ecx, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
cmp ecx, edi
jb 0x4017f9
mov edi, dword [esp + 0x24]
jmp 0x401835
mov ecx, ebx
cmp ecx, edi
je 0x401863
push 0x8000
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ebp, ebx
cmp esi, 0xffffffff
je 0x401854
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x1d4
ret 8
mov eax, dword [esp + 0x1ec]
mov dword [eax], edi
test edi, edi
je 0x401848
mov dl, bl
mov cl, byte [ebx + ebp]
mov eax, ebx
and eax, 0x7f
mov al, byte [esp + eax + 0x160]
add al, dl
mov dl, cl
xor al, cl
mov byte [ebx + ebp], al
inc ebx
cmp ebx, edi
jb 0x401872
jmp 0x401848