Function at 0x140001194
Capabilities:
Create thread
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rdi
push r15
sub rsp, 0x30
mov rbx, rdx
cmp ecx, 3
je 0x1400011d5
mov ebx, 2
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rdx, rax
lea rcx, str.Usage:_asyncbuf_buf_size_bytes_initial_fill_bytes_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov eax, ebx
jmp 0x1400014a7
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov edi, 0x8000
mov ecx, eax
mov edx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
mov ebp, 1
test eax, eax
js 0x1400014a5
mov ecx, ebp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
mov edx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
test eax, eax
js 0x1400014a5
mov rcx, qword [rbx + 8]
lea edi, [rbp + 9]
mov r8d, edi
xor edx, edx
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
mov rcx, qword [rbx + 0x10]
mov r8d, edi
mov eax, eax
xor edx, edx
mov qword [0x140005660], rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
mov edx, eax
mov ecx, 0x20000
mov rax, qword [0x140005660]
cmp rax, rcx
jb 0x140001272
mov r8d, 0x40000000
mov rcx, rax
cmp rax, r8
cmova rcx, r8
lea rax, [rcx - 0x20000]
mov qword [0x140005660], rcx
cmp rdx, rax
cmova rdx, rax
mov qword [0x140005638], rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [0x1400056a0], rax
test rax, rax
je 0x1400014a5
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140005668], rax
test rax, rax
je 0x140001498
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140005640], rax
test rax, rax
je 0x14000148b
lea rdi, [0x140005678]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
and qword [rsp + 0x28], 0
lea r8, section..text
and dword [rsp + 0x20], 0
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [0x140005648], rax
test rax, rax
je 0x140001475
mov r15d, 0x10000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x140005670]
xor edx, edx
sub rax, qword [0x140005650]
mov rcx, rdi
dec rax
add rax, qword [0x140005660]
div qword [0x140005660]
cmp rdx, r15
jb 0x1400013fa
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [0x140005660]
mov rbx, r15
sub rax, qword [0x140005650]
cmp rax, r15
cmovb rbx, rax
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, qword [0x1400056a0]
mov r8, rbx
add rcx, qword [0x140005650]
mov r9, rax
mov rdx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x140005658]
test rbx, rbx
mov rax, qword [0x140005650]
cmove ecx, ebp
add rax, rbx
xor edx, edx
mov dword [0x140005658], ecx
div qword [0x140005660]
mov rcx, qword [0x140005668]
mov qword [0x140005650], rdx
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test rbx, rbx
je 0x140001424
jmp 0x140001329
cmp dword [0x140005658], 0
jne 0x14000141e
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [0x140005640]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x140001329
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [0x140005648]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x140005648]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [0x140005640]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140005668]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400056a0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
jmp 0x1400014a7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [0x140005640]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140005668]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400056a0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, ebp
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r15
ret