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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416910
push 0x4159e4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x5c
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
mov edi, eax
inc edi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x28], ebx
mov esi, 0x4168c8
mov eax, dword [esi]
cmp byte [eax], 0x30
jne 0x40f66d
inc eax
push edi
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
je 0x40f68d
inc ebx
add esi, 4
cmp esi, str..Upack
jb 0x40f665
mov eax, dword [ebp - 0x38]
jmp 0x40f69d
test ebx, ebx
je 0x40f698
mov dword [ebp - 0x28], 1
mov eax, 1
test eax, eax
jne 0x40f6b2
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f6e5
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040f1f0
add esp, 4
test eax, eax
jne 0x40f70f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
cmp eax, 0xa00000
jbe 0x40f737
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test edi, edi
jne 0x40f76a
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
push edi
call esi
xor eax, eax
cmp ebx, eax
jne 0x40f798
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x4c], ebx
mov ebx, dword [ebx + 0x3c]
add ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x58], ebx
xor edx, edx
mov dx, word [ebx + 0x14]
lea eax, [edx + ebx + 0x18]
mov dword [ebp - 0x48], eax
cmp dword [ebx], 0x4550
jne 0x40f898
cmp word [ebx + 0x5c], 1
je 0x40f898
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x40f898
mov ax, word [ebx + 6]
test ax, ax
je 0x40f898
mov ecx, 3
mov edi, str.UpackByDwing
lea esi, [ebx - 0x10]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x40f886
mov ecx, dword [ebp - 0x48]
push ecx
push edx
and eax, 0xffff
push eax
call fcn.0040f5b0
add esp, 0xc
test eax, eax
jne 0x40f886
cmp word [ebx + 6], 2
jne 0x40f82f
mov edx, dword [ebp - 0x48]
cmp dword [edx], 0x7865742e
je 0x40f82f
mov dword [ebp - 0x30], 1
jmp 0x40f89f
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40f851
mov eax, dword [ebx + 0x88]
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x40f848
cmp eax, dword [ebx + 0x50]
jbe 0x40f851
mov dword [ebp - 0x30], 1
jmp 0x40f89f
mov eax, dword [ebx + 0xa8]
mov dword [ebp - 0x50], eax
cmp eax, dword [ebx + 0x50]
ja 0x40f866
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x40f89f
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0040f4c0
add esp, 0x10
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [ebp - 0x54]
je 0x40f89f
mov dword [ebp - 0x30], 1
jmp 0x40f89f
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40f8d0
mov eax, dword [ebp + 8]
push eax
mov ecx, 0x41ef68
call fcn.00406110
test eax, eax
je 0x40f8d0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret