Function at 0x42a66c
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], 0xffffffff
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0xc
mov eax, dword [ebp - 8]
and eax, 3
cmp eax, 2
ja 0x42a6a9
mov eax, dword [ebp - 8]
and eax, 1
mov edx, dword [ebp - 8]
and edx, 8
and eax, edx
je 0x42a6b5
mov dword [ebp - 0x10], 0xffffffff
jmp 0x42a8c4
test byte [ebp - 8], 3
je 0x42a6e3
mov dword [ebp - 0x18], 0x40000000
mov edx, 0x42a8cc
mov eax, dword [ebp - 4]
call fcn.00414c2c
test eax, eax
je 0x42a6da
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x1c], 2
jmp 0x42a6f1
mov dword [ebp - 0x18], 0x80000000
mov dword [ebp - 0x1c], 3
cmp dword [ebp - 8], 0x10a
jne 0x42a780
push 0
push 0x80
push 3
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
or eax, 0x80000000
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x42a7d2
push 0
push 0x80
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x42a7d2
call sub.kernel32.dll_GetLastError_2
mov dword [0x4368dc], eax
cmp dword [0x4368dc], 0x6e
jne 0x42a774
mov dword [0x4368dc], 2
mov dword [ebp - 0x10], 0xffffffff
jmp 0x42a8c4
push 0
push 0x80
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x42a7d2
call sub.kernel32.dll_GetLastError_2
mov dword [0x4368dc], eax
cmp dword [0x4368dc], 0x6e
jne 0x42a7c6
mov dword [0x4368dc], 2
mov dword [ebp - 0x10], 0xffffffff
jmp 0x42a8c4
push 8
mov eax, dword [ebp - 0x20]
push eax
call sub.msvcrt.dll__open_osfhandle
add esp, 8
mov dword [ebp - 0x2c], eax
test byte [ebp - 8], 8
je 0x42a8b6
mov eax, dword [ebp - 0x2c]
call fcn.00422f28
test eax, eax
jne 0x42a8b6
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetFileSize_1
test eax, eax
je 0x42a8b6
mov word [ebp - 0x12], 0
mov dword [ebp - 0x28], 0xffffffff
push 2
lea eax, [ebp - 0x28]
push eax
push 0xffffffffffffffff
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0x1c], eax
call sub.kernel32.dll_GetLastError_2
mov dword [0x4368dc], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x42a863
cmp dword [0x4368dc], 0
je 0x42a863
cmp dword [ebp - 0x2c], 0xffffffff
je 0x42a85a
mov eax, dword [ebp - 0x2c]
push eax
call sub.msvcrt.dll__close
pop ecx
mov dword [ebp - 0x10], 0xffffffff
jmp 0x42a8c4
push 0
lea eax, [ebp - 0x24]
push eax
push 1
lea eax, [ebp - 0x12]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_ReadFile_1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x42a897
xor eax, eax
mov dword [ebp - 0x28], eax
push 2
lea eax, [ebp - 0x28]
push eax
push 0
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_SetFilePointer_1
cmp word [ebp - 0x12], 0x1a
jne 0x42a8b6
mov dword [ebp - 0x28], 0xffffffff
push 2
lea eax, [ebp - 0x28]
push eax
push 0xffffffffffffffff
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov eax, dword [ebp - 0x2c]
call fcn.0042aa88
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret