Function at 0x140011520
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rdi, rdx
mov rsi, rcx
cmp dword [rcx + 0x818], 0
je 0x14001162d
mov rcx, rdi
call fcn.140023730
mov rcx, rdi
mov rdx, rax
call fcn.140014e30
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 0x10
mov rbx, qword [rbx]
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.1400232b0
test eax, eax
jne 0x140011561
mov r14d, dword [rbx + 0xc]
test r14d, r14d
je 0x140011846
mov edi, dword [rbx + 8]
mov ecx, 0x10
call fcn.1400230c8
test rax, rax
je 0x140011820
mov qword [rax], 0
mov dword [rax + 8], edi
mov dword [rax + 0xc], r14d
mov r8, qword [rsi + 0x810]
test r8, r8
je 0x14001185a
lea ecx, [r14 + rdi]
dec ecx
mov rdx, r8
mov r9d, dword [r8 + 8]
mov r8d, dword [r8 + 0xc]
lea r10d, [r9 + r8]
dec r10d
cmp r9d, edi
ja 0x1400115db
cmp r10d, edi
jae 0x140011818
cmp r10d, edi
setb r8b
cmp ecx, r9d
setae bpl
setb r11b
cmp ecx, r10d
seta sil
cmp r9d, edi
setae r14b
cmp r10d, ecx
seta r9b
test bpl, r14b
jne 0x140011818
or r11b, sil
je 0x140011818
or r8b, r9b
je 0x140011818
mov r8, qword [rdx]
test r8, r8
jne 0x1400115bb
mov qword [rdx], rax
jmp 0x140011846
mov rax, qword [rsi + 8]
cmp rax, 4
jb 0x140011844
and rax, 0xfffffffffffffffc
xor ebx, ebx
cmp rax, 4
je 0x140011846
mov rax, qword [rsi]
cmp dword [rax], 0x3152414d
jne 0x140011846
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov r14d, eax
mov rax, qword [rsi + 8]
cmp rax, r14
jb 0x140011844
xor ebx, ebx
cmp rax, 4
jb 0x140011846
add rax, 0xfffffffffffffffc
cmp rax, r14
jb 0x140011846
mov rax, qword [rsi]
mov ecx, dword [rax + r14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov r15d, eax
mov rcx, r15
call fcn.1400230c8
mov qword [rsp + 0x28], rax
test rax, rax
je 0x140011844
mov rax, qword [rsi + 8]
sub rax, r15
jb 0x140011863
add r14, 4
cmp r14, rax
ja 0x140011863
add r14, qword [rsi]
mov rbx, qword [rsp + 0x28]
mov rcx, rbx
mov rdx, r14
mov r8, r15
call fcn.140027ef0
mov r14, rbx
add r14, r15
test r15, r15
je 0x140011874
lea r15, [r14 - 1]
mov rbx, qword [rsp + 0x28]
mov qword [rsp + 0x20], r14
mov rax, r14
sub rax, rbx
cmp rax, 0xe
jl 0x140011874
mov ecx, dword [rbx]
mov ebp, dword [rbx + 4]
mov r12d, dword [rbx + 8]
lea r14, [rbx + 0xc]
mov r13, qword [sym.imp.WS2_32.dll_ntohl]
call r13
mov dword [rsp + 0x34], eax
mov ecx, ebp
call r13
mov ebp, eax
mov ecx, r12d
call r13
cmp byte [rbx + 0xc], 0
mov rbx, r14
je 0x140011759
mov rcx, r14
cmp rcx, r15
je 0x140011863
lea rbx, [rcx + 1]
cmp byte [rcx + 1], 0
mov rcx, rbx
jne 0x140011743
cmp rbx, qword [rsp + 0x20]
je 0x14001186f
mov dword [rsp + 0x30], ebp
mov rbp, rbx
sub rbp, r14
mov ecx, ebp
and ecx, 0x80000000
jne 0x14001186f
mov r13d, eax
inc rbx
mov ecx, ebp
add rcx, 0x18
call fcn.1400230c8
test rax, rax
je 0x14001186f
mov r12, rax
mov qword [rax], 0
mov eax, dword [rsp + 0x34]
mov dword [r12 + 8], eax
mov eax, dword [rsp + 0x30]
mov dword [r12 + 0xc], eax
mov dword [r12 + 0x10], r13d
mov rcx, r12
add rcx, 0x14
inc ebp
mov rdx, r14
mov r8, rbp
call fcn.140027ef0
mov rcx, r14
call fcn.140023730
mov rcx, r14
mov rdx, rax
call fcn.140014e30
movzx ecx, al
mov rax, qword [rsi + rcx*8 + 0x10]
test rax, rax
je 0x1400117fd
mov r14, qword [rsp + 0x20]
mov rcx, rax
mov rax, qword [rax]
test rax, rax
jne 0x1400117f0
jmp 0x14001180a
lea rcx, [rsi + rcx*8]
add rcx, 0x10
mov r14, qword [rsp + 0x20]
mov qword [rcx], r12
cmp rbx, r14
jb 0x1400116ff
jmp 0x140011874
mov rcx, rax
call fcn.140022b54
mov ecx, 2
call fcn.1400177b8
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.140022b68
xor ebx, ebx
mov rax, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsi + 0x810], rax
jmp 0x140011846
mov rcx, qword [rsp + 0x28]
call fcn.140022b54
jmp 0x140011844
mov r14, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
call fcn.140022b54
cmp rbx, r14
jne 0x140011844
mov dword [rsi + 0x818], 1
jmp 0x140011543