Function at 0x100020434
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x100
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov r12, r8
mov rsi, rdx
mov rdi, rcx
xor r14d, r14d
mov ebp, r14d
lea rcx, [0x100081100]
mov rax, qword [0x100081100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [0x100081100]
mov rax, qword [0x100081100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.10002f82c
mov rbx, qword [rsp + 0x40]
lea ecx, [r14 + 1]
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
mov r13d, 0x104
sub eax, r13d
or eax, ecx
jge 0x1000204db
mov edx, r13d
lea rcx, [rsp + 0x40]
call fcn.10001edf8
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], r13d
jge 0x1000204ec
mov ecx, 0x80070057
call fcn.10001f28c
int3
mov dword [rbx - 0x10], r13d
mov word [rbx + 0x208], r14w
mov r13d, 0x98
mov r8, r13
xor edx, edx
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x68], rdi
mov rax, qword [0x100081fd8]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x90], rbx
mov eax, dword [rbx - 0x10]
mov dword [rsp + 0x98], eax
mov dword [rsp + 0xc0], 6
lea rcx, [rsp + 0x60]
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
or r13, 0xffffffffffffffff
cmp eax, r14d
je 0x10002063e
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, r13
je 0x100020622
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x158]
lea r8d, [r13 + 3]
lea rdx, [0x1000025fc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r14d
jne 0x1000205ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [rsi]
lea r8, [0x100008c00]
lea ecx, [r13 + 3]
call fcn.10001d7b8
mov rdx, qword [r12]
mov r8d, dword [rdx - 0x10]
add r8d, r8d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x158]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, r14d
je 0x1000205fb
mov ebp, 1
jmp 0x100020617
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [rsi]
lea r8, [0x100008c80]
mov ecx, 3
call fcn.10001d7b8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10002063e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [rsi]
lea r8, [0x100008cb8]
mov ecx, 3
call fcn.10001d7b8
xor eax, eax
mov rcx, r13
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp ecx, r14d
jl 0x1000206f8
cmp ecx, dword [rbx - 0xc]
jg 0x1000206f8
mov dword [rbx - 0x10], ecx
movsxd rax, ecx
mov word [rbx + rax*2], r14w
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
cmp eax, r14d
jg 0x10002068f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
cmp eax, r14d
jg 0x1000206b2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsi]
sub rdx, 0x18
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
cmp eax, r14d
jg 0x1000206d3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r12]
sub rdx, 0x18
mov ecx, r13d
lock xadd dword [rdx + 0x10], ecx
add ecx, r13d
cmp ecx, r14d
jg 0x1000206f4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, ebp
jmp 0x100020703
mov ecx, 0x80070057
call fcn.10001f28c
nop
add rsp, 0x100
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret