Function at 0x402013
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5d8
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x393]
mov byte [ebp - 0x394], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x497]
mov byte [ebp - 0x498], bl
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push 0x408224
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x394]
push str._scomet.dll
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x394]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 8], 0xffffffff
jne 0x40209e
cmp eax, 5
je 0x40209e
cmp eax, 0x20
jne 0x4022a5
mov eax, dword [ebp + 8]
push 1
pop edx
lea edi, [ebp - 0x28f]
push 0x40
mov dword [eax], edx
pop ecx
xor eax, eax
mov byte [ebp - 0x290], bl
mov dword [ebp - 0xc], 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp + 8]
push eax
push edx
push ebx
push str.SoftwareComet
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4021ea
push 0x1f
lea edi, [ebp - 0x8b]
pop ecx
mov byte [ebp - 0x8c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x18b]
mov byte [ebp - 0x18c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 4]
mov edi, 0x80
push eax
lea eax, [ebp - 0x8c]
push eax
push ebx
push ebx
push str.OriginatorId
push dword [ebp + 8]
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402157
cmp dword [ebp - 4], 1
je 0x402157
mov eax, str.1x_distributor_id
lea ecx, [ebp - 0x8c]
push eax
push ecx
push eax
push str.__s__s___s_
push 0x408654
call esi
add esp, 0x14
jmp 0x40216d
mov eax, str.1x_distributor_id
push eax
push eax
push str.__s_0___s_
push 0x408654
call esi
add esp, 0x10
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0x8c]
push eax
push ebx
push ebx
push str.ControlId
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4021b6
cmp dword [ebp - 4], 1
je 0x4021b6
mov eax, str.1x_control_id
lea ecx, [ebp - 0x8c]
push eax
push ecx
push eax
lea eax, [ebp - 0x18c]
push str.__s__s___s_
push eax
call esi
add esp, 0x14
jmp 0x4021ce
mov eax, str.1x_control_id
push eax
push eax
lea eax, [ebp - 0x18c]
push str.__s_0___s_
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x18c]
push eax
push 0x408654
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp + 8]
push eax
push 1
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4022a5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x290]
push eax
push ebx
push ebx
push str.ProgramFilesDir
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40223b
lea eax, [ebp - 0x290]
push str.C:progra1
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x290]
push str.MyCometCursor.exe
push eax
lea eax, [ebp - 0x498]
push str._scomet_s
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x498]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
jne 0x402290
cmp eax, 5
je 0x402290
cmp eax, 0x20
jne 0x4022a5
mov eax, dword [ebp + 0xc]
cmp edi, 0xffffffff
mov dword [eax], 1
je 0x4022a5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x5d8]
push eax
push 0x40842c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40240d
mov ecx, dword [ebp + 0x10]
push 1
pop edi
push eax
mov dword [ecx], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp + 0xc]
push eax
push edi
push ebx
push str.SoftwareComet_SystemsCore
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40240d
push 0x1f
lea edi, [ebp - 0x8b]
pop ecx
mov byte [ebp - 0x8c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x18b]
mov byte [ebp - 0x18c], bl
mov dword [ebp + 8], 0x80
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x8c]
push eax
push ebx
push ebx
push str.Distributor
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402364
cmp dword [ebp + 8], 1
je 0x402364
mov eax, str.2x_distributor_id
lea ecx, [ebp - 0x8c]
push eax
push ecx
push eax
lea eax, [ebp - 0x18c]
push str.__s__s___s_
push eax
call esi
add esp, 0x14
jmp 0x40237c
mov eax, str.2x_distributor_id
push eax
push eax
lea eax, [ebp - 0x18c]
push str.__s_0___s_
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x18c]
mov edi, 0x408654
push eax
push edi
call sub.MSVCRT.dll_strcat
pop ecx
lea eax, [ebp + 8]
pop ecx
mov dword [ebp + 8], 0x80
push eax
lea eax, [ebp - 0x8c]
push eax
push ebx
push ebx
push str.Client
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4023dd
cmp dword [ebp + 8], 1
je 0x4023dd
mov eax, str.2x_client_id
lea ecx, [ebp - 0x8c]
push eax
push ecx
push eax
lea eax, [ebp - 0x18c]
push str.__s__s___s_
push eax
call esi
add esp, 0x14
jmp 0x4023f5
mov eax, str.2x_client_id
push eax
push eax
lea eax, [ebp - 0x18c]
push str.__s_0___s_
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x18c]
push eax
push edi
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0xffffffff
pop edi
pop esi
pop ebx
je 0x40241f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
leave
ret