Function at 0x140019ec0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r13, qword [rcx + 0x70]
mov eax, dword [rsp + 0xb8]
mov rbx, qword [rsp + 0xc0]
mov r12d, dword [r13]
mov dword [rsp + 0x2c], eax
mov r15, rcx
mov r14d, edx
mov ebp, r8d
mov esi, r9d
test r12b, 4
je 0x140019f0b
cmp dword [r13 + 0x34], 0xffff0000
ja 0x14001a1f0
and r12d, 1
je 0x14001a1d0
mov eax, dword [rsp + 0xb0]
mov rcx, qword [r15 + 0x40]
mov dword [r15 + 0x28], r14d
mov dword [r15 + 0x2c], ebp
mov dword [r15 + 0x34], eax
movzx eax, byte [rsp + 0x2c]
mov dword [r15 + 0x30], esi
mov byte [r15 + 0x38], al
cmp rcx, rbx
je 0x14001a228
test rbx, rbx
je 0x14001a240
test rcx, rcx
je 0x140019f5d
call fcn.14001b170
mov qword [r15 + 0x40], 0
mov rdx, qword [rbx + 0x10]
mov ecx, dword [rbx]
call fcn.14001b040
mov qword [r15 + 0x40], rax
test rax, rax
je 0x14001a320
mov rdx, qword [r15 + 0x70]
mov rax, qword [rdx + 0x48]
mov byte [rsp + 0x3d], 0x2c
lea rdi, [rsp + 0x3d]
test rax, rax
je 0x14001a2f0
mov r8d, 1
mov rdx, rdi
mov rcx, r15
call rax
mov rdx, qword [r15 + 0x70]
mov word [rsp + 0x3b], r14w
lea r14, [rsp + 0x3b]
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x14001a2d0
mov r8d, 2
mov rdx, r14
mov rcx, r15
call rax
mov rdx, qword [r15 + 0x70]
mov word [rsp + 0x3b], bp
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x14001a2b0
mov r8d, 2
mov rdx, r14
mov rcx, r15
call rax
mov rdx, qword [r15 + 0x70]
mov word [rsp + 0x3b], si
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x14001a290
mov r8d, 2
mov rdx, r14
mov rcx, r15
call rax
movzx eax, word [rsp + 0xb0]
mov rdx, qword [r15 + 0x70]
mov word [rsp + 0x3b], ax
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x14001a250
mov r8d, 2
mov rdx, r14
mov rcx, r15
call rax
test rbx, rbx
je 0x14001a230
cmp byte [rsp + 0x2c], 1
movzx eax, byte [rbx + 4]
sbb edx, edx
and edx, 0xffffffc0
sub eax, 1
sub edx, 0x40
or eax, edx
mov rdx, qword [r15 + 0x70]
mov byte [rsp + 0x3d], al
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x14001a270
mov r8d, 1
mov rdx, rdi
mov rcx, r15
call rax
test rbx, rbx
je 0x14001a110
mov eax, dword [rbx]
test eax, eax
jle 0x14001a110
xor ebp, ebp
jmp 0x14001a0b3
mov r8d, 3
mov rdx, rdi
mov rcx, r15
call rax
cmp eax, 3
jne 0x14001a100
add rbp, 1
cmp dword [rbx], ebp
jle 0x14001a110
lea rax, [rbp + rbp*2]
add rax, qword [rbx + 0x10]
movzx edx, byte [rax]
mov byte [rsp + 0x3d], dl
movzx edx, byte [rax + 1]
movzx eax, byte [rax + 2]
mov byte [rsp + 0x3e], dl
mov rdx, qword [r15 + 0x70]
mov byte [rsp + 0x3f], al
mov rax, qword [rdx + 0x48]
test rax, rax
jne 0x14001a098
mov r9, qword [rdx + 0x38]
mov r8d, 3
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
cmp eax, 3
je 0x14001a0ab
nop dword [rax]
mov dword [r15 + 0x60], 2
xor r12d, r12d
jmp 0x14001a1d8
mov rdx, qword [r15 + 0x18]
mov rax, qword [r15 + 0x40]
test rdx, rdx
je 0x14001a200
imul esi, dword [rsp + 0xb0]
or dword [r13], 4
mov rbx, qword [r15 + 0x70]
mov dword [r13 + 0x34], esi
test rax, rax
je 0x14001a310
mov esi, dword [rax + 4]
cmp esi, 2
mov ecx, 2
cmovl esi, ecx
mov byte [rsp + 0x3b], sil
mov rax, qword [rbx + 0x48]
test rax, rax
je 0x14001a330
mov r8d, 1
mov rdx, r14
mov rcx, r15
call rax
mov edx, 1
mov ecx, esi
mov byte [rbx + 0x50], 0
mov eax, edx
mov dword [rbx + 8], esi
shl eax, cl
mov dword [rbx + 0x24], 0x1001
lea ecx, [rax + 1]
mov dword [rbx + 0xc], eax
add eax, 2
mov dword [rbx + 0x10], ecx
lea ecx, [rsi + 1]
shl edx, cl
mov dword [rbx + 0x18], ecx
mov rcx, qword [rbx + 0x6150]
mov dword [rbx + 0x1c], edx
mov dword [rbx + 0x14], eax
mov qword [rbx + 0x2c], 0
call fcn.14001b970
mov edx, dword [rbx + 0xc]
mov rcx, r15
call fcn.1400195b0
test eax, eax
jne 0x14001a1d8
mov dword [r15 + 0x60], 8
jmp 0x14001a1d8
mov dword [r15 + 0x60], 0xa
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rcx + 0x60], 4
xor r12d, r12d
jmp 0x14001a1d8
test rax, rax
je 0x14001a34c
imul esi, dword [rsp + 0xb0]
or dword [r13], 4
mov rbx, qword [r15 + 0x70]
mov dword [r13 + 0x34], esi
jmp 0x14001a13f
mov rdx, r13
jmp 0x140019f79
cmp byte [rsp + 0x2c], 0
setne al
shl eax, 6
jmp 0x14001a05b
mov qword [r15 + 0x40], 0
mov rdx, r13
jmp 0x140019f79
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fwrite
jmp 0x14001a03c
mov r9, qword [rdx + 0x38]
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
jmp 0x14001a07e
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fwrite
jmp 0x14001a010
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fwrite
jmp 0x140019fec
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fwrite
jmp 0x140019fc8
mov r9, qword [rdx + 0x38]
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
jmp 0x140019f9e
mov esi, dword [rdx + 4]
jmp 0x14001a142
mov dword [r15 + 0x60], 7
xor r12d, r12d
jmp 0x14001a1d8
mov r9, qword [rbx + 0x38]
mov r8d, 1
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fwrite
jmp 0x14001a16d
mov dword [r15 + 0x60], 5
xor r12d, r12d
jmp 0x14001a1d8