Function at 0x40f8f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56cc65
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x5cf000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
push eax
call fcn.0040a460
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x54], esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
mov edx, dword [ebp + 0x10]
call fcn.0040ed20
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x38]
call fcn.0040db70
cmp eax, 0xffffffff
jne 0x40f964
mov ecx, dword [ebp - 0x38]
call fcn.0040dc60
mov dword [ebp - 0x48], vtable.SFile.0
mov byte [ebp - 4], 4
call fcn.0042d054
mov ecx, eax
mov byte [ebp - 4], 3
test ecx, ecx
je 0x40fd49
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], eax
push 0x1001
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 5
call fcn.0040dfa0
mov ecx, dword [ebx + 0x20]
mov edx, dword [ecx + 0x70]
mov eax, edx
or eax, dword [ecx + 0x74]
je 0x40fc71
mov eax, dword [ecx + 0x78]
cmp eax, 1
jne 0x40fa07
lea eax, [edx + 0x1000]
push 1
push eax
call fcn.005562b1
add esp, 8
mov edi, eax
mov ecx, ebx
push edi
push 0
push 1
call fcn.0040f570
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x40f9f9
push 0
lea ecx, [ebp - 0x3c]
push ecx
push eax
push edi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call fcn.005529f3
add esp, 4
jmp 0x40fc71
mov ecx, dword [ebx]
push 0x40
push ecx
lea ecx, [ebx + 4]
test eax, eax
jne 0x40faf7
call fcn.0040dfa0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.0040e1b0
push 1
push 0x1001000
call fcn.005562b1
mov ecx, dword [ebx + 0x20]
add esp, 8
mov edx, eax
mov dword [ebp - 0x24], edx
mov edi, dword [ecx + 0x70]
mov ebx, dword [ecx + 0x74]
mov ecx, edi
or ecx, ebx
je 0x40fae9
mov esi, dword [ebp - 0x2c]
nop
test ebx, ebx
ja 0x40fa9b
jb 0x40fa6e
cmp edi, 0x1000000
ja 0x40fa9b
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
mov eax, edi
mov dword [ebp - 0x20], eax
test edi, edi
jne 0x40fa93
movlpd qword [ebp - 0x34], xmm0
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
jmp 0x40fadc
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
jmp 0x40fab3
add edi, 0xff000000
mov dword [ebp - 0x28], 0
mov eax, 0x1000000
mov dword [ebp - 0x20], eax
adc ebx, 0xffffffff
push 0
lea ecx, [ebp - 0x28]
push ecx
push eax
push edx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x24]
mov eax, edi
or eax, ebx
jne 0x40fa60
mov esi, dword [ebp - 0x54]
push edx
call fcn.005529f3
mov ebx, dword [ebp - 0x2c]
jmp 0x40fc58
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
call fcn.0040dfa0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.0040e1b0
push 1
push 0x1001000
call fcn.005562b1
mov ecx, dword [ebx + 0x20]
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ecx + 0x74], 0
jb 0x40fc52
ja 0x40fb48
cmp dword [ecx + 0x70], 0
jbe 0x40fc52
mov eax, dword [ebp - 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x4c], eax
nop dword [eax]
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 4
lea eax, [ebp - 0x24]
push eax
push dword [ebx + 8]
call edi
mov eax, dword [ebp - 0x24]
add eax, 0x100
push 1
push eax
call fcn.005562b1
mov ecx, eax
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x24]
add esp, 8
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x40fbae
push 0
lea edx, [ebp - 0x3c]
push edx
push eax
push ecx
push dword [ebx + 8]
call edi
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x20]
mov edi, 0x1000000
mov eax, dword [eax + 0x7c]
xor dword [ecx], eax
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
push eax
call fcn.00410b70
add esp, 4
test al, al
je 0x40fbfe
cmp dword [ebp - 0x2c], edi
ja 0x40fbfe
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], vtable.snappy::ByteArraySource.0
mov dword [ebp - 0x14], eax
call fcn.00410e50
test al, al
mov dword [ebp - 0x1c], vtable.snappy::Source.0
cmovne edi, dword [ebp - 0x2c]
push dword [ebp - 0x20]
call fcn.005529f3
add esp, 4
test edi, edi
je 0x40fc1e
push 0
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x20]
add ecx, edi
mov edi, dword [ebp - 0x50]
adc edi, 0
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], edi
cmp edi, dword [eax + 0x74]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jb 0x40fb60
ja 0x40fc4c
cmp ecx, dword [eax + 0x70]
jb 0x40fb60
mov esi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x28]
push eax
call fcn.005529f3
mov eax, dword [ebx + 8]
add esp, 4
test eax, eax
je 0x40fc71
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [ebx + 8], 0
mov edi, dword [ebp - 0x44]
test edi, edi
je 0x40fc84
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x44], edi
mov ecx, dword [ebx + 0x20]
mov ebx, dword [ecx + 0xa0]
mov eax, ebx
mov edx, dword [ecx + 0xa4]
or eax, edx
je 0x40fcb4
sub esp, 8
push dword [ecx + 0xac]
push dword [ecx + 0xa8]
mov ecx, esi
push edx
push ebx
call fcn.0040d720
add esp, 0x18
test edi, edi
je 0x40fcc0
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov edx, dword [ebp - 0x40]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fcdd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x38]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40fcf7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40fd0e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40fd26
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d63f
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.00402740
int3