Function at 0x407360
Capabilities:
Access the windows event log
Write file on windows

Disassembly:
push rbp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x268
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x228], rdx
mov rdi, rcx
mov ecx, 0xfffffff4
mov qword [rbp + 0x230], r8
mov qword [rbp + 0x238], r9
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r12, rax
test rax, rax
je 0x4073b3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x407754
cmp byte [rdi], 0
je 0x4077b0
mov rax, rdi
xor r9d, r9d
jmp 0x4073d5
cmp r9d, 0x80000000
je 0x4077b0
add rax, 1
add r9d, 1
cmp byte [rax], 0
jne 0x4073c8
and r9d, 0x7fffffff
lea ebx, [r9 + 1]
lea rax, [rbx + rbx + 0xf]
mov r9, rbx
shr rax, 4
shl rax, 4
call fcn.005b26e0
xor edx, edx
xor ecx, ecx
sub rsp, rax
mov r8, rdi
lea r12, [rsp + 0x50]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r12
mov rsi, r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4075d0
lea rax, [rbx - 1]
cmp rax, 0xe
jbe 0x4077f2
mov rdx, rbx
xor eax, eax
pxor xmm3, xmm3
and edx, 0xfffffff0
nop dword [rax]
movdqu xmm0, xmmword [rdi + rax]
movdqu xmm1, xmm3
pcmpgtb xmm1, xmm0
movdqu 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 0x407448
mov rax, rbx
and rax, 0xfffffffffffffff0
cmp rax, rbx
je 0x4075d0
movsx dx, byte [rdi + rax]
mov word [r12 + rax*2], dx
lea rdx, [rax + 1]
cmp rdx, rbx
jae 0x4075d0
movsx cx, byte [rdi + rax + 1]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 2]
cmp rdx, rbx
jae 0x4075d0
movsx cx, byte [rdi + rax + 2]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 3]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 3]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 4]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 4]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 5]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 5]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 6]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 6]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 7]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 7]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 8]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 8]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 9]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 9]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 0xa]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 0xa]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 0xb]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 0xb]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 0xc]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 0xc]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 0xd]
cmp rbx, rdx
jbe 0x4075d0
movsx cx, byte [rdi + rax + 0xd]
mov word [r12 + rdx*2], cx
lea rdx, [rax + 0xe]
cmp rbx, rdx
jbe 0x4075d0
movsx ax, byte [rdi + rax + 0xe]
mov word [r12 + rdx*2], ax
nop word [rax + rax]
xor ecx, ecx
lea rdx, [0x005b53d8]
jmp 0x4075e0
cmp r8, rbx
jae 0x407638
lea rax, [rcx + rcx]
lea r8, [rcx + 1]
cmp word [rsi + rax], 0x25
mov rcx, r8
jne case.0x40761d.1
lea r9, [rsi + rax + 2]
movzx eax, word [r9]
mov rcx, r8
cmp ax, 0x63
ja 0x407620
cmp ax, 0x29
jbe case.0x40761d.1
sub eax, 0x2a
cmp ax, 0x39
ja case.0x40761d.1
movzx eax, ax
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
cmp ax, 0x73
jne case.0x40761d.1
mov r12d, 0x53
mov word [r9], r12w
cmp r8, rbx
jb 0x4075e0
nop dword [rax]
lea r9, [rbp + 0x228]
lea r13, [rbp - 0x20]
mov r8, rsi
mov edx, 0xff
mov qword [rbp - 0x30], r9
mov rcx, r13
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 0x407674
call sym.OPENSSL_isservice
test eax, eax
jg 0x4076e0
mov r9d, 0x10
lea r8, str.OpenSSL:_FATAL
mov rdx, r13
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
nop
lea rsp, [rbp + 0x1e8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
mov r11d, 0x43
mov word [r9], r11w
jmp case.0x40761d.1
mov edi, 0x73
mov word [r9], di
jmp case.0x40761d.1
mov r10d, 0x63
mov word [r9], r10w
jmp case.0x40761d.1
add r9, 2
add r8, 1
jmp 0x4075f7
lea rdx, str.OpenSSL
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov r12, rax
test rax, rax
je 0x40768d
lea rax, [rbp - 0x28]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
mov rcx, r12
mov qword [rbp - 0x28], r13
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, r12
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
nop
lea rsp, [rbp + 0x1e8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
lea r9, [rbp + 0x228]
lea r13, [rbp - 0x20]
mov r8, rdi
mov edx, 0x200
mov qword [rbp - 0x30], r9
mov rcx, r13
call qword [sym.imp.msvcrt.dll__vsnprintf]
lea r9, [rbp - 0x28]
mov rdx, r13
mov rcx, r12
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 + 0x1e8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
sub rsp, 0x10
mov r9d, 1
mov r8, rdi
xor edx, edx
lea rsi, [rsp + 0x50]
mov dword [rsp + 0x28], 1
xor ecx, ecx
mov ebx, 1
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4075d0
movsx ax, byte [rdi]
mov word [rsi], ax
jmp 0x4075d0
xor eax, eax
jmp 0x407485