Function at 0x180046230
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x30
cmp dword [rcx + 0xda0c], 0
mov rbp, rdx
mov rax, qword [rcx + 0x258]
mov rdi, rcx
movsxd rsi, r8d
lea r9, [rsi + rsi*2]
mov ebx, dword [rax + r9*8 + 0x10]
lea r14, [r9*8]
jne 0x18004631e
mov rax, qword [rax + r14 + 8]
lea r8, [rsp + 0x64]
mov rcx, qword [rcx + 0x208]
mov edx, eax
xor r9d, r9d
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1800462a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1800462a7
or eax, 0xffffffff
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [rdi + 0x208]
lea r9, [rsp + 0x70]
xor esi, esi
mov r8d, ebx
mov rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x70], ebx
jne 0x180046299
cmp byte [rdi + 0x220], sil
je 0x180046311
mov rcx, qword [rdi + 0x250]
mov r8, rbx
mov rdx, rbp
call fcn.18008b7d0
shr ebx, 4
test ebx, ebx
je 0x180046311
nop
mov ecx, esi
lea r8, [rdi + 0xda38]
lea rdx, [rcx + rbp]
add rcx, qword [rdi + 0x250]
call fcn.18006f0b0
add esi, 0x10
add ebx, 0xffffffff
jne 0x1800462f0
xor eax, eax
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
movsxd rax, dword [rcx + 0xda08]
imul rcx, rax, 0x228
cmp esi, dword [rcx + rdi + 0x470]
jl 0x18004633e
cmp esi, dword [rcx + rdi + 0x474]
jle 0x180046350
mov edx, esi
mov rcx, rdi
call fcn.1800460c0
test eax, eax
je 0x180046299
mov r8, qword [rdi + 0x258]
xor r9d, r9d
movsxd rax, dword [rdi + 0xda08]
imul rdx, rax, 0x228
movsxd rax, dword [rdx + rdi + 0x470]
lea rcx, [rax + rax*2]
movsxd rax, dword [rdx + rdi + 0x47c]
sub rax, qword [r8 + rcx*8 + 8]
add rax, qword [r8 + r14 + 8]
lea r8, [rsp + 0x64]
mov rcx, qword [rdi + 0x208]
mov edx, eax
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1800463b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180046299
movsxd rax, dword [rdi + 0xda08]
lea r9, [rsp + 0x70]
imul rcx, rax, 0x228
mov qword [rsp + 0x68], r15
mov rdx, rbp
cmp esi, dword [rcx + rdi + 0x474]
jne 0x1800464a0
mov r14d, dword [rcx + rdi + 0x480]
mov r15d, ebx
mov rcx, qword [rdi + 0x208]
sub r15d, r14d
xor esi, esi
mov r8d, r15d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x70], r15d
jne 0x1800464bd
test r14d, r14d
je 0x1800464d0
mov rcx, rdi
call fcn.180046190
test eax, eax
je 0x1800464bd
movsxd rax, dword [rdi + 0xda08]
lea r8, [rsp + 0x64]
imul rcx, rax, 0x228
xor r9d, r9d
mov eax, dword [rcx + rdi + 0x47c]
mov rcx, qword [rdi + 0x208]
sub eax, r14d
mov edx, eax
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x180046466
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1800464bd
mov rcx, qword [rdi + 0x208]
lea r9, [rsp + 0x70]
mov edx, r15d
mov r8d, r14d
add rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x70], r14d
je 0x1800464d0
or eax, 0xffffffff
mov r15, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [rdi + 0x208]
xor esi, esi
mov r8d, ebx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x70], ebx
je 0x1800464d0
or eax, 0xffffffff
mov r15, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp byte [rdi + 0x220], 0
je 0x180046513
mov rcx, qword [rdi + 0x250]
mov r8, rbx
mov rdx, rbp
call fcn.18008b7d0
shr ebx, 4
test ebx, ebx
je 0x180046513
mov ecx, esi
lea r8, [rdi + 0xda38]
lea rdx, [rcx + rbp]
add rcx, qword [rdi + 0x250]
call fcn.18006f0b0
add esi, 0x10
add ebx, 0xffffffff
jne 0x1800464f2
xor eax, eax
mov r15, qword [rsp + 0x68]
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret