Function at 0x140188400
Capabilities:
Access the windows event log
Check os version
Write file on windows

Disassembly:
push rbp
push r12
push rdi
push rsi
push rbx
sub rsp, 0x260
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x218], rdx
mov rdi, rcx
mov ecx, 0xfffffff4
mov qword [rbp + 0x220], r8
mov qword [rbp + 0x228], r9
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
test rax, rax
je 0x140188451
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x14018877a
cmp byte [rdi], 0
je 0x1401887d0
mov rax, rdi
xor r9d, r9d
jmp 0x140188475
cmp r9d, 0x80000000
je 0x1401887d0
add rax, 1
add r9d, 1
cmp byte [rax], 0
jne 0x140188468
and r9d, 0x7fffffff
lea esi, [r9 + 1]
lea rax, [rsi + rsi + 0xf]
mov r9, rsi
shr rax, 4
shl rax, 4
call fcn.1402261d0
xor edx, edx
xor ecx, ecx
sub rsp, rax
mov r8, rdi
lea r12, [rsp + 0x50]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r12
mov rbx, r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1401885f0
lea rax, [rsi - 1]
cmp rax, 0xe
jbe 0x14018880d
mov rdx, rsi
xor eax, eax
pxor xmm3, xmm3
and edx, 0xfffffff0
nop dword [rax]
movdqu xmm0, xmmword [rdi + rax]
movdqa xmm1, xmm3
pcmpgtb xmm1, xmm0
movdqa xmm2, xmm0
punpcklbw xmm2, xmm1
punpckhbw xmm0, xmm1
movups xmmword [r12 + rax*2], xmm2
movups xmmword [r12 + rax*2 + 0x10], xmm0
add rax, 0x10
cmp rax, rdx
jne 0x1401884e8
cmp rsi, rdx
je 0x1401885f0
mov rax, rsi
sub rax, rdx
lea rcx, [rax - 1]
cmp rcx, 6
jbe 0x14018856b
movq xmm0, qword [rdi + rdx]
pxor xmm1, xmm1
lea rcx, [r12 + rdx*2]
pcmpgtb xmm1, xmm0
movdqa xmm2, xmm0
punpcklbw xmm0, xmm1
punpcklbw xmm2, xmm1
pshufd xmm0, xmm0, 0x4e
movq qword [rcx], xmm2
movq qword [rcx + 8], xmm0
mov rcx, rax
and rcx, 0xfffffffffffffff8
add rdx, rcx
test al, 7
je 0x1401885f0
movsx cx, byte [rdi + rdx]
lea rax, [rdx + rdx]
mov word [rbx + rdx*2], cx
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x1401885f0
movsx cx, byte [rdi + rdx + 1]
mov word [rbx + rax + 2], cx
lea rcx, [rdx + 2]
cmp rcx, rsi
jae 0x1401885f0
movsx cx, byte [rdi + rdx + 2]
mov word [rbx + rax + 4], cx
lea rcx, [rdx + 3]
cmp rcx, rsi
jae 0x1401885f0
movsx cx, byte [rdi + rdx + 3]
mov word [rbx + rax + 6], cx
lea rcx, [rdx + 4]
cmp rcx, rsi
jae 0x1401885f0
movsx cx, byte [rdi + rdx + 4]
mov word [rbx + rax + 8], cx
lea rcx, [rdx + 5]
cmp rcx, rsi
jae 0x1401885f0
movsx cx, byte [rdi + rdx + 5]
mov word [rbx + rax + 0xa], cx
lea rcx, [rdx + 6]
cmp rcx, rsi
jae 0x1401885f0
movsx dx, byte [rdi + rdx + 6]
mov word [rbx + rax + 0xc], dx
xor ecx, ecx
lea r9, [0x1402bf728]
jmp 0x140188605
cmp rdx, rsi
jae 0x140188673
lea rax, [rcx + rcx]
lea rdx, [rcx + 1]
cmp word [rbx + rax], 0x25
mov rcx, rdx
jne case.0x140188642.1
lea r8, [rbx + rax + 2]
mov rcx, rdx
movzx eax, word [r8]
cmp ax, 0x63
ja 0x14018865e
cmp ax, 0x29
jbe case.0x140188642.1
sub eax, 0x2a
cmp ax, 0x39
ja case.0x140188642.1
movzx eax, ax
movsxd rax, dword [r9 + rax*4]
add rax, r9
jmp rax
movzx eax, word [r8 + 2]
add rdx, 1
add r8, 2
mov rcx, rdx
cmp ax, 0x63
jbe 0x140188629
cmp ax, 0x73
jne case.0x140188642.1
mov r12d, 0x53
mov word [r8], r12w
cmp rdx, rsi
jb 0x140188605
lea r9, [rbp + 0x218]
lea rsi, [rbp - 0x20]
mov r8, rbx
mov edx, 0xff
mov qword [rbp - 0x30], r9
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__vsnwprintf]
xor eax, eax
mov word [rbp + 0x1de], ax
call qword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
js 0x1401886af
call fcn.1401882a0
test eax, eax
jg 0x140188708
mov r9d, 0x10
lea r8, str.OpenSSL:_FATAL
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
nop
lea rsp, [rbp + 0x1e0]
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret
mov r11d, 0x43
mov word [r8], r11w
jmp case.0x140188642.1
mov edi, 0x73
mov word [r8], di
jmp case.0x140188642.1
mov r10d, 0x63
mov word [r8], r10w
jmp case.0x140188642.1
lea rdx, str.OpenSSL
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x1401886c8
lea rax, [rbp - 0x28]
mov qword [rbp - 0x28], rsi
xor r9d, r9d
xor r8d, r8d
mov edx, 1
mov rcx, rbx
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
nop
lea rsp, [rbp + 0x1e0]
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret
lea r9, [rbp + 0x218]
lea rsi, [rbp - 0x20]
mov r8, rdi
mov edx, 0x200
mov qword [rbp - 0x30], r9
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__vsnprintf]
lea r9, [rbp - 0x28]
mov rdx, rsi
mov rcx, rbx
test eax, eax
mov r8d, 0x200
mov qword [rsp + 0x20], 0
cmovns r8d, eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
lea rsp, [rbp + 0x1e0]
pop rbx
pop rsi
pop rdi
pop r12
pop rbp
ret
sub rsp, 0x10
mov r9d, 1
mov r8, rdi
xor edx, edx
lea rbx, [rsp + 0x50]
mov dword [rsp + 0x28], 1
xor ecx, ecx
mov esi, 1
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1401885f0
xor edx, edx
jmp 0x14018856b
xor edx, edx
jmp 0x14018851e