Function at 0x140001a90
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
sub rsp, 0x6f8
mov rax, qword [0x14000e008]
xor rax, rsp
mov qword [rsp + 0x6e0], rax
test rdx, rdx
mov rbx, rdx
mov rsi, rcx
je 0x140001dfc
test r8, r8
je 0x140001dfc
cmp dword [rdx], 0x67c
je 0x140001ad6
mov eax, 2
jmp 0x140001e01
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x104
mov qword [rsp + 0x720], rbp
mov qword [rsp + 0x6f0], rdi
call fcn.1400069e0
lea rcx, [rsp + 0x270]
xor edx, edx
mov r8d, 0x12c
call fcn.1400069e0
lea rcx, [rsp + 0x4d0]
xor edx, edx
mov r8d, 0x104
call fcn.1400069e0
mov edx, 0x104
lea r8, [rbx + 0x14]
lea r9d, [rdx - 1]
lea rcx, [rsp + 0x60]
call fcn.140002810
mov edx, 0x12c
lea r8, [rbx + 0x21c]
lea r9d, [rdx - 1]
lea rcx, [rsp + 0x270]
call fcn.140002810
mov edx, 0x104
lea r8, [rbx + 0x474]
lea r9d, [rdx - 1]
lea rcx, [rsp + 0x4d0]
call fcn.140002810
xor ebp, ebp
mov dword [rsi + 0x230], 1
test byte [rbx + 0xc], 1
mov dword [rsp + 0x48], ebp
je 0x140001d66
mov rcx, qword [0x140010098]
test rcx, rcx
je 0x140001ba3
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x140001c21
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
xor r8d, r8d
lea r9, [0x140001e20]
lea edx, [r8 + 8]
mov rcx, rax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.USER32.dll_CreateDialogParamW]
lea rdx, [rsp + 0x60]
mov rcx, rax
mov qword [0x140010098], rax
call qword [sym.imp.USER32.dll_SetWindowTextW]
mov rcx, qword [0x140010098]
mov edx, 0x3ea
mov dword [0x140010090], ebp
call qword [sym.imp.USER32.dll_GetDlgItem]
mov rcx, rax
mov qword [0x140010088], rax
call qword [sym.imp.USER32.dll_GetDC]
mov rcx, qword [0x140010098]
test rcx, rcx
mov qword [0x140010080], rax
jne 0x140001c66
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
mov rcx, qword [0x140010098]
test rcx, rcx
jne 0x140001c66
mov r9d, dword [rbx + 8]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x270]
repne scasw ax, word [rdi]
mov eax, dword [0x14000bec8]
xor ecx, ecx
mov dword [rdi - 2], eax
call qword [sym.imp.USER32.dll_MessageBoxW]
mov dword [rsp + 0x40], eax
jmp 0x140001d83
mov edx, 5
call qword [sym.imp.USER32.dll_ShowWindow]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x44]
lea rcx, [rsp + 0x270]
mov dword [rsp + 0x44], 0xa
call fcn.1400029b0
test rax, rax
mov rbx, rax
je 0x140001d17
nop
mov rcx, qword [0x140010098]
xor r9d, r9d
mov edx, 0x3ea
mov r8d, 0x180
mov qword [rsp + 0x20], rbx
call qword [sym.imp.USER32.dll_SendDlgItemMessageW]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
lea r9, [rsp + 0x50]
mov rdx, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, qword [0x140010080]
call qword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov edx, dword [0x140010090]
mov rax, qword [rsp + 0x50]
cmp edx, eax
lea r8, [rsp + 0x58]
cmovl edx, eax
xor ecx, ecx
mov dword [0x140010090], edx
lea rdx, [rsp + 0x44]
call fcn.1400029b0
test rax, rax
mov rbx, rax
jne 0x140001ca0
movsxd r8, dword [0x140010090]
mov rcx, qword [0x140010088]
xor r9d, r9d
mov edx, 0x194
call qword [sym.imp.USER32.dll_SendMessageW]
mov rdi, qword [0x140010098]
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
mov rdx, rdi
mov rcx, rsi
mov dword [rsi + 0x240], eax
call fcn.140002260
mov rdx, rdi
mov rcx, rsi
call fcn.140001eb0
mov dword [rsp + 0x40], 1
jmp 0x140001d83
mov r9d, dword [rbx + 8]
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x270]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov dword [rsp + 0x40], eax
xor r9d, r9d
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x4d0]
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x140001de2
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x40]
mov r8d, 4
mov rcx, rax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rsp + 0x6f0]
mov dword [rsi + 0x230], ebp
mov rbp, qword [rsp + 0x720]
xor eax, eax
jmp 0x140001e01
mov eax, 1
mov rcx, qword [rsp + 0x6e0]
xor rcx, rsp
call fcn.1400026b0
add rsp, 0x6f8
pop rsi
pop rbx
ret