Function at 0x402e90
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov ebx, 0x20006
mov dword [ebp - 0xc], 0
push str.kernel32
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402ed9
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x402ed9
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x402ee8
cmp dword [ebp - 0xc], 0
mov eax, 0x20206
cmovne ebx, eax
mov dword [ebp - 0x10], ebx
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0
push ebx
push 0
push 0
push 0
push str.SoftwareCanonIJPLMInstalledDevice
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40319d
mov eax, dword [0x41f950]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
mov edi, dword [0x41f94c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], edi
cmp edi, eax
je 0x403197
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [eax]
mov eax, dword [edi]
lea ecx, [ebp - 8]
push 0
push ecx
push 0
push dword [ebp - 0x10]
sub eax, 0xffffff80
mov dword [ebp - 8], 0
push 0
push 0
push 0
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x403188
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
add eax, 0x100
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x1c], eax
sub ecx, 0xffffff80
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x20006
push 0
push ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402fca
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add eax, 0x100
push eax
push 1
push 0
push str.ENQTYPE
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call ebx
mov eax, dword [edi]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x1c], eax
sub ecx, 0xffffff80
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x20006
push 0
push ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403019
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push 1
push eax
push str.DEVICENAME
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call ebx
mov ecx, dword [edi]
mov dword [ebp - 0x14], ecx
mov eax, dword [ecx + 0x204]
sub eax, dword [ecx + 0x200]
sar eax, 3
test eax, eax
je 0x403088
lea eax, [ecx + 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x1c], eax
sub ecx, 0xffffff80
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x20006
push 0
push ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403088
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add eax, 0x180
push eax
push 1
push 0
push str.DISP_WARNING
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call ebx
mov esi, dword [edi]
mov eax, dword [esi + 0x204]
mov esi, dword [esi + 0x200]
mov dword [ebp - 0x1c], eax
cmp esi, eax
je 0x40317d
mov edi, eax
push 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0
push dword [ebp - 0x10]
push 0
push 0
push 0
push dword [esi]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40316f
mov ecx, dword [esi]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
push 0x20006
push 0
push ecx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40310f
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0
push str.SEND_INFO_AGREE
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x18]
call ebx
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
add eax, 0x84
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0xc]
push eax
push 0x20006
push 0
push dword [ebp - 0x14]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40316a
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
add eax, 0x84
push eax
push 1
push 0
push str.DATE
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xc]
call ebx
push dword [ebp - 0x1c]
call ebx
add esi, 8
cmp esi, edi
jne 0x4030a3
mov edi, dword [ebp - 0x20]
push dword [ebp - 8]
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add edi, 8
mov dword [ebp - 0x20], edi
cmp edi, dword [ebp - 0x28]
jne 0x402f40
push dword [ebp - 4]
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret