Function at 0x18002d7d0
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rdi
push r13
push r14
sub rsp, 0x270
mov rax, qword [0x1800ff050]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov r14d, edx
mov r13, r8
mov r8, qword [rcx + 0xc8]
sub r8, qword [rcx + 0xc0]
mov rdi, rcx
movabs r9, 0x2aaaaaaaaaaaaaab
mov rax, r9
imul r8
sar rdx, 3
mov rcx, rdx
shr rcx, 0x3f
add rdx, rcx
je 0x18002dad9
cmp dword [rdi + 0x24], 0
jne 0x18002dad9
mov rcx, qword [rdi + 0xc8]
mov qword [r11 + 0x20], rbx
mov qword [r11 - 0x20], rbp
sub rcx, qword [rdi + 0xc0]
mov rax, r9
mov qword [r11 - 0x28], rsi
mov qword [r11 - 0x30], r12
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
jne 0x18002d86f
call fcn.18006aa4c
mov r12, qword [rdi + 0xc0]
lea rcx, [rsp + 0x41]
xor edx, edx
mov ebx, dword [r12 + 0x10]
lea rsi, [r12 + 0x10]
mov r8d, 0x1ff
mov qword [rsp + 0x250], r15
mov byte [rsp + 0x40], 0
mov dword [r13], ebx
call fcn.18006cf60
mov ecx, dword [r12 + 0x14]
mov r11d, dword [r12 + 0x1c]
mov eax, dword [r12 + 0x24]
mov rbp, qword [r12]
lea edx, [rcx + r11]
imul rdx, rbx
add rdx, rax
add rdx, rcx
lea rcx, [rdx + r11 - 0x200]
mov qword [rsp + 0x30], rcx
cmp rbp, 0xffffffffffffffff
je 0x18002dad2
mov rax, rcx
xor r15d, r15d
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x18002d91e
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x10]
mov rdx, rbp
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0x200
call fcn.180003f70
jmp 0x18002d9dc
mov rdx, rcx
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18002d93e
call fcn.180003180
jmp 0x18002d9dc
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r8d, 0x200
mov rcx, rbp
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x18002d9ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x18002d98b
cmp eax, 0x3e6
je 0x18002d98b
test eax, eax
jle 0x18002d9dc
movzx eax, ax
or eax, 0x80070000
jmp 0x18002d9dc
lea rcx, [rdi + 0x10]
mov edx, 0x200
call fcn.180003da0
test eax, eax
js 0x18002d9dc
cmp eax, 1
je 0x18002d9dc
mov rcx, qword [rdi + 0x10]
lea rdx, [rsp + 0x40]
mov r8d, 0x200
call fcn.18006c2d0
mov rdx, qword [rdi + 0x10]
lea r9, [rsp + 0x38]
mov r8d, 0x200
mov rcx, rbp
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x18002d9ed
call fcn.180003180
test eax, eax
js 0x18002da8d
cmp eax, 1
je 0x18002da8d
mov rcx, qword [r12 + 8]
mov eax, dword [r13]
mov edx, r14d
sub edx, dword [r12 + 0x28]
shl edx, 2
mov dword [rdx + rcx], eax
mov eax, dword [r12 + 0x20]
mov rdx, qword [r12]
lea rcx, [rax + r14*4]
mov qword [rsp + 0x30], rcx
cmp rdx, 0xffffffffffffffff
je 0x18002dad2
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x10]
mov r9, r13
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 4
call fcn.180003f70
test eax, eax
js 0x18002da8d
cmp eax, 1
je 0x18002da8d
inc dword [rsi]
cmp dword [rdi + 0x68], r15d
mov rdx, qword [r12]
mov eax, 0x184
mov ecx, 0x170
cmove rax, rcx
mov qword [rsp + 0x30], rax
test rsi, rsi
je 0x18002dad2
cmp rdx, 0xffffffffffffffff
je 0x18002dad2
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x10]
mov r9, rsi
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 4
call fcn.180003f70
mov r15, qword [rsp + 0x250]
mov rsi, qword [rsp + 0x260]
mov rbp, qword [rsp + 0x268]
mov rbx, qword [rsp + 0x2a8]
mov r12, qword [rsp + 0x258]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.18006a4f0
add rsp, 0x270
pop r14
pop r13
pop rdi
ret
mov eax, 0x80070057
jmp 0x18002da8d
mov eax, 0x80004005
jmp 0x18002dab5