Function at 0x40b330
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x520
mov eax, dword [esp + 0x524]
push ebx
push ebp
push esi
push edi
push 9
push str.softwaremicrosoftwindows_ntcurrentversionperflib
lea ecx, [esp + 0x138]
xor ebx, ebx
push str._s_03x
push ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], ebx
mov dword [eax], ebx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x1c]
lea eax, [esp + 0x130]
push edx
push 0x20019
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40b6e2
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push ebx
push edx
push ebx
push str.counters
push eax
call esi
cmp eax, ebx
jne 0x40b6e2
mov ecx, dword [esp + 0x10]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x40b6e2
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebp, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push edx
mov edx, dword [esp + 0x24]
push ecx
push ebx
push str.counters
push edx
call esi
cmp eax, ebx
jne 0x40b6e2
mov esi, dword [esp + 0x14]
cmp byte [esi], 0
je 0x40b4c3
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ebx, dword [sym.imp.MSVCRT.dll_isdigit]
push str.process
push esi
call ebp
test eax, eax
jne 0x40b468
movsx eax, byte [esi - 2]
lea edi, [esi - 2]
push eax
call ebx
add esp, 4
test eax, eax
je 0x40b456
movsx ecx, byte [edi - 1]
dec edi
push ecx
call ebx
add esp, 4
test eax, eax
jne 0x40b447
inc edi
lea edx, [esp + 0x130]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40b4a3
push str.id_process
push esi
call ebp
test eax, eax
jne 0x40b4a3
movsx eax, byte [esi - 2]
lea edi, [esi - 2]
push eax
call ebx
add esp, 4
test eax, eax
je 0x40b494
movsx ecx, byte [edi - 1]
dec edi
push ecx
call ebx
add esp, 4
test eax, eax
jne 0x40b485
inc edi
push edi
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [esp + 0x28], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
jne 0x40b42a
mov esi, dword [esp + 0x14]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x10], 0xc800
push 0xc800
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x40b6e2
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov edx, ecx
xor eax, eax
mov edi, ebp
mov ebx, 0x46
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ebp
push ecx
lea edx, [esp + 0x13c]
push 0
push edx
push reloc.OLEAUT32.dll_SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push reloc.OLEAUT32.dll_SysReAllocStringLen
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
cmp eax, esi
jae 0x40b547
xor edi, edi
test edi, edi
jne 0x40b56a
test eax, eax
jbe 0x40b56a
cmp word [ebp], 0x50
jne 0x40b56a
cmp word [ebp + 2], 0x45
jne 0x40b56a
cmp word [ebp + 4], 0x52
jne 0x40b56a
cmp word [ebp + 6], bx
je 0x40b5bc
cmp edi, 0xea
jne 0x40b6e2
add eax, 0x6400
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x14]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x18], edi
add esp, 4
mov ebp, dword [esp + 0x14]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40b50c
mov ebx, dword [ebp + 0x18]
xor ecx, ecx
add ebx, ebp
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0x20]
add eax, ebx
test edx, edx
jbe 0x40b5eb
mov esi, dword [esp + 0x28]
mov edi, dword [eax + 4]
cmp edi, esi
je 0x40b5e4
add eax, 0x28
inc ecx
cmp ecx, edx
jb 0x40b5cf
jmp 0x40b5eb
mov eax, dword [eax + 0x24]
mov dword [esp + 0x24], eax
mov ecx, dword [ebx + 0x28]
mov eax, ecx
shl eax, 5
add eax, ecx
shl eax, 3
mov ecx, eax
mov dword [esp + 0x10], eax
shl ecx, 5
add ecx, eax
shl ecx, 3
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x40b6e2
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor ebp, ebp
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x534]
mov eax, dword [ebx + 0x28]
mov dword [ecx], eax
mov esi, dword [ebx + 4]
mov eax, dword [ebx + 0x28]
add esi, ebx
test eax, eax
jbe 0x40b6e2
mov edx, dword [esp + 0x18]
lea edi, [edx + 4]
mov ecx, dword [esi + 0x10]
push 0
push 0
lea eax, [esp + 0x34]
push 0x104
push eax
add ecx, esi
push 0xffffffffffffffff
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40b688
push str.unknown
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 4
cmp eax, 0x104
ja 0x40b6b5
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str..exe
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [esi]
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x24]
add edi, 0x108
mov edx, dword [ecx + eax]
mov ecx, eax
mov dword [edi - 0x10c], edx
mov edx, dword [eax]
mov eax, dword [ebx + 0x28]
add ecx, edx
inc ebp
mov esi, ecx
cmp ebp, eax
jb 0x40b658
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40b6f3
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x520
ret