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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x1027018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x210]
push eax
xor esi, esi
push 0x2001f
push esi
push dword [0x102700c]
mov dword [ebp - 0x224], esi
push edi
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x21c], esi
call ebx
test eax, eax
je 0x101d84e
cmp dword [ebp + 0xc], esi
je 0x101d84e
lea eax, [ebp - 0x210]
push eax
push dword [0x102700c]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, esi
jne 0x101da2d
lea eax, [ebp - 0x21c]
push eax
push 0xf003f
push esi
push dword [0x1027008]
push edi
call ebx
test eax, eax
je 0x101d889
cmp dword [ebp + 0xc], esi
je 0x101d889
lea eax, [ebp - 0x21c]
push eax
push dword [0x1027008]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, esi
jne 0x101da2d
cmp dword [ebp - 0x210], esi
je 0x101d950
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push esi
mov ebx, 0x104
push eax
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x220], 1
mov dword [ebp - 0x218], ebx
call sub.msvcrt.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
add esp, 0xc
push esi
push esi
lea eax, [ebp - 0x220]
push eax
push esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
jmp 0x101d944
inc dword [ebp - 0x214]
lea eax, [ebp - 0x20c]
push eax
mov dword [ebp - 0x218], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x101d926
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x210]
mov dword [ebp - 0x214], esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push esi
push esi
lea eax, [ebp - 0x220]
push eax
push esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x214]
push dword [ebp - 0x210]
call edi
test eax, eax
je 0x101d8ef
mov dword [ebp - 0x214], esi
cmp dword [ebp + 0xc], esi
jbe 0x101da3f
mov edi, dword [ebp - 0x228]
mov eax, dword [ebp - 0x22c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub eax, edi
mov dword [ebp - 0x228], eax
mov eax, dword [edi]
cmp eax, esi
je 0x101da13
push 1
push 0x10013b0
push 1
push esi
push eax
push dword [ebp - 0x210]
call ebx
cmp eax, esi
jne 0x101da2d
cmp dword [ebp - 0x22c], esi
je 0x101da13
push 0x5c
push dword [edi]
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, esi
je 0x101d9ba
inc eax
inc eax
jmp 0x101d9bc
mov eax, dword [edi]
lea ecx, [ebp - 0x218]
push ecx
push eax
push dword [ebp - 0x21c]
mov dword [ebp - 0x218], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, esi
jne 0x101da2d
mov eax, dword [ebp - 0x228]
mov eax, dword [eax + edi]
push 4
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
push 4
push esi
push dword [0x1027004]
push dword [ebp - 0x218]
call ebx
cmp eax, esi
jne 0x101da2d
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x214]
mov eax, dword [ebp - 0x214]
add edi, 4
cmp eax, dword [ebp + 0xc]
jb 0x101d979
jmp 0x101da3f
jle 0x101da39
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x210], esi
je 0x101da53
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x21c], esi
pop edi
pop esi
pop ebx
je 0x101da6a
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x224]
xor ecx, ebp
call fcn.0102302f
leave
ret 0x10