Function at 0x4058fa
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30c
mov eax, dword [ebp + 8]
push ebx
mov dword [0x4129ec], eax
mov eax, dword [ebp + 0xc]
mov dword [0x4129f0], eax
mov eax, dword [ebp + 0x14]
mov dword [0x4129e4], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [0x411dcc], eax
mov eax, dword [ebp + 0x1c]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
cmp eax, ebx
mov dword [0x4129e8], edi
jne 0x405a71
cmp dword [0x410ba4], ebx
je 0x405956
xor eax, eax
cmp dword [edi + 0x798], ebx
sete al
mov dword [0x410ba4], eax
jmp 0x405960
mov dword [edi + 0x798], 1
push ebx
call fcn.00404de4
cmp eax, ebx
pop ecx
mov dword [0x411dec], eax
mov esi, 0x104
jne 0x4059b4
lea eax, [ebp - 0x104]
push esi
push eax
push 0x2b
push dword [0x4120b4]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x405997
push 0x2b
call fcn.0040755d
pop ecx
cmp dword [0x410ba4], ebx
je 0x4059b4
push 0x30
lea eax, [ebp - 0x104]
push 0x412a40
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [0x4129e8]
lea eax, [ebp - 0x104]
push eax
call fcn.004080d0
lea eax, [ebp - 0x104]
push ebx
push eax
push dword [0x4129e8]
call fcn.004077ae
mov eax, dword [0x4129e8]
add eax, 0x300
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004080d0
lea eax, [ebp - 0x104]
push ebx
push eax
mov eax, dword [0x4129e8]
add eax, 0x300
push eax
call fcn.004077ae
mov eax, dword [0x4129e8]
add eax, 0x200
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004080d0
lea eax, [ebp - 0x104]
push ebx
push eax
mov eax, dword [0x4129e8]
add eax, 0x200
push eax
call fcn.004077ae
mov eax, dword [0x4129e8]
add eax, 0x100
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004080d0
add esp, 0x44
lea eax, [ebp - 0x104]
push ebx
push eax
mov eax, dword [0x4129e8]
add eax, 0x100
push eax
call fcn.004077ae
mov eax, dword [ebp + 0x1c]
add esp, 0xc
jmp 0x405a76
mov esi, 0x104
cmp eax, ebx
mov dword [0x4129e0], eax
je 0x405b39
push ebx
mov dword [ebp + 0x1c], eax
call fcn.00404de4
mov dword [0x411dec], eax
mov eax, dword [0x4129e0]
add eax, 0xff
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004080d0
lea eax, [ebp - 0x104]
push ebx
push eax
mov eax, dword [0x4129e0]
add eax, 0xff
push eax
call fcn.004077ae
add esp, 0x18
lea eax, [ebp - 0x208]
push esi
push eax
push 0x17
push dword [0x4120b4]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x405ae5
push 0x17
call fcn.0040755d
pop ecx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x104]
push esi
push eax
push ebx
lea eax, [ebp - 0x208]
push ebx
push eax
push 0x2400
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea eax, [ebp - 0x104]
push eax
push 0x412a40
call dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
pop ecx
push ebx
push 0x40625a
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
push 0x69
push dword [0x4120b4]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
jmp 0x405db6
lea eax, [edi + 0x588]
mov byte [0x412ae0], bl
cmp byte [eax], bl
je 0x405cb3
lea ecx, [ebp + 0xc]
push ecx
push 0x20019
push ebx
push eax
push dword [edi + 0x584]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405cab
lea eax, [ebp + 0x14]
mov dword [ebp + 0x14], esi
push eax
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [edi + 0x650]
push ebx
push eax
push dword [ebp + 0xc]
mov dword [ebp + 8], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405ca2
cmp dword [ebp + 8], 1
jne 0x405ca2
mov cl, byte [ebp - 0x208]
cmp cl, bl
je 0x405ca2
mov edi, dword [sym.imp.USER32.dll_CharNextA]
lea eax, [ebp - 0x208]
cmp cl, 0x22
je 0x405bd0
push eax
call edi
mov cl, byte [eax]
cmp cl, bl
jne 0x405bc2
cmp byte [eax], bl
je 0x405bf2
push eax
call edi
mov dword [ebp + 0x1c], eax
mov cl, byte [eax]
cmp cl, bl
je 0x405bea
cmp cl, 0x22
je 0x405bea
push eax
call edi
jmp 0x405bda
cmp byte [eax], bl
je 0x405bf2
mov byte [eax], bl
jmp 0x405bfb
lea eax, [ebp - 0x208]
mov dword [ebp + 0x1c], eax
mov esi, dword [ebp + 0x1c]
cmp byte [esi], bl
je 0x405c28
push esi
call edi
mov esi, eax
cmp byte [esi], bl
jne 0x405c02
cmp esi, dword [ebp + 0x1c]
jbe 0x405c28
mov al, byte [esi]
cmp al, 0x2e
je 0x405c28
cmp al, 0x5c
je 0x405c28
push esi
push dword [ebp + 0x1c]
call dword [sym.imp.USER32.dll_CharPrevA]
mov esi, eax
jmp 0x405c0b
cmp byte [esi], 0x2e
jne 0x405c87
mov al, byte [esi + 1]
cmp al, 0x65
je 0x405c38
cmp al, 0x45
jne 0x405c87
mov al, byte [esi + 2]
cmp al, 0x78
je 0x405c43
cmp al, 0x58
jne 0x405c87
mov al, byte [esi + 3]
cmp al, 0x65
je 0x405c4e
cmp al, 0x45
jne 0x405c87
push dword [ebp + 0x1c]
mov byte [esi + 4], bl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x405c64
cmp ebx, 0xf
je 0x405c68
test al, 0x10
jne 0x405c87
cmp esi, dword [ebp + 0x1c]
jbe 0x405c80
cmp byte [esi], 0x5c
je 0x405c85
push esi
push dword [ebp + 0x1c]
call dword [sym.imp.USER32.dll_CharPrevA]
mov esi, eax
jmp 0x405c68
cmp byte [esi], 0x5c
jne 0x405c87
mov byte [esi], bl
lea eax, [ebp - 0x208]
push eax
push 0x412ae0
call fcn.004080d0
mov edi, dword [ebp + 0x10]
pop ecx
pop ecx
mov esi, 0x104
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x412ae0], bl
jne 0x405cf0
lea eax, [edi + 0x480]
push eax
push 0x412ae0
call fcn.004080d0
push ebx
lea eax, [ebp - 0x208]
push 0x412ae0
push eax
call fcn.004077ae
add esp, 0x14
test eax, eax
jne 0x405cf0
lea eax, [ebp - 0x208]
push eax
push 0x412ae0
call fcn.004080d0
pop ecx
pop ecx
lea eax, [ebp - 0x30c]
push esi
push eax
push 0x18
push dword [0x4120b4]
mov dword [ebp + 0x1c], edi
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x405d15
push 0x18
call fcn.0040755d
pop ecx
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x104]
push esi
push eax
push ebx
lea eax, [ebp - 0x30c]
push ebx
push eax
push 0x2400
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push edi
push str._s_Setup
push 0x412a40
call esi
add esp, 0xc
cmp dword [edi + 0x798], 2
jne 0x405d91
push 0x412ae0
call fcn.00405016
cmp byte [eax + 0x412adf], 0x5c
pop ecx
mov eax, 0x411df4
je 0x405d72
mov eax, 0x410b34
push eax
push 0x412ae0
push str._s_sinstall.log
push 0x4120c0
call esi
add esp, 0x10
mov dword [0x4121c4], 1
cmp dword [edi + 0x798], ebx
jne 0x405da4
push ebx
push 0x405dbb
jmp 0x405b1f
mov eax, dword [0x4129e4]
push ebx
mov dword [eax + 0x40], 0x80000000
call fcn.00406ecc
pop edi
pop esi
pop ebx
leave
ret