Function at 0x140013360
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x6b0
mov rax, qword [0x14003d880]
xor rax, rsp
mov qword [rsp + 0x6a0], rax
cmp dword [rcx + 8], 0xffffffff
mov rsi, r8
mov ebp, edx
mov rdi, rcx
je 0x140013393
mov rcx, qword [rcx]
call fcn.1400129d0
mov rcx, qword [rdi]
mov dword [rdi + 8], 0xffffffff
cmp ebp, dword [rcx + 8]
jl 0x1400133ac
mov eax, 0x10000
jmp 0x1400136a0
mov qword [rsp + 0x6e8], r12
cmp ebp, dword [rcx + 0x14]
jge 0x1400133be
call fcn.140012110
mov rax, qword [rdi]
xor r12d, r12d
mov qword [rsp + 0x6d8], rbx
cmp dword [rax + 0x14], ebp
jge 0x140013427
mov rbx, qword [rdi]
test rbx, rbx
je 0x14001341f
cmp dword [rbx + 0x1c], r12d
je 0x14001341f
mov edx, dword [rbx + 0x14]
inc edx
cmp edx, dword [rbx + 8]
je 0x14001341f
mov ecx, dword [rbx + 0x54]
mov eax, dword [rbx + 0x4c]
mov dword [rbx + 0x14], edx
add ecx, dword [rbx + 0x50]
lea r8, [rbx + 0x7c]
lea rdx, [rbx + 0x2c]
lea ecx, [rcx + rax + 0x2e]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
add dword [rbx + 0x18], ecx
mov rcx, rbx
call fcn.140011ca0
mov ecx, r12d
test eax, eax
sete cl
mov dword [rbx + 0x1c], ecx
mov rax, qword [rdi]
cmp dword [rax + 0x14], ebp
jl 0x1400133d1
cmp ebp, 0xffffffff
jl 0x14001343b
lea r8, [rsp + 0x50]
mov edx, ebp
mov rcx, rdi
call fcn.140012c00
test byte [rsp + 0x25c], 0x10
movzx eax, word [rsi]
je 0x140013487
cmp ax, 0x2f
je 0x140013476
cmp ax, 0x5c
je 0x140013476
test ax, ax
je 0x140013460
cmp word [rsi + 2], 0x3a
je 0x140013476
lea rcx, [rdi + 0x250]
mov rdx, rsi
call fcn.140013200
xor eax, eax
jmp 0x140013690
xor ecx, ecx
mov rdx, rsi
call fcn.140013200
xor eax, eax
jmp 0x140013690
mov r9, rsi
mov rcx, rsi
test ax, ax
je 0x1400134af
cmp ax, 0x2f
je 0x14001349e
cmp ax, 0x5c
jne 0x1400134a2
lea r9, [rcx + 2]
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140013492
lea rdx, [rsp + 0x280]
mov rcx, rsi
sub rdx, rsi
nop dword [rax]
movzx eax, word [rcx]
add rcx, 2
mov word [rcx + rdx - 2], ax
test ax, ax
jne 0x1400134c0
cmp r9, rsi
jne 0x1400134e1
mov word [rsp + 0x280], r12w
jmp 0x140013517
mov rax, r9
sub rax, rsi
sar rax, 1
mov word [rsp + rax*2 + 0x280], r12w
movzx eax, word [rsp + 0x280]
cmp ax, 0x2f
je 0x140013549
cmp ax, 0x5c
je 0x140013549
test ax, ax
je 0x140013517
cmp word [rsp + 0x282], 0x3a
je 0x140013549
mov qword [rsp + 0x20], r9
lea r8, [rdi + 0x250]
lea rdx, str._s_s_s
lea r9, [rsp + 0x280]
lea rcx, [rsp + 0x490]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rdi + 0x250]
jmp 0x140013568
lea r8, [rsp + 0x280]
lea rdx, str._s_s
lea rcx, [rsp + 0x490]
call qword [sym.imp.USER32.dll_wsprintfW]
xor ecx, ecx
lea rdx, [rsp + 0x280]
call fcn.140013200
mov eax, dword [rsp + 0x25c]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
lea rcx, [rsp + 0x490]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400135b9
mov eax, 0x200
jmp 0x140013690
mov rdx, qword [rdi + 0x240]
mov rcx, qword [rdi]
call fcn.140012430
cmp qword [rdi + 0x248], r12
jne 0x1400135f0
mov ecx, 0x4000
call fcn.140015020
mov qword [rdi + 0x248], rax
nop word [rax + rax]
mov rdx, qword [rdi + 0x248]
mov rcx, qword [rdi]
lea r9, [rsp + 0x40]
mov r8d, 0x4000
call fcn.140012650
mov ebx, eax
cmp eax, 0xffffff96
je 0x140013676
test eax, eax
js 0x140013643
jle 0x140013638
mov rdx, qword [rdi + 0x248]
lea r9, [rsp + 0x44]
mov r8d, eax
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14001364b
cmp byte [rsp + 0x40], r12b
jne 0x140013653
test ebx, ebx
jne 0x1400135f0
mov r12d, 0x5000000
jmp 0x14001367c
mov r12d, 0x400
jmp 0x14001367c
lea r9, [rsp + 0x270]
lea r8, [rsp + 0x260]
lea rdx, [rsp + 0x268]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x14001367c
mov r12d, 0x1000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi]
call fcn.1400129d0
mov eax, r12d
mov rbx, qword [rsp + 0x6d8]
mov r12, qword [rsp + 0x6e8]
mov rcx, qword [rsp + 0x6a0]
xor rcx, rsp
call fcn.140014a20
add rsp, 0x6b0
pop rdi
pop rsi
pop rbp
ret