Function at 0x477d40
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x140
cmp dword [0x505d04], 0
jne 0x477e13
mov dword [0x505cc4], 0
mov dword [0x505cc8], 0
mov eax, dword [0x5052b0]
mov dword [0x505ccc], eax
mov dword [0x505cd0], 0
mov dword [0x505cd4], 0
mov dword [0x505cd8], eax
mov dword [0x505cdc], 0
mov dword [0x505ce0], 0
mov dword [0x505ce4], eax
mov dword [0x505ce8], 0
mov dword [0x505cec], 0
mov dword [0x505cf0], eax
mov dword [0x505cf4], 0
mov dword [0x505cf8], 0
mov dword [0x505cfc], eax
mov dword [0x505d04], 0x38
mov dword [0x505d0c], 0
mov dword [0x505d08], 0
mov dword [0x505d00], 0
push 0x505cc4
call dbg.ffConnectDisplayServerImpl
add esp, 4
mov ebx, dword [ebp + 0xc]
mov eax, dword [0x505d08]
test eax, eax
jle 0x477e49
mov ecx, dword [0x505d00]
mov edx, 0x38
nop word [eax + eax]
cmp dword [ecx + edx - 0x14], 1
jbe 0x477e57
mov esi, edx
sar esi, 3
imul esi, esi, 0xb6db6db7
add edx, 0x38
cmp esi, eax
jl 0x477e30
cmp dword [ebx + 8], eax
jb 0x47810c
jmp 0x47841c
lea ecx, [esp + 0xc]
push 1
push 0
push str.SELECT_CurrentBrightness__InstanceName_FROM_WmiMonitorBrightness_WHERE_Active__true
call dbg.FFWmiQuery
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4780fe
mov dword [esp + 8], 0
lea esi, [esp + 0x38]
mov edi, dword [sym.imp.OLEAUT32.dll_VariantClear]
jmp 0x477ea4
mov eax, dword [esp + 0xc]
mov dword [esp + 8], 0
test eax, eax
je 0x4780fe
mov ecx, dword [eax]
push esi
lea edx, [esp + 0xc]
push edx
push 1
push dword [0x50641c]
push eax
call dword [ecx + 0x10]
test eax, eax
js 0x4780f0
cmp dword [esp + 0x38], 0
je 0x4780f0
cmp dword [esp + 8], 0
je 0x4780f0
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov eax, dword [esp + 8]
mov ecx, dword [eax]
push 0
push 0
push esi
push 0
push str.CurrentBrightness
push eax
call dword [ecx + 0x10]
cmp word [esp + 0x38], 0
je 0x4780d6
mov esi, dword [ebx]
mov edi, dword [ebx + 8]
cmp edi, dword [ebx + 0xc]
jne 0x477f2e
lea eax, [edi + edi]
test edi, edi
mov ecx, 0x10
cmove eax, ecx
mov dword [ebx + 0xc], eax
imul eax, dword [ebx + 4]
push eax
push esi
call sym._realloc
add esp, 8
mov esi, eax
mov dword [ebx], eax
mov edi, dword [ebx + 8]
lea eax, [edi + 1]
mov dword [ebx + 8], eax
imul edi, dword [ebx + 4]
movaps xmm0, xmmword [0x4f8190]
movups xmmword [esi + edi + 0x10], xmm0
movzx eax, byte [esp + 0x40]
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd qword [esi + edi + 0x20], xmm0
mov dword [esi + edi], 0
mov dword [esi + edi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + edi + 8], eax
lea ebx, [esp + 0x28]
push ebx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov eax, dword [esp + 8]
mov ecx, dword [eax]
push 0
push 0
push ebx
push 0
push str.InstanceName
push eax
call dword [ecx + 0x10]
movzx eax, word [esp + 0x28]
test ax, ax
je 0x4780c2
mov ebx, dword [esp + 0x30]
cmp ax, 0x1f
jne 0x477fb2
push ebx
call sym._wcslen
add esp, 4
jmp 0x477fb9
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
add esi, edi
push ebx
push eax
push esi
call dbg.ffStrbufSetNWS
add esp, 0xc
mov ebx, dword [esi + 4]
mov dword [esp + 4], esi
mov esi, dword [esi + 8]
push ebx
push 0x5c
push esi
call sym._memchr
add esp, 0xc
mov edi, eax
mov ecx, esi
sub edi, esi
test eax, eax
cmove edi, ebx
mov eax, ebx
sub eax, edi
jbe 0x47801e
mov esi, dword [esp + 4]
cmp dword [esi], 0
je 0x478028
lea eax, [ecx + edi]
inc eax
not edi
add ebx, edi
push ebx
push eax
push ecx
call sym._memmove
add esp, 0xc
add edi, dword [esi + 4]
mov dword [esi + 4], edi
mov eax, dword [esi + 8]
mov byte [eax + edi], 0
mov edi, dword [esi + 4]
mov ebx, dword [esi + 8]
jmp 0x478040
mov edi, ebx
mov ebx, ecx
mov esi, dword [esp + 4]
jmp 0x478040
mov dword [esi + 4], eax
mov ebx, ecx
add ebx, edi
mov edi, eax
mov dword [esi + 8], ebx
nop word cs:[eax + eax]
push edi
push 0x5c
push ebx
call sym._memchr
add esp, 0xc
mov ecx, eax
sub ecx, ebx
test eax, eax
cmove ecx, edi
cmp edi, ecx
jbe 0x4780c2
cmp dword [esi], 0
je 0x478065
mov dword [esi + 4], ecx
add ebx, ecx
jmp 0x4780bf
mov dword [esi], 0
mov dword [esi + 4], 0
mov eax, dword [0x5052b0]
mov dword [esi + 8], eax
test ebx, ebx
je 0x4780c2
mov dword [esp + 4], edi
lea eax, [edi + 1]
mov ecx, 0x20
nop word [eax + eax]
mov edi, ecx
add ecx, ecx
cmp eax, edi
ja 0x478090
push edi
call sym._malloc
add esp, 4
mov byte [eax], 0
mov dword [esi + 8], eax
mov dword [esi], edi
mov edi, dword [esp + 4]
push edi
push ebx
push eax
mov ebx, eax
call sym._memcpy
add esp, 0xc
mov dword [esi + 4], edi
add ebx, edi
mov byte [ebx], 0
lea eax, [esp + 0x28]
push eax
mov edi, dword [sym.imp.OLEAUT32.dll_VariantClear]
call edi
lea esi, [esp + 0x38]
mov ebx, dword [ebp + 0xc]
push esi
call edi
mov eax, dword [esp + 8]
test eax, eax
je 0x477e90
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x477e90
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4780fe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [0x505d08]
cmp dword [ebx + 8], eax
jae 0x47841c
push 0
push 1
push str.dxva2.dll
push 0
call dbg.ffLibraryLoad
add esp, 0x10
test eax, eax
je 0x47841c
push str.GetPhysicalMonitorsFromHMONITOR
mov dword [esp + 0x18], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x478412
mov esi, eax
push str.GetMonitorBrightness
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x24], eax
test eax, eax
je 0x478412
cmp dword [0x505d08], 0
jle 0x478412
mov ebx, dword [0x505d00]
lea edi, [esp + 0x38]
mov dword [esp + 0x20], esi
jmp 0x478215
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add ecx, eax
mov esi, dword [esp + 0x10]
push esi
push edx
push ecx
call sym._memcpy
add esp, 0xc
mov edx, dword [esp + 4]
add esi, dword [edx + edi + 4]
mov dword [edx + edi + 4], esi
mov eax, dword [edx + edi + 8]
mov byte [eax + esi], 0
movss xmm0, dword [esp + 8]
movsd xmm1, qword [0x4f81a0]
orpd xmm0, xmm1
subsd xmm0, xmm1
movsd qword [edx + edi + 0x18], xmm0
movss xmm0, dword [esp + 0x28]
orpd xmm0, xmm1
subsd xmm0, xmm1
movsd qword [edx + edi + 0x10], xmm0
movss xmm0, dword [esp + 0xc]
orpd xmm0, xmm1
subsd xmm0, xmm1
movsd qword [edx + edi + 0x20], xmm0
mov esi, dword [esp + 0x20]
lea edi, [esp + 0x38]
add ebx, 0x38
mov eax, ebx
sub eax, dword [0x505d00]
sar eax, 3
imul eax, eax, 0xb6db6db7
cmp eax, dword [0x505d08]
jge 0x478412
push edi
push 1
push dword [ebx + 0x30]
call esi
test eax, eax
je 0x4781f5
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x44]
call dword [esp + 0x34]
test eax, eax
je 0x4781f5
mov esi, dword [ebp + 0xc]
mov edx, dword [esi]
mov edi, dword [esi + 8]
cmp edi, dword [esi + 0xc]
jne 0x478286
lea eax, [edi + edi]
test edi, edi
mov ecx, 0x10
cmove eax, ecx
mov dword [esi + 0xc], eax
imul eax, dword [esi + 4]
push eax
push edx
call sym._realloc
add esp, 8
mov edx, eax
mov dword [esi], eax
mov edi, dword [esi + 8]
lea eax, [edi + 1]
mov dword [esi + 8], eax
imul edi, dword [esi + 4]
mov esi, dword [ebx + 0x1c]
test esi, esi
mov dword [esp + 4], edx
je 0x4782b7
mov eax, dword [ebx + 0x18]
mov dword [edx + edi], eax
test eax, eax
je 0x478314
push eax
call sym._malloc
mov edx, dword [esp + 8]
add esp, 4
mov byte [eax], 0
jmp 0x478319
lea esi, [esp + 0x3c]
push esi
call sym._wcslen
add esp, 4
test eax, eax
je 0x478387
sub esp, 0x20
xorpd xmm0, xmm0
movupd xmmword [esp + 0x10], xmm0
mov ecx, esi
mov esi, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, eax
inc eax
mov ecx, dword [esp + 4]
mov dword [ecx + edi], eax
jne 0x4783a8
mov eax, dword [0x5052b0]
jmp 0x4783c0
mov eax, dword [0x5052b0]
mov dword [edx + edi + 8], eax
mov dword [edx + edi + 4], 0
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x4781a9
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov eax, dword [edx + edi]
mov edx, eax
sub edx, 1
mov dword [esp + 0x10], esi
jb 0x478350
xor ecx, ecx
cmp edx, esi
jae 0x47817c
cmp eax, 2
mov ecx, eax
mov edx, 0x20
cmovb ecx, edx
lea edx, [esi + 1]
mov esi, ecx
add ecx, ecx
cmp edx, esi
ja 0x478360
test eax, eax
je 0x4783f0
push esi
push dword [esp + 0x1c]
call sym._realloc
add esp, 8
mov edx, dword [esp + 4]
mov ecx, dword [edx + edi + 4]
jmp 0x478402
mov edx, dword [esp + 4]
mov dword [edx + edi], 0
mov dword [edx + edi + 4], 0
mov eax, dword [0x5052b0]
mov dword [edx + edi + 8], eax
jmp 0x4781a9
push eax
mov dword [esp + 0x14], edx
call sym._malloc
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 8]
add esp, 4
mov byte [eax], 0
mov dword [ecx + edi + 8], eax
mov dword [ecx + edi + 4], 0
push 0
push 0
push edx
push eax
push esi
lea eax, [esp + 0x50]
push eax
push 0
push 0xfde9
mov esi, edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [esp + 4]
jmp 0x47819d
push esi
call sym._malloc
add esp, 4
mov byte [eax], 0
xor ecx, ecx
mov edx, dword [esp + 4]
mov dword [edx + edi + 8], eax
mov dword [edx + edi], esi
mov edx, dword [esp + 0x1c]
jmp 0x478184
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret