Function at 0x140033b60
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x78]
cmp qword [rax + 0x3c8], 0
jne 0x140033b87
mov eax, 1
jmp 0x140034004
mov rax, qword [rsp + 0x78]
movsxd rax, dword [rax + 0x3b8]
imul rax, rax, 0x50
mov rcx, qword [rsp + 0x78]
lea rax, [rcx + rax + 0x3d8]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x3b8]
inc eax
cdq
and edx, 7
add eax, edx
and eax, 7
sub eax, edx
mov rcx, qword [rsp + 0x78]
mov dword [rcx + 0x3b8], eax
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x28], 0
jne 0x140033cd5
mov edx, 0x10000
mov rcx, qword [rsp + 0x78]
call fcn.140033ae0
mov qword [rsp + 0x50], rax
mov r9d, 4
mov r8d, 0x1000
mov rdx, qword [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140033c45
mov rax, qword [rsp + 0x70]
lea r8, [0x14010b558]
mov edx, 0xc
mov rcx, rax
call fcn.14000a870
mov rax, qword [rsp + 0x70]
mov dword [rax + 4], 0x8000
mov eax, 0xffffffe2
jmp 0x140034004
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
mov qword [rax + 0x28], rcx
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 0x30], rcx
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 0x18], rax
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x18], 0
jne 0x140033cd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140041ed0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, qword [rsp + 0x70]
lea r8, str.CreateEvent_failed
mov edx, dword [rax]
call fcn.14000a870
mov rax, qword [rsp + 0x70]
mov dword [rax + 4], 0x8000
mov eax, 0xffffffe2
jmp 0x140034004
jmp 0x140033ce4
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x30]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x360]
cmp rax, qword [rcx]
jle 0x140033d17
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov eax, dword [rax]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x3d0]
cmp qword [rax + 8], rcx
jle 0x140033d72
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x3d0]
mov rax, qword [rax + 8]
sub rax, rcx
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x3c8]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x78]
mov qword [rcx + 0x3c8], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov rcx, qword [rsp + 0x40]
mov rax, qword [rax + 8]
mov qword [rcx + 0x38], rax
mov rax, qword [rsp + 0x40]
mov ecx, 0xffffffff
mov rax, qword [rax + 0x38]
and rax, rcx
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x10], eax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x38]
sar rax, 0x20
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x14], eax
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x78]
cmp qword [rcx + 0x3c8], rax
jle 0x140033dfc
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 0x40], rax
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x3c8]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x78]
mov qword [rcx + 0x3c8], rax
jmp 0x140033e21
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x3c8]
mov qword [rax + 0x40], rcx
mov rax, qword [rsp + 0x78]
mov qword [rax + 0x3c8], 0
mov rax, qword [rsp + 0x40]
mov qword [rax + 0x48], 0
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov ecx, dword [rsp + 0x30]
add rcx, qword [rax + 8]
mov rax, rcx
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x360]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov ecx, dword [rsp + 0x30]
mov rax, qword [rax]
sub rax, rcx
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x360]
mov qword [rcx], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
mov rcx, qword [rsp + 0x78]
mov rax, qword [rax + 8]
mov qword [rcx + 0x3d0], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
cmp qword [rax], 0
jne 0x140033ed3
mov rax, qword [rsp + 0x78]
cmp qword [rax + 0x3c8], 0
jle 0x140033ed3
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x360]
add rax, 0x10
mov rcx, qword [rsp + 0x78]
mov qword [rcx + 0x360], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
mov r8d, dword [rsp + 0x30]
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax + 0x28]
mov rax, qword [rsp + 0x78]
mov rcx, qword [rax + 0x398]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140033fba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0x26
jne 0x140033f4c
mov rax, qword [rsp + 0x70]
lea r8, [0x14010b590]
mov edx, 0xffffffff
mov rcx, rax
call fcn.14000a870
mov rax, qword [rsp + 0x70]
mov dword [rax + 4], 0x8000
mov eax, 0xffffffe2
jmp 0x140034004
cmp dword [rsp + 0x34], 0x3e5
je 0x140033fb8
cmp dword [rsp + 0x34], 0xe8
jne 0x140033f6e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0xb
jmp 0x140033f8c
cmp dword [rsp + 0x34], 5
jne 0x140033f83
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 9
jmp 0x140033f8c
mov ecx, dword [rsp + 0x34]
call fcn.140041ed0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, qword [rsp + 0x70]
lea r8, str.Read_error
mov edx, dword [rax]
call fcn.14000a870
mov rax, qword [rsp + 0x70]
mov dword [rax + 4], 0x8000
mov eax, 0xffffffe2
jmp 0x140034004
jmp 0x140033fc7
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 0x48], rax
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x3c0]
inc eax
mov rcx, qword [rsp + 0x78]
mov dword [rcx + 0x3c0], eax
mov rax, qword [rsp + 0x78]
cmp qword [rax + 0x3c8], 0
jne 0x140033ff8
mov dword [rsp + 0x38], 1
jmp 0x140034000
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x38]
add rsp, 0x68
ret