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

Disassembly:
push ebp
lea ebp, [esp - 0x4090]
mov eax, 0x4090
call fcn.0041e8b0
push 0xffffffffffffffff
push 0x42c968
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x43a19c]
xor eax, ebp
mov dword [ebp + 0x408c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push str.registry_key_exists
mov esi, ebx
call fcn.00404d49
pop ecx
mov edi, str.registry_key_not_exists
test al, al
jne 0x404b66
push edi
call fcn.00404d49
pop ecx
test al, al
jne 0x404b66
mov edi, str.file_exists
push edi
call fcn.00404d49
pop ecx
test al, al
jne 0x40496d
push str.file_not_exists
call fcn.00404d49
pop ecx
test al, al
je 0x4049de
lea eax, [ebp + 0x70]
lea esi, [ebx + 0x1c]
push eax
call fcn.00412ecd
pop ecx
push 2
pop esi
mov dword [ebp - 4], esi
cmp dword [ebp + 0x88], 8
mov eax, dword [ebp + 0x74]
jae 0x40498f
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4049cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jne 0x4049cb
push edi
mov esi, ebx
call fcn.00404d49
pop ecx
test al, al
je 0x4049c7
xor bl, bl
push 0
push 1
lea esi, [ebp + 0x70]
call fcn.004012b7
mov al, bl
jmp 0x404c19
mov bl, 1
jmp 0x4049b4
or dword [ebp - 4], 0xffffffff
xor edi, edi
push edi
push 1
lea esi, [ebp + 0x70]
call fcn.004012b7
jmp 0x4049e0
xor edi, edi
push str.registry_value_equals
mov esi, ebx
call fcn.00404d49
pop ecx
test al, al
jne 0x404a04
push str.registry_value_not_equals
call fcn.00404d49
pop ecx
test al, al
je 0x404c19
sub esp, 0x1c
lea esi, [ebx + 0x1c]
mov ecx, esp
mov dword [ebp - 0x14], esp
push esi
call fcn.00401b7f
call fcn.0040477e
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x14], esp
push esi
mov dword [ebp - 0x10], eax
call fcn.00401b7f
lea eax, [ebp]
push eax
call fcn.00404849
lea eax, [ebp + 0x38]
push eax
lea esi, [ebp]
mov dword [ebp - 4], 3
call fcn.00412ecd
pop ecx
mov byte [ebp - 4], 4
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x18], 0x2000
jae 0x404a5f
lea eax, [ebp + 0x3c]
lea ecx, [ebp - 0x1c]
push ecx
push 1
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x404aa4
push str.registry_value_equals
mov esi, ebx
call fcn.00404d49
mov bl, al
neg bl
sbb bl, bl
inc bl
pop ecx
push edi
push 1
lea esi, [ebp + 0x38]
call fcn.004012b7
push edi
push 1
lea ecx, [ebp]
call fcn.00401d02
jmp 0x4049c0
lea eax, [ebp + 0x54]
lea esi, [ebx + 0x38]
push eax
call fcn.00412ecd
cmp dword [eax + 0x18], 8
pop ecx
jb 0x404abc
mov eax, dword [eax + 4]
jmp 0x404abf
add eax, 4
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp + 0x8c]
push ecx
push edi
push edi
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
push 1
lea esi, [ebp + 0x54]
mov dword [ebp - 0x10], eax
call fcn.004012b7
cmp dword [ebp - 0x10], edi
jne 0x404a74
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp + 0x1c]
call fcn.00401228
push str.registry_value_equals
mov esi, ebx
mov byte [ebp - 4], 5
call fcn.00404d49
pop ecx
lea esi, [ebx + 0x54]
test al, al
je 0x404b43
lea eax, [ebp + 0x54]
push eax
call fcn.00412ecd
pop ecx
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 6
call fcn.00404d6b
mov bl, al
lea esi, [ebp + 0x54]
push edi
push 1
call fcn.004012b7
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.004012b7
jmp 0x404a89
lea eax, [ebp - 0x3c]
push eax
call fcn.00412ecd
pop ecx
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 7
call fcn.00404d6b
mov bl, al
neg bl
sbb bl, bl
inc bl
lea esi, [ebp - 0x3c]
jmp 0x404b2b
sub esp, 0x1c
lea esi, [ebx + 0x1c]
mov ecx, esp
mov dword [ebp - 0x14], esp
push esi
call fcn.00401b7f
call fcn.0040477e
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push esi
mov dword [ebp - 0x10], eax
call fcn.00401b7f
lea eax, [ebp + 0x54]
push eax
call fcn.00404849
and dword [ebp - 4], 0
and dword [ebp - 0x14], 0
lea eax, [ebp + 0x70]
push eax
lea esi, [ebp + 0x54]
call fcn.00412ecd
pop ecx
mov byte [ebp - 4], 1
cmp dword [ebp + 0x88], 8
mov eax, dword [ebp + 0x74]
jae 0x404bbe
lea eax, [ebp + 0x74]
lea ecx, [ebp - 0x14]
push ecx
push 0x20019
push 0
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
mov esi, ebx
mov dword [ebp - 0x10], eax
call fcn.00404d49
pop ecx
xor edi, edi
push edi
lea esi, [ebp + 0x70]
push 1
test al, al
je 0x404c03
call fcn.004012b7
push edi
push 1
lea ecx, [ebp + 0x54]
call fcn.00401d02
cmp dword [ebp - 0x10], edi
setne al
jmp 0x404c19
call fcn.004012b7
push edi
push 1
lea ecx, [ebp + 0x54]
call fcn.00401d02
cmp dword [ebp - 0x10], edi
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x408c]
xor ecx, ebp
call fcn.0041758d
add ebp, 0x4090
leave
ret