Function at 0x407a00
Capabilities:
Check os version
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x1e8
mov eax, dword [0x436ee0]
xor eax, esp
mov dword [esp + 0x1e4], eax
push esi
push 0x9c
lea eax, [esp + 0x10]
push 0
push eax
mov esi, ecx
call fcn.004193f0
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 0x9c
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0x208
call fcn.00419547
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
je 0x407c5f
push edi
push 0x208
push 0
push eax
call fcn.004193f0
add esp, 0xc
lea edi, [esi + 0xc]
push edi
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407c78
cmp dword [esp + 0x14], 6
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jb 0x407b80
lea edx, [esp + 0xc]
push edx
push eax
push eax
push eax
mov eax, dword [edi]
push str.LogPath
push eax
call ebx
test eax, eax
jne 0x407b24
cmp dword [esp + 0xc], 0x104
ja 0x407b76
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0xc]
push ecx
push edx
push eax
push eax
mov eax, dword [edi]
push str.LogPath
push eax
call ebx
test eax, eax
jne 0x407b76
mov eax, dword [esi + 0x20]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407ae1
mov ecx, dword [str._setupapi.dev.log]
mov dword [eax], ecx
mov edx, dword [0x42a9cc]
mov dword [eax + 4], edx
mov ecx, dword [0x42a9d0]
mov dword [eax + 8], ecx
mov edx, dword [0x42a9d4]
mov dword [eax + 0xc], edx
mov cx, word [0x42a9d8]
mov word [eax + 0x10], cx
mov dword [esp + 0x10], 0x5050
jmp 0x407bc8
mov edx, dword [esi + 0x20]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, dword [esi + 0x20]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407b37
mov ecx, dword [str.inf_setupapi.dev.log]
mov dword [eax], ecx
mov edx, dword [0x42a9b4]
mov dword [eax + 4], edx
mov ecx, dword [0x42a9b8]
mov dword [eax + 8], ecx
mov edx, dword [0x42a9bc]
mov dword [eax + 0xc], edx
mov ecx, dword [0x42a9c0]
mov dword [eax + 0x10], ecx
mov dx, word [0x42a9c4]
mov word [eax + 0x14], dx
mov dword [esp + 0x10], 0x5050
jmp 0x407bc8
mov eax, dword [esi + 0x20]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, dword [esi + 0x20]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407b93
mov ecx, dword [str._setupapi.log]
mov dword [eax], ecx
mov edx, dword [0x42a9a4]
mov dword [eax + 4], edx
mov ecx, dword [0x42a9a8]
mov dword [eax + 8], ecx
mov dx, word [0x42a9ac]
mov word [eax + 0xc], dx
mov dword [esp + 0x10], 0xffff
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0xb0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x407bfa
mov edx, dword [esp + 0xd0]
push eax
mov dword [esi + 0x18], edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esi + 8], 0xffffffff
mov edx, dword [edi]
lea eax, [esp + 0xc]
push eax
lea ecx, [esi + 0x1c]
push ecx
push 0
push 0
push str.LogLevel
push edx
mov dword [esp + 0x24], 4
call ebx
mov ebx, 1
test eax, eax
jne 0x407c42
mov ecx, dword [edi]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push str.LogLevel
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x407c42
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov eax, ebx
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x1e4]
xor ecx, esp
call fcn.00418f7f
add esp, 0x1e8
ret
mov eax, dword [esi + 0x10]
pop esi
mov ecx, dword [esp + 0x1e4]
xor ecx, esp
call fcn.00418f7f
add esp, 0x1e8
ret
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x1ec]
pop edi
pop esi
xor ecx, esp
call fcn.00418f7f
add esp, 0x1e8
ret