Function at 0x104d8dd
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
xor ecx, ecx
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
inc eax
cmp ebx, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x314], ebx
mov dword [ebp - 0x31c], ecx
mov dword [ebp - 0x318], ecx
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], ecx
jne 0x104d92b
mov eax, 0x80004003
jmp 0x104dd9e
cmp edi, ecx
push esi
je 0x104d99e
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x104d935
sub eax, edx
sar eax, 1
lea esi, [eax + eax + 1]
push esi
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x104d95e
mov eax, 0x8007000e
jmp 0x104dd9d
push 0xffffffffffffffff
push esi
push edi
push ebx
mov dword [ebp - 0x31c], 0x80004005
call fcn.01048179
test eax, eax
je 0x104d98c
and dword [ebp - 0x31c], 0
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x314]
call fcn.010460e1
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov ebx, dword [ebp - 0x314]
pop ecx
jmp 0x104da64
mov esi, dword [ebp + 0x10]
cmp esi, 0xffffffff
jae 0x104da18
lea edx, [ebp - 0x318]
push edx
push eax
push ecx
push 0x1001b08
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x328], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104da18
lea eax, [ebp - 0x328]
push eax
push ebx
lea eax, [ebp - 0x324]
push eax
push 0
push 0x1007d34
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x104da03
inc eax
cmp dword [ebp - 0x324], eax
jne 0x104da03
mov dword [ebp - 0x320], eax
mov byte [ebx + esi - 1], 0
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x320], 0
jne 0x104da71
cmp esi, 0x7fffffff
ja 0x104da5a
push esi
push ebx
push 0x277e
push dword [0x1081390]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x104da71
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x104da46
push 0x57
pop eax
test eax, eax
jle 0x104da52
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x31c], eax
jmp 0x104da64
mov dword [ebp - 0x31c], 0x80070057
cmp dword [ebp - 0x31c], 0
jl 0x104dd82
mov esi, dword [sym.imp.msvcrt.dll_strstr]
mov edi, 0x1007d30
push edi
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x104dabb
push 0x1007d28
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x104dabb
push 0x1007d20
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x104dabb
push dword [ebp + 0x10]
push 0x2f
push ebx
call fcn.01056b1d
push 0x1007598
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push edi
push ebx
call esi
test eax, eax
pop ecx
pop ecx
jne 0x104dacf
push edi
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
mov eax, ebx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104dad4
mov esi, dword [ebp + 0x10]
sub eax, ecx
sub esi, eax
push esi
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
xor edi, edi
cmp eax, edi
pop ecx
mov dword [ebp - 0x314], eax
je 0x104dd97
mov dword [ebp - 0x328], edi
call fcn.01059a2a
test eax, eax
je 0x104db1e
push 0x1007d14
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
add esi, 0xfffffff6
jmp 0x104dc65
lea eax, [ebp - 0x318]
push eax
push 0x20019
push edi
push 0x1001b08
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x330], edi
mov dword [ebp - 0x334], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104dc0e
push 4
pop edi
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x320]
push eax
push 0
push 0x1007cec
push dword [ebp - 0x318]
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x32c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x104db9c
cmp dword [ebp - 0x320], edi
jne 0x104db9c
mov dword [ebp - 0x330], 1
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x330], 0
je 0x104dc0e
push 0x104
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x334]
call fcn.0105b5e6
lea eax, [ebp - 0x108]
push eax
push 0x1007ce0
lea eax, [ebp - 0x210]
push 0x105
push eax
call fcn.01046149
add esp, 0x10
test eax, eax
jl 0x104dc65
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
lea eax, [ebp - 0x210]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104dc05
jmp 0x104dc60
cmp esi, 0xffffffff
jae 0x104dd33
push esi
push dword [ebp - 0x314]
push 0x277f
push dword [0x1081390]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
je 0x104dc65
push dword [ebp - 0x314]
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push 0x1007cdc
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
mov eax, dword [ebp - 0x314]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104dc59
sub eax, ecx
sub esi, eax
dec esi
cmp esi, 0xffffffff
jae 0x104dd33
xor edi, edi
push edi
push 0xb
push 0x10075c0
lea eax, [ebp - 0x310]
push 0x208
push eax
call fcn.01034db1
add esp, 0x14
test eax, eax
jl 0x104dd33
mov dword [ebp - 0x32c], esi
lea eax, [ebp - 0x318]
push eax
xor esi, esi
inc esi
push esi
push edi
lea eax, [ebp - 0x310]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104dd33
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x314]
lea eax, [ebp - 0x324]
push eax
push edi
push 0x1007cd0
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x104dd1f
cmp dword [ebp - 0x324], esi
jne 0x104dd1f
push 0x1007cc4
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push dword [ebp - 0x314]
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push 0x1007cdc
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
mov dword [ebp - 0x328], esi
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x328], edi
jne 0x104dd74
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0105c57b
test eax, eax
je 0x104dd74
push 0x1007cc4
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push 0x1007cdc
push dword [ebp + 0x10]
push ebx
call fcn.01048bad
push dword [ebp - 0x314]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x104dd97
push dword [ebp - 0x31c]
push 0x1007c80
push 2
call fcn.0105e5ad
add esp, 0xc
mov eax, dword [ebp - 0x31c]
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 0xc