Function at 0x10022690
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003ae1e
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x1004f450]
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 eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ebp + 0x14]
push str.GetPrinterData2kHelper_____Start
mov dword [ebp - 0x84], edx
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x88], ecx
call fcn.100269c0
xor ebx, ebx
add esp, 4
cmp edi, ebx
jne 0x10022706
push 0x57
push str.GetPrinterData2kHelper_____End__d_
call fcn.100269c0
add esp, 8
lea eax, [ebx + 0x57]
jmp 0x100229eb
mov esi, 7
xor edx, edx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], dx
mov dword [ebp - 4], ebx
xor eax, eax
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
xor ecx, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
mov dword [ebp - 0x68], ebx
mov byte [ebp - 4], 3
test byte [0x10052244], 1
jne 0x1002276c
or dword [0x10052244], 1
mov byte [ebp - 4], 4
call fcn.1001dc40
push 0x1003ba20
call fcn.1002a940
add esp, 4
mov byte [ebp - 4], 3
mov edx, dword [0x10052240]
mov eax, dword [edx*4 + 0x10042700]
push ebx
push edi
call eax
add esp, 8
cmp eax, 1
jne 0x100227ea
push ebx
push str.GetPrinterData2kHelper_____End__d_
call fcn.100269c0
mov edi, 8
add esp, 8
cmp dword [ebp - 0x18], edi
jb 0x100227a9
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.10029653
add esp, 4
xor edx, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], dx
cmp dword [ebp - 0x34], edi
jb 0x100227c6
mov eax, dword [ebp - 0x48]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], cx
cmp dword [ebp - 0x50], edi
jb 0x100227e3
mov edx, dword [ebp - 0x64]
push edx
call fcn.10029653
add esp, 4
xor eax, eax
jmp 0x100229eb
push 0x2f
mov eax, str.SYSTEMCurrentControlSetControlPrintPrinters
lea esi, [ebp - 0x64]
call fcn.10001a60
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10022800
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea esi, [ebp - 0x48]
call fcn.10001a60
mov edx, dword [ebp - 0x6c]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10022822
sub eax, esi
sar eax, 1
push eax
mov eax, edx
lea esi, [ebp - 0x2c]
call fcn.10001a60
mov eax, dword [ebp - 0x64]
mov esi, 8
cmp dword [ebp - 0x50], esi
jae 0x1002284c
lea eax, [ebp - 0x64]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [ebp - 0x74]
push ecx
push 0x20019
push ebx
push eax
push SysStringLen
call edi
test eax, eax
jne 0x1002294e
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], esi
jae 0x10022877
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x78]
push edx
push 0x20019
push ebx
push eax
mov eax, dword [ebp - 0x74]
push eax
call edi
test eax, eax
jne 0x1002294e
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x1002289b
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x78]
lea ecx, [ebp - 0x70]
push ecx
push 0x20019
push ebx
push eax
push edx
call edi
test eax, eax
jne 0x1002294e
mov edx, dword [ebp - 0x7c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x70]
push ebx
lea ecx, [ebp - 0x6c]
push ecx
push ebx
push edx
push eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
call edi
mov ecx, dword [ebp - 0x68]
inc ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
je 0x10022947
mov ecx, dword [ebp - 0x7c]
lea edx, [ebp - 0x68]
push edx
mov edx, dword [ebp - 0x70]
push esi
lea eax, [ebp - 0x6c]
push eax
push ebx
push ecx
push edx
call edi
mov edi, eax
cmp edi, ebx
jne 0x1002292e
mov eax, dword [ebp - 0x68]
cmp byte [esi + eax - 1], bl
je 0x10022914
inc eax
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x84]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x88]
mov dword [ecx], esi
mov dword [edx], eax
jmp 0x10022956
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10022956
mov edi, 8
jmp 0x10022956
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x70]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
je 0x10022969
push eax
call esi
mov dword [ebp - 0x70], ebx
mov eax, dword [ebp - 0x78]
cmp eax, ebx
je 0x10022976
push eax
call esi
mov dword [ebp - 0x78], ebx
mov eax, dword [ebp - 0x74]
cmp eax, ebx
je 0x10022983
push eax
call esi
mov dword [ebp - 0x74], ebx
push edi
push str.GetPrinterData2kHelper_____End__d_
call fcn.100269c0
mov esi, 8
add esp, 8
cmp dword [ebp - 0x18], esi
jb 0x100229a7
mov eax, dword [ebp - 0x2c]
push eax
call fcn.10029653
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x34], esi
jb 0x100229c8
mov edx, dword [ebp - 0x48]
push edx
call fcn.10029653
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
cmp dword [ebp - 0x50], esi
jb 0x100229e9
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.10029653
add esp, 4
mov eax, edi
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.10028eba
mov esp, ebp
pop ebp
ret