joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4047d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x133c
call fcn.0042dd50
push ebx
push esi
push edi
call fcn.00404100
cmp eax, 2
je 0x404969
cmp eax, 3
je 0x404969
push 0x104
lea eax, [esp + 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x404969
lea ecx, [esp + 0x240]
push ecx
lea edx, [esp + 0x13c]
push str._spsapi.dll
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x404969
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push eax
call esi
mov ecx, dword [esp + 0x10]
push str.EnumProcessModules
push ecx
mov edi, eax
call esi
mov edx, dword [esp + 0x10]
push str.GetModuleBaseNameA
push edx
mov dword [esp + 0x1c], eax
call esi
cmp edi, ebx
mov dword [esp + 0x28], eax
je 0x404969
cmp dword [esp + 0x14], ebx
je 0x404969
cmp eax, ebx
je 0x404969
lea eax, [esp + 0x1c]
push eax
push 0x1000
lea ecx, [esp + 0x350]
push ecx
mov dword [esp + 0x28], ebx
call edi
mov eax, dword [esp + 0x1c]
shr eax, 2
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edi
jbe 0x40495e
lea ebx, [ebx]
mov edx, dword [esp + edi*4 + 0x348]
push edx
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x40494d
lea eax, [esp + 0x24]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], ebx
call dword [esp + 0x24]
test eax, eax
je 0x404946
xor eax, eax
mov byte [esp + 0x30], bl
mov ecx, 0x40
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea edx, [esp + 0x34]
stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
push edx
push eax
push esi
call dword [esp + 0x38]
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x404972
mov edi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
inc edi
cmp edi, eax
mov dword [esp + 0x20], edi
jb 0x4048d0
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404990
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x30
push ebp
push edi
lea eax, [esp + 0xc]
push eax
push 0x20019
xor ebp, ebp
push ebp
push str.SOFTWARECanonVDCSETUP
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, 2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404af1
mov eax, dword [esp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x18]
push ecx
push ebp
lea edx, [esp + 0x18]
push edx
push ebp
push str.Version
push eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x28], 1
call esi
test eax, eax
jne 0x404a49
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x18]
push eax
push ebp
push str.Version
push ecx
call esi
test eax, eax
jne 0x404a49
mov ebx, dword [esp + 0x44]
lea edx, [esp + 0x20]
push ebx
push edx
call fcn.0040fb10
add esp, 8
test eax, eax
jle 0x404a2c
mov edi, 1
jmp 0x404a4e
lea eax, [esp + 0x20]
push ebx
push eax
call fcn.0040fb10
add esp, 8
test eax, eax
jge 0x404a42
xor edi, edi
jmp 0x404a4e
mov ebp, 1
jmp 0x404a4e
mov edi, 2
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 0
lea edx, [esp + 0x18]
push edx
push 0
push str.BuildNumber
push eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x28], 1
call esi
test eax, eax
jne 0x404ad2
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push str.BuildNumber
push ecx
call esi
test eax, eax
jne 0x404ad2
cmp ebp, 1
jne 0x404adc
mov edx, dword [esp + 0x48]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.0040fb10
mov edx, dword [esp + 0x1c]
xor ecx, ecx
add esp, 8
test eax, eax
setge cl
push edx
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x30
ret
cmp ebp, 1
jne 0x404adc
mov edi, 2
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
mov eax, edi
pop edi
pop ebp
add esp, 0x30
ret
pop edi
mov eax, 2
pop ebp
add esp, 0x30
ret
Function at 0x404b00
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x168
lea eax, [esp]
push eax
push 0x20019
push 0
push str.SOFTWARECanonDIASSETUP
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404b2e
xor eax, eax
add esp, 0x168
ret
push esi
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x14]
push eax
push 0
push str.Path
mov esi, 1
push ecx
mov dword [esp + 0x20], 0x104
mov dword [esp + 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x404b7a
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
add esp, 0x168
ret
mov eax, dword [esp + 4]
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x70]
push edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], 0x44
mov dword [esp + 0x5c], esi
mov word [esp + 0x60], cx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0x6f], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x404bdb
push 0x44b63c
lea eax, [esp + 0x74]
push eax
call esi
push str.CnxDIAS.EXE
lea ecx, [esp + 0x74]
push ecx
call esi
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push str.__remove
lea ecx, [esp + 0x94]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edx, dword [esp + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
push edx
mov edi, eax
call ebx
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x404c3d
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push esi
call ebx
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x168
ret
Function at 0x404c50
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x18
push ebx
xor ebx, ebx
lea eax, [esp + 4]
push eax
push 8
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x21], 5
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x404ca6
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x78
neg eax
sbb eax, eax
inc eax
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 4]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [esp + 0xc]
push ecx
push ebx
push ebx
push 2
push edx
call edi
test eax, eax
jne 0x404cdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x404cdf
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebx
add esp, 0x18
ret
mov ecx, dword [esp + 0xc]
push esi
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
je 0x404d77
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push eax
push esi
push 2
push ecx
call edi
test eax, eax
je 0x404d70
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x404d70
mov eax, dword [esi]
xor edi, edi
cmp eax, ebx
jbe 0x404d65
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea ebx, [esi + 4]
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx]
push ecx
push edx
call ebp
test eax, eax
je 0x404d5a
mov dword [esp + 0x1c], 1
mov eax, dword [esi]
inc edi
add ebx, 8
cmp edi, eax
jb 0x404d44
pop ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop esi
pop edi
pop ebx
add esp, 0x18
ret

Function at 0x404e40
Capabilities:
Get common file path

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 8
push esi
lea eax, [esp + 4]
push eax
push ecx
xor esi, esi
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x404e95
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 4]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
lea ecx, [esp + 8]
push ecx
mov esi, eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x404e95
mov ecx, dword [esp + 4]
mov eax, dword [esp + 8]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 8]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, esi
pop esi
add esp, 8
ret
Function at 0x404ea0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
xor ebx, ebx
mov dword [esp + 0x1c], 0x9c
call esi
test eax, eax
jne 0x404ee6
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x94
call esi
cmp dword [esp + 0x28], 2
jne 0x404f12
cmp dword [esp + 0x1c], 4
jbe 0x404f12
mov edx, dword [ebp + 8]
push edx
push 0x26
call fcn.00404e40
add esp, 8
test eax, eax
je 0x404f6f
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404f6f
mov edx, dword [ebp + 8]
lea ecx, [ebp + 0xc]
push ecx
mov ecx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push str.ProgramFilesDir
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x10]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
mov eax, 1
je 0x404f71
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404f80
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x45c
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
test ebx, ebx
push edi
je 0x4050f2
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x360]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x150]
rep stosd dword es:[edi], eax
push ebx
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x150]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea edx, [esp + 0x150]
push edx
lea eax, [esp + 0x364]
push 0x44bbe0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x364]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x4050f2
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x44bbdc
lea eax, [esp + 0x40]
push eax
call esi
test eax, eax
je 0x4050c3
push 0x44bbd8
lea ecx, [esp + 0x40]
push ecx
call esi
test eax, eax
je 0x4050c3
test byte [esp + 0x10], 0x10
jne 0x405088
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x154]
push eax
push 0x44bbd0
lea ecx, [esp + 0x264]
push 0x104
push ecx
call fcn.0042f54c
add esp, 0x14
lea edx, [esp + 0x258]
push edx
call edi
test byte [esp + 0x10], 0x10
je 0x4050c3
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x154]
push ecx
push 0x44bbd0
lea edx, [esp + 0x264]
push 0x104
push edx
call fcn.0042f54c
lea eax, [esp + 0x26c]
push eax
call fcn.00404f80
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405021
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405140
Capabilities:
Get common file path

Disassembly:
sub esp, 0x214
push ebx
mov ebx, dword [esp + 0x228]
push ebp
xor ebp, ebp
mov eax, ebx
dec eax
neg eax
sbb eax, eax
push esi
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
and eax, 0xffffffda
push edi
add eax, 0x31
push eax
mov dword [esp + 0x18], ebp
call esi
dec ebx
neg ebx
sbb ebx, ebx
and ebx, 0xffffffda
add ebx, 0x32
push ebx
mov edi, eax
call esi
mov ebx, eax
mov eax, dword [esp + 0x238]
test eax, eax
jne 0x4051f5
mov ecx, dword [esp + 0x22c]
test ecx, ecx
je 0x4051a1
mov eax, dword [ecx + 4]
test eax, eax
je 0x4051a1
call fcn.0043bc92
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ebp, eax
push ebp
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
test esi, esi
je 0x4051d2
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [esp + 0x18], 0x18
jge 0x4051dd
push 8
push 8
push 0xff
jmp 0x4051e3
push 8
push 8
push 0x21
mov ecx, dword [esp + 0x238]
push ebx
push edi
call fcn.0043bd65
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x228]
test eax, eax
jne 0x405235
push 0x104
lea ecx, [esp + 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str.SHELL32.DLL
lea edx, [esp + 0x124]
push edx
lea eax, [esp + 0x24]
push 0x44bbe8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x405241
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x230]
cmp dword [eax], 0x7fffffff
je 0x4052be
mov esi, dword [sym.imp.SHELL32.dll_ExtractIconExA]
mov ebx, dword [sym.imp.COMCTL32.dll_ImageList_ReplaceIcon]
mov edi, eax
mov edi, edi
mov ecx, dword [esp + 0x234]
mov eax, dword [eax]
cmp ecx, 1
lea edx, [esp + 0x10]
push 1
lea ecx, [esp + 0x20]
jne 0x40527d
push edx
push 0
jmp 0x405280
push 0
push edx
push eax
push ecx
call esi
test eax, eax
mov eax, dword [esp + 0x10]
je 0x4052a3
test eax, eax
je 0x4052ae
mov edx, dword [esp + 0x22c]
push eax
mov eax, dword [edx + 4]
push 0xffffffffffffffff
push eax
call ebx
inc ebp
jmp 0x4052ae
test eax, eax
je 0x4052ae
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov ecx, dword [edi + 4]
add edi, 4
cmp ecx, 0x7fffffff
mov eax, edi
jne 0x405260
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x214
ret
Function at 0x405570
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x85c
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov ecx, 0x80
lea edi, [esp + 0x268]
rep stosd dword es:[edi], eax
push 0x200
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0x67], 0x5c
je 0x4055d3
lea edi, [esp + 0x68]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4055c1
mov dx, word [0x44b63c]
mov word [edi], dx
push str.cmd.exe
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x270]
push 0x44bbd0
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
push edi
lea edx, [esp + 0x47c]
push str._C_net_stop___s___Y
push edx
mov dword [esp + 0x3c], 0x44
mov word [esp + 0x6c], ax
mov dword [esp + 0x68], 1
call fcn.0042f6e9
add esp, 0x1c
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [esp + 0x488]
push edx
lea eax, [esp + 0x28c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
test esi, esi
je 0x4056a3
mov ecx, dword [esp + 0x10]
push 0xea60
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [esp + 0x14]
push eax
call ebx
push str.SPOOLER
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4056a3
call fcn.0044608e
mov ecx, dword [eax + 4]
mov dword [ecx + 0x1f4], 1
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4056b0
Capabilities:
Query service status

Disassembly:
sub esp, 0x24
push esi
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.0044181e
push 0xf003f
push 0
push 0
mov dword [esp + 0x10], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
mov dword [esp + 8], esi
je 0x405760
mov eax, dword [esp + 0x2c]
push edi
push 4
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x405747
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
xor esi, esi
lea ecx, [esp + 0x18]
push ecx
push edi
call ebp
cmp eax, 1
je 0x405730
push 0x64
call ebx
inc esi
cmp esi, 0x96
jb 0x405707
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [esp + 0x14]
pop ebp
pop ebx
jmp 0x405758
mov edx, dword [esp + 0x1c]
push edi
mov dword [esp + 0x14], edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [esp + 0x14]
pop ebp
pop ebx
jmp 0x405758
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x405758
mov dword [esp + 8], eax
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441833
mov eax, dword [esp + 4]
pop esi
add esp, 0x24
ret
Function at 0x405780
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x10
push ebx
push ebp
push edi
mov ebp, 1
mov dword [esp + 0xc], 0
xor edi, edi
call fcn.0044608e
mov ebx, dword [eax + 4]
lea eax, [esp + 0x10]
push eax
push 0xf003f
push edi
push str.Console
push SysReAllocString
mov dword [ebx + 0x210], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405876
mov eax, 4
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x20]
push eax
push edi
push str.LoadConIme
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405860
mov eax, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x14], 4
je 0x405817
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40581f
mov dword [esp + 0xc], edi
mov edi, ebp
jmp 0x40581f
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0x10]
push 4
lea edx, [esp + 0x10]
push edx
push 4
push 0
push str.LoadConIme
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x405860
test edi, edi
je 0x405862
mov dword [ebx + 0x210], 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x10
ret
xor ebp, ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret

Function at 0x405880
Capabilities:
Delete registry key
Delete registry value
Query or enumerate registry value

Disassembly:
sub esp, 0x10c
push esi
push edi
xor edi, edi
call fcn.0044608e
mov esi, dword [eax + 4]
lea eax, [esp + 8]
push eax
push 0x2001f
push edi
push str.SOFTWARECanonPortSetPortSetUser
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405928
mov eax, dword [esi + 0xd0]
mov ecx, dword [esp + 8]
push edi
push edi
push edi
push edi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4058dd
mov edx, dword [esi + 0xd0]
mov eax, dword [esp + 8]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov eax, dword [esp + 8]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push eax
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x40591d
push str.SOFTWARECanonPortSetPortSetUser
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov edi, 1
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
add esp, 0x10c
ret
Function at 0x405940
Capabilities:
Check if file exists
Delete directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x218
push ebx
push ebp
push esi
push edi
call fcn.0044608e
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x120]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push 0x104
push ecx
xor ebp, ebp
call fcn.00404ea0
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
add esp, 8
lea edx, [esp + 0x18]
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.Canon_
lea eax, [esp + 0x1c]
push eax
call edi
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea ecx, [esp + 0x18]
push ecx
call ebx
test eax, eax
jne 0x4059c0
mov ebp, 1
lea edx, [esp + 0x18]
push edx
call esi
push str.InstRestore
lea eax, [esp + 0x1c]
push eax
call edi
lea ecx, [esp + 0x18]
push ecx
call ebx
test eax, eax
jne 0x4059e3
mov ebp, 1
lea edx, [esp + 0x18]
push edx
call esi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0xd0]
push eax
lea ecx, [esp + 0x1c]
push ecx
call edi
lea edx, [esp + 0x18]
push edx
call ebx
test eax, eax
je 0x405a49
test ebp, ebp
jne 0x405a56
lea eax, [esp + 0x18]
push eax
call esi
lea ecx, [esp + 0x18]
push ecx
call fcn.00404f80
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
add esp, 4
lea edx, [esp + 0x18]
push edx
call esi
lea eax, [esp + 0x120]
push eax
call esi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret