Function at 0x140010710
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x140045010]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0x810], 0
je 0x140010823
mov rcx, rdi
call fcn.140021720
mov rcx, rdi
mov rdx, rax
call fcn.14000cba0
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 8
mov rbx, qword [rbx]
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.1400216a0
test eax, eax
jne 0x140010760
mov ebp, dword [rbx + 0xc]
test ebp, ebp
je 0x140010a89
mov r14d, dword [rbx + 8]
mov ecx, 0x10
call fcn.1400215bc
test rax, rax
je 0x140010a63
mov qword [rax], 0
mov dword [rax + 8], r14d
mov dword [rax + 0xc], ebp
mov rdx, qword [rsi + 0x808]
test rdx, rdx
je 0x140010aaa
lea r8d, [r14 + rbp]
add r8d, 0xffffffff
nop dword [rax + rax]
mov rdi, rdx
mov ebp, dword [rdx + 8]
mov ecx, dword [rdx + 0xc]
lea esi, [rcx + rbp]
add esi, 0xffffffff
cmp ebp, r14d
ja 0x1400107dd
cmp esi, r14d
jae 0x140010a5b
cmp esi, r14d
setae r10b
cmp r8d, ebp
setb r11b
cmp r8d, esi
seta r9b
cmp ebp, r14d
setb cl
cmp esi, r8d
setbe dl
test r10b, dl
jne 0x140010a5b
and cl, r9b
or r11b, cl
je 0x140010a5b
mov rdx, qword [rdi]
test rdx, rdx
jne 0x1400107c0
mov qword [rdi], rax
jmp 0x140010a89
mov rcx, qword [rsi]
xor edx, edx
xor r8d, r8d
call fcn.14001bd18
mov r9, qword [rsi]
lea rcx, [rsp + 0x4c]
mov edx, 4
mov r8d, 1
call fcn.140020e34
cmp rax, 1
jne 0x140010a87
cmp dword [rsp + 0x4c], 0x3152414d
jne 0x140010a87
mov r9, qword [rsi]
lea rcx, [rsp + 0x28]
mov edx, 4
mov r8d, 1
call fcn.140020e34
cmp rax, 1
jne 0x140010a87
mov ecx, dword [rsp + 0x28]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x28], eax
mov rcx, qword [rsi]
mov edx, eax
xor r8d, r8d
call fcn.14001bd18
test eax, eax
jne 0x140010a87
mov r9, qword [rsi]
lea rcx, [rsp + 0x24]
mov edx, 4
mov r8d, 1
call fcn.140020e34
cmp rax, 1
jne 0x140010a87
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x24], eax
mov ebp, eax
mov rcx, rbp
call fcn.1400215bc
test rax, rax
je 0x140010a87
mov r13, rax
mov r9, qword [rsi]
mov r8d, 1
mov rcx, rax
mov rdx, rbp
call fcn.140020e34
cmp rax, 1
jne 0x140010ab3
mov r12, r13
add r12, rbp
mov qword [rsp + 0x30], r13
test ebp, ebp
je 0x140010ac2
lea rax, [r12 - 1]
mov qword [rsp + 0x40], rax
mov rbx, qword [sym.imp.WSOCK32.dll_ntohl]
mov r13, qword [rsp + 0x30]
mov rax, r12
sub rax, r13
cmp rax, 0xe
jl 0x140010ac2
mov ecx, dword [r13]
mov ebp, dword [r13 + 4]
mov r15d, dword [r13 + 8]
lea r14, [r13 + 0xc]
call rbx
mov dword [rsp + 0x2c], eax
mov ecx, ebp
call rbx
mov ebp, eax
mov ecx, r15d
call rbx
cmp byte [r13 + 0xc], 0
mov qword [rsp + 0x38], r14
mov rcx, r14
je 0x140010991
add r13, 0xd
cmp r12, r13
je 0x140010abd
cmp byte [r13], 0
lea r13, [r13 + 1]
jne 0x140010976
add r13, 0xffffffffffffffff
mov rcx, r13
cmp rcx, r12
je 0x140010ae0
mov r15, rcx
sub r15, qword [rsp + 0x38]
test r15d, r15d
js 0x140010ae0
mov ebx, eax
mov r14d, ebp
mov r13, rcx
add r13, 1
movsxd rcx, r15d
add rcx, 0x18
call fcn.1400215bc
test rax, rax
je 0x140010ac2
mov rbp, rax
shl r15, 0x20
movabs rax, 0x100000000
add r15, rax
mov qword [rbp], 0
mov eax, dword [rsp + 0x2c]
mov dword [rbp + 8], eax
mov dword [rbp + 0xc], r14d
mov dword [rbp + 0x10], ebx
mov rcx, rbp
add rcx, 0x14
sar r15, 0x20
mov r14, qword [rsp + 0x38]
mov rdx, r14
mov r8, r15
call fcn.140027db0
mov rcx, r14
call fcn.140021720
mov rcx, r14
mov rdx, rax
call fcn.14000cba0
movzx eax, al
mov rcx, qword [rsi + rax*8 + 8]
test rcx, rcx
je 0x140010a3e
mov rax, rcx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x140010a31
jmp 0x140010a46
lea rax, [rsi + rax*8]
add rax, 8
mov rbx, qword [sym.imp.WSOCK32.dll_ntohl]
mov qword [rax], rbp
cmp r13, r12
jb 0x140010932
jmp 0x140010ac2
mov rcx, rax
call fcn.1400210e4
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.1400210f8
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140023e80
mov rax, rbx
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsi + 0x808], rax
jmp 0x140010a89
mov rcx, r13
call fcn.1400210e4
jmp 0x140010a87
mov r13, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
call fcn.1400210e4
cmp r13, r12
jne 0x140010a87
mov dword [rsi + 0x810], 1
jmp 0x140010742
mov r13, rcx
jmp 0x140010ac2