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

Disassembly:
push rbp
push r13
push rdi
push rsi
push rbx
add rsp, 0xffffffffffffff80
mov rbp, rsp
mov rbx, rcx
mov dword [rbp + 0x44], edx
mov esi, r8d
mov dword [rbp + 0x68], 0xffffffff
mov qword [rbp + 0x60], 0
mov dword [rbp + 0x58], 0x18
mov eax, dword [rbp + 0x44]
and eax, 3
cmp eax, 2
ja 0x4363d7
mov eax, dword [rbp + 0x44]
and eax, 1
mov ecx, dword [rbp + 0x44]
and ecx, 8
test ecx, eax
je 0x4363df
or eax, 0xffffffff
jmp 0x436634
mov eax, dword [rbp + 0x44]
test eax, 3
je 0x436412
mov edi, 0x40000000
mov rcx, rbx
lea rdx, [0x00436644]
call fcn.0041b7b0
test eax, eax
je 0x436409
mov esi, 1
mov r13d, 2
jmp 0x43641f
mov edi, 0x80000000
mov r13d, 3
mov eax, dword [rbp + 0x44]
cmp eax, 0x10a
jne 0x4364cf
mov rcx, rbx
mov edx, edi
or edx, 0x80000000
mov r8d, esi
lea r9, [rbp + 0x58]
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
cmp rax, 0xffffffffffffffff
jne 0x43652a
mov rcx, rbx
mov edx, edi
mov r8d, esi
lea r9, [rbp + 0x58]
mov dword [rsp + 0x20], r13d
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
cmp rax, 0xffffffffffffffff
jne 0x43652a
call sub.kernel32.dll_GetLastError_2
mov dword [0x00448928], eax
cmp dword [0x00448928], 0x6e
jne 0x4364c7
mov dword [0x00448928], 2
or eax, 0xffffffff
jmp 0x436634
mov rcx, rbx
mov edx, edi
mov r8d, esi
lea r9, [rbp + 0x58]
mov dword [rsp + 0x20], r13d
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW_1
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
cmp rax, 0xffffffffffffffff
jne 0x43652a
call sub.kernel32.dll_GetLastError_2
mov dword [0x00448928], eax
cmp dword [0x00448928], 0x6e
jne 0x436522
mov dword [0x00448928], 2
or eax, 0xffffffff
jmp 0x436634
mov rcx, qword [rbp + 0x48]
mov edx, 8
call sub.msvcrt.dll__open_osfhandle
mov ebx, eax
mov eax, dword [rbp + 0x44]
test eax, 8
je 0x43662b
mov ecx, ebx
call fcn.0042dc50
test eax, eax
jne 0x43662b
mov rcx, qword [rbp + 0x48]
xor rdx, rdx
call sub.kernel32.dll_GetFileSize_1
test eax, eax
je 0x43662b
mov word [rbp + 0x7e], 0
mov dword [rbp + 0x74], 0xffffffff
mov rcx, qword [rbp + 0x48]
or edx, 0xffffffff
lea r8, [rbp + 0x74]
mov r9d, 2
call sub.kernel32.dll_SetFilePointer_1
mov r13d, eax
call sub.kernel32.dll_GetLastError_2
mov dword [0x00448928], eax
cmp r13d, 0xffffffff
jne 0x4365bf
cmp dword [0x00448928], 0
je 0x4365bf
cmp ebx, 0xffffffff
je 0x4365ba
mov ecx, ebx
call sub.msvcrt.dll__close
or eax, 0xffffffff
jmp 0x436634
mov rcx, qword [rbp + 0x48]
lea rdx, [rbp + 0x7e]
mov r8d, 1
lea r9, [rbp + 0x78]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_ReadFile_1
mov r13d, eax
test r13d, r13d
jne 0x436606
mov dword [rbp + 0x74], 0
mov rcx, qword [rbp + 0x48]
xor rdx, rdx
lea r8, [rbp + 0x74]
mov r9d, 2
call sub.kernel32.dll_SetFilePointer_1
cmp word [rbp + 0x7e], 0x1a
jne 0x43662b
mov dword [rbp + 0x74], 0xffffffff
mov rcx, qword [rbp + 0x48]
or edx, 0xffffffff
lea r8, [rbp + 0x74]
mov r9d, 2
call sub.kernel32.dll_SetFilePointer_1
mov ecx, ebx
call fcn.004367e0
mov eax, ebx
lea rsp, [rbp + 0x80]
pop rbx
pop rsi
pop rdi
pop r13
pop rbp
ret