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

Disassembly:
mov r11, rsp
push rbx
push r12
push r13
push r14
sub rsp, 0x278
mov rax, qword [0x14002f008]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov r14, qword [0x140046d30]
xor r12d, r12d
mov qword [rsp + 0x58], rcx
mov rbx, rcx
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x50], r14
lea r13d, [r12 + 1]
test r14, r14
je 0x14001933e
mov rcx, qword [rcx + 0x78]
test rcx, rcx
je 0x14001931c
mov qword [r11 + 0x20], rdi
lea rdx, [rsp + 0x60]
movzx r9d, r13b
mov qword [r11 - 0x28], r15
call fcn.1400099b0
mov edi, dword [r14 + 0xc]
mov rcx, r14
mov dword [rsp + 0x48], edi
call fcn.140008bd0
mov r15d, eax
cmp eax, 0xffffffff
je 0x140019346
mov ecx, eax
mov qword [rsp + 0x2b0], rsi
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rcx, rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileSize]
mov rcx, qword [rbx + 0x78]
mov esi, eax
mov dword [rsp + 0x4c], eax
call fcn.1400088a8
cmp byte [0x140046d39], r12b
mov rbx, rax
je 0x140009dbf
lea r8d, [r12 + 4]
mov rcx, rax
lea rdx, str.:EOF
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14000a137
mov qword [rsp + 0x2a8], rbp
lea rsi, [0x140032810]
lea rbx, [0x1400303c0]
cmp dword [0x14002f70c], r12d
jne 0x14001934e
mov ecx, r15d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r9d, 1
xor r8d, r8d
mov rcx, rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
mov dword [r14 + 0xc], eax
cmp eax, edi
jl 0x140009e10
test r13d, r13d
je 0x14000a1a5
mov ecx, r15d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rcx, rax
mov rbp, rax
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileType]
btr eax, 0xf
mov rcx, rbp
cmp eax, 2
je 0x140019359
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov rdi, rbx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
lea rcx, [0x140030378]
mov r14d, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_AcquireSRWLockShared]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r12
mov r8d, 0x200
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_ReadFile]
lea rcx, [0x140030378]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
mov esi, dword [rsp + 0x40]
test ebx, ebx
je 0x140019375
test esi, esi
je 0x14000a15c
mov ecx, esi
mov dword [rsp + 0x44], ecx
test esi, esi
jle 0x140009ed7
cmp ecx, 3
jl 0x140009eb6
movzx eax, byte [rdi]
cmp al, 0xa
je 0x140019384
cmp al, 0xd
je 0x140009ee0
movzx eax, byte [rdi]
lea rdx, [0x14004afb0]
cmp byte [rax + rdx], r12b
jne 0x140019393
dec ecx
inc rdi
mov dword [rsp + 0x44], ecx
test ecx, ecx
jg 0x140009ea2
lea rbx, [0x1400303c0]
jmp 0x140009f0b
cmp byte [rdi + 1], 0xa
jne 0x140009eb6
mov esi, edi
mov byte [rdi + 2], r12b
lea rbx, [0x1400303c0]
xor r9d, r9d
sub esi, ebx
xor r8d, r8d
add esi, 2
mov rcx, rbp
lea edx, [rsi + r14]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
mov ecx, dword [0x14003a844]
cmp ecx, 0x2b
jb 0x140019406
cmp ecx, 0xc42c
jae 0x140019406
mov edx, 1
lea r8, [0x140032810]
mov dword [rsp + 0x28], 0x200
mov qword [rsp + 0x20], r8
mov r9d, esi
mov r8, rbx
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov esi, eax
mov dword [rsp + 0x40], eax
mov r14, qword [rsp + 0x50]
mov edi, dword [rsp + 0x48]
test eax, eax
je 0x14000a16b
test esi, esi
je 0x14000a173
cmp esi, 0xffffffff
je 0x14000a16b
cmp word [0x140032810], r12w
je 0x14000a16b
cmp word [rsp + 0x60], r12w
je 0x14000a16b
mov eax, esi
mov edx, 0x3a
lea rsi, [0x140032810]
mov rcx, rsi
mov word [rsi + rax*2], r12w
call qword [sym.imp.msvcrt.dll_wcschr]
mov rbp, rax
test rax, rax
je 0x140009dd5
mov rbx, rbp
add rbp, 2
cmp word [rbx], 0xa
je 0x140009fd1
cmp rbx, rsi
je 0x140009fd1
sub rbx, 2
cmp word [rbx], 0xa
jne 0x140009fc2
cmp word [rbx], 0x3a
je 0x140009fdb
add rbx, 2
mov rdi, rbx
test rbx, rbx
je 0x14000a01f
movzx esi, word [rdi]
movzx ecx, si
call qword [sym.imp.msvcrt.dll_iswspace]
test eax, eax
je 0x140009fff
cmp si, 0xa
je 0x140009fff
add rdi, 2
jmp 0x140009fe3
movzx edx, si
lea rcx, [0x140028768]
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x14001947a
lea rsi, [0x140032810]
cmp word [rdi], 0x3a
je 0x14000a05a
test rbp, rbp
je 0x14000a044
mov edx, 0x3a
mov rcx, rbp
call qword [sym.imp.msvcrt.dll_wcschr]
mov rbp, rax
test rax, rax
jne 0x140009fb5
cmp byte [0x140030350], 1
je 0x14000a0ed
mov edi, dword [rsp + 0x48]
jmp 0x140009dce
test rbx, rbx
je 0x140019488
mov edx, 0xa
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_wcschr]
mov rbp, rax
test rax, rax
je 0x14001948b
xor r9d, r9d
lea rdx, [rsp + 0x160]
mov rcx, rdi
call fcn.1400099b0
lea rdx, [rsp + 0x160]
lea rcx, [rsp + 0x60]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x14000a025
mov rax, qword [rsp + 0x58]
test byte [rax + 0x80], 1
je 0x140019534
mov byte [0x140030350], 1
call fcn.140007170
test rbp, rbp
je 0x140019540
sub rbp, rsi
test al, al
jne 0x140019558
add rbp, 2
sar rbp, 1
add dword [r14 + 0xc], ebp
jmp 0x14000a044
mov rbp, qword [rsp + 0x2a8]
mov ecx, r15d
call fcn.140008c50
mov rsi, qword [rsp + 0x2b0]
mov eax, r12d
mov rdi, qword [rsp + 0x2b8]
mov r15, qword [rsp + 0x270]
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400151c0
add rsp, 0x278
pop r14
pop r13
pop r12
pop rbx
ret
movzx ecx, word [rbx + 8]
test cx, cx
jne 0x14000a14d
mov dword [r14 + 0xc], esi
mov byte [0x140030350], r13b
jmp 0x14000a0f5
call qword [sym.imp.msvcrt.dll_iswspace]
test eax, eax
jne 0x14000a140
jmp 0x140009dbf
mov eax, r12d
lea rbx, [0x1400303c0]
jmp 0x140009f51
test esi, esi
jne 0x14001958d
test r13d, r13d
je 0x14001958d
mov ecx, r15d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
mov r13d, r12d
lea rsi, [0x140032810]
jmp 0x140009dd5
mov esi, dword [rsp + 0x40]
jmp 0x14000a16b
mov rcx, r14
call fcn.140007140
mov rax, qword [r14 + 0x1d0]
xor edx, edx
mov ecx, 0x2330
mov qword [0x140046d30], rax
call fcn.1400057e4
mov eax, r13d
jmp 0x14000a118
mov eax, r13d
jmp 0x14000a108
call fcn.1400245a4
nop
jmp 0x140009de2
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, rsi
call fcn.1400032fc
mov esi, dword [rsp + 0x40]
jmp 0x140009f5a
mov eax, r12d
lea rbx, [0x1400303c0]
jmp 0x140009f51
cmp byte [rdi + 1], 0xd
je 0x140009ee6
jmp 0x140009eb2
cmp ecx, 1
je 0x1400193a4
sub ecx, 2
add rdi, 2
jmp 0x140009ecf
lea rcx, [0x140030378]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_AcquireSRWLockShared]
lea rdx, [rdi + 1]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
mov r8d, 1
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_ReadFile]
lea rcx, [0x140030378]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
test ebx, ebx
je 0x1400193ef
cmp dword [rsp + 0x44], r12d
je 0x1400193ef
inc esi
jmp 0x140009ed7
mov esi, r12d
mov dword [rsp + 0x40], r12d
mov eax, r12d
lea rbx, [0x1400303c0]
jmp 0x140009f51
cmp ecx, 0xc435
ja 0x14001943e
je 0x140019472
cmp ecx, 0x2a
je 0x140019472
cmp ecx, 0xc42b
jbe 0x140009f26
cmp ecx, 0xc42e
jbe 0x140019472
cmp ecx, 0xc431
je 0x140019472
cmp ecx, 0xc433
je 0x140019472
jmp 0x140009f26
cmp ecx, 0xdeb3
ja 0x140019463
cmp ecx, 0xdeaa
jae 0x140019472
cmp ecx, 0xcec8
je 0x140019472
cmp ecx, 0xd698
je 0x140019472
jmp 0x140009f26
lea eax, [rcx - 0xfde8]
cmp eax, 1
ja 0x140009f26
mov edx, r12d
jmp 0x140009f2b
test si, si
je 0x14000a018
jmp 0x140009ff9
mov rbp, r12
mov ecx, r15d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r9d, 1
xor r8d, r8d
mov rcx, rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
cmp eax, dword [rsp + 0x4c]
je 0x14000a07d
mov esi, dword [rsp + 0x40]
cmp esi, 0x200
jne 0x1400194ca
lea rsi, [0x140032810]
jmp 0x14000a07d
lea r8, [0x140032810]
sub rbx, r8
sar rbx, 1
sub esi, ebx
call fcn.140007170
test al, al
je 0x140019509
mov ecx, dword [0x14003a844]
mov r9d, esi
mov qword [rsp + 0x38], r12
xor edx, edx
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov esi, eax
mov ecx, r15d
neg esi
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r9d, 1
xor r8d, r8d
mov rcx, rax
mov edx, esi
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
lea rsi, [0x140032810]
jmp 0x14000a044
mov byte [0x140030350], r12b
jmp 0x14000a0c4
test al, al
je 0x14001954b
mov r9d, dword [rsp + 0x40]
jmp 0x14001955f
mov eax, dword [rsp + 0x40]
add dword [r14 + 0xc], eax
jmp 0x14000a044
lea r9, [rbp + 2]
sar r9, 1
mov ecx, dword [0x14003a844]
mov r8, rsi
mov qword [rsp + 0x38], r12
xor edx, edx
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
add dword [r14 + 0xc], eax
jmp 0x14000a044
mov rcx, r14
call fcn.140007140
mov rax, qword [r14 + 0x1d0]
lea r8, [rsp + 0x60]
mov edx, 1
mov qword [0x140046d30], rax
mov ecx, 0x400023ab
call fcn.1400057e4
mov r12d, 1
jmp 0x14000a0ed