Function at 0x140052870
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rsi, r9
mov r14, r8
mov r15d, ecx
cmp ecx, 0x1000
jne 0x140052901
test edx, edx
jne 0x140052901
lea rax, [r8 + 1]
xor ebx, ebx
lea edi, [rdx + 3]
nop word [rax + rax]
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
lea rax, [rax + 0x40]
mov qword [rax - 0x28], rbx
mov qword [rax - 0x20], rbx
mov qword [rax - 0x18], rbx
mov qword [rax - 0x10], rbx
mov qword [rax - 8], rbx
dec rdi
jne 0x1400528a0
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov dword [rax + 0x38], ebx
mov word [rax + 0x3c], bx
mov byte [rax + 0x3e], bl
mov qword [r9 + 0x1c], 1
add rsp, 0x20
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov eax, dword [r9 + 0x20]
mov qword [rsp + 0x58], rbp
xor ebx, ebx
lea ebp, [rdx + rax]
mov ecx, eax
mov eax, dword [r9 + 0x1c]
mov edx, r15d
mov qword [rsp + 0x60], r12
mov r12, qword [rsp + 0x70]
shl edx, cl
lea edi, [rbx + 3]
or byte [rax + r8], dl
cmp dword [r9 + 0x1c], 0xff
mov dword [rsp + 0x50], edx
jne 0x1400529b0
cmp ebp, 8
jb 0x1400529c9
mov byte [r8], 0xff
lea edx, [rbx + 1]
mov r9, r12
mov r8d, 0x100
mov rcx, r14
call fcn.1400faf54
lea rax, [r14 + 1]
mov ecx, edi
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
lea rax, [rax + 0x40]
mov qword [rax - 0x28], rbx
mov qword [rax - 0x20], rbx
mov qword [rax - 0x18], rbx
mov qword [rax - 0x10], rbx
mov qword [rax - 8], rbx
dec rcx
jne 0x140052960
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov dword [rax + 0x38], ebx
mov word [rax + 0x3c], bx
mov byte [rax + 0x3e], bl
mov dword [rsi + 0x1c], ebx
cmp ebp, 8
jb 0x1400529c9
inc dword [rsi + 0x1c]
cmp ebp, 8
jbe 0x1400529c9
mov ecx, dword [rsi + 0x1c]
movzx eax, byte [rsp + 0x51]
mov byte [rcx + r14], al
cmp dword [rsi + 0x1c], 0xff
jne 0x140052a50
cmp ebp, 0x10
jb 0x140052a69
mov r9, r12
mov edx, 1
mov r8d, 0x100
mov rcx, r14
mov byte [r14], 0xff
call fcn.1400faf54
lea rax, [r14 + 1]
nop dword [rax]
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
lea rax, [rax + 0x40]
mov qword [rax - 0x28], rbx
mov qword [rax - 0x20], rbx
mov qword [rax - 0x18], rbx
mov qword [rax - 0x10], rbx
mov qword [rax - 8], rbx
dec rdi
jne 0x140052a00
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov dword [rax + 0x38], ebx
mov word [rax + 0x3c], bx
mov byte [rax + 0x3e], bl
mov dword [rsi + 0x1c], ebx
cmp ebp, 0x10
jb 0x140052a69
inc dword [rsi + 0x1c]
cmp ebp, 0x10
jbe 0x140052a69
mov ecx, dword [rsi + 0x1c]
movzx eax, byte [rsp + 0x52]
mov byte [rcx + r14], al
and ebp, 7
mov dword [rsi + 0x20], ebp
cmp r15d, dword [rsi + 0x10]
jne 0x140052ab0
test ebp, ebp
jne 0x140052a7c
dec dword [rsi + 0x1c]
movzx eax, byte [rsi + 0x1c]
mov r9, r12
mov edx, 1
mov byte [r14], al
mov r8d, dword [rsi + 0x1c]
mov rcx, r14
inc r8d
call fcn.1400faf54
mov edx, 1
mov r9, r12
mov rcx, r14
mov r8d, edx
mov byte [r14], bl
call fcn.1400faf54
mov rbp, qword [rsp + 0x58]
mov r12, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret