Function at 0x4030f0
Capabilities:
Get graphical window text
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x864
mov eax, dword [0x41b194]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], 5
cmp dword [0x41cec8], 0
je 0x40312e
lea eax, [ebp - 8]
push eax
call dword [0x41cec8]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40312e
mov eax, dword [ebp - 8]
jmp 0x4033e5
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4031b6
push str.GetForegroundWindow__NULL_r_n
call fcn.00401180
add esp, 4
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetTopWindow]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40316f
push str.GetTopWindow__NULL_r_n
call fcn.00401180
add esp, 4
jmp 0x4031b6
mov byte [ebp - 0x410], 0
push 0x3ff
push 0
lea ecx, [ebp - 0x40f]
push ecx
call fcn.0040b510
add esp, 0xc
push 0x400
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea ecx, [ebp - 0x410]
push ecx
push str.GetTopWindow___s_r_n
call fcn.00401180
add esp, 8
cmp dword [ebp - 4], 0
je 0x4033e2
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
jne 0x4031da
jmp 0x4033e2
cmp dword [ebp - 0x420], 0
jne 0x4033e2
cmp dword [ebp - 0x41c], 0
jne 0x4033e2
push 0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x430], eax
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x418]
sub ecx, dword [ebp - 0x420]
mov dword [ebp - 0x42c], ecx
mov edx, dword [ebp - 0x414]
sub edx, dword [ebp - 0x41c]
mov dword [ebp - 0x428], edx
mov eax, dword [ebp - 0x424]
push eax
mov ecx, dword [ebp - 0x430]
push ecx
mov edx, dword [ebp - 0x428]
push edx
mov eax, dword [ebp - 0x42c]
push eax
mov ecx, dword [ebp - 0x41c]
push ecx
mov edx, dword [ebp - 0x420]
push edx
push str._d___d__d_x__d___d_x__d__r_n
call fcn.00401180
add esp, 0x1c
mov eax, dword [ebp - 0x42c]
cmp eax, dword [ebp - 0x430]
jne 0x4033e2
mov ecx, dword [ebp - 0x428]
cmp ecx, dword [ebp - 0x424]
jne 0x4033e2
push 0xfffffffffffffff0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov dword [ebp - 0x438], eax
mov eax, dword [ebp - 0x438]
and eax, 0x800000
jne 0x4032b5
mov dword [ebp - 8], 2
lea ecx, [ebp - 0x434]
push ecx
push str.Control_PanelDesktop
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4033e2
mov dword [ebp - 0x648], 0x208
lea edx, [ebp - 0x648]
push edx
lea eax, [ebp - 0x640]
push eax
lea ecx, [ebp - 0x644]
push ecx
push 0
push str.SCRNSAVE.EXE
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4033d5
mov dword [ebp - 0x650], 0
lea eax, [ebp - 0x650]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [ebp - 0x64c], eax
cmp dword [ebp - 0x650], 0
je 0x4033d5
mov edx, dword [ebp - 0x650]
push edx
call fcn.00403080
add esp, 4
mov dword [ebp - 0x654], eax
cmp dword [ebp - 0x654], 0
jne 0x40335d
jmp 0x4033d5
lea eax, [ebp - 0x640]
mov dword [ebp - 0x864], eax
push 0x104
lea ecx, [ebp - 0x860]
push ecx
lea edx, [ebp - 0x640]
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x403392
lea eax, [ebp - 0x860]
mov dword [ebp - 0x864], eax
mov ecx, dword [ebp - 0x864]
push ecx
mov edx, dword [ebp - 0x654]
push edx
mov eax, dword [ebp - 0x650]
push eax
push str.__4d___ws_____ws_r_n
call fcn.00401180
add esp, 0x10
mov ecx, dword [ebp - 0x654]
push ecx
mov edx, dword [ebp - 0x864]
push edx
call fcn.00404b4c
add esp, 8
test eax, eax
jne 0x4033d5
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x434]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404566
mov esp, ebp
pop ebp
ret