Function at 0x4053f2
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 - 0x14], esi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x405439
or eax, 0xffffffff
jmp 0x4056ce
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 - 0x10], esi
push esi
jmp 0x4055c1
cmp dword [ebp - 0xc], 0x103
je 0x4055e4
lea eax, [ebp - 0x14]
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 0x4055a9
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x40c64c
push dword [ebp - 0x14]
mov dword [ebp - 0x20], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405566
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x405566
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.00401207
add esp, 0xc
test eax, eax
je 0x405566
push 4
mov dword [ebp - 0x18], esi
call fcn.00405895
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.00405890
pop ecx
push dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x40555c
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 0x405555
cmp dword [eax + 0x10], esi
je 0x40554e
cmp dword [eax + 0x24], esi
jne 0x405555
mov dword [ebp - 0x1c], 1
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x40556d
mov dword [ebp - 0x1c], 1
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 1
jne 0x4055a9
lea eax, [ebp - 0x130]
push eax
push str.softwareEPSONSTM3STMDataEPLTarget
lea eax, [ebp - 0x338]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x338]
push eax
call fcn.00405392
add esp, 0x14
inc dword [ebp - 0x10]
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 - 0x10]
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 0x40545b
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 0x40569d
or eax, 0xffffffff
jmp 0x4056cd
lea eax, [ebp - 0x14]
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 0x40569a
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x40c64c
push dword [ebp - 0x14]
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 0x405691
lea eax, [ebp - 0x130]
push eax
push str.softwareEPSONSTM3STMDataEPNTarget
lea eax, [ebp - 0x338]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x338]
push eax
call fcn.0040526d
add esp, 0x14
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x10]
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 - 0x10]
mov dword [ebp - 8], edi
push dword [ebp - 4]
call ebx
test eax, eax
jne 0x405617
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret