Function at 0x40c151
Capabilities:
Get common file path
Get file size
Query or enumerate registry value
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push ebx
push esi
push edi
call fcn.0041844d
test eax, eax
je 0x40c311
lea eax, [ebp - 0x14]
xor esi, esi
push eax
push 1
push esi
push 0x428b1c
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c3f9
mov ebx, 0x400
push 0x401
mov dword [ebp - 0x10], ebx
call sub.MFC42.DLL_operatornew
push dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
push esi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 0x10]
mov edi, 0x428b00
mov dword [ebp - 0x18], 7
push eax
lea eax, [ebp - 0x18]
push dword [ebp - 0xc]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
push dword [ebp - 0x14]
call esi
cmp eax, 0xea
mov dword [ebp - 4], eax
jne 0x40c22f
push dword [ebp - 0xc]
call sub.MFC42.DLL_operatordelete
cmp dword [ebp - 0x10], 0xf4240
pop ecx
jbe 0x40c1fb
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40c3f9
add dword [ebp - 0x10], ebx
push dword [ebp - 0x10]
call sub.MFC42.DLL_operatornew
push dword [ebp - 0x10]
mov ebx, eax
mov dword [ebp - 0xc], ebx
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push ebx
push eax
push 0
push edi
push dword [ebp - 0x14]
call esi
mov dword [ebp - 4], eax
jmp 0x40c232
mov ebx, dword [ebp - 0xc]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
jne 0x40c303
cmp byte [ebx], 0
mov esi, ebx
je 0x40c303
cmp byte [esi], 0
je 0x40c29c
push 4
push 0x428af8
push esi
call dword [sym.imp.MSVCRT.dll__mbsnbcmp]
add esp, 0xc
test eax, eax
jne 0x40c26d
add esi, 4
mov ebx, dword [ebp + 8]
and dword [ebp - 4], 0
mov edi, dword [ebx + 0xc]
test edi, edi
jle 0x40c29f
push dword [ebp - 4]
mov ecx, ebx
call fcn.004179e4
push esi
push eax
call fcn.00418a4b
pop ecx
test al, al
pop ecx
jne 0x40c30d
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jl 0x40c27b
jmp 0x40c29f
mov ebx, dword [ebp + 8]
push esi
call sub.MSVCRT.dll_strlen
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
pop ecx
je 0x40c2ed
push 4
push 0x428af8
push esi
call dword [sym.imp.MSVCRT.dll__mbsnbcmp]
add esp, 0xc
test eax, eax
jne 0x40c2c9
add esi, 4
mov edi, dword [ebx + 0xc]
xor ebx, ebx
test edi, edi
jle 0x40c2ed
mov ecx, dword [ebp + 8]
push ebx
call fcn.004179e4
push esi
push eax
call fcn.00418a4b
pop ecx
test al, al
pop ecx
jne 0x40c30d
inc ebx
cmp ebx, edi
jl 0x40c2d2
push esi
call sub.MSVCRT.dll_strlen
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
pop ecx
jne 0x40c255
xor bl, bl
push dword [ebp - 0xc]
jmp 0x40c531
mov bl, 1
jmp 0x40c305
lea eax, [ebp - 0x22c]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x124]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x124]
push 0x428ae8
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
xor edi, edi
lea eax, [ebp - 0x124]
push edi
push 0x80
push 4
push edi
push edi
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40c3f9
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0xc], edi
cmp esi, edi
je 0x40c3e9
lea edi, [esi + 1]
push edi
call sub.MFC42.DLL_operatornew
mov ebx, eax
pop ecx
test ebx, ebx
je 0x40c3e9
push edi
xor edi, edi
push edi
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], edi
push edi
push eax
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c3e2
mov eax, dword [ebp - 0x18]
cmp esi, eax
jne 0x40c3e2
add eax, 0x208
push eax
call sub.MFC42.DLL_operatornew
cmp eax, edi
pop ecx
mov dword [ebp - 0xc], eax
je 0x40c3e2
push ebx
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push ebx
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp - 0xc], esi
jne 0x40c400
xor al, al
jmp 0x40c539
push dword [ebp - 0xc]
call sub.MSVCRT.dll_strlen
mov edi, eax
lea eax, [edi + 0x208]
push eax
call sub.MFC42.DLL_operatornew
pop ecx
cmp eax, esi
pop ecx
mov dword [ebp - 0x14], eax
jne 0x40c426
xor bl, bl
jmp 0x40c52e
push dword [ebp - 0xc]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
cmp edi, esi
pop ecx
jle 0x40c44f
mov eax, dword [ebp - 0x14]
lea ebx, [esi + eax]
movsx ax, byte [esi + eax]
push eax
call dword [sym.imp.MSVCRT.dll_towupper]
inc esi
pop ecx
cmp esi, edi
mov byte [ebx], al
jl 0x40c435
push 0x428adc
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_strstr]
and byte [ebp - 5], 0
pop ecx
test eax, eax
pop ecx
je 0x40c51e
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
lea esi, [eax + ecx + 8]
mov al, byte [eax + ecx + 8]
test al, al
je 0x40c522
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
cmp al, 0x5b
je 0x40c522
push 0x3d
push esi
call edi
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
je 0x40c522
inc ebx
push 0xd
push ebx
call edi
pop ecx
test eax, eax
pop ecx
jne 0x40c4b7
push 0xa
push ebx
call edi
pop ecx
test eax, eax
pop ecx
je 0x40c4cd
mov esi, eax
mov cl, byte [esi]
cmp cl, 0xd
je 0x40c4c5
cmp cl, 0xa
jne 0x40c4c8
inc esi
jmp 0x40c4b9
and byte [eax], 0
jmp 0x40c4d8
push ebx
call sub.MSVCRT.dll_strlen
mov esi, eax
pop ecx
add esi, ebx
mov eax, dword [ebp + 8]
and dword [ebp - 4], 0
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [ebp - 0x1c], eax
jle 0x40c512
push dword [ebp - 4]
mov ecx, dword [ebp + 8]
call fcn.004179e4
push ebx
push eax
call fcn.00418a4b
pop ecx
test al, al
pop ecx
jne 0x40c50e
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
jl 0x40c4e9
jmp 0x40c512
mov byte [ebp - 5], 1
mov al, byte [esi]
test al, al
jne 0x40c487
jmp 0x40c522
and byte [ebp - 5], 0
push dword [ebp - 0x14]
call sub.MFC42.DLL_operatordelete
mov bl, byte [ebp - 5]
pop ecx
push dword [ebp - 0xc]
call sub.MFC42.DLL_operatordelete
pop ecx
mov al, bl
pop edi
pop esi
pop ebx
leave
ret