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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x340
mov eax, dword [0x1099a38]
push ebx
push esi
push edi
push 0xd
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
pop ecx
mov dword [ebp - 0x330], eax
mov eax, dword [ebp + 0x10]
mov esi, 0x100abec
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x338], eax
lea eax, [ebp - 0x314]
push eax
push 0x20019
xor ebx, ebx
push ebx
lea eax, [ebp - 0x108]
push eax
push SysStringLen
mov dword [ebp - 0x320], 0x100
mov dword [ebp - 0x318], ebx
movsb byte es:[edi], byte [esi]
mov byte [0x1106960], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x105140d
lea eax, [ebp - 0x340]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
jmp 0x10513e5
lea eax, [ebp - 0x20c]
mov esi, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x105122f
lea edi, [ebp - 0x108]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x105123f
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x31c]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x108]
push eax
and ecx, 3
push SysStringLen
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10513a6
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x328]
push eax
push ebx
push 0x100ab78
push dword [ebp - 0x31c]
mov dword [ebp - 0x324], 4
call esi
test eax, eax
jne 0x105139a
cmp dword [ebp - 0x32c], 1
jne 0x105139a
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x328]
push eax
push ebx
push 0x100a3b8
push dword [ebp - 0x31c]
call esi
cmp eax, ebx
jne 0x105138d
mov ecx, dword [ebp - 0x334]
cmp ecx, dword [ebp + 0x14]
ja 0x105138d
xor eax, eax
mov cl, byte [ebp + eax - 0x20c]
mov byte [ebp + eax - 0x310], cl
inc eax
cmp cl, bl
jne 0x1051300
lea edi, [ebp - 0x310]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x105131a
mov esi, 0x100a6b8
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, 0x104
push edi
mov esi, 0x109a820
push esi
push 0x100a5dc
push 0x10c64c0
call fcn.01070fc9
push edi
push esi
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.01070fc9
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x105139a
cmp dword [ebp + 0x18], ebx
je 0x105137f
push ebx
push dword [ebp - 0x338]
push dword [ebp - 0x330]
push dword [ebp + 8]
push 1
push ebx
push esi
call fcn.0104beb6
jmp 0x105139a
lea eax, [ebp - 0x310]
push eax
call fcn.0107c693
jmp 0x105139a
push eax
push 0x1019008
call fcn.01071ac0
pop ecx
pop ecx
push dword [ebp - 0x31c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x318]
push 0xd
pop ecx
mov esi, 0x100abec
lea edi, [ebp - 0x108]
lea eax, [ebp - 0x340]
push eax
push ebx
rep movsd dword es:[edi], dword [esi]
push ebx
push ebx
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x318]
movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x320], 0x100
push dword [ebp - 0x314]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x1051227
cmp dword [ebp - 0x314], ebx
je 0x105140d
push dword [ebp - 0x314]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
call fcn.0106bc50
leave
ret 0x14