Function at 0x1042727
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
push esi
mov dword [ebp - 0x420], esi
call fcn.01066648
push esi
push esi
push esi
push 6
call fcn.01058952
test eax, eax
jne 0x1042d20
push edi
push 0x100
push esi
push 0x1074110
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
mov edi, 0x20019
push edi
push esi
push 0x1004be0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042d1f
push ebx
push 2
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x40c], esi
pop ebx
mov eax, 0x1004bd0
cmp dword [ebp - 0x40c], esi
je 0x10427b9
mov eax, 0x1004bc4
lea ecx, [ebp - 0x418]
push ecx
push edi
push esi
push eax
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042c8f
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x408], esi
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x41c], esi
je 0x1042801
cmp dword [ebp - 0x41c], 0xea
jne 0x1042c83
push 0x14
mov dword [ebp - 0x408], 0x100
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
cmp eax, esi
je 0x1042827
mov dword [eax], esi
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], esi
jmp 0x1042829
xor eax, eax
mov ecx, dword [0x10742c4]
mov dword [ecx*4 + 0x1074110], eax
cmp eax, esi
je 0x1042c83
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x424]
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x424]
mov dword [ebp - 0x41c], eax
cmp eax, esi
je 0x104287d
cmp eax, 0xea
jne 0x1042c57
lea eax, [ebp - 0x414]
push eax
push edi
push esi
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x418]
mov dword [ebp - 0x414], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042c57
lea eax, [ebp - 0x204]
mov dword [ebp - 0x410], 1
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x10428ba
sub eax, edx
sar eax, 1
lea edi, [eax + 8]
xor ecx, ecx
mov eax, edi
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov ecx, dword [0x10742c4]
mov ecx, dword [ecx*4 + 0x1074110]
mov dword [ecx], eax
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
cmp dword [eax], esi
je 0x1042954
mov ecx, 0x1004bd0
cmp dword [ebp - 0x40c], esi
je 0x1042912
mov ecx, 0x1004bc4
lea edx, [ebp - 0x204]
push edx
push ecx
push 0x100286c
push edi
push dword [eax]
call fcn.0103590d
add esp, 0x14
test eax, eax
jge 0x1042954
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
cmp dword [eax], esi
je 0x1042954
push dword [eax]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
pop ecx
mov dword [eax], esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push 0x1004ba0
push dword [ebp - 0x414]
mov dword [ebp - 0x408], 0x200
call edi
test eax, eax
jne 0x10429a9
cmp dword [ebp - 0x410], 1
jne 0x10429a9
push 0x100
lea eax, [ebp - 0x404]
push eax
call fcn.010417b6
test eax, eax
je 0x10429e7
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push esi
push dword [ebp - 0x414]
mov dword [ebp - 0x408], 0x200
call edi
test eax, eax
jne 0x1042a75
cmp dword [ebp - 0x410], 1
jne 0x1042a75
lea eax, [ebp - 0x404]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x10429f0
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
mov eax, edi
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov ecx, dword [0x10742c4]
mov ecx, dword [ecx*4 + 0x1074110]
mov dword [ecx + 4], eax
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 4]
cmp eax, esi
je 0x1042a75
lea ecx, [ebp - 0x404]
push ecx
push edi
push eax
call fcn.01035811
test eax, eax
jge 0x1042a75
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 4]
cmp eax, esi
je 0x1042a75
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
pop ecx
mov dword [eax + 4], esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push 0x1004b70
push dword [ebp - 0x414]
mov dword [ebp - 0x408], 0x200
call edi
test eax, eax
jne 0x1042aca
cmp dword [ebp - 0x410], 1
jne 0x1042aca
push 0x100
lea eax, [ebp - 0x204]
push eax
call fcn.010417b6
test eax, eax
je 0x1042b0c
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push 0x1004b58
push dword [ebp - 0x414]
mov dword [ebp - 0x408], 0x200
call edi
test eax, eax
jne 0x1042b9a
cmp dword [ebp - 0x410], 1
jne 0x1042b9a
lea eax, [ebp - 0x204]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x1042b15
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
xor ecx, ecx
mov eax, edi
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov ecx, dword [0x10742c4]
mov ecx, dword [ecx*4 + 0x1074110]
mov dword [ecx + 8], eax
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 8]
cmp eax, esi
je 0x1042b9a
lea ecx, [ebp - 0x204]
push ecx
push edi
push eax
call fcn.01035811
test eax, eax
jge 0x1042b9a
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 8]
cmp eax, esi
je 0x1042b9a
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
pop ecx
mov dword [eax + 8], esi
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
cmp dword [eax], esi
je 0x1042bdb
cmp dword [eax + 4], esi
je 0x1042bdb
mov dword [eax + 0x10], 1
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
push dword [eax]
call fcn.0105c92f
mov ecx, dword [0x10742c4]
mov ecx, dword [ecx*4 + 0x1074110]
mov dword [ecx + 0xc], eax
jmp 0x1042bde
mov dword [eax + 0x10], esi
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push 0x1004b3c
push dword [ebp - 0x414]
mov dword [ebp - 0x408], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1042c3b
cmp dword [ebp - 0x410], 1
jne 0x1042c3b
lea eax, [ebp - 0x204]
push eax
call fcn.010561ca
test eax, eax
jne 0x1042c3b
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov dword [eax + 0x10], esi
push dword [ebp - 0x414]
inc dword [0x10742c4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x20019
jmp 0x10427e9
mov eax, dword [0x10742c4]
mov ecx, dword [eax*4 + 0x1074110]
cmp ecx, esi
je 0x10427e9
push 1
call fcn.01041864
mov eax, dword [0x10742c4]
mov dword [eax*4 + 0x1074110], esi
jmp 0x10427e9
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x40c]
cmp dword [ebp - 0x40c], ebx
jb 0x10427a7
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1074110], esi
je 0x1042d1e
xor ebx, ebx
mov dword [ebp - 0x40c], esi
mov edi, ebx
cmp ebx, dword [0x10742c4]
jae 0x1042d0e
mov eax, dword [edi*4 + 0x1074110]
cmp eax, esi
je 0x1042d0e
push dword [eax]
mov eax, dword [ebp - 0x40c]
push dword [eax + 0x100466c]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1042cf7
inc edi
cmp edi, dword [0x10742c4]
jb 0x1042cc7
jmp 0x1042d0e
lea eax, [ebx*4 + 0x1074110]
mov edx, dword [eax]
lea ecx, [edi*4 + 0x1074110]
mov edi, dword [ecx]
mov dword [eax], edi
mov dword [ecx], edx
inc ebx
add dword [ebp - 0x40c], 4
cmp dword [ebp - 0x40c], 0x34
jb 0x1042cbd
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01047464
leave
ret