Function at 0x4053af
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 0x4053f6
or eax, 0xffffffff
jmp 0x40568b
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 0x40557e
cmp dword [ebp - 0xc], 0x103
je 0x4055a1
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 0x405566
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x40c62c
push dword [ebp - 0x14]
mov dword [ebp - 0x20], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405523
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x405523
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 0x405523
push 4
mov dword [ebp - 0x18], esi
call fcn.00405855
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.00405850
pop ecx
push dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x405519
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 0x405512
cmp dword [eax + 0x10], esi
je 0x40550b
cmp dword [eax + 0x24], esi
jne 0x405512
mov dword [ebp - 0x1c], 1
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x40552a
mov dword [ebp - 0x1c], 1
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 1
jne 0x405566
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.0040534f
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 0x405418
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 0x40565a
or eax, 0xffffffff
jmp 0x40568a
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 0x405657
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x234]
push eax
push esi
push esi
push 0x40c62c
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 0x40564e
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.0040522a
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 0x4055d4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret