Function at 0x670550
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x78
mov rbp, rsp
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x48], rbp
mov qword [rbp + 0x90], rcx
mov byte [rbp + 0x98], dl
mov qword [rbp + 0xa0], r8
mov qword [rbp + 0xa8], r9
mov rcx, qword [rbp + 0xa0]
call fcn.00410210
cmp byte [rbp + 0x98], 0
je 0x6705b0
mov rcx, qword [rbp + 0x90]
movzx rdx, byte [rbp + 0x98]
call fcn.0040d650
mov qword [rbp + 0x90], rax
nop
nop
mov rax, qword [rbp + 0x90]
mov dword [rax + 0x40], 0
mov rax, qword [rbp + 0x90]
mov byte [rax + 0x3d], 0
mov rax, qword [rbp + 0x90]
mov byte [rax + 0x3c], 0
mov rax, qword [rbp + 0x90]
mov dword [rax + 0x38], 0xffffffff
mov rax, qword [rbp + 0x90]
lea rcx, [rax + 0x30]
call fcn.00410080
mov rax, qword [rbp + 0x90]
mov byte [rax + 0x3e], 0
mov rcx, qword [rbp + 0x90]
xor rdx, rdx
xor r8, r8
call fcn.00641e60
mov rax, qword [rbp + 0x90]
mov rcx, qword [rbp + 0x90]
mov rcx, qword [rcx + 0x10]
mov qword [rax + 0x28], rcx
mov rax, qword [rbp + 0x90]
mov rcx, qword [rax + 0x28]
call fcn.0040ccc0
mov rcx, qword [0x0066d830]
mov dl, 1
call fcn.005cc750
mov rcx, qword [rbp + 0x90]
mov qword [rcx + 0x28], rax
mov rax, qword [rbp + 0x90]
mov rcx, qword [rbp + 0x90]
mov rcx, qword [rcx + 0x28]
mov qword [rax + 0x10], rcx
mov rax, qword [rbp + 0x90]
lea rcx, [rax + 0x20]
mov rdx, qword [rbp + 0xa0]
call fcn.004106d0
mov rax, qword [rbp + 0x90]
cmp qword [rax + 0x20], 0
je 0x6707dc
mov rcx, qword [rbp + 0x90]
mov rax, qword [rbp + 0x90]
mov rdx, qword [rax + 0x20]
call fcn.00670070
mov rax, qword [rbp + 0x90]
mov rcx, qword [rax + 0x20]
mov dl, 1
call fcn.0047e810
test al, al
jne 0x6707c4
lea rcx, [rbp + 0xa0]
mov rax, qword [rbp + 0x90]
mov rdx, qword [rax + 0x20]
call fcn.0047f390
mov dword [rbp + 0x58], 0
cmp qword [rbp + 0xa0], 0
je 0x6706f5
mov rax, qword [rbp + 0xa0]
mov eax, dword [rax - 4]
mov dword [rbp + 0x58], eax
cmp dword [rbp + 0x58], 0
jle 0x670707
mov rcx, qword [rbp + 0xa0]
call fcn.006701f0
mov rax, qword [rbp + 0x90]
mov rcx, qword [rax + 0x20]
call fcn.00411e10
mov rcx, rax
mov edx, 0xc0000000
mov r8d, 1
xor r9, r9
mov dword [rsp + 0x20], 4
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x30], 0
call sub.kernel32.dll_CreateFileW
mov qword [rbp + 0x68], rax
cmp qword [rbp + 0x68], 0xffffffffffffffff
je 0x6707c4
cmp qword [rbp + 0xa8], 0
je 0x6707bb
mov rax, qword [rbp + 0x90]
mov rcx, qword [rbp + 0xa8]
mov qword [rax + 0x18], rcx
mov rcx, qword [rbp + 0xa8]
lea rdx, [rbp + 0x60]
mov rax, qword [rbp + 0xa8]
mov rbx, qword [rax]
call qword [rbx + 0x48]
mov rcx, qword [rbp + 0x60]
call fcn.00413940
test rax, rax
jle 0x6707bb
mov rcx, qword [rbp + 0x60]
call fcn.00413940
mov rcx, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov r8d, eax
lea r9, [rbp + 0x5c]
mov qword [rsp + 0x20], 0
call sub.kernel32.dll_WriteFile
mov rcx, qword [rbp + 0x68]
call sub.kernel32.dll_CloseHandle
mov rax, qword [rbp + 0x90]
cmp dword [rax + 0x40], 0
je 0x6707dc
mov rax, qword [rbp + 0x90]
mov byte [rax + 0x3d], 1
mov rax, qword [rbp + 0x90]
mov rax, qword [rax + 0x28]
lea rax, [rax + 0x68]
mov rcx, qword [rbp + 0x90]
mov qword [rax + 8], rcx
lea rcx, [0x00670360]
mov qword [rax], rcx
nop
lea rcx, [rbp + 0x60]
mov rdx, qword [0x00472f80]
call fcn.00413ec0
lea rcx, [rbp + 0xa0]
call fcn.00410080
cmp byte [rbp + 0x98], 0
je 0x670878
mov rcx, qword [rbp + 0x90]
call fcn.0040d690
mov qword [rbp + 0x90], rax
jmp 0x670878
mov rax, qword [rbp + 0x90]
lea rsp, [rbp + 0x78]
pop rbx
pop rbp
ret