Function at 0x4cae40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50cde3
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x559540]
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 eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x44], eax
lea eax, [ebx + 0x14]
push eax
mov dword [ebp - 0x4c], vtable.ProtocolFilters::AutoLock.0
mov dword [ebp - 0x48], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x64]
mov dword [ebp - 4], 0
call fcn.004c5cc0
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.004ca5f0
push esi
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.004cd3a0
mov edi, eax
push edi
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004c8960
mov esi, eax
cmp esi, dword [ebx]
je 0x4caeef
cmp dword [esi + 0x24], 0x10
lea eax, [esi + 0x10]
mov ecx, dword [eax + 0x10]
jb 0x4caed8
mov eax, dword [eax]
push ecx
push eax
push dword [edi + 0x10]
mov ecx, edi
push 0
call fcn.004be573
test eax, eax
js 0x4caeef
mov dword [ebp - 0x3c], esi
jmp 0x4caef4
mov eax, dword [ebx]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x14], 0x10
lea esi, [ebp - 0x3c]
mov esi, dword [esi]
mov byte [ebp - 4], 1
jb 0x4caf0e
push dword [ebp - 0x28]
call fcn.004eb50e
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp esi, dword [ebx]
je 0x4cb031
cmp dword [esi + 0x40], 0
push 0
je 0x4caf5a
call fcn.004f1106
mov ebx, dword [ebp - 0x40]
add esp, 4
mov dword [esi + 0x30], eax
mov ecx, ebx
mov dword [esi + 0x34], edx
push dword [esi + 0x40]
call fcn.004c5d20
mov eax, dword [esi + 0x40]
mov ecx, dword [ebp - 0x44]
add eax, 0x18
push eax
jmp 0x4cb078
push dword [esi + 0x28]
push dword [ebx + 0x10]
call fcn.004f0921
push dword [ebx + 0x10]
lea eax, [ebp - 0x38]
push 0x10
push 1
push eax
call fcn.004f07e6
add esp, 0x1c
cmp eax, 0x10
jne 0x4cb031
movzx ecx, word [ebp - 0x32]
movzx eax, word [ebp - 0x34]
add ecx, eax
push ecx
lea ecx, [ebp - 0x64]
call fcn.004c5ed0
test al, al
je 0x4cb031
movzx eax, word [ebp - 0x36]
push 1
push eax
push dword [ebx + 0x10]
call fcn.004f0921
add esp, 0xc
lea ecx, [ebp - 0x64]
call fcn.004babe0
lea ecx, [ebp - 0x64]
mov edi, eax
call fcn.004c5e90
push dword [ebx + 0x10]
push edi
push 1
push eax
call fcn.004f07e6
add esp, 0x10
cmp eax, edi
jne 0x4cb031
push 0
lea ecx, [ebp - 0x64]
call fcn.004babe0
push eax
lea ecx, [ebp - 0x64]
call fcn.004c5e90
push eax
call fcn.004ca370
movzx eax, word [ebp - 0x34]
lea ecx, [ebp - 0x64]
add esp, 0xc
push 1
push eax
call fcn.004c5e90
mov ebx, dword [ebp - 0x40]
mov ecx, ebx
push eax
call fcn.004c5dc0
test al, al
je 0x4cb031
movzx eax, word [ebp - 0x32]
lea ecx, [ebp - 0x64]
push 1
push eax
call fcn.004c5e90
movzx ecx, word [ebp - 0x34]
mov edi, dword [ebp - 0x44]
add eax, ecx
push eax
mov ecx, edi
call fcn.004c5dc0
test al, al
jne 0x4cb035
xor bl, bl
jmp 0x4cb07f
push 0
call fcn.004f1106
push 0x30
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
call fcn.004edd71
add esp, 8
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4cb060
mov ecx, eax
call fcn.004c7af0
jmp 0x4cb062
xor eax, eax
push ebx
mov ecx, eax
mov byte [ebp - 4], 1
mov dword [esi + 0x40], eax
call fcn.004c5d20
mov ecx, dword [esi + 0x40]
push edi
add ecx, 0x18
call fcn.004c5d20
mov bl, 1
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 0
call fcn.004c5cf0
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, bl
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.004ebd2c
mov esp, ebp
pop ebp
ret 0xc