Function at 0x40e220
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44823c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x330
push ebx
push esi
push edi
call fcn.00404100
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x344], 0
call fcn.0044608e
mov esi, dword [ebp + 8]
xor eax, eax
mov ecx, 0xc3
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
push esi
lea ecx, [esp + 0x10]
call fcn.00402470
mov eax, dword [esp + 0xc]
push 0x5c
push eax
mov byte [esp + 0x34c], 1
call fcn.0042dfa2
add esp, 8
test eax, eax
jne 0x40e355
or ebx, 0xffffffff
push esi
push str.SystemCurrentControlSetControlPrintPrinters
lea eax, [esp + 0x30]
push 0x44bbe8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x34]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x40e41e
mov esi, dword [ebp + 0xc]
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x14]
push eax
push esi
lea ecx, [esp + 0x28]
push ecx
push 0
push str.Share_Name
push edx
mov dword [esp + 0x2c], 0x208
mov dword [esp + 0x38], 1
call edi
test eax, eax
je 0x40e320
mov byte [esi], 0
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push str.Attributes
push eax
mov dword [esp + 0x2c], 4
call edi
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e51d
sub eax, dword [esp + 0xc]
mov ebx, eax
js 0x40e2a8
lea ecx, [ebx + 1]
push ecx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x14]
call fcn.00401cf0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x348], 2
call fcn.00401e30
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x344], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e3ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebx - 2]
push eax
push 2
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401730
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x348], 3
call fcn.00401e30
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x344], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e3f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
push eax
push ecx
push str.SystemCurrentControlSetControlPrintPrinters
lea edx, [esp + 0x34]
push str._s___s__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x40e2c1
lea edx, [esp + 0x18]
push edx
push 0x20019
xor eax, eax
push eax
push str.SystemCurrentControlSetControlPrintPrinters
mov ecx, 0xc3
lea edi, [esp + 0x38]
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 0
rep stosd dword es:[edi], eax
call esi
test eax, eax
jne 0x40e592
test ebx, ebx
jl 0x40e475
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
push eax
push ecx
lea edx, [esp + 0x30]
push str.___s__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40e48b
mov eax, dword [ebp + 8]
push 0x30c
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.0042fb50
add esp, 0xc
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
lea eax, [esp + 0x34]
push eax
push ecx
call esi
test eax, eax
jne 0x40e587
mov esi, dword [ebp + 0xc]
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x14]
push edx
push esi
lea eax, [esp + 0x28]
push eax
push 0
push str.Share_Name
push ecx
mov dword [esp + 0x2c], 0x208
mov dword [esp + 0x38], 1
call edi
test eax, eax
je 0x40e4e4
mov byte [esi], 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push str.Attributes
push edx
mov dword [esp + 0x2c], 4
call edi
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x344], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e547
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x344], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e570
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, esi
mov ecx, dword [esp + 0x33c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [esp + 0x344], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e5b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x344], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e5e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x33c]
pop edi
pop esi
or eax, 0xffffffff
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret