Function at 0x104d3cc
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
xor ecx, ecx
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
inc eax
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
cmp ebx, ecx
jne 0x104d41a
mov eax, 0x80004003
jmp 0x104d88d
push esi
cmp edi, ecx
je 0x104d48d
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x104d424
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
pop ecx
test ebx, ebx
jne 0x104d44d
mov eax, 0x8007000e
jmp 0x104d88c
push 0xffffffffffffffff
push esi
push edi
push ebx
mov dword [ebp - 0x31c], 0x80004005
call fcn.01047cad
test eax, eax
je 0x104d47b
and dword [ebp - 0x31c], 0
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x314]
call fcn.01045c74
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov ebx, dword [ebp - 0x314]
pop ecx
jmp 0x104d553
mov esi, dword [ebp + 0x10]
cmp esi, 0xffffffff
jae 0x104d507
lea edx, [ebp - 0x318]
push edx
push eax
push ecx
push 0x1001c88
push 0x80000002
mov dword [ebp - 0x328], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104d507
lea eax, [ebp - 0x328]
push eax
push ebx
lea eax, [ebp - 0x324]
push eax
push 0
push 0x1007cb4
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x104d4f2
inc eax
cmp dword [ebp - 0x324], eax
jne 0x104d4f2
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 0x104d560
cmp esi, 0x7fffffff
ja 0x104d549
push esi
push ebx
push 0x277e
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
jne 0x104d560
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x104d535
push 0x57
pop eax
test eax, eax
jle 0x104d541
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x31c], eax
jmp 0x104d553
mov dword [ebp - 0x31c], 0x80070057
cmp dword [ebp - 0x31c], 0
jl 0x104d871
mov esi, dword [sym.imp.msvcrt.dll_strstr]
mov edi, 0x1007cb0
push edi
push ebx
call esi
pop ecx
pop ecx
test eax, eax
jne 0x104d5aa
push 0x1007ca8
push ebx
call esi
pop ecx
pop ecx
test eax, eax
jne 0x104d5aa
push 0x1007ca0
push ebx
call esi
pop ecx
pop ecx
test eax, eax
jne 0x104d5aa
push dword [ebp + 0x10]
push 0x2f
push ebx
call fcn.01055dc0
push 0x10074a8
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push edi
push ebx
call esi
pop ecx
pop ecx
test eax, eax
jne 0x104d5be
push edi
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
mov eax, ebx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104d5c3
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
pop ecx
mov dword [ebp - 0x314], eax
cmp eax, edi
je 0x104d886
mov dword [ebp - 0x328], edi
call fcn.0105665c
test eax, eax
je 0x104d60d
push 0x1007c94
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
add esi, 0xfffffff6
jmp 0x104d754
lea eax, [ebp - 0x318]
push eax
push 0x20019
push edi
push 0x1001c88
push 0x80000002
mov dword [ebp - 0x330], edi
mov dword [ebp - 0x334], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104d6fd
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 0x1007c6c
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 0x104d68b
cmp dword [ebp - 0x320], edi
jne 0x104d68b
mov dword [ebp - 0x330], 1
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x330], 0
je 0x104d6fd
push 0x104
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x334]
call fcn.0105a2da
lea eax, [ebp - 0x108]
push eax
push 0x1007c60
lea eax, [ebp - 0x210]
push 0x105
push eax
call fcn.01045cdc
add esp, 0x10
test eax, eax
jl 0x104d754
lea eax, [ebp - 0x210]
push eax
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
lea eax, [ebp - 0x210]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104d6f4
jmp 0x104d74f
cmp esi, 0xffffffff
jae 0x104d822
push esi
push dword [ebp - 0x314]
push 0x277f
push dword [0x1073960]
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
je 0x104d754
push dword [ebp - 0x314]
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push 0x1007c5c
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
mov eax, dword [ebp - 0x314]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x104d748
sub eax, ecx
sub esi, eax
dec esi
cmp esi, 0xffffffff
jae 0x104d822
xor edi, edi
push edi
push 0xc
push 0x10074d0
lea eax, [ebp - 0x310]
push 0x208
push eax
call fcn.01035968
add esp, 0x14
test eax, eax
jl 0x104d822
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 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x104d822
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x314]
lea eax, [ebp - 0x324]
push eax
push edi
push 0x1007c50
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x104d80e
cmp dword [ebp - 0x324], esi
jne 0x104d80e
push 0x1007c44
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push dword [ebp - 0x314]
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push 0x1007c5c
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
mov dword [ebp - 0x328], esi
push dword [ebp - 0x318]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x328], edi
jne 0x104d863
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.0105aa1b
test eax, eax
je 0x104d863
push 0x1007c44
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push 0x1007c5c
push dword [ebp + 0x10]
push ebx
call fcn.010486d3
push dword [ebp - 0x314]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x104d886
push dword [ebp - 0x31c]
push 0x1007c00
push 2
call fcn.01055c8a
add esp, 0xc
mov eax, dword [ebp - 0x31c]
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.01047480
leave
ret 0xc