Function at 0x40af00
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x33c
mov ecx, dword [0x423840]
mov eax, dword [str.SoftwareLexmark_]
mov dword [esp + 0x14], ecx
mov cx, word [0x42384c]
mov dword [esp + 0x10], eax
mov eax, dword [0x423848]
mov edx, dword [0x423844]
mov word [esp + 0x20], cx
mov ecx, dword [0x43793c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
push ebx
lea eax, [ecx + ecx*4]
push ebp
shl eax, 6
sub eax, ecx
push esi
push edi
lea ecx, [esp + 0x20]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x437eec]
push eax
push ecx
call fcn.00417a50
add esp, 8
test eax, eax
jne 0x40afa7
mov ecx, dword [0x43793c]
lea eax, [ecx + ecx*4]
shl eax, 6
sub eax, ecx
or ecx, 0xffffffff
lea edx, [eax + eax*2]
xor eax, eax
lea edi, [edx*4 + 0x437eec]
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x423140
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x423810
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x4270e8]
mov eax, ecx
shl eax, 4
add eax, ecx
lea ecx, [eax + eax*4]
lea edx, [ecx*8 + 0x42736c]
push edx
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x40b0a6
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x224]
push 0x12c
xor ebx, ebx
push ecx
push ebx
push str.OriginalFriendlyName
push edx
call sub.WINSPOOL.DRV_GetPrinterDataA
mov esi, eax
cmp esi, ebx
je 0x40b049
mov eax, dword [str.OFN1]
mov cl, byte [0x423820]
mov dword [esp + 0x220], eax
mov byte [esp + 0x224], cl
xor esi, esi
mov edx, dword [esp + 0x18]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
cmp esi, ebx
jne 0x40b0a6
lea edi, [esp + 0x220]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x28]
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40b0b3
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret
mov ecx, dword [0x43793c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x10]
mov edi, 1
lea eax, [ecx + ecx*4]
push edx
shl eax, 6
mov edx, dword [esp + 0x18]
sub eax, ecx
push 0x437960
push ebx
lea eax, [eax + eax*2]
push ebx
mov dword [esp + 0x20], edi
lea ecx, [eax*4 + 0x437f14]
push ecx
push edx
call esi
mov ecx, dword [0x43793c]
lea eax, [esp + 0x10]
push eax
push 0x437964
lea eax, [ecx + ecx*4]
push ebx
shl eax, 6
sub eax, ecx
push ebx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x24]
lea edx, [ecx*4 + 0x437f3c]
push edx
push eax
call esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 4
push ecx
mov ecx, dword [0x43793c]
push 0x43796c
push ebx
lea eax, [ecx + ecx*4]
push ebx
shl eax, 6
sub eax, ecx
mov ecx, dword [esp + 0x24]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x437f64]
push eax
push ecx
call esi
mov ecx, dword [0x43793c]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
lea eax, [ecx + ecx*4]
push 0x437970
shl eax, 6
sub eax, ecx
push ebx
push ebx
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x437f8c]
push ecx
push edx
call esi
mov ecx, dword [0x43793c]
lea eax, [esp + 0x10]
push eax
push 0x437974
lea eax, [ecx + ecx*4]
push ebx
shl eax, 6
sub eax, ecx
push ebx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x24]
lea edx, [ecx*4 + 0x437fb4]
push edx
push eax
call esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [0x43793c]
push 0x437978
push ebx
push ebx
lea eax, [ecx + ecx*4]
shl eax, 6
sub eax, ecx
mov ecx, dword [esp + 0x24]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x437fdc]
push eax
push ecx
call esi
mov ecx, dword [0x43793c]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
lea eax, [ecx + ecx*4]
push 0x43797c
shl eax, 6
sub eax, ecx
push ebx
push ebx
mov dword [0x42710c], edi
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 0x438004]
push ecx
push edx
call esi
test eax, eax
jne 0x40b20e
mov dword [0x42710c], ebx
mov ecx, dword [0x43793c]
lea eax, [esp + 0x10]
push eax
push 0x437980
lea eax, [ecx + ecx*4]
push ebx
shl eax, 6
sub eax, ecx
push ebx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x24]
lea edx, [ecx*4 + 0x43802c]
push edx
push eax
call esi
test eax, eax
jne 0x40b244
mov dword [0x42710c], ebx
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [0x43793c]
push 0x437984
push ebx
lea eax, [ecx + ecx*4]
push ebx
shl eax, 6
sub eax, ecx
mov ecx, dword [esp + 0x24]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x438054]
push eax
push ecx
call esi
test eax, eax
jne 0x40b27a
mov dword [0x42710c], ebx
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x33c
ret