Function at 0x140019bd0
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 rbp, qword [rcx + 0x70]
mov rdi, qword [rsp + 0xb8]
mov r12d, dword [rbp]
mov rbx, rcx
mov r13d, edx
mov r14d, r8d
mov esi, r9d
mov qword [rcx + 0x18], 0
test r12b, 2
jne 0x140019df0
and r12d, 1
jne 0x140019c30
mov dword [rcx + 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
call fcn.140019ad0
mov rcx, rax
mov r15, rax
call sub.msvcrt.dll_strlen
mov rdx, qword [rbx + 0x70]
mov r8, rax
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x140019e20
mov rdx, r15
mov rcx, rbx
call rax
mov dword [rsp + 0x2c], eax
mov rcx, r15
call sub.msvcrt.dll_strlen
movsxd r15, dword [rsp + 0x2c]
cmp r15, rax
jne 0x140019de0
mov eax, dword [rsp + 0xb0]
mov dword [rbx], r13d
mov dword [rbx + 4], r14d
mov dword [rbx + 8], esi
mov dword [rbx + 0xc], eax
test rdi, rdi
je 0x140019e10
mov rdx, qword [rdi + 0x10]
mov ecx, dword [rdi]
call fcn.14001b040
mov qword [rbx + 0x18], rax
test rax, rax
je 0x140019eb0
mov rdx, qword [rbx + 0x70]
mov word [rsp + 0x3d], r13w
lea r13, [rsp + 0x3d]
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x140019e70
mov r8d, 2
mov rdx, r13
mov rcx, rbx
call rax
mov rdx, qword [rbx + 0x70]
mov word [rsp + 0x3d], r14w
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x140019e50
mov r8d, 2
mov rdx, r13
mov rcx, rbx
call rax
sub esi, 1
shl esi, 4
test rdi, rdi
je 0x140019e40
movzx eax, byte [rdi + 4]
sub eax, 1
or esi, eax
mov eax, esi
or eax, 0xffffff80
cmp byte [rdi + 8], 0
mov byte [rsp + 0x3d], al
je 0x140019d29
or esi, 0xffffff88
mov byte [rsp + 0x3d], sil
movzx eax, byte [rsp + 0xb0]
mov rdx, qword [rbx + 0x70]
mov byte [rsp + 0x3e], al
movzx eax, byte [rbx + 0x10]
mov byte [rsp + 0x3f], al
mov rax, qword [rdx + 0x48]
test rax, rax
je 0x140019e90
mov r8d, 3
mov rdx, r13
mov rcx, rbx
call rax
test rdi, rdi
je 0x140019e00
mov eax, dword [rdi]
test eax, eax
jle 0x140019e00
xor esi, esi
jmp 0x140019d93
mov r8d, 3
mov rdx, r13
mov rcx, rbx
call rax
cmp eax, 3
jne 0x140019de0
add rsi, 1
cmp dword [rdi], esi
jle 0x140019e00
lea rax, [rsi + rsi*2]
add rax, qword [rdi + 0x10]
movzx edx, byte [rax]
mov byte [rsp + 0x3d], dl
movzx edx, byte [rax + 1]
mov byte [rsp + 0x3e], dl
mov rdx, qword [rbx + 0x70]
movzx eax, byte [rax + 2]
mov byte [rsp + 0x3f], al
mov rax, qword [rdx + 0x48]
test rax, rax
jne 0x140019d78
mov r9, qword [rdx + 0x38]
mov r8d, 3
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
jmp 0x140019d86
mov dword [rbx + 0x60], 2
xor r12d, r12d
jmp 0x140019c1b
mov dword [rcx + 0x60], 3
xor r12d, r12d
jmp 0x140019c1b
or dword [rbp], 2
jmp 0x140019c1b
mov qword [rbx + 0x18], 0
jmp 0x140019cab
mov r9, qword [rdx + 0x38]
mov rcx, r15
mov edx, 1
call sub.msvcrt.dll_fwrite
mov dword [rsp + 0x2c], eax
jmp 0x140019c60
or esi, 7
mov byte [rsp + 0x3d], sil
jmp 0x140019d29
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
jmp 0x140019cfa
mov r9, qword [rdx + 0x38]
mov r8d, 2
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
jmp 0x140019cd5
mov r9, qword [rdx + 0x38]
mov r8d, 3
mov edx, 1
mov rcx, r13
call sub.msvcrt.dll_fwrite
jmp 0x140019d5c
mov dword [rbx + 0x60], 7
xor r12d, r12d
jmp 0x140019c1b