Function at 0x401500
Capabilities:
Encode data using xor
Get file size
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x40de68
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x412064]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
or ecx, 0xffffffff
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], 0x410244
xor ebx, ebx
cmp ebp, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
je 0x401735
cmp eax, ebx
je 0x401735
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x1c], esi
je 0x401730
cmp esi, ebx
je 0x401730
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push ebx
push 2
push ebx
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x40172b
cmp eax, 0xffffffff
je 0x40172b
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x18], esi
jne 0x4015d4
or edi, 0xffffffff
jmp 0x40175f
mov eax, dword [esi + 0x3c]
mov eax, dword [eax + esi + 0x9c]
mov ecx, esi
sub ecx, eax
push 0x1000
lea edx, [ecx + edi - 0x1000]
push edx
push ebp
mov dword [esp + 0x2c], eax
call fcn.00407480
mov eax, dword [ebp + 0xd4]
add esp, 0xc
cmp eax, 0xf28
je 0x401613
mov edi, 0xfffffffe
jmp 0x40175f
push 0xf28
call fcn.00402bc4
mov esi, eax
add esp, 4
test esi, esi
je 0x40173c
push 0xf28
push 0
push esi
call fcn.00405cb0
lea eax, [ebp + 0xd8]
push 0xf28
push eax
push esi
call fcn.00407480
add esp, 0x18
lea ecx, [esp + 0x3c]
mov eax, 0xf28
mov edx, esi
call fcn.00402ae0
mov eax, dword [esp + 0x3c]
cmp eax, dword [ebp + 0xd0]
jne 0x40173c
push 0xf28
lea eax, [ebp + 0xd8]
push eax
push esi
call fcn.00407480
add esp, 0xc
xor eax, eax
mov cl, byte [ebp + 0xcc]
xor byte [eax + esi], cl
add eax, 1
cmp eax, 0xf28
jb 0x401683
push 0xf28
lea eax, [ebp + 0xd8]
push esi
push eax
call fcn.00407480
sub edi, dword [esp + 0x2c]
sub edi, 0x1000
push edi
call fcn.00402bc4
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4016c6
lea edi, [eax - 4]
jmp 0x401741
push edi
push 0
push ebx
call fcn.00405cb0
mov edx, dword [esp + 0x24]
push edi
push edx
push ebx
call fcn.00407480
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebp + 0x85c]
xor edx, edx
add esp, 0x18
add eax, ebx
cmp ecx, edx
je 0x4016f2
mov dword [eax + 0x58], ecx
mov dword [eax + 0x9c], edx
mov dword [eax + 0x98], edx
mov eax, ebx
call fcn.00402b20
test eax, eax
jne 0x40170e
lea edi, [eax - 5]
jmp 0x401741
lea ecx, [esp + 0x3c]
mov eax, edi
mov edx, ebx
call fcn.00402ae0
mov edi, dword [esp + 0x3c]
sub edi, dword [ebp]
neg edi
sbb edi, edi
and edi, 0xfffffffa
jmp 0x401741
or edi, 0xffffffff
jmp 0x401770
or edi, 0xffffffff
jmp 0x401774
mov edi, 0xffffff9c
jmp 0x401774
mov edi, 0xfffffffd
test esi, esi
je 0x40174e
push esi
call fcn.004038d1
add esp, 4
test ebx, ebx
je 0x40175b
push ebx
call fcn.004038d1
add esp, 4
mov esi, dword [esp + 0x18]
xor ebx, ebx
cmp esi, ebx
je 0x40176c
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40177f
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x40178f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret