Function at 0x140183860
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rsi, qword [rsp + 0xd0]
mov rdi, qword [rsp + 0xd8]
test rsi, rsi
lea rax, [rsi + 0x3c]
mov dword [rsp + 0x3c], edx
lea rdx, [rdi + 0x3c]
mov rbx, rcx
mov r13, r8
cmove rax, rdx
mov ecx, dword [rcx + 0xfc]
xor edx, edx
mov r12, r9
mov qword [rsp + 0x50], rax
call fcn.14012c070
mov ecx, dword [rbx + 0xfc]
mov edx, 4
mov qword [rsp + 0x40], rax
call fcn.14012c070
mov ecx, dword [rbx + 0xfc]
mov edx, 5
mov qword [rsp + 0x48], rax
call fcn.14012c070
mov ecx, dword [rbx + 0xfc]
mov edx, 6
mov qword [rsp + 0x58], rax
call fcn.14012c070
mov r15d, dword [rbx + 0x13c]
mov r14, rax
test r15d, r15d
jns 0x140183906
mov rax, qword [0x14022c3a0]
mov r15d, dword [rax]
cmp qword [r12 + 8], 0
je 0x140183a10
mov rbp, qword [r13 + 0x10]
test rdi, rdi
je 0x140183a4d
test rsi, rsi
je 0x140183980
mov rdx, qword [rdi + 0x18]
mov rcx, qword [rsi + 0x18]
call sub.msvcrt.dll_strcmp
mov qword [r13 + 8], 0
test eax, eax
jne 0x140183c40
cmp rbp, qword [0x14022c910]
je 0x140183cf0
mov byte [rbp], 0
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rdx, r14
mov rcx, r13
mov r8, rax
call fcn.14008f5f0
mov qword [rsp + 0x48], r14
mov r14d, 0x3d
jmp 0x140183a90
cmp rbp, qword [0x14022c910]
mov qword [r13 + 8], 0
je 0x140183d28
mov byte [rbp], 0
mov rsi, qword [rsp + 0x58]
mov r14d, 0x3e
mov rcx, rsi
call sub.msvcrt.dll_strlen
mov rdx, rsi
mov rcx, r13
mov r8, rax
call fcn.14008f5f0
mov qword [rsp + 0x48], rsi
mov rax, qword [r12 + 0x10]
mov r8d, dword [rsp + 0x3c]
mov rcx, r13
lea rdx, str._s:___s
lea r9, [0x14021db38]
mov qword [rsp + 0x20], rax
call fcn.14008fc00
mov rdx, qword [r13]
mov rbp, qword [0x14022c970]
test rdx, rdx
jne 0x140183ad7
mov edx, 1
mov rcx, r13
call fcn.14008e7e0
mov rax, qword [r13 + 8]
jmp 0x140183ae8
mov rbp, qword [0x14022c970]
mov rdx, qword [rsp + 0x50]
mov r8d, r15d
mov rcx, qword [rbp]
call fcn.1400371d0
mov rcx, rax
call sub.msvcrt.dll_strlen
mov edx, 0x2d
mov rcx, r12
mov r8, rax
call fcn.14008f9d0
mov rbp, qword [r13 + 0x10]
test rdi, rdi
jne 0x14018391f
cmp rbp, qword [0x14022c910]
mov qword [r13 + 8], 0
je 0x140183d60
mov byte [rbp], 0
mov r14, qword [rsp + 0x48]
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rdx, r14
mov rcx, r13
mov r14d, 0x3c
mov r8, rax
call fcn.14008f5f0
test rsi, rsi
je 0x1401839bf
mov rbp, qword [0x14022c970]
lea rdx, [rsi + 0x3c]
mov r8d, r15d
mov rcx, qword [rbp]
call fcn.1400371d0
mov r8d, dword [rsp + 0x3c]
mov rcx, r13
mov rdx, rax
mov eax, dword [rsi + 0x20]
mov qword [rsp + 0x20], rdx
lea rdx, str._d:___s
lea r9d, [rax + 1]
call fcn.14008fc00
mov rdx, qword [r13]
test rdx, rdx
je 0x1401839f8
mov rax, qword [r13 + 8]
sub rdx, rax
cmp rdx, 1
je 0x1401839f8
mov rdx, qword [r13 + 0x10]
lea rcx, [rax + 1]
mov qword [r13 + 8], rcx
mov byte [rdx + rax], r14b
mov rdx, qword [r13 + 0x10]
mov rax, qword [r13 + 8]
mov byte [rdx + rax], 0
cmp r14b, 0x21
je 0x140183cd0
test rdi, rdi
je 0x140183c10
mov rcx, qword [rbp]
lea rdx, [rdi + 0x3c]
mov r8d, r15d
call fcn.1400371d0
mov r8d, dword [rsp + 0x3c]
mov rcx, r13
mov rdx, rax
mov eax, dword [rdi + 0x20]
mov qword [rsp + 0x20], rdx
lea rdx, str.__d:___s
lea r9d, [rax + 1]
call fcn.14008fc00
mov rcx, qword [rbp]
mov rdx, qword [rsp + 0x50]
call fcn.140115490
mov rsi, rax
test rax, rax
je 0x140183bac
cmp r14b, 0x21
je 0x140183d38
mov rdx, qword [r13]
test rdx, rdx
je 0x140183bf0
mov rax, qword [r13 + 8]
sub rdx, rax
cmp rdx, 1
je 0x140183bf0
mov rdx, qword [r13 + 0x10]
lea rcx, [rax + 1]
mov r8, r13
mov qword [r13 + 8], rcx
mov ecx, 5
mov byte [rdx + rax], 0x20
mov rdx, qword [r13 + 0x10]
mov rax, qword [r13 + 8]
mov byte [rdx + rax], 0
mov rdx, rsi
call fcn.14004bf40
mov r8, qword [rsp + 0x40]
mov rcx, r13
lea rdx, [0x14021db5d]
call fcn.14008fc00
mov rdx, qword [r13 + 8]
mov rcx, qword [r13 + 0x10]
mov r8d, 1
mov r9, qword [rbx + 0x1c0]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_fwrite
mov edx, 1
mov rcx, r13
call fcn.14008e7e0
mov rax, qword [r13 + 8]
jmp 0x140183b80
mov rax, qword [r12 + 0x10]
mov r8d, dword [rsp + 0x3c]
mov rcx, r13
lea r9, [0x14021db38]
lea rdx, str.__s:___s
mov qword [rsp + 0x20], rax
call fcn.14008fc00
jmp 0x140183b4a
cmp rbp, qword [0x14022c910]
je 0x140183d18
mov byte [rbp], 0
mov rbp, qword [rsp + 0x48]
mov rcx, rbp
call sub.msvcrt.dll_strlen
mov rdx, rbp
mov rcx, r13
mov r8, rax
call fcn.14008f5f0
mov rbp, qword [0x14022c970]
lea rdx, [rsi + 0x3c]
mov r8d, r15d
mov rcx, qword [rbp]
call fcn.1400371d0
mov r8d, dword [rsp + 0x3c]
mov rcx, r13
mov rdx, rax
mov eax, dword [rsi + 0x20]
mov qword [rsp + 0x20], rdx
lea rdx, str._d:___s
lea r9d, [rax + 1]
call fcn.14008fc00
mov r8, qword [rsp + 0x40]
mov r9, r14
mov rcx, r13
lea rdx, [0x14021db44]
call fcn.14008fc00
mov qword [rsp + 0x48], r14
mov r14d, 0x21
jmp 0x140183aca
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x40]
lea rdx, [0x14021db44]
mov rcx, r13
call fcn.14008fc00
jmp 0x140183b0e
cmp byte [rbp], 0
je 0x140183952
mov r8d, 0xac
lea rdx, [0x14021da79]
lea rcx, [0x14021da82]
call qword [sym.imp.msvcrt.dll__assert]
nop dword [rax]
cmp byte [rbp], 0
je 0x140183c51
jmp 0x140183cfa
cmp byte [rbp], 0
je 0x140183999
jmp 0x140183cfa
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x40]
lea rdx, [0x14021db44]
mov rcx, r13
call fcn.14008fc00
jmp 0x140183b6a
cmp byte [rbp], 0
je 0x140183a66
jmp 0x140183cfa