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

Disassembly:
or dword [rdi + 0xc], 4
xor eax, eax
mov esi, 0xfffe
mov qword [rbp - 0x11], rax
mov qword [rbp - 0x11], rbx
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
mov rdx, qword [rdi + 0x58]
test rdx, rdx
je 0x180050495
lea rcx, [rbp - 0x11]
call fcn.180050800
test eax, eax
jne 0x180050791
mov rdx, qword [rdi + 0x60]
test rdx, rdx
je 0x1800504af
lea rcx, [rbp - 0x11]
call fcn.180050800
test eax, eax
jne 0x180050791
test dword [rdi + 0xc], 0x8000
je 0x1800504d0
mov rax, qword [rdi + 0x20]
mov rcx, qword [rax + 0x30]
mov rax, qword [rdi + 0x40]
mov qword [rcx + 0x40], rax
mov qword [rdi + 0x40], 0
mov rax, qword [rdi + 0x20]
xor r14d, r14d
cmp dword [rax], r14d
jle 0x1800505c1
xor esi, esi
nop word [rax + rax]
mov r12, qword [rdi + 0x20]
cmp qword [r12 + rsi + 0x30], 0
je 0x1800505a4
mov rcx, qword [rbp - 0x29]
mov r9, qword [rbp + 0x7f]
xor ebx, ebx
mov r13, qword [r9 + 0x238]
mov rax, rcx
test rcx, rcx
je 0x18005052c
nop dword [rax]
add ebx, dword [rax + 0x28]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x180050520
mov rax, qword [r12 + rsi + 0x18]
test rax, rax
je 0x18005053d
mov qword [r9 + 0x238], rax
mov rdx, qword [r12 + rsi + 0x30]
mov r8, rcx
mov rcx, r9
call fcn.180050a70
mov rax, qword [rbp + 0x7f]
cmp dword [rax + 0x50], 0
mov qword [rax + 0x238], r13
jne 0x180050791
mov rax, qword [rbp - 0x21]
cmp byte [rax + 0x55], 0
jne 0x180050791
mov r13, qword [rbp - 0x29]
mov rax, r13
test r13, r13
je 0x18005058c
nop dword [rax]
sub ebx, dword [rax + 0x28]
mov rax, qword [rax + 0x20]
test rax, rax
jne 0x180050580
and dword [r12 + rsi + 0x48], 0xfffffff7
xor eax, eax
test ebx, ebx
setne al
and eax, r15d
shl eax, 3
or dword [r12 + rsi + 0x48], eax
mov rax, qword [rdi + 0x20]
inc r14d
add rsi, 0x78
cmp r14d, dword [rax]
jl 0x1800504f0
mov rbx, qword [rbp + 0x7f]
mov esi, 0xfffe
mov word [rbp + 0x1f], r15w
mov rax, qword [rdi + 0x20]
mov qword [rbp + 0xf], r13
mov qword [rbp - 9], rax
mov rdx, qword [rdi]
test rdx, rdx
je 0x1800505eb
lea rcx, [rbp - 0x11]
call fcn.180050900
test eax, eax
jne 0x180050791
mov r12, qword [rdi + 0x30]
test r12, r12
jne 0x180050600
test byte [rbp + 0x1f], 2
jne 0x180050600
and word [rbp + 0x1f], si
jmp 0x18005060e
mov eax, dword [rbp + 0x1f]
and eax, 0x1000
or eax, 8
or dword [rdi + 0xc], eax
cmp qword [rdi + 0x38], 0
je 0x18005061e
test r12, r12
je 0x180050782
mov rax, qword [rdi]
mov qword [rbp - 1], rax
mov rdx, qword [rdi + 0x38]
test rdx, rdx
je 0x18005063f
lea rcx, [rbp - 0x11]
call fcn.180050800
test eax, eax
jne 0x180050791
mov rdx, qword [rdi + 0x28]
test rdx, rdx
je 0x180050659
lea rcx, [rbp - 0x11]
call fcn.180050800
test eax, eax
jne 0x180050791
mov rax, qword [rdi + 0x20]
xor r14d, r14d
mov esi, r14d
cmp dword [rax], r14d
jle 0x1800506a4
mov ebx, r14d
nop dword [rax + rax]
mov rax, qword [rdi + 0x20]
test byte [rax + rbx + 0x48], 4
je 0x180050696
mov rdx, qword [rax + rbx + 0x70]
test rdx, rdx
je 0x180050696
lea rcx, [rbp - 0x11]
call fcn.180050900
test eax, eax
jne 0x180050791
mov rax, qword [rdi + 0x20]
inc esi
add rbx, 0x78
cmp esi, dword [rax]
jl 0x180050670
or word [rbp + 0x1f], r15w
mov qword [rbp + 0xf], r14
test dword [rdi + 0xc], 0x8000
je 0x1800506ca
mov rax, qword [rdi + 0x20]
mov rcx, qword [rax + 0x30]
mov rax, qword [rcx + 0x40]
mov qword [rdi + 0x40], rax
mov qword [rcx + 0x40], r14
mov r14d, dword [rbp + 0x6f]
mov ebx, dword [rbp + 0x77]
cmp ebx, r14d
jg 0x1800506fa
mov r8, qword [rdi + 0x40]
test r8, r8
je 0x1800506fa
lea r9, str.ORDER
lea rcx, [rbp - 0x11]
mov rdx, rdi
call fcn.1800501a0
test eax, eax
jne 0x180050791
mov rsi, qword [rbp - 0x21]
cmp byte [rsi + 0x55], 0
jne 0x180050791
test r12, r12
je 0x180050754
lea r9, str.GROUP
lea rcx, [rbp - 0x11]
mov r8, r12
mov rdx, rdi
call fcn.1800501a0
test eax, eax
jne 0x180050791
cmp byte [rsi + 0x55], al
jne 0x180050791
mov r8d, dword [r12]
mov rcx, qword [r12 + 8]
xor edx, edx
test r8d, r8d
jle 0x180050754
nop dword [rax]
mov rax, qword [rcx]
test byte [rax + 4], 2
jne 0x1800507c4
inc edx
add rcx, 0x28
cmp edx, r8d
jl 0x180050740
mov rax, qword [rdi + 0x50]
test rax, rax
je 0x180050769
mov rax, qword [rax]
mov rcx, qword [rdi]
mov eax, dword [rax]
cmp dword [rcx], eax
jne 0x1800507d1
mov rdi, qword [rdi + 0x48]
inc r14d
mov dword [rbp + 0x6f], r14d
test rdi, rdi
je 0x1800507e0
mov rbx, qword [rbp + 0x7f]
jmp 0x180050450
lea rdx, str.a_GROUP_BY_clause_is_required_before_HAVING
mov rcx, rbx
call fcn.18001a500
mov eax, 2
mov r12, qword [rsp + 0x80]
mov r14, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0xb0]
mov r13, qword [rsp + 0x78]
add rsp, 0x90
pop r15
pop rdi
pop rbp
ret
mov rcx, qword [rbp + 0x7f]
lea rdx, str.aggregate_functions_are_not_allowed_in_the_GROUP_BY_clause
jmp 0x18005078c
mov rdx, qword [rdi + 0x50]
mov rcx, qword [rbp + 0x7f]
call fcn.1800835d0
jmp 0x180050791
test ebx, ebx
je 0x1800507f5
mov rdx, qword [rbp - 0x19]
mov rcx, qword [rbp + 0x7f]
call fcn.18004fc60
test eax, eax
jne 0x180050791
mov eax, r15d
jmp 0x180050796
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbp
push rbx
push rsi
push rdi
push r12
push r13
mov eax, 0x278
call fcn.1800b9c10
sub rsp, rax
lea rbp, [rsp + 0x50]
mov rax, qword [0x1802e4710]
xor rax, rbp
mov qword [rbp + 0x210], rax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
test rax, rax
je 0x1800cadb3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x1800cadb3
mov r8, qword [rbp + 0x260]
mov edi, 0x200
lea r9, [rbp + 0x268]
lea rcx, [rbp + 0x10]
mov edx, edi
call fcn.180210a70
test eax, eax
js 0x1800cad93
mov edi, eax
xor esi, esi
lea r9, [rbp]
lea rdx, [rbp + 0x10]
mov r8d, edi
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1800caf7d
mov r8, qword [rbp + 0x260]
mov rcx, r8
call fcn.1800cab80
inc eax
mov edi, eax
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1800caddc
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1800b9c10
sub rsp, rcx
xor esi, esi
lea rbx, [rsp + 0x50]
test rbx, rbx
jne 0x1800cae03
lea rbx, str.no_stack_
jmp 0x1800caed3
mov r9d, edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1800cae49
mov rdx, rsi
test rdi, rdi
je 0x1800cae49
nop word [rax + rax]
mov rax, qword [rbp + 0x260]
inc rdx
movsx ecx, byte [rdx + rax - 1]
mov word [rbx + rdx*2 - 2], cx
cmp rdx, rdi
jb 0x1800cae30
mov rdx, rsi
test rdi, rdi
je 0x1800caed3
mov r10d, 0x53
lea r9, [0x180000000]
lea r11d, [r10 + 0x20]
lea r12d, [r10 - 0x10]
lea r13d, [r10 + 0x10]
nop
cmp word [rbx + rdx*2], 0x25
jne case.0x1800caea2.47
lea r8, [rbx + rdx*2 + 2]
nop dword [rax]
movzx eax, word [r8]
add eax, 0xffffffd6
cmp eax, 0x49
ja case.0x1800caea2.47
cdqe
movzx eax, byte [r9 + rax + 0xcafb4]
mov ecx, dword [r9 + rax*4 + 0xcaf9c]
add rcx, r9
jmp rcx
inc rdx
add r8, 2
jmp 0x1800cae80
mov word [rbx + rdx*2 + 2], r10w
jmp case.0x1800caea2.47
mov word [rbx + rdx*2 + 2], r11w
jmp case.0x1800caea2.47
mov word [rbx + rdx*2 + 2], r12w
jmp case.0x1800caea2.47
mov word [rbx + rdx*2 + 2], r13w
inc rdx
cmp rdx, rdi
jb 0x1800cae70
lea r9, [rbp + 0x268]
lea rcx, [rbp + 0x10]
mov r8, rbx
mov edx, 0xff
call fcn.18021098c
mov word [rbp + 0x20e], si
call qword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x1800caf64
call fcn.1800caba0
test eax, eax
jle 0x1800caf64
lea rdx, str.OpenSSL
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x1800caf7d
mov qword [rsp + 0x40], rsi
mov ecx, 1
lea rax, [rbp + 0x10]
mov qword [rbp], rax
lea rax, [rbp]
mov edx, ecx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], esi
mov word [rsp + 0x28], cx
mov rcx, rbx
xor r8d, r8d
xor r9d, r9d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x1800caf7d
lea r8, str.OpenSSL:_FATAL
lea rdx, [rbp + 0x10]
mov r9d, reloc.WS2_32.dll_recv
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, qword [rbp + 0x210]
xor rcx, rbp
call fcn.1800acfa0
lea rsp, [rbp + 0x228]
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret