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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415062
mov eax, dword fs:[0]
push eax
sub esp, 0x1cc
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, 0x20019
mov dword [ebp - 0x1a0], 0
push str.kernel32
mov dword [ebp - 0x1b4], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4025c8
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4025c8
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x4025dd
cmp dword [ebp - 0x1a0], 0
mov eax, 0x20219
cmovne ebx, eax
mov dword [ebp - 0x1b4], ebx
lea eax, [ebp - 0x19c]
mov dword [ebp - 0x19c], 0
push eax
push ebx
push 0
push str.SoftwareCanonIJPLMInstalledDevice
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0x1ac]
mov edx, dword [0x41f950]
mov esi, eax
push ecx
mov ecx, dword [0x41f94c]
call fcn.00404970
mov ecx, dword [0x41f94c]
add esp, 8
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x41f950], ecx
mov dword [ebp - 0x1a0], 0
test esi, esi
jne 0x402bad
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [eax + eax]
push 0x80
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.004069c0
add esp, 0xc
lea eax, [ebp - 0x110]
push 0x40
push eax
push dword [ebp - 0x1a0]
push dword [ebp - 0x19c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov dword [ebp - 0x1ac], eax
test eax, eax
jne 0x402b9f
push 0x80
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.004069c0
push 0x190
call fcn.00404d0f
mov esi, eax
push 0x80
push 0
push esi
mov dword [ebp - 0x198], esi
mov dword [esi + 0x184], 0
mov dword [esi + 0x188], 0
mov dword [esi + 0x18c], 0
call fcn.004069c0
push 0x80
sub esi, 0xffffff80
push 0
push esi
call fcn.004069c0
mov eax, dword [ebp - 0x198]
push 0x80
add eax, 0x100
push 0
push eax
call fcn.004069c0
mov ecx, dword [ebp - 0x198]
add esp, 0x34
push dword [ebp - 0x1ac]
mov dword [ecx + 0x180], 0xffffffff
mov edx, dword [ecx + 0x188]
push ecx
mov ecx, dword [ecx + 0x184]
call fcn.00404970
mov ecx, dword [ebp - 0x198]
add esp, 8
mov eax, dword [ecx + 0x184]
mov dword [ecx + 0x188], eax
lea eax, [ebp - 0x110]
push 0x40
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x194]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x110]
mov dword [ebp - 0x1a4], 0x40
push eax
push dword [ebp - 0x19c]
mov dword [ebp - 0x194], 0
call esi
test eax, eax
jne 0x4027b8
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x90]
push eax
push 0
push 0
push str.ENQTYPE
push dword [ebp - 0x194]
call ebx
push dword [ebp - 0x194]
call edi
push 0x40
lea eax, [ebp - 0x90]
push eax
mov eax, dword [ebp - 0x198]
add eax, 0x100
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x194]
mov dword [ebp - 0x1a4], 0x40
push eax
push 0x20019
push 0
lea eax, [ebp - 0x110]
mov dword [ebp - 0x194], 0
push eax
push dword [ebp - 0x19c]
call esi
test eax, eax
jne 0x40282f
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x90]
push eax
push 0
push 0
push str.DEVICENAME
push dword [ebp - 0x194]
call ebx
push dword [ebp - 0x194]
call edi
push 0x40
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x198]
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x1b0]
mov dword [ebp - 0x194], 0
push eax
push 0x20019
push 0
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x19c]
call esi
test eax, eax
jne 0x4028ae
lea eax, [ebp - 0x1cc]
mov dword [ebp - 0x1cc], 4
push eax
lea eax, [ebp - 0x194]
push eax
push 0
push 0
push str.DISP_WARNING
push dword [ebp - 0x1b0]
call ebx
push dword [ebp - 0x1b0]
mov esi, eax
call edi
test esi, esi
jne 0x4028ae
mov eax, dword [ebp - 0x194]
jmp 0x4028b0
xor eax, eax
mov esi, dword [ebp - 0x198]
push 0x80
push 0
mov dword [ebp - 0x1a8], 0
mov dword [esi + 0x180], eax
lea eax, [ebp - 0x190]
push eax
call fcn.004069c0
add esp, 0xc
lea eax, [ebp - 0x1a8]
push eax
push dword [ebp - 0x1b4]
lea eax, [ebp - 0x110]
push 0
push eax
push dword [ebp - 0x19c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402b2d
xor ebx, ebx
nop dword [eax + eax]
push 0x40
lea eax, [ebp - 0x190]
push eax
push ebx
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov dword [ebp - 0x1d4], eax
test eax, eax
jne 0x402b0a
push 0x104
call fcn.00404d0f
push 0x80
mov esi, eax
push 0
push esi
mov dword [ebp - 0x1a4], esi
call fcn.004069c0
push 0x80
lea edi, [esi + 0x84]
mov dword [esi + 0x80], 0xffffffff
push 0
push edi
call fcn.004069c0
add esp, 0x1c
lea eax, [ebp - 0x190]
push 0x40
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x40
lea eax, [ebp - 0x90]
push 0
push eax
call fcn.004069c0
add esp, 0xc
mov dword [ebp - 0x1a4], 0x40
lea eax, [ebp - 0x194]
mov dword [ebp - 0x194], 0
push eax
push 0x20019
push 0
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4029fe
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x90]
push eax
push 0
push 0
push str.DATE
push dword [ebp - 0x194]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x194]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40
lea eax, [ebp - 0x90]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x194], 0
push eax
push 0x20019
push 0
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402a84
lea eax, [ebp - 0x1d0]
mov dword [ebp - 0x1d0], 4
push eax
lea eax, [ebp - 0x194]
push eax
push 0
push 0
push str.SEND_INFO_AGREE
push dword [ebp - 0x1b8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1b8]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x402a84
mov eax, dword [ebp - 0x194]
jmp 0x402a86
xor eax, eax
push esi
lea ecx, [ebp - 0x1c0]
mov dword [esi + 0x80], eax
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0
call fcn.004047f0
mov ecx, dword [ebp - 0x198]
lea eax, [ebp - 0x1c0]
push eax
mov dword [ebp - 4], 0
lea ecx, [ecx + 0x184]
call fcn.00404340
mov dword [ebp - 4], 1
mov esi, dword [ebp - 0x1bc]
test esi, esi
je 0x402afd
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x402afd
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x402afd
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x1d4]
mov dword [ebp - 4], 0xffffffff
inc ebx
test eax, eax
je 0x402910
push dword [ebp - 0x1a8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [ebp - 0x198]
push esi
lea ecx, [ebp - 0x1c8]
mov dword [ebp - 0x1c8], 0
mov dword [ebp - 0x1c4], 0
call fcn.004048b0
lea eax, [ebp - 0x1c8]
mov dword [ebp - 4], 2
push eax
call fcn.00404190
mov dword [ebp - 4], 3
mov esi, dword [ebp - 0x1c4]
test esi, esi
je 0x402b92
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x402b92
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x402b92
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1ac]
inc dword [ebp - 0x1a0]
test eax, eax
je 0x402650
push dword [ebp - 0x19c]
call edi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404aff
mov esp, ebp
pop ebp
ret