Function at 0x14000d010
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 0x14000d125
mov rcx, rdi
call fcn.140021560
mov rcx, rdi
mov rdx, rax
call fcn.1400103f0
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 8
mov rbx, qword [rbx]
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.140021370
test eax, eax
jne 0x14000d060
mov ebp, dword [rbx + 0xc]
test ebp, ebp
je 0x14000d37f
mov r14d, dword [rbx + 8]
mov ecx, 0x10
call fcn.140021290
test rax, rax
je 0x14000d359
mov qword [rax], 0
mov dword [rax + 8], r14d
mov dword [rax + 0xc], ebp
mov rcx, qword [rsi + 0x808]
test rcx, rcx
je 0x14000d3a0
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 0x14000d0d6
cmp ebp, r14d
jae 0x14000d351
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 0x14000d351
or dl, cl
je 0x14000d351
or r9b, r10b
je 0x14000d351
mov rcx, qword [rdi]
test rcx, rcx
jne 0x14000d0ba
mov qword [rdi], rax
jmp 0x14000d37f
mov rcx, qword [rsi]
xor edx, edx
xor r8d, r8d
call fcn.14001b7d8
mov r9, qword [rsi]
lea rcx, [rsp + 0x4c]
mov edx, 4
mov r8d, 1
call fcn.140020b08
cmp rax, 1
jne 0x14000d37d
cmp dword [rsp + 0x4c], 0x3152414d
jne 0x14000d37d
mov r9, qword [rsi]
lea rcx, [rsp + 0x48]
mov edx, 4
mov r8d, 1
call fcn.140020b08
cmp rax, 1
jne 0x14000d37d
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.14001b7d8
test eax, eax
jne 0x14000d37d
mov r9, qword [rsi]
lea rcx, [rsp + 0x44]
mov edx, 4
mov r8d, 1
call fcn.140020b08
cmp rax, 1
jne 0x14000d37d
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.140021290
test rax, rax
je 0x14000d37d
mov r12, rax
mov r9, qword [rsi]
mov r8d, 1
mov rcx, rax
mov rdx, rbx
call fcn.140020b08
cmp rax, 1
jne 0x14000d3a9
mov rbp, r12
add rbp, rbx
mov r14, r12
test rbx, rbx
je 0x14000d3bd
lea r13, [rbp - 1]
mov r14, r12
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x28], r12
mov rax, rbp
sub rax, r14
cmp rax, 0xe
jl 0x14000d3bd
mov ecx, dword [r14]
mov ebx, dword [r14 + 4]
mov r15d, dword [r14 + 8]
lea rax, [r14 + 0xc]
mov qword [rsp + 0x38], rax
mov rbp, qword [sym.imp.WS2_32.dll_ntohl]
call rbp
mov dword [rsp + 0x34], eax
mov ecx, ebx
call rbp
mov ebx, eax
mov ecx, r15d
call rbp
mov rbp, qword [rsp + 0x38]
cmp byte [r14 + 0xc], 0
mov r14, rbp
je 0x14000d292
mov rcx, rbp
cmp rcx, r13
je 0x14000d3a9
lea r14, [rcx + 1]
cmp byte [rcx + 1], 0
mov rcx, r14
jne 0x14000d27c
cmp r14, qword [rsp + 0x20]
je 0x14000d3b3
mov dword [rsp + 0x30], eax
mov r15, r14
sub r15, rbp
mov eax, r15d
and eax, 0x80000000
test rax, rax
jne 0x14000d3b3
mov r12d, ebx
inc r14
mov ecx, r15d
add rcx, 0x18
call fcn.140021290
test rax, rax
je 0x14000d3b3
mov rbx, rax
mov qword [rax], 0
mov eax, dword [rsp + 0x34]
mov dword [rbx + 8], eax
mov dword [rbx + 0xc], r12d
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x10], eax
mov rcx, rbx
add rcx, 0x14
inc r15d
mov rdx, rbp
mov r8, r15
call fcn.1400277a0
mov rcx, rbp
call fcn.140021560
mov rcx, rbp
mov rdx, rax
call fcn.1400103f0
movzx eax, al
mov rcx, qword [rsi + rax*8 + 8]
test rcx, rcx
je 0x14000d331
mov rax, rcx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x14000d324
jmp 0x14000d339
lea rax, [rsi + rax*8]
add rax, 8
mov r12, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x20]
mov qword [rax], rbx
cmp r14, rbp
jb 0x14000d22e
jmp 0x14000d3bd
mov rcx, rax
call fcn.140020db8
mov ecx, 2
call fcn.140016378
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.140020dcc
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140023af0
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 0x14000d37f
mov rcx, r12
call fcn.140020db8
jmp 0x14000d37d
mov r12, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x20]
mov rcx, r12
call fcn.140020db8
cmp r14, rbp
jne 0x14000d37d
mov dword [rsi + 0x810], 1
jmp 0x14000d042