Function at 0x1400051d0
Capabilities:
Get file size
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0xa90
mov rax, qword [0x140019160]
xor rax, rsp
mov qword [rsp + 0xa80], rax
mov rax, r8
mov rbx, rdx
mov rdi, rcx
lea r8, [rsp + 0x670]
xor r9d, r9d
mov edx, 0x104
mov rcx, rax
mov dword [rsp + 0x40], 0
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x140005586
cmp eax, 0x104
ja 0x140005586
lea r8, str.Printer
lea rdx, [rsp + 0x670]
mov r9d, 1
mov rcx, rdi
mov dword [rsp + 0x28], 0x200
mov qword [rsp + 0x20], rbx
call fcn.140004760
test eax, eax
je 0x140005381
cmp dword [rbx + 0x400], 1
jne 0x1400052ab
mov r9d, dword [rbx + 0x57c]
lea r8, [0x140016340]
lea rcx, [rsp + 0x5f0]
mov edx, 0x40
call fcn.1400046f0
lea r9, [rsp + 0x670]
lea r8, [rsp + 0x5f0]
lea rdx, str.text.FontChange
lea rcx, [0x140015fc8]
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov r9d, dword [rbx + 0x40c]
lea r8, [0x140016340]
lea rcx, [rsp + 0x5f0]
mov edx, 0x40
call fcn.1400046f0
lea r9, [rsp + 0x670]
lea r8, [rsp + 0x5f0]
lea rdx, str.Size.x
lea rcx, [0x140015fc8]
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov r9d, dword [rbx + 0x410]
lea r8, [0x140016340]
lea rcx, [rsp + 0x5f0]
mov edx, 0x40
call fcn.1400046f0
lea r9, [rsp + 0x670]
lea r8, [rsp + 0x5f0]
lea rdx, str.Size.y
lea rcx, [0x140015fc8]
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov r9d, dword [rbx + 0x414]
lea r8, [0x140016340]
lea rcx, [rsp + 0x5f0]
mov edx, 0x40
call fcn.1400046f0
lea r9, [rsp + 0x670]
lea r8, [rsp + 0x5f0]
lea rdx, str.Result
lea rcx, [0x140015fc8]
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, 1
jmp 0x140005588
xor r9d, r9d
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x670]
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140005586
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x59c
jne 0x140005377
lea rcx, [rsp + 0x50]
mov r8, rbx
mov edx, 0x100
call fcn.140007b0c
lea r8, [rbx + 0x200]
lea rcx, [rsp + 0x250]
mov edx, 0x100
call fcn.140007b0c
lea r8, [rbx + 0x418]
lea rcx, [rsp + 0x450]
mov edx, 0x80
call fcn.140007b0c
lea r8, [rbx + 0x518]
lea rcx, [rsp + 0x550]
mov edx, 0x20
call fcn.140007b0c
mov rax, qword [rbx + 0x40c]
mov r11d, dword [rbx + 0x558]
mov qword [rsp + 0x594], rax
mov eax, dword [rbx + 0x55c]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x59c], eax
mov eax, dword [rbx + 0x560]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x5a0], eax
mov eax, dword [rbx + 0x564]
mov r8d, 0x59c
mov dword [rsp + 0x5a4], eax
mov eax, dword [rbx + 0x568]
mov rcx, rdi
mov dword [rsp + 0x5a8], eax
mov eax, dword [rbx + 0x56c]
mov dword [rsp + 0x590], r11d
mov dword [rsp + 0x5ac], eax
mov eax, dword [rbx + 0x570]
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x5b0], eax
mov eax, dword [rbx + 0x404]
mov dword [rsp + 0x5b4], eax
mov eax, dword [rbx + 0x620]
mov dword [rsp + 0x5cc], eax
mov eax, dword [rbx + 0x624]
mov dword [rsp + 0x5d0], eax
mov eax, dword [rbx + 0x628]
mov dword [rsp + 0x5d4], eax
mov eax, dword [rbx + 0x62c]
mov dword [rsp + 0x5d8], eax
mov eax, dword [rbx + 0x630]
mov dword [rsp + 0x5dc], eax
mov eax, dword [rbx + 0x634]
mov dword [rsp + 0x5e0], eax
mov eax, dword [rbx + 0x638]
mov dword [rsp + 0x5e4], eax
mov eax, dword [rbx + 0x63c]
mov dword [rsp + 0x5e8], eax
mov eax, dword [rbx + 0x414]
mov dword [rsp + 0x5b8], eax
mov eax, dword [rbx + 0x408]
mov dword [rsp + 0x5bc], eax
mov eax, dword [rbx + 0x574]
mov dword [rsp + 0x5c0], eax
mov eax, dword [rbx + 0x57c]
mov dword [rsp + 0x5c4], eax
mov eax, dword [rbx + 0x578]
mov dword [rsp + 0x5c8], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140005586
cmp dword [rsp + 0x40], 0x59c
je 0x140005377
xor eax, eax
mov rcx, qword [rsp + 0xa80]
xor rcx, rsp
call fcn.140007ba0
mov rbx, qword [rsp + 0xaa0]
add rsp, 0xa90
pop rdi
ret