Function at 0x510250
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ac58e
mov eax, dword fs:[0]
push eax
sub esp, 0xed4
mov eax, dword [0x608554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push ecx
push str.CBaseOSSpecTypeWin2K::GetPrinterNameToNetwork
lea ecx, [ebp - 0xe80]
mov dword [ebp - 0xe90], esi
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x510320
test byte [ecx + 0x1c], 1
je 0x5102e5
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5dd3a8
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xac
call fcn.00401840
mov ecx, dword [0x608f30]
add esp, 0xc
cmp ecx, 0x608f30
je 0x510320
test byte [ecx + 0x1c], 1
je 0x510320
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xad
call fcn.00405920
add esp, 0x10
push 0x410
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.00571c00
push 0x618
lea eax, [ebp - 0xe48]
push 0
push eax
call fcn.00571c00
push 0x410
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00571c00
add esp, 0x24
lea ecx, [ebp - 0xe84]
push esi
call fcn.00403320
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xe84]
cmp dword [eax - 0xc], 2
jg 0x51037d
or ecx, 0xffffffff
jmp 0x5103a0
add eax, 4
push 0x5c
push eax
call fcn.00570b1c
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0xe84]
test ecx, ecx
jne 0x51039c
or ecx, 0xffffffff
jmp 0x5103a0
sub ecx, eax
sar ecx, 1
xor esi, esi
test ecx, ecx
cmovns esi, ecx
cmp esi, dword [eax - 0xc]
jl 0x5103bf
lea ecx, [eax - 0x10]
call fcn.00403af0
add eax, 0x10
mov dword [ebp - 0xe8c], eax
jmp 0x5103f4
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x5103cf
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x5103db
call fcn.00550b4e
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push esi
push dword [ebp - 0xe84]
lea ecx, [ebp - 0xe8c]
call fcn.00403d50
mov eax, dword [ebp - 0xe8c]
mov byte [ebp - 4], 2
lea esi, [eax - 0x10]
mov edi, dword [ebp - 0xe84]
add edi, 0xfffffff0
cmp esi, edi
je 0x510458
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x510449
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x510449
mov ecx, esi
call fcn.00403af0
mov dword [ebp - 0xe88], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x51043e
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xe88]
add eax, 0x10
mov dword [ebp - 0xe84], eax
jmp 0x510458
push dword [eax - 0xc]
lea ecx, [ebp - 0xe84]
push eax
call fcn.00403bb0
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x510471
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xe84]
lea ecx, [ebp - 0xe84]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffe
push eax
push 2
lea eax, [ebp - 0xe88]
push eax
call fcn.0041d2b0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xe88]
mov edi, dword [ebp - 0xe84]
add edi, 0xfffffff0
lea esi, [eax - 0x10]
cmp esi, edi
je 0x5104fc
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x5104ed
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x5104ed
mov ecx, esi
call fcn.00403af0
mov dword [ebp - 0xe8c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x5104e2
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xe8c]
add eax, 0x10
mov dword [ebp - 0xe84], eax
jmp 0x5104fc
push dword [eax - 0xc]
lea ecx, [ebp - 0xe84]
push eax
call fcn.00403bb0
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x510515
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0xe84]
lea eax, [ebp - 0xe48]
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionPrintProvidersLanMan_Print_ServicesServers
push str._s_sPrinters
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [ebp - 0xe90]
add esp, 0x10
test ebx, ebx
jne 0x510543
xor ecx, ecx
jmp 0x51055f
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x510550
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0xe84]
call fcn.00403bb0
push 0x5c
push dword [ebp - 0xe84]
call fcn.00571054
mov ecx, dword [ebp - 0xe84]
add esp, 8
test eax, eax
jne 0x51058b
or eax, 0xffffffff
jmp 0x51058f
sub eax, ecx
sar eax, 1
lea edx, [eax + 1]
mov eax, dword [ecx - 0xc]
sub eax, edx
lea ecx, [ebp - 0xe84]
push eax
push edx
lea eax, [ebp - 0xe88]
push eax
call fcn.0041d2b0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0xe88]
mov edi, dword [ebp - 0xe84]
add edi, 0xfffffff0
lea esi, [eax - 0x10]
cmp esi, edi
je 0x51061b
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x510606
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x510606
mov ecx, esi
call fcn.00403af0
mov dword [ebp - 0xe8c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x5105fb
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xe8c]
add eax, 0x10
mov dword [ebp - 0xe84], eax
jmp 0x510615
push dword [eax - 0xc]
lea ecx, [ebp - 0xe84]
push eax
call fcn.00403bb0
mov ebx, dword [ebp - 0xe90]
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x510634
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0xee0]
call fcn.004066e0
lea ecx, [ebp - 0xee0]
mov byte [ebp - 4], 5
call fcn.004068b0
lea eax, [ebp - 0xee0]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe48]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x510a2c
xor edi, edi
mov eax, dword [ebp - 0xee0]
xor esi, esi
mov dword [ebp - 0xe88], 0x410
test eax, eax
je 0x5106b3
push esi
push esi
push esi
push esi
lea ecx, [ebp - 0xe88]
push ecx
lea ecx, [ebp - 0x420]
push ecx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x5106b8
mov esi, 0x80010080
jmp 0x5106b8
mov esi, 0x80010001
test esi, esi
jne 0x510a7d
movaps xmm0, xmmword [0x5e74d0]
mov dword [ebp - method.CCommandLineInfo.virtual_0], vtable.CMap_class_ATL::CStringT_unsigned_short_int__class_StrTraitMFC_unsigned_short_int__class_ATL::ChTraitsCRT_unsigned_short_int_____unsigned_short_int_const___unsigned_char___unsigned_char__.0
mov dword [ebp - 0xeb0], esi
mov dword [ebp - 0xeac], 0x11
movups xmmword [ebp - 0xea8], xmm0
mov byte [ebp - 4], 6
mov dword [ebp - 0xe98], esi
mov dword [ebp - 0xe94], esi
call fcn.00407360
mov dword [ebp - 0xe98], eax
mov dword [ebp - 0xeb8], esi
mov byte [ebp - 4], 7
mov esi, dword [ebp - 0xee0]
test esi, esi
je 0x5107db
lea ecx, [ebp - 0xeb8]
call fcn.004068b0
lea eax, [ebp - 0xeb8]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x420]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x5107db
push eax
mov dword [ebp - 0xe8c], eax
lea ecx, [ebp - 0xeb8]
lea eax, [ebp - 0xe8c]
push eax
push str.Share_Name
call fcn.00406aa0
test eax, eax
jne 0x51082a
push dword [ebp - 0xe8c]
lea eax, [ebp - 0x830]
push 0x208
push eax
call fcn.005746e6
lea ecx, [ebp - 0x830]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x510793
sub ecx, edx
sar ecx, 1
je 0x51082a
lea eax, [ebp - 0x830]
push eax
push dword [ebp - 0xe84]
call fcn.00574f99
add esp, 8
test eax, eax
jne 0x51082a
lea ecx, [ebp - 0xeb8]
mov byte [ebp - 4], 5
call fcn.004067f0
test ebx, ebx
jne 0x510851
xor ecx, ecx
jmp 0x510865
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x51082a
test byte [eax + 0x1c], 2
je 0x51082a
cmp dword [0x608f68], 8
lea ecx, [ebp - 0xe80]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xae
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
push 0x410
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00571c00
add esp, 0xc
lea ecx, [ebp - 0xeb8]
call fcn.004067f0
inc edi
jmp 0x510678
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x510856
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0xe84]
call fcn.00403bb0
mov eax, dword [ebp - 0xe84]
cmp dword [eax - 0xc], 2
jg 0x510883
or ecx, 0xffffffff
jmp 0x5108a6
add eax, 4
push 0x5c
push eax
call fcn.00570b1c
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0xe84]
test ecx, ecx
jne 0x5108a2
or ecx, 0xffffffff
jmp 0x5108a6
sub ecx, eax
sar ecx, 1
xor esi, esi
add ecx, 1
cmovns esi, ecx
cmp esi, dword [eax - 0xc]
jl 0x5108c6
lea ecx, [eax - 0x10]
call fcn.00403af0
add eax, 0x10
mov dword [ebp - 0xe8c], eax
jmp 0x5108fb
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x5108d6
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x5108e2
call fcn.00550b4e
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push esi
push dword [ebp - 0xe84]
lea ecx, [ebp - 0xe8c]
call fcn.00403d50
mov eax, dword [ebp - 0xe8c]
mov byte [ebp - 4], 8
lea esi, [eax - 0x10]
mov edi, dword [ebp - 0xe84]
add edi, 0xfffffff0
cmp esi, edi
je 0x51095f
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x510950
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x510950
mov ecx, esi
call fcn.00403af0
mov dword [ebp - 0xe88], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x510945
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xe88]
add eax, 0x10
mov dword [ebp - 0xe84], eax
jmp 0x51095f
push dword [eax - 0xc]
lea ecx, [ebp - 0xe84]
push eax
call fcn.00403bb0
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x510978
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x420]
push eax
lea edx, [ebp - 0xe84]
lea ecx, [ebp - 0xe88]
call fcn.0042af40
add esp, 4
mov byte [ebp - 4], 9
mov edx, dword [eax]
mov esi, dword [ebp - 0xe84]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x5109ed
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x5109de
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x5109de
call fcn.00403af0
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x5109d3
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [ebx + 0x10]
mov dword [ebp - 0xe84], eax
jmp 0x5109ed
push dword [edx - 0xc]
lea ecx, [ebp - 0xe84]
push edx
call fcn.00403bb0
mov byte [ebp - 4], 5
or esi, 0xffffffff
mov edx, dword [ebp - 0xe88]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x510a11
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0xe84]
mov ebx, dword [ebp - 0xe90]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [0x608f30]
jmp 0x510a86
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x510a83
test byte [ecx + 0x1c], 2
je 0x510a83
cmp dword [0x608f68], 8
lea ecx, [ebp - 0xe80]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xaf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
mov ecx, dword [0x608f30]
or esi, 0xffffffff
mov byte [ebp - 0xe7c], 1
cmp ecx, 0x608f30
je 0x510ac8
test byte [ecx + 0x1c], 1
je 0x510ac8
cmp dword [0x608f68], 8
mov eax, 0x608f54
push ebx
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xb0
call fcn.00405920
add esp, 0x10
lea ecx, [ebp - 0xee0]
call fcn.004067f0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0xe84]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x510af2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0xe80]
call fcn.0040a570
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056d977
mov esp, ebp
pop ebp
ret 4