Function at 0x140029690
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov r8d, dword [0x1401c3d80]
mov rsi, rdx
lea eax, [r8 + 1]
lea r9d, [r8 + 2]
imul r9d, eax
mov eax, 0xb21642c9
imul r9d, r8d
imul r9d
add edx, r9d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x17
sub r9d, edx
cmp r9d, 0x13
jne 0x1400296e5
dec dword [0x1401c49fc]
mov rcx, qword [rcx]
xor ebp, ebp
xor r9d, r9d
mov qword [rsp + 0x30], rbp
lea r8d, [rbp + 2]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
xor bl, bl
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400298f3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdx, qword [rsi]
mov dword [rsp + 0x50], ebp
mov r8d, dword [rdx - 0x10]
lea r9, [rsp + 0x50]
mov rcx, rdi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400298ea
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [0x1401c3d80]
lea ecx, [rax + 1]
imul ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0x1401c4990]
imul edx, edx, 0x16
sub ecx, edx
mov edx, 0x10ea6ff5
cmp ecx, 0xa
mov rcx, rdi
cmove eax, edx
mov dword [0x1401c4990], eax
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [0x1401c3d80]
mov r8d, ecx
mov eax, 0x6bca1af3
imul r8d, ecx
imul r8d, ecx
imul r8d
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x13
sub r8d, edx
cmp r8d, 0x11
jne 0x14002983b
test ecx, ecx
je 0x14002983b
mov eax, ecx
and eax, 0x80000001
jge 0x1400297e5
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x1400297fa
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov ecx, eax
mov dword [0x1401c3d80], eax
jmp 0x140029807
lea ecx, [rcx*2 + 1]
mov dword [0x1401c3d80], ecx
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
mov edx, ecx
sub edx, eax
je 0x140029829
sub edx, 2
je 0x14002982c
dec edx
je 0x14002982e
jmp 0x140029837
add ecx, 2
inc ecx
add ecx, 2
mov dword [0x1401c3d80], ecx
test ecx, ecx
jne 0x1400297d5
lea eax, [rcx + 1]
lea r8d, [rcx + 2]
mov bl, 1
imul r8d, eax
mov eax, 0x88888889
imul r8d, ecx
imul r8d
add edx, r8d
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xf
sub r8d, edx
cmp r8d, 0xc
jne 0x1400298b2
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 4
imul edx, edx, 0x64
sub ecx, edx
add ecx, 0x7b
movsxd rdx, ecx
mov rcx, 0xffffffffffffffff
mul rdx
cmovo rax, rcx
mov rcx, rax
call fcn.1400cd108
mov rcx, rax
call fcn.1400cebfc
mov ecx, dword [0x1401c3d80]
imul ecx, ecx
mov eax, 0x30c30c31
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x15
sub ecx, edx
cmp ecx, 8
jne 0x1400298ea
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
movzx eax, bl
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret