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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4214a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
push edi
cmp ecx, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], esi
je 0x40f174
mov eax, dword [ecx + 4]
jmp 0x40f176
xor eax, eax
mov dword [esi + 4], eax
mov dword [esi + 0x218], ecx
mov ecx, 0x82
xor eax, eax
lea edi, [esi + 0xc]
push ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x214], 2
mov dword [esi + 0x21c], ebx
mov dword [esi + 0x220], ebx
mov dword [esi + 0x224], ebx
mov dword [esi], 0x422644
push 0x80
push 3
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
push ebx
push 1
push 0x80000000
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 0x21c], eax
jne 0x40f1ed
lea eax, [ebp - 0x18]
push 0x424b48
push eax
mov dword [ebp - 0x18], str.open_zip_file_failed.
call fcn.00418737
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x40f211
lea ecx, [ebp - 0x1c]
push 0x424b48
push ecx
mov dword [ebp - 0x1c], str.zip_file_size_is_0.
call fcn.00418737
push 0x5c
push edi
call fcn.00418217
add esp, 8
cmp eax, ebx
mov dword [ebp + 0x10], eax
je 0x40f229
add eax, 2
mov dword [ebp + 0x10], eax
mov dl, byte [ebp + 0x13]
mov dword [ebp - 0x30], ebx
mov byte [ebp - 0x34], dl
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x40f2f2
push str.Mx_Zip_Bundle_
call fcn.00417a8e
add esp, 4
mov edi, eax
lea ecx, [ebp - 0x34]
push 1
push edi
call fcn.0040ce00
test al, al
je 0x40f28b
mov eax, dword [ebp - 0x30]
mov edx, edi
mov ecx, str.Mx_Zip_Bundle_
cmp edx, ebx
jbe 0x40f281
mov bx, word [ecx]
add ecx, 2
mov word [eax], bx
add eax, 2
dec edx
xor ebx, ebx
jmp 0x40f26c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edi
mov word [eax + edi*2], bx
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00417a8e
mov edx, dword [0x422604]
mov ecx, dword [ebp - 0x2c]
mov ebx, eax
sub edx, ecx
add esp, 4
cmp edx, ebx
ja 0x40f2ad
call fcn.004177a5
test ebx, ebx
jbe 0x40f2e9
mov eax, dword [ebp - 0x2c]
push 0
lea ecx, [ebp - 0x34]
lea edi, [eax + ebx]
push edi
call fcn.0040ce00
test al, al
je 0x40f2e9
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
push ebx
lea eax, [ecx + edx*2]
mov ecx, dword [ebp + 0x10]
push ecx
push eax
call fcn.00401be0
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edi
add esp, 0xc
mov word [edx + edi*2], 0
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x40f2f9
xor ebx, ebx
mov eax, 0x422470
jmp 0x40f2fb
xor ebx, ebx
push eax
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
cmp eax, ebx
mov dword [esi + 0x220], eax
jne 0x40f334
mov eax, dword [ebp - 0x30]
cmp eax, ebx
jne 0x40f31b
mov eax, 0x422470
push eax
mov eax, dword [esi + 0x21c]
push ebx
push ebx
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 0x220], eax
mov eax, dword [esi + 0x220]
cmp eax, ebx
jne 0x40f353
lea ecx, [ebp - 0x20]
push 0x424b48
push ecx
mov dword [ebp - 0x20], str.CreateFileMapping_failed.
call fcn.00418737
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esi + 0x224], eax
jne 0x40f37e
lea edx, [ebp - 0x24]
push 0x424b48
push edx
mov dword [ebp - 0x24], str.MapViewOfFile_failed.
call fcn.00418737
lea edi, [esi + 8]
push edi
call sub.MxTool.dll_CreateMxZipObj
mov eax, dword [edi]
cmp eax, ebx
je 0x40f39f
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
push ebx
push edx
mov edx, dword [esi + 0x224]
push edx
push eax
call dword [ecx + 0x2c]
mov ecx, dword [ebp - 0x30]
cmp ecx, ebx
je 0x40f407
mov al, byte [ecx - 1]
test al, al
je 0x40f3b8
cmp al, 0xff
je 0x40f3b8
dec al
mov byte [ecx - 1], al
jmp 0x40f407
add ecx, 0xfffffffe
push ecx
call fcn.0041749e
add esp, 4
jmp 0x40f407
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc