Function at 0x14000cfe0
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 [0x140047010]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0x810], 0
je 0x14000d0fa
mov rcx, rdi
call fcn.140022150
mov rcx, rdi
mov rdx, rax
call fcn.140010400
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 8
mov rbx, qword [rbx]
test rbx, rbx
je 0x14000d048
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.140021d10
test eax, eax
jne 0x14000d030
mov ebp, dword [rbx + 0xc]
test ebp, ebp
je 0x14000d35b
mov r14d, dword [rbx + 8]
mov ecx, 0x10
call fcn.140021c30
test rax, rax
je 0x14000d335
mov qword [rax], 0
mov dword [rax + 8], r14d
mov dword [rax + 0xc], ebp
mov rcx, qword [rsi + 0x808]
test rcx, rcx
je 0x14000d37c
lea r8d, [r14 + rbp]
dec r8d
mov rdi, rcx
mov esi, dword [rcx + 8]
mov ecx, dword [rcx + 0xc]
lea ebp, [rsi + rcx]
dec ebp
cmp esi, r14d
ja 0x14000d0ab
cmp ebp, r14d
jae 0x14000d32d
cmp ebp, r14d
setb r9b
cmp r8d, esi
setae r11b
setb dl
cmp r8d, ebp
seta cl
cmp esi, r14d
setae sil
cmp ebp, r8d
seta r10b
test r11b, sil
jne 0x14000d32d
or dl, cl
je 0x14000d32d
or r9b, r10b
je 0x14000d32d
mov rcx, qword [rdi]
test rcx, rcx
jne 0x14000d08f
mov qword [rdi], rax
jmp 0x14000d35b
mov rcx, qword [rsi]
xor edx, edx
xor r8d, r8d
call fcn.14001b858
mov r9, qword [rsi]
lea rcx, [rsp + 0x4c]
mov edx, 4
mov r8d, 1
call fcn.1400214a8
cmp rax, 1
jne 0x14000d359
cmp dword [rsp + 0x4c], 0x3152414d
jne 0x14000d359
mov r9, qword [rsi]
lea rcx, [rsp + 0x48]
mov edx, 4
mov r8d, 1
call fcn.1400214a8
cmp rax, 1
jne 0x14000d359
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rsp + 0x48], eax
mov rcx, qword [rsi]
mov edx, eax
xor r8d, r8d
call fcn.14001b858
test eax, eax
jne 0x14000d359
mov r9, qword [rsi]
lea rcx, [rsp + 0x44]
mov edx, 4
mov r8d, 1
call fcn.1400214a8
cmp rax, 1
jne 0x14000d359
mov ecx, dword [rsp + 0x44]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rsp + 0x44], eax
mov ebx, eax
mov rcx, rbx
call fcn.140021c30
test rax, rax
je 0x14000d359
mov r15, rax
mov r9, qword [rsi]
mov r8d, 1
mov rcx, rax
mov rdx, rbx
call fcn.1400214a8
cmp rax, 1
jne 0x14000d385
mov rbp, r15
add rbp, rbx
mov r14, r15
test rbx, rbx
je 0x14000d399
lea r13, [rbp - 1]
mov r14, r15
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x28], r15
mov rax, rbp
sub rax, r14
cmp rax, 0xe
jl 0x14000d399
mov ecx, dword [r14]
mov ebp, dword [r14 + 4]
mov ebx, dword [r14 + 8]
lea rax, [r14 + 0xc]
mov qword [rsp + 0x38], rax
mov r12, qword [sym.imp.WS2_32.dll_ntohl]
call r12
mov dword [rsp + 0x34], eax
mov ecx, ebp
call r12
mov dword [rsp + 0x30], eax
mov ecx, ebx
call r12
mov rbp, qword [rsp + 0x38]
cmp byte [r14 + 0xc], 0
mov r14, rbp
je 0x14000d26b
mov rcx, rbp
cmp rcx, r13
je 0x14000d385
lea r14, [rcx + 1]
cmp byte [rcx + 1], 0
mov rcx, r14
jne 0x14000d255
cmp r14, qword [rsp + 0x20]
je 0x14000d38f
mov r12d, eax
mov r15, r14
sub r15, rbp
mov eax, r15d
and eax, 0x80000000
jne 0x14000d38f
inc r14
mov ecx, r15d
add rcx, 0x18
call fcn.140021c30
test rax, rax
je 0x14000d38f
mov rbx, rax
mov qword [rax], 0
mov eax, dword [rsp + 0x34]
mov dword [rbx + 8], eax
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0xc], eax
mov dword [rbx + 0x10], r12d
mov rcx, rbx
add rcx, 0x14
inc r15d
mov rdx, rbp
mov r8, r15
call fcn.140028530
mov rcx, rbp
call fcn.140022150
mov rcx, rbp
mov rdx, rax
call fcn.140010400
movzx ecx, al
mov rax, qword [rsi + rcx*8 + 8]
test rax, rax
je 0x14000d30d
mov r15, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x20]
mov rcx, rax
mov rax, qword [rax]
test rax, rax
jne 0x14000d300
jmp 0x14000d31f
lea rcx, [rsi + rcx*8]
add rcx, 8
mov r15, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x20]
mov qword [rcx], rbx
cmp r14, rbp
jb 0x14000d203
jmp 0x14000d399
mov rcx, rax
call fcn.140021758
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.14002176c
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400246e0
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 0x14000d35b
mov rcx, r15
call fcn.140021758
jmp 0x14000d359
mov r15, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x20]
mov rcx, r15
call fcn.140021758
cmp r14, rbp
jne 0x14000d359
mov dword [rsi + 0x810], 1
jmp 0x14000d012