joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4077c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4077d9
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x407816
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x407812
nop word [eax + eax]
cmp esi, edx
jae 0x407816
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x407800
cmp esi, edx
jb 0x40781d
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4088b0
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea ecx, [ebp - 4]
call fcn.00421b00
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4088e3
push dword [ebp - 4]
push 0xffffffffffffffff
push 0x5e8f48
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
jmp 0x4088e8
mov esi, 1
mov edx, dword [ebp - 4]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408903
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x408910
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584e20
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x60e9b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x10]
call fcn.00421b00
mov dword [ebp - 4], 0
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or edi, 0xffffffff
test eax, eax
je 0x4089c0
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x40896b
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push 0x5e9208
push eax
call fcn.00406550
mov esi, dword [ebp - 0x14]
add esp, 0xc
push dword [ebp - 0x10]
push esi
push str.ServerDetectPdfAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4089c0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x4089df
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x408a00
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584e20
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x60e9b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x10]
call fcn.00421b00
mov dword [ebp - 4], 0
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or edi, 0xffffffff
test eax, eax
je 0x408ab0
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x408a5b
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push 0x5e9208
push eax
call fcn.00406550
mov esi, dword [ebp - 0x14]
add esp, 0xc
push dword [ebp - 0x10]
push esi
push str.CheckAssocTime
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408ab0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x408acf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x408af0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584e20
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x60e9b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x10]
call fcn.00421b00
mov dword [ebp - 4], 0
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or edi, 0xffffffff
test eax, eax
je 0x408ba0
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x408b4b
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push 0x5e9208
push eax
call fcn.00406550
mov esi, dword [ebp - 0x14]
add esp, 0xc
push dword [ebp - 0x10]
push esi
push str.ServerShellPdfAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408ba0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x408bbf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x408be0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
lea ecx, [ebp - 4]
call fcn.00421b00
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408c11
push dword [ebp - 4]
mov eax, dword [ebp + 8]
push dword [eax]
push str.ServerShellPdfApps
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov edx, dword [ebp - 4]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408c2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esp, ebp
pop ebp
ret 4

Function at 0x408c40
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea ecx, [ebp - 4]
call fcn.00421b00
push dword [ebp - 4]
or esi, 0xffffffff
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408c74
push dword [ebp - 4]
push esi
push str.ServerDetectPdfAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
mov eax, dword [ebp - 4]
xor ebx, ebx
test esi, esi
setne bl
add eax, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x408c96
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a710
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5850b6
mov eax, dword fs:[0]
push eax
mov eax, 0x2018
call fcn.00556c40
mov eax, dword [0x60e9b0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
cmp dword [edi + 8], 0
jne 0x40a758
cmp dword [edi + 4], 0
je 0x40a87f
lea ebx, [edi + 0x14]
push ebx
mov dword [ebp - 0x2020], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x201c], 1
mov dword [ebp - 4], 0
mov eax, dword [edi + 0x10]
cmp dword [eax - 0xc], 0
jle 0x40a7ae
test esi, esi
je 0x40a878
cmp dword [eax - 0xc], 0
jl 0x40a878
push esi
push eax
call fcn.00558bf4
add esp, 8
test eax, eax
je 0x40a878
sub eax, dword [edi + 0x10]
sar eax, 1
js 0x40a878
push 0x2000
lea eax, [ebp - 0x2014]
push 0
push eax
call fcn.00559270
add esp, 0xc
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x2014]
call fcn.0040a190
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x40a7ec
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2018], eax
lea eax, [ebp - 0x2014]
mov byte [ebp - 4], 1
push eax
push esi
lea eax, [ebp - 0x2018]
push str.__s___s_r_n
push eax
call fcn.00406550
mov esi, dword [ebp - 0x2018]
add esp, 0x10
cmp dword [edi + 8], 0
je 0x40a82d
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [edi + 4], 0
je 0x40a85c
mov ecx, dword [edi + 0xc]
cmp ecx, 0xffffffff
je 0x40a85c
push 0
mov dword [ebp - 0x2018], 0
lea edx, [ebp - 0x2018]
mov eax, dword [esi - 0xc]
push edx
add eax, eax
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40a878
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00555b37
mov esp, ebp
pop ebp
ret
Function at 0x40a9e0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5850ef
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x60e9b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push dword [ebp - 0x10]
lea eax, [esi + 0x20]
mov dword [esi + 0x28], 0
push eax
push 0x60f550
call fcn.00407480
add esp, 0xc
movzx eax, ax
mov ecx, esi
push 0
push eax
push 0
push 0
push SysReAllocStringLen
push 0
push 0
push 0
call fcn.00407300
push 0
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 1
push 0x2ff
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
mov eax, dword [0x615824]
test eax, eax
jne 0x40aa85
push 0x2c
call fcn.0055602b
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.0040a200
mov dword [ebp - 4], 0xffffffff
mov dword [0x615824], eax
push str.Init
push str.CEndSessionMgr
push eax
call fcn.0040a710
add esp, 0xc
push 0x5e90d4
push 0x5e0904
push str.delay_enable_server
call fcn.004385c0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40ac30
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x585182
mov eax, dword fs:[0]
push eax
sub esp, 0x310
mov eax, dword [0x60e9b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x208
lea eax, [ebp - 0x318]
push 0
push eax
call fcn.00559270
add esp, 0xc
lea eax, [ebp - 0x318]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40aca4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_install_service___d__n
call fcn.0040b7b0
add esp, 8
jmp 0x40ae28
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.PdfServer.exe
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40ad33
mov eax, dword [0x615824]
test eax, eax
jne 0x40ad07
push 0x2c
call fcn.0055602b
add esp, 4
mov dword [ebp - 0x31c], eax
mov ecx, eax
mov dword [ebp - 4], edi
call fcn.0040a200
mov dword [ebp - 4], 0xffffffff
mov dword [0x615824], eax
push str.OpenSCManager_fail
push str.InstallService
push eax
call fcn.0040a710
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.0040b7b0
add esp, 8
jmp 0x40ae28
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x318]
push eax
push 1
push 2
push 0x10
push 0xf01ff
push str.masterPDF_Server
push str.masterPDF_Server
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x40ade0
push 0x100
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.00559270
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.error_d
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.0040b760
lea eax, [ebp - 0x110]
push eax
push str.CreateService_failed__s_n
call fcn.0040b7b0
add esp, 0x18
lea eax, [ebp - 0x110]
push eax
push str.CreateService_fail___s
push str.InstallService
call fcn.0040a6b0
push eax
call fcn.0040a710
add esp, 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 0x110]
push eax
push 0x5e08d0
jmp 0x40ae1b
push str.Service_installed_successfully_n
call fcn.0040b7b0
add esp, 4
push str.Service_installed_successfully
push str.InstallService
call fcn.0040a6b0
push eax
call fcn.0040a710
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0x5e90d4
push 0x5e08c8
push str.delay_enable_server
call fcn.004385c0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00555b37
mov esp, ebp
pop ebp
ret
Function at 0x40b950
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x60e9b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x6184f0]
cmp eax, dword [ecx + 4]
jle 0x40b97d
jmp 0x40ba1b
mov eax, dword [0x6184f4]
cmp dword [eax - 0xc], 0
jne 0x40ba06
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00559270
add esp, 0xc
lea eax, [ebp - 0x404]
push 0x200
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.full.data
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x404]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b9e0
sub ecx, edx
lea eax, [ebp - 0x404]
sar ecx, 1
push ecx
push eax
mov ecx, 0x6184f4
call fcn.00407d30
mov eax, dword [0x6184f4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00555b37
mov esp, ebp
pop ebp
ret
push 0x6184f0
call fcn.00555cbc
add esp, 4
cmp dword [0x6184f0], 0xffffffff
jne 0x40b97d
call fcn.00402a90
mov ecx, eax
test ecx, ecx
jne 0x40ba4a
push 0x80004005
call fcn.00402b10
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x58c6e0
mov dword [0x6184f4], eax
call fcn.00556016
push 0x6184f0
call fcn.00555c7d
add esp, 8
jmp 0x40b97d

Function at 0x40be80
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1008
call fcn.00556c40
mov eax, dword [0x60e9b0]
xor eax, esp
mov dword [esp + 0x1004], eax
call fcn.0040b950
test eax, eax
je 0x40beef
push 0x1000
lea eax, [esp + 4]
push 0
push eax
call fcn.00559270
add esp, 0xc
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [esp + 0xc]
push 0x800
push 0x800
push eax
call fcn.00408140
push dword [eax + 4]
push dword [eax]
call fcn.00562507
add esp, 0x20
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [esp + 0x1004]
xor ecx, esp
call fcn.00555b37
mov esp, ebp
pop ebp
ret

Function at 0x40c2d0
Capabilities:
Get file size

Disassembly:
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40c2f5
xor eax, eax
pop edi
ret
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
ret
Function at 0x40c3f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5853e0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x60e9b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, str.pdf_toolpdfpreview_
lea ecx, [ebp - 0x5c]
call fcn.00421780
mov dword [ebp - 4], 0
mov edx, dword [eax]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp word [edx], ax
jne 0x40c44d
xor ecx, ecx
jmp 0x40c461
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c452
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.00406f40
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov edx, dword [ebp - 0x5c]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40c48c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x44], 8
lea edx, [ebp - 0x58]
mov dword [ebp - 0x2c], 7
cmovae edx, dword [ebp - 0x58]
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp word [edx], ax
jne 0x40c4b4
xor ecx, ecx
jmp 0x40c4cf
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c4c0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00406f40
mov byte [ebp - 4], 3
call fcn.00439be0
cmp dword [0x615f44], 0
lea edx, [ebp - 0x40]
mov ecx, str.XDPdfPreview.dll
mov eax, str.XDPdfPreview64.dll
cmove eax, ecx
lea ecx, [ebp - 0x28]
push eax
call fcn.0040c310
add esp, 4
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40c51e
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00407af0
xor eax, eax
mov dword [ebp - 0x2c], 7
cmp dword [ebp - 0x14], 8
mov word [ebp - 0x40], ax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
mov dword [ebp - 0x30], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c57d
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ecx
cmovae eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x60]
push eax
mov edx, str.regsvr32__s__u
call fcn.0040af70
mov edx, dword [ebp - 0x60]
add esp, 8
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x40c57d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40c592
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00407af0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x40c5bb
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00407af0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00555b37
mov esp, ebp
pop ebp
ret
Function at 0x40cbe0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5854b6
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x60e9b0]
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 dword [ebp - 0x254], 0
mov dword [ebp - 0x24c], 0
call fcn.00439be0
cmp dword [0x615f44], 0
mov ecx, 0x100
mov eax, 0x200
cmovne eax, ecx
lea ecx, [ebp - 0x24c]
push ecx
or eax, 1
push eax
push 0
push str.CLSID29e40a4e_3bb4_4211_b380_f56f2bf680b1InprocServer32
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x40ce23
push 0x208
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.00559270
add esp, 0xc
mov dword [ebp - 0x250], 0x208
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x254]
push eax
push esi
push esi
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x24c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40ce23
mov edx, str.pdf_toolofficeplugin_
lea ecx, [ebp - 0x258]
call fcn.00421780
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x248]
push dword [eax]
call fcn.00405a20
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x258]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cd02
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00439be0
cmp dword [0x615f44], 0
lea edx, [ebp - 0x248]
mov ecx, str.XDOffilePlugin.dll
mov eax, str.XDOffilePlugin64.dll
cmove eax, ecx
lea ecx, [ebp - 0x230]
push eax
call fcn.0040c310
add esp, 4
cmp word [ebp - 0x218], 0
jne 0x40cd3e
xor ecx, ecx
jmp 0x40cd56
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cd47
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x21c]
lea edx, [ebp - 0x230]
mov ebx, dword [ebp - 0x220]
cmp esi, 8
mov edi, ecx
cmovae edx, dword [ebp - 0x230]
cmp ebx, ecx
cmovb edi, ebx
test edi, edi
je 0x40cd9c
lea esi, [ebp - 0x218]
mov ax, word [edx]
cmp ax, word [esi]
jne 0x40cdab
add edx, 2
add esi, 2
sub edi, 1
jne 0x40cd83
mov esi, dword [ebp - 0x21c]
xor eax, eax
test eax, eax
jne 0x40cdc3
cmp ecx, ebx
jbe 0x40cdbf
or eax, 0xffffffff
jmp 0x40cdc3
movzx eax, word [edx]
cmp ax, word [esi]
mov esi, dword [ebp - 0x21c]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x40cd9e
sbb eax, eax
neg eax
xor ebx, ebx
test eax, eax
sete bl
cmp esi, 8
jb 0x40cde4
lea eax, [esi + 1]
push eax
push dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
call fcn.00407af0
mov ecx, dword [ebp - 0x234]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp ecx, 8
jb 0x40ce1f
inc ecx
push ecx
push dword [ebp - 0x248]
lea ecx, [ebp - 0x248]
call fcn.00407af0
mov eax, ebx
jmp 0x40ce25
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.00555b37
mov esp, ebp
pop ebp
ret