Function at 0x14021c840
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 8]
sub rsp, 0x108
mov rax, qword [0x1403ceac0]
xor rax, rsp
mov qword [rbp - 8], rax
mov esi, r9d
mov dword [rsp + 0x40], r9d
mov r15, r8
mov qword [rsp + 0x48], r8
mov rbx, rdx
mov rdi, rcx
call fcn.14021c1d0
test al, al
jne 0x14021c8bc
mov qword [rsp + 0x28], rdi
lea rax, str.CreateDir_failed_for__s
mov qword [rsp + 0x20], rax
mov r9d, 0x86
lea r8, str.XMLUpdater::v2::NUtils::StoreBufferInFile
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterFileUtils.cpp
mov ecx, 1
call fcn.140213350
xor al, al
jmp 0x14021ce7b
lea rax, [case.0x1400bf494.25]
test rbx, rbx
cmove rbx, rax
xor r12d, r12d
mov qword [rbp - 0x38], r12
mov r14d, 7
mov qword [rbp - 0x30], r14
mov word [rbp - 0x48], r12w
mov r13, 0xffffffffffffffff
mov r8, r13
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], r12w
jne 0x14021c8f0
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.14002b640
nop
test rdi, rdi
jne 0x14021c921
movups xmm0, xmmword [rbp - 0x48]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rbp - 0x38]
movups xmmword [rbp - 0x58], xmm1
jmp 0x14021cd40
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], r14
mov word [rbp - 0x28], r12w
mov r8, r13
inc r8
cmp word [rdi + r8*2], 0
jne 0x14021c931
mov rdx, rdi
lea rcx, [rbp - 0x28]
call fcn.14002b640
nop
mov rdx, qword [rbp - 0x18]
test rdx, rdx
jne 0x14021c9a8
movups xmm0, xmmword [rbp - 0x48]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rbp - 0x38]
movups xmmword [rbp - 0x58], xmm1
mov rdx, qword [rbp - 0x10]
cmp rdx, 8
jb 0x14021c9a3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14021c99d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021cea7
call fcn.140296f94
nop
jmp 0x14021cd40
lea rax, [rbp - 0x28]
mov rsi, qword [rbp - 0x28]
mov r12, qword [rbp - 0x10]
cmp r12, 8
cmovae rax, rsi
lea rcx, [rdx + rdx]
mov qword [rsp + 0x78], rcx
cmp word [rcx + rax - 2], 0x5c
movabs rcx, 0x7ffffffffffffffe
jne 0x14021cb2a
mov rax, rcx
sub rax, rdx
mov r15, qword [rbp - 0x38]
cmp rax, r15
jb 0x14021cea1
lea rax, [rbp - 0x28]
cmp r12, 8
cmovae rax, rsi
mov qword [rbp - 0x78], rax
lea rax, [rbp - 0x48]
mov rbx, qword [rbp - 0x48]
mov r13, qword [rbp - 0x30]
cmp r13, 8
cmovae rax, rbx
mov qword [rbp - 0x80], rax
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
lea rax, [rdx + r15]
mov qword [rsp + 0x70], rax
lea rdi, [rbp - 0x68]
cmp rax, 7
jbe 0x14021ca77
mov r14, rax
or r14, 7
cmp r14, rcx
jbe 0x14021ca44
mov r14, rcx
jmp 0x14021ca50
mov eax, 0xa
cmp r14, rax
cmovb r14, rax
mov rdx, r14
add rdx, 1
mov rax, 0xffffffffffffffff
cmovb rdx, rax
lea rcx, [rbp - 0x68]
call fcn.14002bf30
mov rdi, rax
mov qword [rbp - 0x68], rax
mov rax, qword [rsp + 0x70]
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], r14
mov r14, qword [rsp + 0x78]
mov r8, r14
mov rdx, qword [rbp - 0x78]
mov rcx, rdi
call fcn.1402b53e0
lea rcx, [r14 + rdi]
lea r8, [r15 + r15]
mov rdx, qword [rbp - 0x80]
call fcn.1402b53e0
mov rax, qword [rsp + 0x70]
xor ecx, ecx
mov word [rdi + rax*2], cx
cmp r12, 8
jb 0x14021caeb
lea rdx, [r12*2 + 2]
mov rax, rsi
cmp rdx, 0x1000
jb 0x14021cae2
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021cea7
mov rcx, rsi
call fcn.140296f94
nop
cmp r13, 8
jb 0x14021cd34
lea rdx, [r13*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x14021cb22
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021ce9b
mov rcx, rbx
jmp 0x14021cd2f
cmp rdx, rcx
je 0x14021cead
lea r13, [rbp - 0x28]
cmp r12, 8
cmovae r13, rsi
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
lea r15, [rdx + 1]
mov rbx, r14
lea rdi, [rsp + 0x50]
cmp r15, rbx
jbe 0x14021cb9d
mov rbx, r15
or rbx, 7
cmp rbx, rcx
jbe 0x14021cb6d
mov rbx, rcx
jmp 0x14021cb79
mov eax, 0xa
cmp rbx, rax
cmovb rbx, rax
mov rdx, rbx
add rdx, 1
mov rax, 0xffffffffffffffff
cmovb rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14002bf30
mov rdi, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], rbx
mov rbx, qword [rsp + 0x78]
mov r8, rbx
mov rdx, r13
mov rcx, rdi
call fcn.1402b53e0
mov eax, 0x5c
mov word [rbx + rdi], ax
xor ecx, ecx
mov word [rdi + r15*2], cx
lea r9, [rbp - 0x48]
mov r15, qword [rbp - 0x48]
mov r13, qword [rbp - 0x30]
cmp r13, 8
cmovae r9, r15
mov rcx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
mov rax, r8
sub rax, rcx
mov rdx, qword [rbp - 0x38]
cmp rdx, rax
ja 0x14021cc2c
lea rdi, [rcx + rdx]
mov qword [rsp + 0x60], rdi
lea rbx, [rsp + 0x50]
cmp r8, 8
cmovae rbx, qword [rsp + 0x50]
lea rcx, [rbx + rcx*2]
lea r8, [rdx + rdx]
mov rdx, r9
call fcn.1402b53e0
xor ecx, ecx
mov word [rbx + rdi*2], cx
lea rax, [rsp + 0x50]
jmp 0x14021cc48
mov qword [rsp + 0x20], rdx
xor r8d, r8d
lea rcx, [rsp + 0x50]
call fcn.140030e60
mov r13, qword [rbp - 0x30]
mov r15, qword [rbp - 0x48]
xor ecx, ecx
mov qword [rbp - 0x58], rcx
mov qword [rbp - 0x50], rcx
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], r14
mov word [rax], cx
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x14021ccae
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14021cca7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021ceb3
call fcn.140296f94
xor ecx, ecx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], r14
mov word [rsp + 0x50], cx
cmp r12, 8
jb 0x14021ccf9
lea rdx, [r12*2 + 2]
mov rax, rsi
cmp rdx, 0x1000
jb 0x14021ccf0
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021ceb9
mov rcx, rsi
call fcn.140296f94
nop
cmp r13, 8
jb 0x14021cd34
lea rdx, [r13*2 + 2]
mov rax, r15
cmp rdx, 0x1000
jb 0x14021cd2c
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021cebf
mov rcx, r15
call fcn.140296f94
xor r12d, r12d
mov r15, qword [rsp + 0x48]
mov esi, dword [rsp + 0x40]
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14021cdc7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rcx
lea rax, str.CreateFile_failed_for__s:__d
mov qword [rsp + 0x20], rax
mov r9d, 0x8e
lea r8, str.XMLUpdater::v2::NUtils::StoreBufferInFile
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterFileUtils.cpp
lea ecx, [rbx + 2]
call fcn.140213350
xor dil, dil
jmp 0x14021ce3b
mov qword [rbp - 0x80], rbx
mov dword [rbp - 0x70], r12d
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x70]
mov r8d, esi
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14021cdf5
cmp dword [rbp - 0x70], esi
jne 0x14021cdf5
mov dil, 1
jmp 0x14021ce2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x28], eax
lea rax, str.WriteFile_failed:__d
mov qword [rsp + 0x20], rax
mov r9d, reloc.OLEAUT32.dll_DllRegisterServer
lea r8, str.XMLUpdater::v2::NUtils::StoreBufferInFile
lea rdx, str.E:BT0a209782_47a3_49ff_a189_59d4c06152f0WebAdvisor_XmlUpdater_srcXmlUpdaterFileUtils.cpp
mov ecx, 1
call fcn.140213350
xor dil, dil
test rbx, rbx
je 0x14021ce3b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x14021ce77
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14021ce72
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14021ce9b
call fcn.140296f94
movzx eax, dil
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140296f70
add rsp, 0x108
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1402ba3ec
nop
call fcn.14002c880
nop
call fcn.1402ba3ec
nop
call fcn.14002c880
int3
call fcn.1402ba3ec
nop
call fcn.1402ba3ec
nop
call fcn.1402ba3ec
int3