Function at 0x1042741
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.01066666
push esi
push esi
push esi
push 6
call fcn.01058973
test eax, eax
jne 0x1042d3a
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 0x1042d39
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 0x10427d3
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 0x1042ca9
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x408], esi
mov dword [ebp - 0x41c], esi
cmp dword [ebp - 0x41c], esi
je 0x104281b
cmp dword [ebp - 0x41c], 0xea
jne 0x1042c9d
push 0x14
mov dword [ebp - 0x408], 0x100
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
cmp eax, esi
je 0x1042841
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 0x1042843
xor eax, eax
mov ecx, dword [0x10742c4]
mov dword [ecx*4 + 0x1074110], eax
cmp eax, esi
je 0x1042c9d
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 0x1042897
cmp eax, 0xea
jne 0x1042c71
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 0x1042c71
lea eax, [ebp - 0x204]
mov dword [ebp - 0x410], 1
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x10428d4
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 0x104296e
mov ecx, 0x1004bd0
cmp dword [ebp - 0x40c], esi
je 0x104292c
mov ecx, 0x1004bc4
lea edx, [ebp - 0x204]
push edx
push ecx
push 0x100286c
push edi
push dword [eax]
call fcn.0103592d
add esp, 0x14
test eax, eax
jge 0x104296e
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
cmp dword [eax], esi
je 0x104296e
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 0x10429c3
cmp dword [ebp - 0x410], 1
jne 0x10429c3
push 0x100
lea eax, [ebp - 0x404]
push eax
call fcn.010417d3
test eax, eax
je 0x1042a01
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 0x1042a8f
cmp dword [ebp - 0x410], 1
jne 0x1042a8f
lea eax, [ebp - 0x404]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x1042a0a
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 0x1042a8f
lea ecx, [ebp - 0x404]
push ecx
push edi
push eax
call fcn.01035831
test eax, eax
jge 0x1042a8f
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 4]
cmp eax, esi
je 0x1042a8f
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 0x1042ae4
cmp dword [ebp - 0x410], 1
jne 0x1042ae4
push 0x100
lea eax, [ebp - 0x204]
push eax
call fcn.010417d3
test eax, eax
je 0x1042b26
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 0x1042bb4
cmp dword [ebp - 0x410], 1
jne 0x1042bb4
lea eax, [ebp - 0x204]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, si
jne 0x1042b2f
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 0x1042bb4
lea ecx, [ebp - 0x204]
push ecx
push edi
push eax
call fcn.01035831
test eax, eax
jge 0x1042bb4
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
mov eax, dword [eax + 8]
cmp eax, esi
je 0x1042bb4
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 0x1042bf5
cmp dword [eax + 4], esi
je 0x1042bf5
mov dword [eax + 0x10], 1
mov eax, dword [0x10742c4]
mov eax, dword [eax*4 + 0x1074110]
push dword [eax]
call fcn.0105c950
mov ecx, dword [0x10742c4]
mov ecx, dword [ecx*4 + 0x1074110]
mov dword [ecx + 0xc], eax
jmp 0x1042bf8
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 0x1042c55
cmp dword [ebp - 0x410], 1
jne 0x1042c55
lea eax, [ebp - 0x204]
push eax
call fcn.010561eb
test eax, eax
jne 0x1042c55
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 0x1042803
mov eax, dword [0x10742c4]
mov ecx, dword [eax*4 + 0x1074110]
cmp ecx, esi
je 0x1042803
push 1
call fcn.01041881
mov eax, dword [0x10742c4]
mov dword [eax*4 + 0x1074110], esi
jmp 0x1042803
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x40c]
cmp dword [ebp - 0x40c], ebx
jb 0x10427c1
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1074110], esi
je 0x1042d38
xor ebx, ebx
mov dword [ebp - 0x40c], esi
mov edi, ebx
cmp ebx, dword [0x10742c4]
jae 0x1042d28
mov eax, dword [edi*4 + 0x1074110]
cmp eax, esi
je 0x1042d28
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 0x1042d11
inc edi
cmp edi, dword [0x10742c4]
jb 0x1042ce1
jmp 0x1042d28
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 0x1042cd7
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01047480
leave
ret