Function at 0x140008180
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov byte [rsp + 0x20], r9b
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rdi, rdx
mov r13, rcx
mov rcx, qword [r8]
lea rdx, [0x140012fe0]
mov bl, r9b
mov r14, r8
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
xor r15d, r15d
mov byte [rsp + 0xa0], r15b
mov bpl, r15b
lea esi, [r15 + 0xa]
test rax, rax
je 0x1400082ff
cmp rax, qword [r14]
je 0x1400081e4
cmp word [rax - 2], si
jne 0x1400082ff
lea rdi, [rax + 4]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
mov rbx, rax
test rax, rax
je 0x1400081ff
mov word [rax], r15w
mov rcx, rdi
call fcn.14000e208
mov rsi, rax
test rbx, rbx
je 0x140008217
mov eax, 0xa
mov word [rbx], ax
lea r8, [rsp + 0x40]
mov qword [rsp + 0x40], r15
lea rdx, [0x140013078]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
mov rbx, rax
test rax, rax
je 0x1400082c4
mov rdi, qword [rsp + 0xb0]
lea rdx, str.keep
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x14000825e
mov byte [rdi], 1
jmp 0x1400082a0
lea rdx, str.nokeep
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140008277
mov byte [rdi], r15b
jmp 0x1400082a0
lea rdx, str.unicode
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140008290
mov bpl, 1
jmp 0x1400082a0
mov ecx, dword [0x140026c20]
mov edx, 0x446
call fcn.140003e48
lea r8, [rsp + 0x40]
xor ecx, ecx
lea rdx, [0x140013078]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
mov rbx, rax
test rax, rax
jne 0x140008245
mov byte [rsp + 0xa0], bpl
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test bpl, bpl
je 0x1400082eb
mov edx, 2
lea rcx, [0x140013070]
mov r9, r13
lea r8d, [rdx - 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov bl, byte [rsp + 0xa8]
mov esi, 0xa
mov rdi, qword [rsp + 0x98]
mov rcx, qword [r14]
lea rdx, [0x140012fe0]
mov r8d, 2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
je 0x140008557
mov r12b, r15b
mov rcx, qword [r14]
mov edx, esi
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
xor edx, edx
mov r15, rax
test rax, rax
je 0x14000855b
test bl, bl
je 0x140008487
mov rsi, qword [r14]
mov word [rax], dx
mov rbx, rsi
movzx ecx, word [rsi]
jmp 0x140008362
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
xor edx, edx
test eax, eax
je 0x140008392
add rbx, 2
movzx ecx, word [rbx]
test cx, cx
jne 0x14000834f
lea rax, [0x140012ff0]
test r12b, r12b
lea rdx, [0x140012d9c]
mov r8, rdi
cmovne rdx, rax
lea rcx, str._techo.__s__s_n
call fcn.14000c568
xor edx, edx
jmp 0x14000847e
or rax, 0xffffffffffffffff
inc rax
cmp word [rdi + rax*2], dx
jne 0x140008396
mov ebp, 0x3f4
sub rbp, rax
jmp 0x14000846d
mov r9, rbp
lea rcx, [0x14003e120]
mov r8, rsi
mov edx, 0x400
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
or rax, 0xffffffffffffffff
lea rdx, [0x14003e120]
mov rbx, rax
xor ecx, ecx
inc rbx
cmp word [rdx + rbx*2], cx
jne 0x1400083d4
inc rax
cmp word [rsi + rax*2], cx
jne 0x1400083dd
cmp rbp, rax
jae 0x14000842d
movzx eax, word [0x14003e120]
mov rdi, rdx
test ax, ax
je 0x140008425
movzx ecx, ax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
xor ecx, ecx
lea rdx, [0x14003e120]
test eax, eax
je 0x14000841c
mov rbx, rdi
sub rbx, rdx
sar rbx, 1
inc rbx
add rdi, 2
movzx eax, word [rdi]
jmp 0x1400083f5
mov rdi, qword [rsp + 0x98]
add rbx, rbx
cmp rbx, 0x800
jae 0x140008573
lea rax, [0x140012ff0]
mov word [rbx + rdx], cx
test r12b, r12b
lea r8, [0x140012d9c]
mov r9, rdi
lea rcx, str._techo__s__s__s_n
cmovne r8, rax
call fcn.14000c568
add rsi, rbx
mov r12b, 1
xor edx, edx
cmp word [rsi], dx
jne 0x1400083ac
mov bpl, byte [rsp + 0xa0]
mov esi, 0xa
mov word [r15], si
mov rbx, qword [r14]
test bpl, bpl
je 0x14000850a
mov rdx, r15
mov r9, r13
sub rdx, rbx
mov r8d, 2
sar rdx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edx, 4
lea rcx, [0x14001306c]
jmp 0x14000851b
mov qword [rsp + 0x38], rdx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rdx
mov r9d, 1
mov dword [rsp + 0x28], 4
xor edx, edx
mov r8, rbx
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor edx, edx
test eax, eax
je 0x140008506
movsxd rdx, eax
lea rcx, [rsp + 0x40]
mov r9, r13
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
xor edx, edx
add rbx, 2
cmp rbx, r15
jb 0x1400084b8
mov edx, 2
lea rcx, [0x140013068]
mov r9, r13
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea rcx, [r15 + 2]
mov r8d, 2
lea rdx, [0x140012fe0]
mov qword [r14], rcx
mov r12b, 1
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
je 0x140008557
mov bl, byte [rsp + 0xa8]
jmp 0x140008320
add qword [r14], 4
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
int3