Function at 0x4039a1
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
pushal
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call sub.KERNEL32.DLL_CreateFileA
inc eax
je 0x403c79
punpckhbw mm5, mm3
movd mm6, eax
movd ebx, mm6
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize
or eax, eax
pcmpgtw mm1, mm0
je 0x403c6a
movd mm7, eax
movd dword [ebp - 4], mm7
pcmpgtw mm0, mm6
push 0
push 0
push 0
push 2
push 0
push ebx
call sub.KERNEL32.DLL_CreateFileMappingA
movd mm0, eax
movd esi, mm0
push 0
push 0
push 0
push 4
push esi
call sub.KERNEL32.DLL_MapViewOfFile
pcmpeqd mm5, mm4
movd mm1, eax
movd edi, mm1
punpckhwd mm2, mm4
movd mm2, eax
movd dword [ebp - 0x20], mm2
or eax, eax
je 0x403c6a
inc edi
movq mm3, mm2
pushal
movd mm3, dword [ebp - 4]
movd ecx, mm3
psubsb mm0, mm5
movd mm4, edi
movd eax, mm4
movd mm2, eax
movd mm6, dword [ebp - 0x20]
psubd mm2, mm6
movd eax, mm2
punpckhdq mm6, mm0
movd mm2, eax
movd mm7, dword [ebp - 4]
psubd mm2, mm7
movd eax, mm2
neg eax
movd mm5, eax
movd ecx, mm5
pcmpgtb mm5, mm1
mov al, pe_nt_image_headers32
movd mm7, edi
movd edx, mm7
pcmpgtd mm4, mm6
repne scasb al, byte es:[edi]
pmaxub mm6, mm4
or ecx, ecx
pavgb mm4, mm2
je 0x403c5f
pcmpgtd mm4, mm0
movd mm0, edi
movd eax, mm0
movd mm3, eax
movd mm0, edx
psubd mm3, mm0
movd eax, mm3
packsswb mm2, mm0
dec eax
dec eax
movd mm1, eax
movd dword [ebp - 0x14], mm1
movd mm2, edi
movd edx, mm2
pmulhuw mm0, mm3
dec edi
pcmpeqb mm3, mm1
dec edi
movd mm3, edi
movd dword [ebp - 0x18], mm3
paddb mm3, mm0
jmp 0x403ad8
dec edi
cmp dword [ebp - 0x14], 0
jbe 0x403ad0
dec dword [ebp - 0x14]
pcmpgtw mm2, mm4
jmp 0x403ad5
jmp 0x403b0a
psraw mm4, mm6
cmp byte [edi], 0x40
jbe 0x403ae2
cmp byte [edi], 0x5b
jb 0x403ac1
cmp byte [edi], 0x2f
jbe 0x403aec
cmp byte [edi], 0x3a
jb 0x403ac1
cmp byte [edi], 0x60
jbe 0x403af6
cmp byte [edi], 0x7b
jb 0x403ac1
cmp byte [edi], 0x5f
je 0x403ac1
cmp byte [edi], 0x2e
je 0x403ac1
cmp byte [edi], 0x2b
je 0x403ac1
cmp byte [edi], 0x2d
je 0x403ac1
cmp dword [ebp - 0x18], edi
je 0x403c5f
paddb mm5, mm6
inc edi
movd mm4, edi
movd dword [ebp - 8], mm4
paddsb mm0, mm5
movd mm5, edx
movd edi, mm5
movd mm6, edi
movd dword [ebp - 0x1c], mm6
pcmpeqb mm3, mm1
jmp 0x403b3b
inc edi
pmulhw mm4, mm3
dec ecx
punpckhdq mm6, mm2
cmp byte [edi], 0x40
jbe 0x403b45
cmp byte [edi], 0x5b
jb 0x403b33
cmp byte [edi], 0x2f
jbe 0x403b4f
cmp byte [edi], 0x3a
jb 0x403b33
cmp byte [edi], 0x60
jbe 0x403b59
cmp byte [edi], 0x7b
jb 0x403b33
cmp byte [edi], 0x5f
je 0x403b33
cmp byte [edi], 0x2e
je 0x403b33
cmp byte [edi], 0x2b
je 0x403b33
cmp byte [edi], 0x2d
je 0x403b33
cmp dword [ebp - 0x1c], edi
je 0x403c5f
pminsw mm3, mm1
sub edi, 4
cmp dword [ebp - 0x1c], edi
jle 0x403b8c
psubd mm1, mm0
add edi, 4
jmp 0x403c5f
add edi, 4
dec edi
por mm5, mm6
movd mm3, edi
movd mm1, dword [ebp - 8]
psubd mm3, mm1
movd edi, mm3
movd mm7, edi
movd dword [ebp - 0xc], mm7
packssdw mm4, mm0
inc dword [ebp - 0xc]
movd mm2, edi
movd mm1, dword [ebp - 8]
paddd mm2, mm1
movd edi, mm2
pminsw mm2, mm5
inc edi
dec ecx
cmp dword [ebp - 0xc], 0x64
paddusw mm6, mm5
jge 0x403c53
psllw mm0, mm3
pushal
psllw mm0, mm4
movd mm0, dword [ebp - 8]
movd esi, mm0
pmaxub mm1, mm6
movd mm1, dword [ebp + 0x10]
movd edi, mm1
movd mm2, dword [ebp - 0xc]
movd ecx, mm2
inc ecx
psubusb mm0, mm1
cmp ecx, dword [ebp + 0x14]
jle 0x403bfc
jmp 0x403c81
punpckhbw mm5, mm2
movd mm3, dword [ebp - 0x1c]
movd eax, mm3
pcmpeqd mm6, mm0
movd mm4, dword [eax]
movd eax, mm4
xor eax, 0x202020
cmp eax, 0x7243494d
jne 0x403c1b
popal
jmp 0x403c5f
pmaddwd mm1, mm5
movd mm3, dword [ebp + 0x14]
movd mm2, ecx
psubd mm3, mm2
movd dword [ebp + 0x14], mm3
psadbw mm3, mm0
movd mm2, dword [ebp + 0x10]
movd mm3, ecx
paddd mm2, mm3
movd dword [ebp + 0x10], mm2
movd mm5, dword [ebp + 0xc]
movd eax, mm5
add dword [eax], ecx
punpckhdq mm4, mm3
dec ecx
pmaddwd mm6, mm2
rep movsb byte es:[edi], byte [esi]
psrad mm5, mm0
popal
cmp ecx, 0
punpckhbw mm2, mm3
jg 0x403a3d
popal
dec edi
push edi
call sub.KERNEL32.DLL_UnmapViewOfFile
pminsw mm3, mm5
push esi
call sub.KERNEL32.DLL_CloseHandle
push ebx
call sub.KERNEL32.DLL_CloseHandle
pcmpgtw mm2, mm5
popal
leave
ret 0x10
pcmpgtb mm2, mm4
pushal
pand mm4, mm1
movd mm3, edi
movd mm4, dword [ebp + 0xc]
psubd mm3, mm4
movd edi, mm3
sub edi, 4
movd mm6, dword [ebp + 0xc]
movd eax, mm6
movd mm7, edi
movd dword [eax], mm7
push 0
push dword [ebp + 0xc]
call fcn.0040954d
popal
psubusw mm6, mm4
movd mm0, dword [ebp + 0xc]
movd dword [ebp + 0x10], mm0
movd mm0, dword [ebp + 0xc]
movd eax, mm0
psadbw mm3, mm2
add dword [ebp + 0x10], 4
paddsw mm6, mm0
mov dword [eax], 0
movq mm2, mm6
mov dword [ebp + 0x14], 0xf9ffc
movd mm3, dword [ebp - 8]
movd esi, mm3
paddsb mm2, mm0
movd mm4, dword [ebp + 0x10]
movd edi, mm4
pandn mm3, mm4
movd mm5, dword [ebp - 0xc]
movd ecx, mm5
punpckhdq mm4, mm5
jmp 0x403bf9