Function at 0x407033
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
push esi
push edi
lea eax, [ebp - 4]
push eax
xor esi, esi
push 0xf003f
push esi
push str.SoftwareEPSONSTM3STMDataEPLTarget
mov edi, 0x104
push 0x80000001
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40707a
or eax, 0xffffffff
jmp 0x40732b
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x130]
push eax
mov dword [ebp - 0x14], esi
push esi
jmp 0x407219
cmp dword [ebp - 0xc], 0x103
je 0x40723c
lea eax, [ebp - 0x10]
push eax
push 0xf003f
push esi
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407201
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x41a77c
push dword [ebp - 0x10]
mov dword [ebp - 0x20], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4071b9
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4071b9
lea eax, [ebp - 0x234]
push eax
push edi
lea eax, [ebp - 0x43c]
push eax
call fcn.004010dd
test eax, eax
je 0x40712c
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407201
push esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.00401b2e
add esp, 0xc
test eax, eax
je 0x4071b9
push 4
mov dword [ebp - 0x18], esi
call fcn.0040f581
pop ecx
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push eax
push 2
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_GetPrinterA
push dword [ebp - 0xc]
call fcn.0040ef50
pop ecx
push dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x4071af
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 0x18]
push eax
push 2
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
mov eax, dword [ebp - 0xc]
je 0x4071a8
cmp dword [eax + 0x10], esi
je 0x4071a1
cmp dword [eax + 0x24], esi
jne 0x4071a8
mov dword [ebp - 0x1c], 1
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x4071c0
mov dword [ebp - 0x1c], 1
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 1
jne 0x407201
lea eax, [ebp - 0x130]
push eax
push str.SoftwareEPSONSTM3STMDataEPLTarget
push str._s_s
lea eax, [ebp - 0x338]
push edi
push eax
call fcn.00403f12
add esp, 0x14
test eax, eax
jne 0x407201
lea eax, [ebp - 0x338]
push eax
call fcn.00406fd3
pop ecx
inc dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x14]
push dword [ebp - 4]
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], esi
call ebx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x40709c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push 0xf003f
push esi
push str.SoftwareEPSONSTM3STMDataEPNTarget
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4072fa
or eax, 0xffffffff
jmp 0x40732a
lea eax, [ebp - 0x10]
push eax
push 0xf003f
push esi
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4072f7
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x41a77c
push dword [ebp - 0x10]
mov dword [ebp - 0x20], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x4072ee
lea eax, [ebp - 0x130]
push eax
push str.SoftwareEPSONSTM3STMDataEPNTarget
push str._s_s
lea eax, [ebp - 0x338]
push edi
push eax
call fcn.00403f12
add esp, 0x14
test eax, eax
jne 0x4072f7
lea eax, [ebp - 0x338]
push eax
call fcn.00406ea9
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 8], edi
push dword [ebp - 4]
call ebx
test eax, eax
jne 0x40726f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret