Function at 0x58c700
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d3b53
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x638fe4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, cl
push 0x20001
mov edx, 0x1e240
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.005b5f80
add esp, 4
mov esi, dword [ebp - 0x18]
mov ecx, 0x60ab98
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x58c776
test dx, dx
je 0x58c772
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x58c776
add eax, 4
add ecx, 4
test dx, dx
jne 0x58c750
xor eax, eax
jmp 0x58c77b
sbb eax, eax
or eax, 1
test eax, eax
je 0x58c7b9
mov ecx, str.SULA
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x58c7ac
test dx, dx
je 0x58c7a8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x58c7ac
add eax, 4
add ecx, 4
test dx, dx
jne 0x58c786
xor eax, eax
jmp 0x58c7b1
sbb eax, eax
or eax, 1
test eax, eax
jne 0x58c881
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWARECanonIJ_Scan_Utility
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edx, dword [ebp - 0x10]
test edx, edx
jne 0x58c7f1
xor bl, bl
jmp 0x58c883
test bl, bl
jne 0x58c852
lea ecx, [ebp - 0x14]
call fcn.00402be0
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
mov edx, str.TempDir
push eax
call fcn.005b0e00
add esp, 4
test eax, eax
je 0x58c847
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00404550
add esp, 8
test al, al
je 0x58c847
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], 0
call fcn.00402b90
jmp 0x58c881
lea ecx, [ebp - 0x14]
call fcn.00402b90
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0xc]
lea ecx, [ecx*2 + 2]
push ecx
push eax
push 1
push 0
push str.TempDir
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x10], 0
mov bl, 1
or edi, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x58c8c6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58c8c4
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x58c8c4
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x58c8c6
call edx
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x58c91f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x58c91d
mov eax, dword [ecx + 4]
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CWin32Heap.0
jne 0x58c91b
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, eax
call esi
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret