Function at 0x4f0e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x567265
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov dword [esp + 0x10], edx
mov edi, ecx
mov ebx, dword [sym.imp.MSVCR120.dll_malloc]
push 0x98
call ebx
mov esi, eax
add esp, 4
test esi, esi
je 0x4f112b
push 0x98
push 0
push esi
call sub.MSVCR120.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, eax
mov dword [esi], eax
and ecx, 1
mov eax, 0
mov dword [esp + 0x28], ecx
setne al
add eax, 3
neg ecx
push 0
push eax
sbb eax, eax
xor edx, edx
and eax, 0x10102
mov ecx, edi
inc eax
push eax
call fcn.00501940
add esp, 0xc
mov dword [esi + 0x10], eax
test eax, eax
jne 0x4f0ed3
push esi
call dword [sym.imp.MSVCR120.dll_free]
jmp 0x4f1128
push 0x18
call ebx
mov edi, eax
add esp, 4
test edi, edi
je 0x4f0ee7
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esi + 0x14], edi
lea eax, [esi + 0x80]
mov dword [esp + 0x58], 0
test eax, eax
je 0x4f0f1e
mov dword [eax], vtable.CArray_struct__DISKLOG_INDEX_RECORD__struct__DISKLOG_INDEX_RECORD_const__.0
mov dword [eax + 4], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [esp + 0x58], 0xffffffff
test byte [esp + 0x10], 4
je 0x4f0f45
push 0x10000
call ebx
add esp, 4
mov dword [esi + 0x74], eax
test eax, eax
je 0x4f0f45
mov dword [esi + 0x78], 0x10000
cmp byte [0x5c6a90], 0
lea edi, [esi + 0x18]
mov eax, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
je 0x4f0f99
xor ecx, ecx
push ecx
push 0x38
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0260]
cmp eax, 0xc0000011
jne 0x4f0f8d
mov dword [esp + 0x18], 0
xor eax, eax
push eax
call dword [0x5c00a8]
push eax
call ebx
jmp 0x4f0fa8
lea ecx, [esp + 0x44]
push ecx
push 0x38
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [edi], 0xcf9bf378
jne 0x4f101a
mov ecx, dword [esi + 0x1c]
cmp ecx, 0x38
jae 0x4f0fd0
mov eax, 0x38
sub eax, ecx
push eax
lea eax, [esi + 0x18]
add eax, ecx
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov ecx, dword [esi + 0x10]
lea edx, [esi + 8]
call fcn.00501ce0
test byte [esp + 0x10], 2
je 0x4f0ff1
mov ecx, esi
call fcn.004f1a90
test al, al
je 0x4f1122
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x68], eax
mov eax, esi
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x28], 0
je 0x4f1122
push 0x38
push 0
push edi
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [edi], 0xcf9bf378
lea eax, [esp + 0x2c]
mov dword [esi + 0x1c], 0x38
mov dword [esi + 0x24], 0x38
mov dword [esi + 0x28], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov dword [esi + 0x30], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x34], ecx
cmp byte [0x5c6a90], 0
je 0x4f10af
push 0xe
push 8
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push ecx
lea ecx, [esp + 0x50]
mov dword [esp + 0x44], 0
push ecx
push eax
call dword [0x5c0080]
push eax
call dword [0x5c00a8]
push eax
call ebx
jmp 0x4f10de
push 0
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], 0
push ecx
push 0
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4f10de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x10]
mov edx, edi
push 0x38
call fcn.00501ab0
add esp, 4
cmp eax, 0x38
jne 0x4f1122
mov ecx, dword [esi + 0x10]
push 0
push eax
call fcn.00501b20
add esp, 8
cmp eax, 0xffffffff
je 0x4f1122
mov ecx, dword [esi + 0x10]
call fcn.00501cb0
mov eax, esi
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.004f0dc0
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret