Function at 0x1400107e0
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 0x1400108f3
mov rcx, rdi
call fcn.140021880
mov rcx, rdi
mov rdx, rax
call fcn.14000cc70
movzx eax, al
lea rbx, [rsi + rax*8]
add rbx, 8
mov rbx, qword [rbx]
lea rcx, [rbx + 0x14]
mov rdx, rdi
call fcn.140021800
test eax, eax
jne 0x140010830
mov ebp, dword [rbx + 0xc]
test ebp, ebp
je 0x140010b59
mov r14d, dword [rbx + 8]
mov ecx, 0x10
call fcn.14002171c
test rax, rax
je 0x140010b33
mov qword [rax], 0
mov dword [rax + 8], r14d
mov dword [rax + 0xc], ebp
mov rdx, qword [rsi + 0x808]
test rdx, rdx
je 0x140010b7a
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 0x1400108ad
cmp esi, r14d
jae 0x140010b2b
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 0x140010b2b
and cl, r9b
or r11b, cl
je 0x140010b2b
mov rdx, qword [rdi]
test rdx, rdx
jne 0x140010890
mov qword [rdi], rax
jmp 0x140010b59
mov rcx, qword [rsi]
xor edx, edx
xor r8d, r8d
call fcn.14001be78
mov r9, qword [rsi]
lea rcx, [rsp + 0x4c]
mov edx, 4
mov r8d, 1
call fcn.140020f94
cmp rax, 1
jne 0x140010b57
cmp dword [rsp + 0x4c], 0x3152414d
jne 0x140010b57
mov r9, qword [rsi]
lea rcx, [rsp + 0x48]
mov edx, 4
mov r8d, 1
call fcn.140020f94
cmp rax, 1
jne 0x140010b57
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x48], eax
mov rcx, qword [rsi]
mov edx, eax
xor r8d, r8d
call fcn.14001be78
test eax, eax
jne 0x140010b57
mov r9, qword [rsi]
lea rcx, [rsp + 0x44]
mov edx, 4
mov r8d, 1
call fcn.140020f94
cmp rax, 1
jne 0x140010b57
mov ecx, dword [rsp + 0x44]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x44], eax
mov ebp, eax
mov rcx, rbp
call fcn.14002171c
test rax, rax
je 0x140010b57
mov r13, rax
mov r9, qword [rsi]
mov r8d, 1
mov rcx, rax
mov rdx, rbp
call fcn.140020f94
cmp rax, 1
jne 0x140010b83
mov r12, r13
add r12, rbp
mov qword [rsp + 0x28], r13
test ebp, ebp
je 0x140010b92
lea rax, [r12 - 1]
mov qword [rsp + 0x38], rax
mov rbx, qword [sym.imp.WSOCK32.dll_ntohl]
mov r13, qword [rsp + 0x28]
mov rax, r12
sub rax, r13
cmp rax, 0xe
jl 0x140010b92
mov ecx, dword [r13]
mov ebp, dword [r13 + 4]
mov r15d, dword [r13 + 8]
lea r14, [r13 + 0xc]
call rbx
mov dword [rsp + 0x24], eax
mov ecx, ebp
call rbx
mov ebp, eax
mov ecx, r15d
call rbx
cmp byte [r13 + 0xc], 0
mov qword [rsp + 0x30], r14
mov rcx, r14
je 0x140010a61
add r13, 0xd
cmp r12, r13
je 0x140010b8d
cmp byte [r13], 0
lea r13, [r13 + 1]
jne 0x140010a46
add r13, 0xffffffffffffffff
mov rcx, r13
cmp rcx, r12
je 0x140010bb0
mov r15, rcx
sub r15, qword [rsp + 0x30]
test r15d, r15d
js 0x140010bb0
mov ebx, eax
mov r14d, ebp
mov r13, rcx
add r13, 1
movsxd rcx, r15d
add rcx, 0x18
call fcn.14002171c
test rax, rax
je 0x140010b92
mov rbp, rax
shl r15, 0x20
movabs rax, 0x100000000
add r15, rax
mov qword [rbp], 0
mov eax, dword [rsp + 0x24]
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 + 0x30]
mov rdx, r14
mov r8, r15
call fcn.140027f10
mov rcx, r14
call fcn.140021880
mov rcx, r14
mov rdx, rax
call fcn.14000cc70
movzx eax, al
mov rcx, qword [rsi + rax*8 + 8]
test rcx, rcx
je 0x140010b0e
mov rax, rcx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x140010b01
jmp 0x140010b16
lea rax, [rsi + rax*8]
add rax, 8
mov rbx, qword [sym.imp.WSOCK32.dll_ntohl]
mov qword [rax], rbp
cmp r13, r12
jb 0x140010a02
jmp 0x140010b92
mov rcx, rax
call fcn.140021244
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_file_content_collision_in_mar_find_item___n
mov edx, 0x31
mov r8d, 1
mov r9, rax
call fcn.140021258
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140023fe0
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 0x140010b59
mov rcx, r13
call fcn.140021244
jmp 0x140010b57
mov r13, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
call fcn.140021244
cmp r13, r12
jne 0x140010b57
mov dword [rsi + 0x810], 1
jmp 0x140010812
mov r13, rcx
jmp 0x140010b92