Function at 0x140022c10
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x3e8]
sub rsp, 0x4d0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402ac7a8]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov r14, rcx
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x40]
call fcn.1401bcd10
xor edi, edi
mov dword [rsp + 0x44], edi
mov byte [rsp + 0x40], dil
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x70], 0xf
mov byte [rsp + 0x78], dil
mov r15d, 1
mov r8d, r15d
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x78]
call fcn.140014bd0
nop
lea rcx, [0x1403b0ec8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp r14, 0xffffffffffffffff
je 0x140022e99
cmp qword [0x1403b0af8], rdi
je 0x140022cef
cmp dword [0x1403b1440], edi
je 0x140022cef
xor r8d, r8d
mov edx, dword [0x1403b0b10]
mov rcx, qword [0x1403b0b18]
call qword [0x1403b0af0]
xor r8d, r8d
mov edx, dword [0x1403a92dc]
mov rcx, qword [0x1403b0b00]
call qword [0x1403b0af0]
mov dword [0x1403b1440], edi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x4e2000
mov rax, qword [0x1403b0b00]
mov qword [rsp + 0x20], rax
mov rbx, 0xffffffffffffffff
mov r9d, ebx
mov r8, qword [0x1403b0b18]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rdx, qword [0x1403b0b00]
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], 0xf
mov byte [rsp + 0x48], 0
mov r8, rbx
inc r8
cmp byte [rdx + r8], 0
jne 0x140022d45
lea rcx, [rsp + 0x48]
call fcn.140014bd0
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x68]
call fcn.140021890
mov rsi, rax
lea rax, [rsp + 0x78]
cmp rax, rsi
je 0x140022da0
lea rcx, [rsp + 0x78]
call fcn.140014b70
movups xmm0, xmmword [rsi]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rsi + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rsi + 0x10], rdi
mov qword [rsi + 0x18], 0xf
mov byte [rsi], 0
mov rdx, qword [rbp - 0x50]
cmp rdx, 0x10
jb 0x140022ddb
inc rdx
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022dd6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022f13
call fcn.14003543c
lea rcx, [rbp - 0x40]
cmp qword [rbp - 0x78], 0
je 0x140022e04
lea r8, [rsp + 0x78]
cmp qword [rbp - 0x70], 0x10
cmovae r8, qword [rsp + 0x78]
lea rdx, str.Global_log_CRC:__s_r_n
call fcn.140014d80
jmp 0x140022e10
lea rdx, str.Global_log_CRC:_ERROR_r_n
call fcn.140014d80
lea r8, [rbp - 0x40]
mov edx, 0x4e2000
mov rcx, qword [0x1403b0b00]
call fcn.1401c9784
mov rdx, qword [0x1403b0b00]
nop dword [rax]
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140022e30
mov r8, rbx
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x44]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
cmovne edi, r15d
mov rax, qword [0x1403b0af8]
test rax, rax
je 0x140022e99
cmp dword [0x1403b1440], 0
jne 0x140022e99
xor r8d, r8d
mov edx, dword [0x1403b0b10]
mov rcx, qword [0x1403b0b18]
call rax
xor r8d, r8d
mov edx, dword [0x1403a92dc]
mov rcx, qword [0x1403b0b00]
call qword [0x1403b0af8]
mov dword [0x1403b1440], r15d
lea rcx, [0x1403b0ec8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x140022edf
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022eda
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140022f0d
call fcn.14003543c
mov eax, edi
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.1401b6d50
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.1401c772c
nop
call fcn.1401c772c
nop
int3