Function at 0x180047fb0
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rdi
push r13
push r14
sub rsp, 0x270
mov rax, qword [0x1800f7050]
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 0x1800482b9
cmp dword [rdi + 0x24], 0
jne 0x1800482b9
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 0x18004804f
call fcn.18006265c
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.1800644c0
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 0x1800482b2
mov rax, rcx
xor r15d, r15d
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x1800480fe
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.180003e90
jmp 0x1800481bc
mov rdx, rcx
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18004811e
call fcn.1800030e0
jmp 0x1800481bc
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 0x1800481cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x18004816b
cmp eax, 0x3e6
je 0x18004816b
test eax, eax
jle 0x1800481bc
movzx eax, ax
or eax, 0x80070000
jmp 0x1800481bc
lea rcx, [rdi + 0x10]
mov edx, 0x200
call fcn.180003cc0
test eax, eax
js 0x1800481bc
cmp eax, 1
je 0x1800481bc
mov rcx, qword [rdi + 0x10]
lea rdx, [rsp + 0x40]
mov r8d, 0x200
call fcn.180063290
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 0x1800481cd
call fcn.1800030e0
test eax, eax
js 0x18004826d
cmp eax, 1
je 0x18004826d
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 0x1800482b2
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x10]
mov r9, r13
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 4
call fcn.180003e90
test eax, eax
js 0x18004826d
cmp eax, 1
je 0x18004826d
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 0x1800482b2
cmp rdx, 0xffffffffffffffff
je 0x1800482b2
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x10]
mov r9, rsi
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 4
call fcn.180003e90
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.180062100
add rsp, 0x270
pop r14
pop r13
pop rdi
ret
mov eax, 0x80070057
jmp 0x18004826d
mov eax, 0x80004005
jmp 0x180048295