Function at 0x4135b0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x49d0e8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
mov eax, dword [0x4c13e0]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [edi + 0xa0]
push eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x50], 0
mov dword [edi], 0xffffffff
lea ebp, [edi + 4]
test esi, esi
jne 0x413606
xor eax, eax
jmp 0x41361f
mov eax, esi
lea edx, [eax + 2]
jmp 0x413610
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413610
sub eax, edx
sar eax, 1
mov ebx, eax
push esi
mov eax, ebp
call fcn.004037f0
mov ecx, dword [edi + 0x80]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [edi + 0x80]
mov dword [ecx + 4], ecx
xor ebx, ebx
mov dword [edi + 0x84], ebx
cmp eax, dword [edi + 0x80]
je 0x413665
lea esp, [esp]
mov esi, dword [eax]
push eax
call fcn.00476df2
add esp, 4
mov eax, esi
cmp esi, dword [edi + 0x80]
jne 0x413650
mov eax, dword [ebp]
cmp dword [eax - 0xc], ebx
je 0x4136ce
xor esi, esi
mov dword [esp + 0x18], esi
push ebx
push 0x80
push 3
push ebx
push 7
push SysReAllocString
push eax
mov byte [esp + 0x6c], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4136ee
call fcn.00408010
cmp eax, ebx
jne 0x41370f
xor ebp, ebp
push ebp
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], ebx
push 0x64
lea ebx, [edi + 8]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
jne 0x4136f6
call fcn.00408010
cmp eax, ebp
je 0x4136fd
cmp esi, ebp
je 0x4136ce
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov esi, eax
mov dword [esp + 0x18], esi
jmp 0x41369d
cmp dword [esp + 0x1c], 0x64
jne 0x4136c3
mov ebx, dword [ebx]
cmp ebx, 1
jge 0x41372f
cmp esi, ebp
je 0x41370f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
jne 0x4137c5
cmp dword [edi + 0xc], ebp
je 0x41379c
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
mov eax, esi
lea esi, [esp + 0x24]
mov byte [esp + 0x50], 2
call fcn.00415b70
test eax, eax
jne 0x413793
mov ecx, dword [esp + 0x28]
cmp ecx, 0x64
jbe 0x413793
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x413793
add eax, 0x64
push eax
add ecx, 0xffffff9c
push edi
call fcn.00413920
test eax, eax
je 0x413793
mov dword [edi], 2
call fcn.00413800
lea esi, [esp + 0x18]
call fcn.00408030
mov edx, dword [esp + 0x14]
push edx
jmp 0x4137d9
lea esi, [esp + 0x24]
call fcn.00413800
lea esi, [esp + 0x18]
call fcn.00408030
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
lea esi, [esp + 0x18]
mov dword [edi], 1
call fcn.00408030
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0x44
ret