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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57d865
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
push eax
call fcn.0040c4e0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
mov edx, dword [ebp + 0x10]
call fcn.00410cb0
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
call fcn.0040fae0
cmp eax, 0xffffffff
jne 0x4118c9
mov ecx, dword [ebp - 0x20]
call fcn.0040fbc0
mov dword [ebp - 0x4c], vtable.SFile.0
mov byte [ebp - 4], 4
call fcn.00437ca1
mov ecx, eax
mov byte [ebp - 4], 3
test ecx, ecx
je 0x411cd3
mov eax, dword [ecx]
push ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], eax
push 0x1001
push esi
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 5
call fcn.0040ff00
mov ecx, dword [edi + 0x20]
lea ebx, [edi + 0x20]
mov edx, dword [ecx + 0x70]
mov eax, edx
or eax, dword [ecx + 0x74]
je 0x411c07
mov eax, dword [ecx + 0x78]
cmp eax, 1
jne 0x411973
lea eax, [edx + 0x1000]
push 1
push eax
call fcn.00562e6c
add esp, 8
mov dword [ebp - 0x1c], eax
mov ecx, edi
push eax
push 0
push 1
call fcn.004114e0
mov ecx, dword [ebx]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x70]
test eax, eax
je 0x411965
push 0
lea ecx, [ebp - 0x34]
push ecx
push eax
push edi
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call fcn.0055d993
add esp, 4
jmp 0x411c07
mov edx, dword [edi]
lea ecx, [edi + 4]
mov dword [ebp - 0x2c], ecx
push 0x40
push edx
test eax, eax
jne 0x411a83
call fcn.0040ff00
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x2c]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.00410100
push 1
push 0x1001000
call fcn.00562e6c
mov ecx, dword [ebx]
add esp, 8
mov edx, eax
mov dword [ebp - 0x10], edx
mov edi, dword [ecx + 0x70]
mov ebx, dword [ecx + 0x74]
mov ecx, edi
or ecx, ebx
je 0x411a59
mov esi, dword [ebp - 0x14]
nop dword [eax]
test ebx, ebx
ja 0x411a0b
jb 0x4119de
cmp edi, 0x1000000
ja 0x411a0b
mov dword [ebp - 0x1c], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
mov eax, edi
mov dword [ebp - 0x18], eax
test edi, edi
jne 0x411a03
movlpd qword [ebp - 0x40], xmm0
mov ebx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
jmp 0x411a4c
mov ebx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
jmp 0x411a23
add edi, 0xff000000
mov dword [ebp - 0x1c], 0
mov eax, 0x1000000
mov dword [ebp - 0x18], eax
adc ebx, 0xffffffff
push 0
lea ecx, [ebp - 0x1c]
push ecx
push eax
push edx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x10]
mov eax, edi
or eax, ebx
jne 0x4119d0
mov esi, dword [ebp - 0x30]
push edx
call fcn.0055d993
mov ebx, dword [ebp - 0x14]
add esp, 4
mov eax, dword [ebx + 8]
test eax, eax
je 0x411a7b
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [ebx + 8], 0
add ebx, 0x20
jmp 0x411c07
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
call fcn.0040ff00
mov eax, dword [ebx]
lea ecx, [edi + 4]
push 0
push dword [eax + 0x9c]
push dword [eax + 0x98]
call fcn.00410100
push 1
push 0x1001000
call fcn.00562e6c
mov ecx, dword [ebx]
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ecx + 0x74], 0
jb 0x411be8
ja 0x411ad2
cmp dword [ecx + 0x70], 0
jbe 0x411be8
mov eax, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], eax
nop word [eax + eax]
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [esi + 8]
call edi
mov eax, dword [ebp - 0x10]
add eax, 0x100
push 1
push eax
call fcn.00562e6c
mov ecx, eax
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x10]
add esp, 8
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x411b3e
push 0
lea edx, [ebp - 0x34]
push edx
push eax
push ecx
push dword [esi + 8]
call edi
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebx]
mov edi, 0x1000000
mov eax, dword [eax + 0x7c]
xor dword [ecx], eax
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x10]
push eax
call fcn.0041b7c0
add esp, 4
test al, al
je 0x411b8d
cmp dword [ebp - 0x24], edi
ja 0x411b8d
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x58]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x58], vtable.snappy::ByteArraySource.0
mov dword [ebp - 0x50], eax
call fcn.0041ba90
test al, al
mov dword [ebp - 0x58], vtable.snappy::Source.0
cmovne edi, dword [ebp - 0x24]
push dword [ebp - 0x18]
call fcn.0055d993
add esp, 4
test edi, edi
je 0x411baf
push 0
lea eax, [ebp - 0x3c]
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebx]
add ecx, edi
mov edi, dword [ebp - 0x2c]
adc edi, 0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edi
cmp edi, dword [eax + 0x74]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jb 0x411af0
ja 0x411bdc
cmp ecx, dword [eax + 0x70]
jb 0x411af0
mov edi, dword [ebp - 0x14]
lea ebx, [esi + 0x20]
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0055d993
mov eax, dword [edi + 8]
add esp, 4
test eax, eax
je 0x411c07
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [edi + 8], 0
mov edi, dword [ebp - 0x48]
test edi, edi
je 0x411c1a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x48], edi
mov ecx, dword [ebx]
mov ebx, dword [ecx + 0xa0]
mov eax, ebx
mov edx, dword [ecx + 0xa4]
or eax, edx
je 0x411c49
sub esp, 8
push dword [ecx + 0xac]
push dword [ecx + 0xa8]
mov ecx, esi
push edx
push ebx
call fcn.0040f6b0
add esp, 0x18
pop ebx
test edi, edi
je 0x411c56
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov edx, dword [ebp - 0x44]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x411c73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x20]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x411c8d
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 0x411ca4
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 0x411cbc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov eax, 1
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.004027e0
int3