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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56ce35
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x5d0000]
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 dword [ebp - 0x58], esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
mov edx, dword [ebp + 0x10]
call fcn.0040ed00
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x38]
call fcn.0040db70
cmp eax, 0xffffffff
jne 0x40f947
mov ecx, dword [ebp - 0x38]
call fcn.0040dc60
mov dword [ebp - 0x48], vtable.SFile.0
mov byte [ebp - 4], 4
call fcn.0042d02f
mov ecx, eax
mov byte [ebp - 4], 3
test ecx, ecx
je 0x40fd29
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.0040dfb0
mov ecx, dword [ebx + 0x20]
mov edx, dword [ecx + 0x70]
mov eax, edx
or eax, dword [ecx + 0x74]
je 0x40fc51
mov eax, dword [ecx + 0x78]
cmp eax, 1
jne 0x40f9ea
lea eax, [edx + 0x1000]
push 1
push eax
call fcn.0055648e
add esp, 8
mov edi, eax
mov ecx, ebx
push edi
push 0
push 1
call fcn.0040f550
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x40f9dc
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.00552bd3
add esp, 4
jmp 0x40fc51
mov ecx, dword [ebx]
push 0x40
push ecx
lea ecx, [ebx + 4]
test eax, eax
jne 0x40fad9
call fcn.0040dfb0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.0040e1c0
push 1
push 0x1001000
call fcn.0055648e
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 0x40facb
mov esi, dword [ebp - 0x2c]
test ebx, ebx
ja 0x40fa7d
jb 0x40fa50
cmp edi, 0x1000000
ja 0x40fa7d
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 0x40fa75
movlpd qword [ebp - 0x34], xmm0
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
jmp 0x40fabe
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
jmp 0x40fa95
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 0x40fa42
mov esi, dword [ebp - 0x54]
push edx
call fcn.00552bd3
mov ebx, dword [ebp - 0x2c]
jmp 0x40fc38
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
call fcn.0040dfb0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.0040e1c0
push 1
push 0x1001000
call fcn.0055648e
mov ecx, dword [ebx + 0x20]
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ecx + 0x74], 0
jb 0x40fc32
ja 0x40fb2a
cmp dword [ecx + 0x70], 0
jbe 0x40fc32
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
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.0055648e
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 0x40fb8e
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.00410b50
add esp, 4
test al, al
je 0x40fbde
cmp dword [ebp - 0x2c], edi
ja 0x40fbde
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.00410e20
test al, al
mov dword [ebp - 0x1c], vtable.snappy::Source.0
cmovne edi, dword [ebp - 0x2c]
push dword [ebp - 0x20]
call fcn.00552bd3
add esp, 4
test edi, edi
je 0x40fbfe
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 0x40fb40
ja 0x40fc2c
cmp ecx, dword [eax + 0x70]
jb 0x40fb40
mov esi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x28]
push eax
call fcn.00552bd3
mov eax, dword [ebx + 8]
add esp, 4
test eax, eax
je 0x40fc51
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 0x40fc64
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 0x40fc94
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 0x40fca0
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 0x40fcbd
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 0x40fcd7
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 0x40fcee
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 0x40fd06
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.0054d6d8
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.00402740
int3