Function at 0x14000d1b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rdi, rdx
mov rsi, rcx
cmp dword [rcx + 0x818], 0
je 0x14000d2bb
mov rcx, rdi
call fcn.1400224c0
mov rcx, rdi
mov rdx, rax
call fcn.1400105a0
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 0x10
mov rbx, qword [rbx]
test rbx, rbx
je 0x14000d209
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.140022080
test eax, eax
jne 0x14000d1f1
mov ebp, dword [rbx + 0xc]
test ebp, ebp
je 0x14000d4e4
mov r14d, dword [rbx + 8]
mov ecx, 0x10
call fcn.140021ee0
test rax, rax
je 0x14000d4be
mov qword [rax], 0
mov dword [rax + 8], r14d
mov dword [rax + 0xc], ebp
mov rcx, qword [rsi + 0x810]
test rcx, rcx
je 0x14000d4f8
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 0x14000d26c
cmp ebp, r14d
jae 0x14000d4b6
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 0x14000d4b6
or dl, cl
je 0x14000d4b6
or r9b, r10b
je 0x14000d4b6
mov rcx, qword [rdi]
test rcx, rcx
jne 0x14000d250
mov qword [rdi], rax
jmp 0x14000d4e4
mov rcx, qword [rsi + 8]
cmp rcx, 4
jb 0x14000d4e2
mov rax, qword [rsi]
xor ebx, ebx
cmp dword [rax], 0x3152414d
jne 0x14000d4e4
and rcx, 0xfffffffffffffffc
cmp rcx, 4
je 0x14000d4e4
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebp, eax
mov rax, qword [rsi + 8]
xor ebx, ebx
cmp rax, rbp
cmovb rbp, rbx
jb 0x14000d4e4
xor ebx, ebx
sub rax, 4
jb 0x14000d4e4
cmp rbp, rax
ja 0x14000d4e4
mov rax, qword [rsi]
mov ecx, dword [rax + rbp]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
mov rcx, rbx
call fcn.140021ee0
test rax, rax
je 0x14000d4e2
mov r15, rax
mov rax, qword [rsi + 8]
sub rax, rbx
jb 0x14000d501
add rbp, 4
cmp rbp, rax
ja 0x14000d501
add rbp, qword [rsi]
mov rcx, r15
mov rdx, rbp
mov r8, rbx
call fcn.1400288a0
mov rbp, r15
add rbp, rbx
mov r14, r15
test rbx, rbx
je 0x14000d515
lea r13, [rbp - 1]
mov r14, r15
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x30], r15
mov rax, rbp
sub rax, r14
cmp rax, 0xe
jl 0x14000d515
mov ecx, dword [r14]
mov ebp, dword [r14 + 4]
mov ebx, dword [r14 + 8]
lea rax, [r14 + 0xc]
mov qword [rsp + 0x40], rax
mov r12, qword [sym.imp.WS2_32.dll_ntohl]
call r12
mov dword [rsp + 0x3c], eax
mov ecx, ebp
call r12
mov dword [rsp + 0x38], eax
mov ecx, ebx
call r12
mov rbp, qword [rsp + 0x40]
cmp byte [r14 + 0xc], 0
mov r14, rbp
je 0x14000d3f3
mov rcx, rbp
cmp rcx, r13
je 0x14000d501
lea r14, [rcx + 1]
cmp byte [rcx + 1], 0
mov rcx, r14
jne 0x14000d3dd
cmp r14, qword [rsp + 0x28]
je 0x14000d510
mov r15, r14
sub r15, rbp
mov ecx, r15d
and ecx, 0x80000000
jne 0x14000d50b
mov r12d, eax
inc r14
mov ecx, r15d
add rcx, 0x18
call fcn.140021ee0
test rax, rax
je 0x14000d50b
mov rbx, rax
mov qword [rax], 0
mov eax, dword [rsp + 0x3c]
mov dword [rbx + 8], eax
mov eax, dword [rsp + 0x38]
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.1400288a0
mov rcx, rbp
call fcn.1400224c0
mov rcx, rbp
mov rdx, rax
call fcn.1400105a0
movzx ecx, al
mov rax, qword [rsi + rcx*8 + 0x10]
test rax, rax
je 0x14000d496
mov r15, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x28]
mov rcx, rax
mov rax, qword [rax]
test rax, rax
jne 0x14000d489
jmp 0x14000d4a8
lea rcx, [rsi + rcx*8]
add rcx, 0x10
mov r15, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x28]
mov qword [rcx], rbx
cmp r14, rbp
jb 0x14000d38b
jmp 0x14000d515
mov rcx, rax
call fcn.140021a08
mov ecx, 2
call fcn.140016598
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.140021a1c
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsi + 0x810], rax
jmp 0x14000d4e4
mov rcx, r15
call fcn.140021a08
jmp 0x14000d4e2
mov r15, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x28]
mov rcx, r15
call fcn.140021a08
cmp r14, rbp
jne 0x14000d4e2
mov dword [rsi + 0x818], 1
jmp 0x14000d1d3