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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56ccb5
mov eax, dword fs:[0]
push eax
sub esp, 0x50
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 - 0x30], ebx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], edi
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 - 0x5c], esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x44]
mov edx, dword [ebp + 0x10]
call fcn.0040ed20
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x44]
call fcn.0040db70
cmp eax, 0xffffffff
jne 0x40fde6
mov ecx, dword [ebp - 0x44]
call fcn.0040dc60
mov dword [ebp - 0x54], vtable.SFile.0
mov byte [ebp - 4], 4
call fcn.0042d054
mov ecx, eax
mov byte [ebp - 4], 3
test ecx, ecx
je 0x410214
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], eax
push 0x1001
push esi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 5
call fcn.0040dfa0
imul ecx, dword [ebp - 0x40], 0x68
mov dword [ebp - 0x24], ecx
add ecx, dword [ebx + 0x20]
mov edx, dword [ecx + 8]
mov eax, edx
or eax, dword [ecx + 0xc]
je 0x410144
mov eax, dword [ecx + 0x10]
cmp eax, 1
jne 0x40feae
lea eax, [edx + 0x1000]
push 1
push eax
call fcn.005562b1
add esp, 8
mov dword [ebp - 0x20], eax
mov ecx, ebx
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x40]
call fcn.0040f570
mov ecx, dword [ebx + 0x20]
mov edx, dword [ebp - 0x24]
mov eax, dword [ecx + edx + 8]
test eax, eax
je 0x40fe8b
push 0
lea ecx, [ebp - 0x48]
push ecx
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x20]
call fcn.005529f3
mov ecx, dword [ebx + 0x20]
add esp, 4
mov edx, dword [ebp - 0x24]
mov eax, dword [ecx + edx + 8]
add dword [edi], eax
mov eax, dword [ecx + edx + 0xc]
adc dword [edi + 4], eax
jmp 0x410144
mov edx, dword [ebx]
lea ecx, [ebx + 4]
push 0x40
push edx
test eax, eax
jne 0x40ffb5
call fcn.0040dfa0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
mov edi, dword [ebp - 0x24]
push 0
push dword [edi + eax + 0x34]
push dword [edi + eax + 0x30]
call fcn.0040e1b0
push 1
push 0x1001000
call fcn.005562b1
mov ecx, dword [ebx + 0x20]
add esp, 8
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov edi, dword [ecx + edi + 8]
mov ebx, dword [ecx + edx + 0xc]
mov ecx, edi
or ecx, ebx
je 0x40ffa7
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
nop dword [eax + eax]
test ebx, ebx
ja 0x40ff4b
jb 0x40ff1e
cmp edi, 0x1000000
ja 0x40ff4b
mov dword [ebp - 0x24], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x3c], xmm0
mov eax, edi
mov dword [ebp - 0x28], eax
test edi, edi
jne 0x40ff43
movlpd qword [ebp - 0x3c], xmm0
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x3c]
jmp 0x40ff91
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x3c]
jmp 0x40ff63
add edi, 0xff000000
mov dword [ebp - 0x24], 0
mov eax, 0x1000000
mov dword [ebp - 0x28], eax
adc ebx, 0xffffffff
push 0
lea ecx, [ebp - 0x24]
push ecx
push eax
push dword [ebp - 0x2c]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
add dword [ecx], eax
mov eax, edi
adc dword [ecx + 4], 0
or eax, ebx
jne 0x40ff10
mov esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x2c]
push eax
call fcn.005529f3
mov ebx, dword [ebp - 0x30]
jmp 0x41012b
xorps xmm0, xmm0
movlpd qword [ebp - 0x3c], xmm0
call fcn.0040dfa0
mov eax, dword [ebx + 0x20]
lea ecx, [ebx + 4]
mov edi, dword [ebp - 0x24]
push 0
push dword [edi + eax + 0x34]
push dword [edi + eax + 0x30]
call fcn.0040e1b0
push 1
push 0x1001000
call fcn.005562b1
mov ecx, dword [ebx + 0x20]
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ecx + edi + 0xc], 0
jb 0x410125
ja 0x410007
cmp dword [ecx + edi + 8], 0
jbe 0x410125
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x58], eax
nop word [eax + eax]
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 4
lea eax, [ebp - 0x28]
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x28]
add eax, 0x100
push 1
push eax
call fcn.005562b1
mov ecx, eax
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x28]
add esp, 8
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x410076
push 0
lea edx, [ebp - 0x48]
push edx
push eax
push ecx
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x20]
mov edi, 0x1000000
mov edx, dword [ebp - 0x24]
mov eax, dword [eax + edx + 0x14]
xor dword [ecx], eax
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x28]
push eax
call fcn.00410b70
add esp, 4
test al, al
je 0x4100ca
cmp dword [ebp - 0x30], edi
ja 0x4100ca
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
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 - 0x30]
push dword [ebp - 0x20]
call fcn.005529f3
add esp, 4
test edi, edi
je 0x4100ec
push 0
lea eax, [ebp - 0x38]
push eax
push edi
push dword [ebp - 0x2c]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [esi], edi
mov ecx, dword [ebp - 0x58]
adc dword [esi + 4], 0
add ecx, edi
mov edx, dword [ebp - 0x34]
mov eax, dword [ebx + 0x20]
adc edx, 0
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x34], edx
cmp edx, dword [eax + edi + 0xc]
jb 0x410020
ja 0x41011f
cmp ecx, dword [eax + edi + 8]
jb 0x410020
mov esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x2c]
push eax
call fcn.005529f3
mov eax, dword [ebx + 8]
add esp, 4
test eax, eax
je 0x410144
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [ebx + 8], 0
mov edi, dword [ebp - 0x50]
test edi, edi
je 0x410157
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x50], edi
imul ecx, dword [ebp - 0x40], 0x68
add ecx, dword [ebx + 0x20]
mov ebx, dword [ecx + 0x38]
mov eax, ebx
mov edx, dword [ecx + 0x3c]
or eax, edx
je 0x41017f
sub esp, 8
push dword [ecx + 0x44]
push dword [ecx + 0x40]
mov ecx, esi
push edx
push ebx
call fcn.0040d720
add esp, 0x18
test edi, edi
je 0x41018b
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov edx, dword [ebp - 0x4c]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4101a8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x44]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4101c2
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 0x4101d9
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 0x4101f1
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 0x10
push 0x80004005
call fcn.00402740
int3