Function at 0x140062570
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push r13
lea rbp, [rax - 0x8d8]
sub rsp, 0x9c8
mov qword [rax - 0x18], rbx
lea rcx, [0x14021a4d8]
mov qword [rax - 0x20], rsi
xor r9d, r9d
mov qword [rax - 0x28], rdi
mov edx, 0x80000000
mov qword [rax - 0x30], r12
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov esi, r12d
mov qword [rax - 0x38], r14
mov dword [rsp + 0x28], 0x80
lea r8d, [r12 + 3]
mov qword [rax - 0x40], r15
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140062a8f
mov edi, 0x400000
lea rdx, [0x14014fdc0]
mov ecx, edi
call fcn.14002e8b0
test rax, rax
je 0x140062a8f
xor r9d, r9d
mov dword [rbp + 0x8e0], edi
lea r8, [rsp + 0x4c]
mov qword [rsp + 0x48], r12
xor edx, edx
mov rcx, r13
mov rsi, rax
mov r15d, edi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x48], eax
cmp eax, 0xffffffff
jne 0x140062639
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140062a8f
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x140062a8f
mov ebx, r12d
test rsi, rsi
je 0x140062695
nop dword [rax]
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x8e8], r12d
add rdx, rsi
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x8e8]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006268b
mov eax, dword [rbp + 0x8e8]
test eax, eax
je 0x14006268b
add ebx, eax
cmp ebx, edi
jb 0x140062650
mov eax, ebx
lock add qword [0x1401f3d70], rax
mov qword [rsp + 0x40], r12
mov r14, r12
test rsi, rsi
je 0x140062a8f
mov eax, 0xf8
cmp ebx, eax
jae 0x14006274f
cmp r13, 0xffffffffffffffff
je 0x140062a9a
xor r9d, r9d
mov qword [rsp + 0x50], r12
lea r8, [rsp + 0x54]
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x50], eax
cmp eax, 0xffffffff
jne 0x1400626ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140062a8f
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x140062a8f
mov ebx, r12d
test rsi, rsi
je 0x140062745
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x8f0], r12d
add rdx, rsi
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x8f0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006273b
mov eax, dword [rbp + 0x8f0]
test eax, eax
je 0x14006273b
add ebx, eax
cmp ebx, edi
jb 0x140062700
mov eax, ebx
lock add qword [0x1401f3d70], rax
mov qword [rsp + 0x40], r12
mov eax, 0xf8
cmp ebx, eax
mov r12d, ebx
cmova r12d, eax
test r12d, r12d
je 0x140062a8f
mov edi, r12d
test rsi, rsi
je 0x140062782
cmp rdi, rax
ja 0x140062782
mov r8d, edi
lea rcx, [0x14021a1d8]
mov rdx, rsi
call fcn.14014cbf0
jmp 0x1400627be
mov r8, rax
lea rcx, [0x14021a1d8]
xor edx, edx
call fcn.14014d290
test rsi, rsi
jne 0x1400627a5
call fcn.1400409f4
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x1400627b9
cmp rdi, 0xf8
jbe 0x1400627be
call fcn.1400409f4
mov dword [rax], 0x22
call fcn.140040884
cmp r12d, 0xf8
jne 0x140062a8f
cmp dword [0x14021a1d8], 3
jne 0x140062a5d
mov edx, 9
lea r8, [0x140000000]
xor ecx, ecx
movzx eax, word [rcx + r8 + 0x1b91b0]
cmp word [rcx + r8 + 0x21a1dc], ax
jne 0x140062a5d
add rcx, 2
sub rdx, 1
jne 0x1400627e6
xor ecx, ecx
call fcn.140035ae0
mov qword [rsp + 0x60], rax
mov edi, 0x8c8
nop dword [rax]
test rsi, rsi
je 0x140062a56
cmp r12d, ebx
ja 0x140062a56
mov eax, ebx
sub eax, r12d
cmp eax, edi
jae 0x14006293f
cmp r13, 0xffffffffffffffff
je 0x140062a56
add r12, r14
mov r14, r12
and r12d, 0xfff
sub r14, r12
mov qword [rsp + 0x40], r14
lea edi, [r12 + 0x400000]
cmp edi, r15d
jbe 0x140062899
mov ecx, edi
lea rdx, [0x14014fdc0]
call fcn.14002e8b0
mov rbx, rax
test rax, rax
je 0x140062a56
mov rcx, rsi
call fcn.14002e8a8
mov rsi, rbx
mov dword [rbp + 0x8e0], edi
mov r15d, edi
xor r9d, r9d
mov qword [rsp + 0x58], r14
lea r8, [rsp + 0x5c]
mov edx, r14d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x58], eax
cmp eax, 0xffffffff
jne 0x1400628c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140062a56
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x140062a56
test rsi, rsi
je 0x14006292b
xor eax, eax
mov ebx, eax
nop
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x8f8], eax
add rdx, rsi
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x8f8]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14006291f
mov eax, dword [rbp + 0x8f8]
test eax, eax
je 0x14006291f
add ebx, eax
mov eax, 0
cmp ebx, edi
jb 0x1400628e0
mov eax, ebx
lock add qword [0x1401f3d70], rax
jmp 0x14006292d
xor ebx, ebx
cmp r12d, ebx
ja 0x140062a56
cmp r12d, r15d
ja 0x140062a56
mov eax, 0x8c8
mov edi, ebx
sub edi, r12d
cmp edi, eax
cmova edi, eax
test edi, edi
je 0x140062a56
mov r14d, r12d
mov r15d, edi
add r14, rsi
je 0x140062977
cmp r15, rax
ja 0x140062977
mov r8d, r15d
lea rcx, [rbp - 0x40]
mov rdx, r14
call fcn.14014cbf0
jmp 0x1400629b0
mov r8, rax
lea rcx, [rbp - 0x40]
xor edx, edx
call fcn.14014d290
test r14, r14
jne 0x140062997
call fcn.1400409f4
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x1400629ab
cmp r15, 0x8c8
jbe 0x1400629b0
call fcn.1400409f4
mov dword [rax], 0x22
call fcn.140040884
add r12d, edi
cmp edi, 0x8c8
jne 0x140062a56
cmp word [rbp - 0x40], 0
mov edi, 0x8c8
mov r14, qword [rsp + 0x40]
mov r15d, dword [rbp + 0x8e0]
je 0x140062820
cmp byte [rbp + 0x40], 0
je 0x140062820
cmp byte [rbp + 0x80], 0
je 0x140062820
mov rax, qword [rbp + 0x880]
test rax, rax
je 0x140062820
cmp rax, qword [rsp + 0x60]
jle 0x140062820
mov edx, dword [0x14021ac70]
lea rcx, [0x14021ac58]
inc edx
call fcn.140003020
test al, al
je 0x140062820
mov eax, dword [0x14021ac78]
lea rdx, [rbp - 0x40]
mov r8d, eax
imul eax, dword [0x14021ac70]
mov ecx, eax
add rcx, qword [0x14021ac68]
call fcn.14014cbf0
inc dword [0x14021ac70]
jmp 0x140062820
mov byte [0x14021ac80], 0
cmp r13, 0xffffffffffffffff
je 0x140062a68
test rsi, rsi
je 0x140062a77
test rsi, rsi
je 0x140062a77
mov rcx, rsi
call fcn.14002e8a8
xor esi, esi
cmp r13, 0xffffffffffffffff
je 0x140062a9a
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, 0xffffffffffffffff
jmp 0x140062a9a
cmp r13, 0xffffffffffffffff
je 0x140062a9a
test rsi, rsi
je 0x140062aa7
test rsi, rsi
je 0x140062aa7
mov rcx, rsi
call fcn.14002e8a8
mov r15, qword [rsp + 0x998]
mov r14, qword [rsp + 0x9a0]
mov r12, qword [rsp + 0x9a8]
mov rdi, qword [rsp + 0x9b0]
mov rsi, qword [rsp + 0x9b8]
mov rbx, qword [rsp + 0x9c0]
cmp r13, 0xffffffffffffffff
je 0x140062ae6
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x9c8
pop r13
pop rbp
ret