Function at 0x402110
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x51c
push ebx
push ebp
push esi
push edi
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea eax, [esp + 0x134]
push str._s_03x
push eax
mov dword [esp + 0x2c], 0
call fcn.00402c9c
add esp, 0x10
lea ecx, [esp + 0x14]
lea edx, [esp + 0x12c]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402387
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push 0
push ecx
push 0
push str.Counters
push edx
call esi
test eax, eax
jne 0x402387
mov eax, dword [esp + 0x10]
push eax
call fcn.00402c28
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402387
mov ecx, dword [esp + 0x10]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ebx
push ecx
push 0
push str.Counters
push edx
call esi
test eax, eax
jne 0x40237a
mov al, byte [ebx]
mov ebp, ebx
test al, al
je 0x4022da
cmp ebp, ebx
jbe 0x402211
movsx eax, byte [ebp - 2]
lea edi, [ebp - 2]
push eax
call fcn.00402c00
add esp, 4
test eax, eax
je 0x402211
movsx ecx, byte [edi - 1]
dec edi
push ecx
call fcn.00402c00
add esp, 4
test eax, eax
jne 0x4021ff
push str.process
push ebp
call fcn.00406c00
add esp, 8
test eax, eax
jne 0x402278
movsx edx, byte [ebp - 2]
lea esi, [ebp - 2]
push edx
call fcn.00402c00
add esp, 4
test eax, eax
je 0x402249
movsx eax, byte [esi - 1]
dec esi
push eax
call fcn.00402c00
add esp, 4
test eax, eax
jne 0x402237
lea edi, [esi + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x12c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jmp 0x4022be
push str.id_process
push ebp
call fcn.00406c00
add esp, 8
test eax, eax
jne 0x4022be
movsx ecx, byte [ebp - 2]
lea edi, [ebp - 2]
push ecx
call fcn.00402c00
add esp, 4
test eax, eax
je 0x4022b0
movsx edx, byte [edi - 1]
dec edi
push edx
call fcn.00402c00
add esp, 4
test eax, eax
jne 0x40229e
inc edi
push edi
call fcn.00402b75
add esp, 4
mov dword [esp + 0x18], eax
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [ecx + ebp + 1]
lea ebp, [ecx + ebp + 1]
test al, al
jne 0x4021e7
push ebx
call fcn.00402b46
push 0xc800
mov dword [esp + 0x18], 0xc800
call fcn.00402c28
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x402387
mov ecx, dword [esp + 0x10]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x12c]
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push ebx
push ecx
push 0
push edx
push 0x80000004
call esi
test eax, eax
je 0x402357
cmp eax, 0xea
jne 0x40237a
mov eax, dword [esp + 0x10]
add eax, 0x6400
push eax
push ebx
mov dword [esp + 0x18], eax
call fcn.00402a26
add esp, 8
mov ebx, eax
jmp 0x4022ff
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x40237a
cmp word [ebx], 0x50
jne 0x40237a
cmp word [ebx + 2], 0x45
jne 0x40237a
cmp word [ebx + 4], 0x52
jne 0x40237a
cmp word [ebx + 6], 0x46
je 0x4023a8
test ebx, ebx
je 0x402387
push ebx
call fcn.00402b46
add esp, 4
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
push 0x80000004
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x51c
ret
mov ebp, dword [ebx + 0x18]
xor ecx, ecx
add ebp, ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x20]
add eax, ebp
test edx, edx
jbe 0x4023d7
mov esi, dword [esp + 0x18]
mov edi, dword [eax + 4]
cmp edi, esi
je 0x4023d0
add eax, 0x28
inc ecx
cmp ecx, edx
jb 0x4023bb
jmp 0x4023d7
mov ecx, dword [eax + 0x24]
mov dword [esp + 0x24], ecx
mov esi, dword [ebp + 4]
mov eax, dword [ebp + 0x28]
add esi, ebp
mov dword [esp + 0x18], 0
test eax, eax
jbe 0x402478
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esi + 0x10]
push 0
push 0
lea edx, [esp + 0x30]
push 0x104
push edx
add eax, esi
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
mov edi, dword [esi]
mov ecx, dword [esp + 0x24]
add edi, esi
mov esi, dword [edi + ecx]
test esi, esi
jne 0x402425
mov esi, 0xfffffffe
mov edx, dword [esp + 0x530]
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00406c00
add esp, 8
test eax, eax
je 0x402454
mov esi, dword [edi]
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
add esi, edi
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x4023f5
jmp 0x402478
mov eax, dword [esp + 0x534]
test eax, eax
jne 0x402469
mov dword [esp + 0x1c], 1
jmp 0x402478
push 1
push esi
call fcn.00402540
add esp, 8
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
push 0x80000004
call esi
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret