Function at 0x40f550
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x5d0000]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
push 0x40
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
push dword [esi]
lea ecx, [esi + 4]
mov dword [esp + 0x28], eax
call fcn.0040dfb0
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x10]
imul edi, edi, 0x68
push 0
push edx
mov dword [esp + 0x14], edi
mov ecx, dword [edi + eax + 0x30]
mov eax, dword [edi + eax + 0x34]
push eax
push ecx
push dword [esi + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esi + 0x20]
add eax, edi
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x40f63a
mov eax, dword [eax + 8]
add eax, 0x100
push 1
push eax
call fcn.0055648e
mov ecx, dword [esi + 0x20]
add esp, 8
mov ebx, eax
cmp dword [ecx + edi + 0xc], 0
mov edx, dword [ecx + edi + 8]
ja 0x40f5e5
test edx, edx
je 0x40f603
mov dword [esp + 0xc], 0
test edx, edx
je 0x40f603
push 0
lea eax, [esp + 0x10]
push eax
push edx
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 8]
test eax, eax
je 0x40f618
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x20]
push dword [eax + edi + 8]
push ebx
push dword [esp + 0x28]
call fcn.0054f9f0
add esp, 0xc
push ebx
call fcn.00552bd3
add esp, 4
jmp 0x40f827
cmp ecx, 1
jne 0x40f6f3
mov eax, dword [eax]
add eax, 0x100
push ecx
push eax
call fcn.0055648e
mov ecx, dword [esi + 0x20]
add esp, 8
mov ebx, eax
cmp dword [edi + ecx + 4], 0
mov eax, dword [edi + ecx]
ja 0x40f667
test eax, eax
je 0x40f685
mov dword [esp + 0xc], 0
test eax, eax
je 0x40f685
push 0
lea ecx, [esp + 0x10]
push ecx
push eax
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 8]
test eax, eax
je 0x40f69a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x20]
mov ecx, ebx
mov eax, dword [eax + edi + 0x14]
xor dword [ebx], eax
lea eax, [esp + 0xc]
mov esi, dword [esi + 0x20]
add esi, edi
push eax
mov edi, dword [esi]
mov edx, edi
call fcn.00410b50
add esp, 4
test al, al
je 0x40f6e5
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0xc]
jb 0x40f6e5
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], vtable.snappy::ByteArraySource.0
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edi
call fcn.00410e20
push ebx
call fcn.00552bd3
add esp, 4
jmp 0x40f827
cmp dword [eax + 0xc], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x10], xmm0
jb 0x40f812
ja 0x40f712
cmp dword [eax + 8], 0
jbe 0x40f812
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], eax
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 4
lea eax, [esp + 0x28]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
add eax, 0x100
push 1
push eax
call fcn.0055648e
mov ebx, eax
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
je 0x40f779
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0xc]
mov edi, dword [eax + edi + 8]
mov eax, dword [eax + ecx + 0x14]
mov ecx, ebx
xor dword [ebx], eax
lea eax, [esp + 0x24]
mov edx, dword [esp + 0x1c]
push eax
call fcn.00410b50
add esp, 4
test al, al
je 0x40f7d7
cmp edi, dword [esp + 0x24]
jb 0x40f7d7
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x30], vtable.snappy::ByteArraySource.0
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], eax
call fcn.00410e20
test al, al
mov dword [esp + 0x30], vtable.snappy::Source.0
cmovne edi, dword [esp + 0x24]
push ebx
call fcn.00552bd3
mov ecx, dword [esp + 0x2c]
add esp, 4
mov edx, dword [esp + 0x2c]
add ecx, edi
mov eax, dword [esi + 0x20]
mov edi, dword [esp + 0xc]
adc edx, 0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
cmp edx, dword [eax + edi + 0xc]
jb 0x40f722
ja 0x40f812
cmp ecx, dword [eax + edi + 8]
jb 0x40f722
mov eax, dword [esi + 8]
test eax, eax
je 0x40f827
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov ecx, dword [esp + 0x3c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0054d6d8
mov esp, ebp
pop ebp
ret 0xc