Function at 0x140019250
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
push rbp
push rbx
push rdi
mov rbp, rsp
sub rsp, 0x60
cmp qword [rcx + 0x740], 0
mov rdi, rdx
mov rbx, rcx
jne 0x140019281
mov eax, 0x80040207
add rsp, 0x60
pop rdi
pop rbx
pop rbp
ret
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r15
test r8d, r8d
je 0x140019388
mov rcx, qword [rcx + 0x98]
lea r9, [rbp + 0x20]
xor r15d, r15d
lea rdx, [rbp + 0x38]
mov dword [rbp + 0x20], r15d
mov qword [rsp + 0x20], r15
lea r8d, [r15 + 4]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140019504
cmp dword [rbp + 0x20], 4
jne 0x140019504
mov esi, dword [rbx + 0x748]
imul esi, dword [rbx + 0x38]
test esi, esi
jne 0x1400193a4
mov rcx, qword [rbx + 0x98]
lea r9, [rbp + 0x20]
lea r8d, [r15 + 4]
mov dword [rbp + 0x20], r15d
lea rdx, [rbp + 0x30]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r14d, dword [rbp + 0x30]
mov rcx, qword [rbx + 0x98]
lea r9, [rbp + 0x20]
mov r8d, r14d
mov dword [rbp + 0x20], r15d
mov rdx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140019504
cmp dword [rbp + 0x20], r14d
jne 0x140019504
mov rax, qword [rbx + 0x740]
test esi, esi
je 0x1400193be
mov r8d, dword [rbx + 0x38]
xor r9d, r9d
mov rcx, qword [rbx + 0x90]
mov rdx, rdi
mov byte [rsp + 0x38], r15b
mov byte [rsp + 0x30], r15b
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x38]
mov dword [rsp + 0x20], eax
call fcn.1400266e0
mov r8d, dword [rbp + 0x38]
lea rcx, [rbx - 0x18]
mov rdx, qword [rbx + 0x90]
call fcn.140016a00
xor eax, eax
mov r14, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x88]
mov r15, qword [rsp + 0x50]
add rsp, 0x60
pop rdi
pop rbx
pop rbp
ret
mov r14d, dword [rbp + 0x30]
mov eax, esi
imul eax, dword [rbp + 0x38]
cmp r14d, eax
je 0x14001930b
mov eax, 0x80040200
jmp 0x14001938a
cmp word [rax], 0x4d
jne 0x140019388
cmp word [rax + 0xa], 0x41
jne 0x140019492
mov rsi, qword [rbx + 0x750]
cmp dword [rbp + 0x38], r15d
jne 0x140019410
mov eax, dword [rbp + 0x30]
cmp eax, 3
jae 0x1400193eb
mov eax, 0x8004020d
jmp 0x14001938a
dec eax
lea rdx, [rdi + 1]
mov r8d, 0x20
lea rcx, [rsi + 0x3c]
cmp eax, r8d
cmovb r8d, eax
mov dword [rsi + 0x5c], r8d
call fcn.1400b9e30
jmp 0x140019388
mov ecx, dword [rbp + 0x30]
test ecx, ecx
je 0x140019388
nop dword [rax + rax]
mov eax, dword [rbx + 0x44]
lea r8, [rbp + 0x20]
mov rdx, qword [rbx + 0x90]
mov r9, rdi
mov dword [rbp + 0x20], eax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov rcx, rsi
mov dword [rbp - 0x20], r15d
call fcn.14003e5d0
mov ecx, eax
shr ecx, 0x1f
test cl, cl
jne 0x14001938a
mov r8d, dword [rbp + 0x20]
test r8d, r8d
je 0x140019473
mov rdx, qword [rbx + 0x90]
lea rcx, [rbx - 0x18]
call fcn.140016a00
mov eax, dword [rbp - 0x20]
test eax, eax
je 0x140019388
mov ecx, dword [rbp + 0x30]
add rdi, rax
sub ecx, eax
mov dword [rbp + 0x30], ecx
test ecx, ecx
jne 0x140019420
jmp 0x140019388
mov rsi, qword [rbx + 0x758]
mov rdx, rdi
mov r8d, dword [rbp + 0x30]
mov rcx, rsi
mov r14, qword [rbx + 0x750]
call fcn.140045ba0
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
jne 0x140019388
mov r8d, dword [rbx + 0x38]
xor r9d, r9d
mov rdx, qword [rbx + 0x90]
mov rcx, r14
mov qword [rsp + 0x20], r15
call fcn.14003f330
test eax, eax
je 0x1400194f2
mov rdx, qword [rbx + 0x90]
lea rcx, [rbx - 0x18]
mov r8d, eax
call fcn.140016a00
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x1400194c0
jmp 0x140019388
mov eax, 0x80040206
jmp 0x14001938a