Function at 0x140095eb0
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x368], rbx
mov rax, qword [0x14047b0a0]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rdi, r8
mov rbx, rdx
mov r13, rcx
mov qword [rsp + 0x68], rcx
test rcx, rcx
je 0x1400962e1
mov r14, 0xffffffffffffffff
mov rax, r14
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x140095f10
test rax, rax
je 0x1400962e1
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x10]
call fcn.1402dd440
mov r8, r13
mov edx, 0x104
lea rcx, [rbp - 0x10]
call fcn.1402e50f4
lea rcx, [rbp - 0x10]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea rcx, [rbp - 0x10]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140095f69
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea rcx, [rsp + 0x78]
call fcn.1401a2f50
nop
mov r8, rbx
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x38]
call fcn.1401a5c40
nop
xor r15d, r15d
test rdi, rdi
je 0x1400961ed
lea ecx, [r15 + 0x48]
call fcn.1401af66c
mov qword [rsp + 0x40], rax
mov ecx, 0x1000
call fcn.1401af66c
mov qword [rsp + 0x48], rax
mov r8, r14
inc r8
cmp byte [rdi + r8], 0
jne 0x140095fb2
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.1400933a0
mov rcx, qword [rbp - 0x28]
mov eax, ecx
and eax, 7
je 0x140095fd9
sub ecx, eax
add ecx, 8
mov qword [rsp + 0x50], rcx
xor r10d, r10d
mov qword [rbp - 0x48], r10
mov qword [rbp - 0x40], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x58], r10b
mov edx, ecx
test ecx, ecx
jne 0x140096001
mov qword [rbp - 0x48], rdx
mov byte [rbp + rdx - 0x58], cl
jmp 0x140096010
xor r8d, r8d
lea rcx, [rbp - 0x58]
call fcn.14008e6c0
xor r10d, r10d
mov r12, qword [rbp - 0x28]
lea rdi, [rbp - 0x58]
mov rax, qword [rbp - 0x58]
mov rcx, qword [rbp - 0x40]
cmp rcx, 0x10
cmovae rdi, rax
mov qword [rsp + 0x58], rdi
lea r8, [rbp - 0x38]
cmp qword [rbp - 0x20], 0x10
cmovae r8, qword [rbp - 0x38]
mov qword [rsp + 0x60], r8
mov rbx, r8
mov edx, r12d
and edx, 7
mov r15d, r12d
je 0x140096055
sub r15d, edx
add r15d, 8
mov esi, r10d
test r15d, r15d
je 0x14009617b
lea r13d, [r12 - 7]
lea r14, [rdi + 2]
nop word [rax + rax]
cmp r8, rdi
jne 0x1400960a7
cmp esi, r13d
jb 0x140096091
mov edi, r12d
add rdi, rbx
mov eax, r15d
sub eax, r12d
test eax, eax
jle 0x140096091
movsxd rcx, eax
xor eax, eax
rep stosb byte [rdi], al
lea r8, [rbx + 4]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140092b20
jmp 0x14009614a
cmp esi, r13d
jae 0x1400960f1
lea rdx, [r14 - 2]
movzx eax, byte [rbx]
mov byte [rdx], al
movzx eax, byte [rbx + 1]
mov byte [r14 - 1], al
movzx eax, byte [rbx + 2]
mov byte [r14], al
movzx eax, byte [rbx + 3]
mov byte [r14 + 1], al
lea r8, [r14 + 2]
movzx eax, byte [rbx + 4]
mov byte [r8], al
movzx eax, byte [rbx + 5]
mov byte [r14 + 3], al
movzx eax, byte [rbx + 6]
mov byte [r14 + 4], al
movzx eax, byte [rbx + 7]
mov byte [r14 + 5], al
jmp 0x14009613c
mov eax, r12d
sub eax, esi
lea rdi, [r14 - 2]
mov edx, r10d
test eax, eax
jle 0x140096126
mov edx, eax
mov ecx, eax
nop word [rax + rax]
movzx eax, byte [rbx]
inc rbx
mov byte [rdi], al
inc rdi
sub rcx, 1
jne 0x140096110
cmp edx, 8
jge 0x140096134
mov eax, 8
sub eax, edx
movsxd rcx, eax
xor eax, eax
rep stosb byte [rdi], al
lea r8, [r14 + 2]
lea rdx, [r14 - 2]
lea rcx, [rsp + 0x40]
call fcn.140092b20
add r14, 8
add esi, 8
add rbx, 8
cmp esi, r15d
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
mov r10d, 0
jb 0x140096070
mov rcx, qword [rbp - 0x40]
mov rax, qword [rbp - 0x58]
mov r13, qword [rsp + 0x68]
lea r14, [r10 - 1]
cmp r15d, dword [rsp + 0x50]
je 0x1400961ad
lea rcx, [rbp - 0x58]
call fcn.14007ea30
nop
mov edx, 4
mov rcx, qword [rsp + 0x40]
call fcn.1401aed44
mov rcx, qword [rsp + 0x48]
call fcn.1401aed44
xor dil, dil
jmp 0x1400962c7
lea rdx, [rbp - 0x58]
cmp rcx, 0x10
cmovae rdx, rax
mov r8, qword [rbp - 0x48]
lea rcx, [rbp - 0x38]
call fcn.14007dce0
nop
lea rcx, [rbp - 0x58]
call fcn.14007ea30
nop
mov edx, 4
mov rcx, qword [rsp + 0x40]
call fcn.1401aed44
mov rcx, qword [rsp + 0x48]
call fcn.1401aed44
xor r15d, r15d
movdqa xmm0, xmmword [0x140415690]
movdqu xmmword [rbp - 0x48], xmm0
mov word [rbp - 0x58], r15w
mov r8, r14
inc r8
cmp word [r13 + r8*2], 0
jne 0x140096202
mov rdx, r13
lea rcx, [rbp - 0x58]
call fcn.14007ece0
mov rsi, qword [rbp - 0x28]
lea rbx, [rbp - 0x38]
cmp qword [rbp - 0x20], 0x10
cmovae rbx, qword [rbp - 0x38]
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
test rax, rax
jne 0x140096269
xor ecx, ecx
jmp 0x1400962b0
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
mov r8d, esi
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400962a7
movsxd rbx, dword [rsp + 0x50]
mov rax, rbx
cmp rbx, rsi
jne 0x1400962a7
cmp rdi, 0xffffffffffffffff
je 0x1400962a2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, ebx
jmp 0x1400962b6
cmp rdi, 0xffffffffffffffff
je 0x1400962b6
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
setne dil
lea rcx, [rbp - 0x58]
call fcn.14007ec70
nop
lea rcx, [rbp - 0x38]
call fcn.14007ea30
nop
lea rcx, [rsp + 0x78]
call fcn.1401a3180
movzx eax, dil
jmp 0x1400962e3
xor al, al
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.1401aed20
mov rbx, qword [rsp + 0x368]
add rsp, 0x310
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret