Function at 0x1400399a0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3f98]
mov eax, 0x4098
call fcn.14004e810
sub rsp, rax
mov rax, qword [0x140068008]
xor rax, rsp
mov qword [rbp + 0x3f80], rax
mov r15, qword [rbp + 0x4000]
mov r12, r9
mov r13, qword [rbp + 0x4008]
mov rdi, r8
mov ebx, dword [rcx + 0x11c]
mov rsi, rdx
mov qword [rsp + 0x50], r15
mov r14, rcx
mov qword [rsp + 0x48], r13
mov eax, 1
mov qword [rsp + 0x58], r9
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], rdx
mov dword [rsp + 0x40], ebx
nop word [rax + rax]
mov r9, qword [r14]
lea rcx, [rsp + 0x70]
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 0x10
jb 0x140039ec1
add qword [r14 + 0x138], rax
mov eax, ebx
sub eax, 1
je 0x140039b38
cmp eax, 1
je 0x140039aa5
mov eax, ebx
mov dword [rsi], 0xa3a3
sub eax, 1
je 0x140039b5d
cmp eax, 1
je 0x140039aca
mov eax, ebx
mov dword [rdi], 0xa3a3
sub eax, 1
je 0x140039b82
cmp eax, 1
je 0x140039aef
mov eax, ebx
mov dword [r15], 0xa3a3
sub eax, 1
je 0x140039ba8
cmp eax, 1
je 0x140039b15
mov ecx, 0xa3a3
jmp 0x140039bcb
movzx eax, byte [rsp + 0x72]
movzx ecx, byte [rsp + 0x73]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x71]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x70]
shl ecx, 8
or ecx, eax
mov dword [rsi], ecx
movzx eax, byte [rsp + 0x76]
movzx ecx, byte [rsp + 0x77]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x75]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x74]
shl ecx, 8
or ecx, eax
mov dword [rdi], ecx
movzx eax, byte [rsp + 0x7a]
movzx ecx, byte [rsp + 0x7b]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x79]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x78]
shl ecx, 8
or ecx, eax
mov dword [r15], ecx
movzx eax, byte [rsp + 0x7e]
movzx ecx, byte [rsp + 0x7f]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7d]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7c]
jmp 0x140039bc6
movzx eax, byte [rsp + 0x71]
movzx ecx, byte [rsp + 0x70]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x72]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x73]
shl ecx, 8
or ecx, eax
mov dword [rsi], ecx
movzx eax, byte [rsp + 0x75]
movzx ecx, byte [rsp + 0x74]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x76]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x77]
shl ecx, 8
or ecx, eax
mov dword [rdi], ecx
movzx eax, byte [rsp + 0x79]
movzx ecx, byte [rsp + 0x78]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7a]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7b]
shl ecx, 8
or ecx, eax
mov dword [r15], ecx
movzx eax, byte [rsp + 0x7d]
movzx ecx, byte [rsp + 0x7c]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7e]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x7f]
shl ecx, 8
or ecx, eax
mov dword [r12], ecx
xor ecx, ecx
mov eax, dword [rdi]
cmp eax, 0xf42a4
jbe 0x140039beb
cmp eax, 0xffffff00
jbe 0x140039c0b
dec dword [rsi]
add dword [rdi], 0xf4240
mov eax, dword [rdi]
test eax, eax
mov eax, 1
jne 0x140039c12
cmp dword [rsi], 0
jne 0x140039c12
cmp dword [r12], 0
jne 0x140039c12
cmp dword [r15], 0
jne 0x140039c12
jmp 0x140039a20
mov eax, 1
mov ecx, eax
mov edx, dword [r15]
cmp edx, 0x10000
cmova ecx, eax
mov eax, dword [r12]
cmp eax, edx
mov r12d, 1
cmovb ecx, r12d
cmp eax, 8
jae 0x140039c38
mov ecx, r12d
jmp 0x140039c43
cmp eax, 0x27100
ja 0x140039cf1
test ecx, ecx
jne 0x140039cf1
mov r9, qword [r14]
mov r8, rdx
mov rdx, r12
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rax
mov eax, dword [r15]
cmp rcx, rax
jae 0x140039cb3
test rcx, rcx
mov ecx, 2
jne 0x140039ca1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r14 + 0x128]
lea r8, [r14 + 0x1c]
mov rcx, rax
lea rdx, str._s:_could_not_read_packet_data__frame__lld_n
call fcn.140001010
lea rcx, [r14 + 0x1c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140039ee4
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str._s:_premature_end_of_file_n
jmp 0x140039ed8
add qword [r14 + 0x138], rcx
mov rdx, qword [r14 + 0x128]
test rdx, rdx
jne 0x140039cd2
mov ecx, dword [rsi]
mov dword [r14 + 0xc], ecx
mov ecx, dword [rdi]
mov dword [r14 + 0x10], ecx
mov ecx, dword [rsi]
mov eax, r12d
mov dword [r14 + 0x14], ecx
mov ecx, dword [rdi]
mov dword [r14 + 0x18], ecx
lea rcx, [rdx + 1]
mov qword [r14 + 0x128], rcx
jmp 0x140039ee6
mov rcx, qword [r14]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov rbx, qword [r14 + 0x128]
mov ecx, 2
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140039ea0
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsp + 0x28], r13
lea r8, [r14 + 0x1c]
mov rcx, rax
mov qword [rsp + 0x20], r13
mov r9, rbx
lea rdx, str._s:_lld:_corruption_found_at_0x_08I64x___I64d__n
call fcn.140001010
mov r9, qword [r14]
lea rcx, [rbp - 0x80]
mov rdx, r12
mov r8d, 0x4000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rsi, rax
test rax, rax
je 0x140039e76
add qword [r14 + 0x138], rax
xor ebx, ebx
test rax, rax
je 0x140039da5
mov r15d, dword [r14 + 0x120]
xor edi, edi
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [rsp + 0x40]
lea rcx, [rbp - 0x80]
mov edx, esi
add rcx, rdi
sub edx, ebx
mov r9d, r15d
call fcn.140039580
test eax, eax
jne 0x140039db6
inc ebx
mov edi, ebx
cmp rdi, rsi
jb 0x140039d80
lea rcx, str.No_valid_packet_found_in_chunk_n
call fcn.140001370
jmp 0x140039cf1
mov rcx, qword [r14]
lea rdx, [rdi + r13]
xor r8d, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
test eax, eax
je 0x140039e06
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea r8, [r14 + 0x1c]
lea rdx, str._s:_could_not_resolve_file_corruption__seek_forward__n
call fcn.140001010
lea rcx, [r14 + 0x1c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov rcx, qword [r14]
xor edx, edx
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
jmp 0x140039ee4
mov rcx, qword [r14]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r14 + 0x128]
lea r8, [r14 + 0x1c]
mov rcx, rax
mov qword [rsp + 0x28], rbx
lea rdx, str._s:_lld:_good_packet_found_at_0x_08I64x___I64d__n
mov qword [rsp + 0x20], rbx
call fcn.140001010
mov rax, qword [rsp + 0x48]
mov rcx, r14
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
mov dword [rsp + 0x30], 0x10000
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
call fcn.1400399a0
jmp 0x140039ee6
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea r8, [r14 + 0x1c]
lea rdx, str._s:_error_at_end_of_file_n
call fcn.140001010
lea rcx, [r14 + 0x1c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140039ee4
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rbx
lea r8, [r14 + 0x1c]
mov rcx, rax
lea rdx, str._s:_lld:_could_not_resolve_file_corruption__ftell__n
call fcn.140001010
jmp 0x140039de8
test rax, rax
je 0x140039ee4
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, [0x14005f150]
lea r8, [r14 + 0x1c]
mov rcx, rax
call fcn.140001010
xor eax, eax
mov rcx, qword [rbp + 0x3f80]
xor rcx, rsp
call fcn.14004da00
add rsp, 0x4098
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret