joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51aa7a
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5cc5b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0050b687
mov dword [ebp - 0x14], eax
cmp dword [0x5d73cc], esi
jne 0x51ab6d
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x51aafa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x51ac4d
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x51ac4d
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x51ac4d
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x5d73cc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x5d73d0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x5ab3dc
push edi
mov dword [0x5d73d4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5d73dc], eax
test eax, eax
je 0x51ab6a
push 0x5ab3f8
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x5d73d8], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x51ab92
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x51ab85
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x51aba7
push 4
pop eax
jmp 0x51ac4f
cmp dword [ebp - 0x14], esi
je 0x51aba7
push dword [0x5d73cc]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x51ab8c
mov eax, dword [0x5d73d8]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x51ac05
cmp dword [0x5d73dc], edi
je 0x51ac05
push eax
call ebx
push dword [0x5d73dc]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x51ac05
test eax, eax
je 0x51ac05
call ecx
test eax, eax
je 0x51abfa
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x51abfa
test byte [ebp - 8], 1
jne 0x51ac05
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x51ac35
mov eax, dword [0x5d73d0]
cmp eax, edi
je 0x51ac32
push eax
call ebx
test eax, eax
je 0x51ac32
call eax
mov esi, eax
test esi, esi
je 0x51ac32
mov eax, dword [0x5d73d4]
cmp eax, edi
je 0x51ac32
push eax
call ebx
test eax, eax
je 0x51ac32
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x5d73cc]
call ebx
test eax, eax
je 0x51ac4d
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x51ac4f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00501f35
mov esp, ebp
pop ebp
ret
Function at 0x401970
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x45000c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.004166d0
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4019d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_install_service___d__n
call fcn.00401ec0
add esp, 8
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x401a10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.00401ec0
add esp, 8
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x210]
push eax
push 1
push 2
push 0x10
push 0xf01ff
push 0x446980
push 0x446980
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x401a6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed___d__n
call fcn.00401ec0
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret
push str.Service_installed_successfully_n
call fcn.00401ec0
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00413f68
mov esp, ebp
pop ebp
ret

Function at 0x401bb0
Capabilities:
Create thread
Print debug messages

Disassembly:
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x452620], eax
test eax, eax
jne 0x401c0d
push 0x452628
push dword [0x452624]
mov dword [0x45262c], 1
mov dword [0x452634], 0
mov dword [0x452640], 0
mov dword [0x452630], 1
mov dword [0x45263c], 0
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
xor eax, eax
ret
push str.start_start
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [0x452ab4], 0
jne 0x401c4d
push 0
push 0
push 0x452ab4
push 0x401f90
push 0
push 0
mov byte [0x452abc], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x452ab4], eax
test eax, eax
je 0x401bc7
push 0x452628
push dword [0x452624]
mov dword [0x45262c], 4
mov dword [0x452634], 0
mov dword [0x452640], 0
mov dword [0x452630], 1
mov dword [0x45263c], 0
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push 0xffffffffffffffff
push dword [0x452620]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, 0x452ab4
call fcn.00405830
push 0x452628
push dword [0x452624]
mov dword [0x45262c], 1
mov dword [0x452634], 0
mov dword [0x452640], 0
mov dword [0x452630], 1
mov dword [0x45263c], 0
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov eax, 1
ret
Function at 0x401d70
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x45000c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0xa0
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xac], 0
push 0
push eax
mov dword [ebp - 0xa8], 0
call fcn.004166d0
add esp, 0xc
push 0x446980
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x401e1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegisterServiceCtrlHandler
push str._s_failed_with__d
lea eax, [ebp - 0xa4]
push 0x50
push eax
call fcn.00401e30
add esp, 0x14
mov dword [ebp - 0xac], 0x446980
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xac]
push 0
push eax
push 0
push 2
push 0
push 0xc0020001
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00413f68
mov esp, ebp
pop ebp
ret
Function at 0x401fb0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437e12
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x45000c]
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 edi, ecx
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0
push 0
push 0
push 0
mov ebx, eax
call dword [sym.imp.USER32.dll_DefWindowProcW]
push 0xb8
call fcn.00414980
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.00405ad0
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0xc], eax
test eax, eax
je 0x402187
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 8
push eax
mov dword [ebp - 0x24], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
sub esp, 0xc
call fcn.00402bf0
mov ebx, eax
test ebx, ebx
js 0x402187
xorps xmm0, xmm0
mov dword [ebp - 0x78], 0x449fa4
movups xmmword [ebp - 0x74], xmm0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 4], 1
lea eax, [ebp - 0x78]
mov esi, dword [0x4525f4]
add esi, 0x10
mov dword [ebp - 0x2c], eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x452afc]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00402b80
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [edi + 0xc]
xorps xmm0, xmm0
push dword [ebp - 0x24]
movups xmmword [ebp - 0x20], xmm0
lea eax, [esi + 0x20]
push eax
push 0x4509e8
call fcn.00402420
add esp, 8
movzx eax, ax
push eax
push 0
push 0x188
push 0x80000000
push 0x44589c
lea eax, [ebp - 0x20]
push eax
push ecx
mov ecx, esi
call fcn.00402260
test eax, eax
je 0x402165
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
push 0
push 0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
push 0x407c60
push 0
push 0
mov byte [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x38], eax
call fcn.00402a90
call fcn.00402940
mov eax, dword [edi + 0xc]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_DestroyWindow]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00405830
mov eax, dword [ebp - 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40215b
push eax
call esi
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x402165
push eax
call esi
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x402173
mov eax, dword [ecx]
push 1
call dword [eax + 4]
mov dword [edi + 0xc], 0
call fcn.004027b0
lea ecx, [ebp - 0x78]
call fcn.004021b0
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, ebx
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.00413f68
mov esp, ebp
pop ebp
ret
Function at 0x4045b0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x228
mov eax, dword [0x45000c]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [ecx + 4]
mov edx, dword [ebp + 8]
or eax, 0x2001f
push esi
push edi
push eax
push edx
push dword [ecx]
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call fcn.00404500
mov esi, eax
test esi, esi
jne 0x4046a7
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [esp + 0x20]
push eax
push esi
push esi
push esi
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x100
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push dword [esp + 0x28]
call edi
test eax, eax
jne 0x404679
nop dword [eax]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x10]
call fcn.004045b0
mov esi, eax
test esi, esi
jne 0x4046a7
lea eax, [esp + 0x20]
mov dword [esp + 8], 0x100
push eax
push esi
push esi
push esi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push dword [esp + 0x28]
call edi
test eax, eax
je 0x404640
mov eax, dword [esp + 0xc]
test eax, eax
je 0x404690
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
push dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], 0
call fcn.004046f0
mov esi, eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4046b6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x22c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.00413f68
mov esp, ebp
pop ebp
ret 4
Function at 0x4052e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438006
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x45000c]
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 dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x420], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x430], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x418], 0
push 0x60
push 0
mov byte [ebp - 4], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push esi
call ebx
mov edi, eax
mov dword [ebp - 0x424], edi
test edi, edi
jne 0x40538c
push 2
push eax
push esi
call ebx
mov edi, eax
mov dword [ebp - 0x424], eax
test edi, edi
jne 0x40538c
call fcn.004037c0
mov esi, eax
jmp 0x40547c
push dword [ebp - 0x41c]
push dword [ebp - 0x420]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x4053af
call fcn.004037c0
jmp 0x40546f
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x420], ebx
test ebx, ebx
jne 0x4053cd
call fcn.004037c0
jmp 0x40546f
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x41c], esi
lea eax, [esi + 1]
cmp eax, esi
jae 0x4053ee
mov esi, 0x8007000e
jmp 0x405471
push eax
lea ecx, [ebp - 0x418]
mov byte [ebp - 4], 2
call fcn.00403770
jmp 0x405418
mov dword [ebp - 4], 1
cmp dword [ebp - 0x418], 0
jne 0x40542f
mov esi, 0x8007000e
jmp 0x405471
push esi
push dword [ebp - 0x418]
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
jne 0x40544f
call fcn.004037c0
jmp 0x40546f
mov eax, dword [ebp - 0x418]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x42c]
push dword [ebp - 0x418]
call fcn.00405180
mov esi, eax
test edi, edi
je 0x40547c
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x4054a0
lea ecx, [ebp - 0x418]
call fcn.00403720
nop word [eax + eax]
mov eax, esi
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.00413f68
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4058b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x45000c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x452c54]
cmp eax, dword [ecx + 4]
jle 0x405921
push 0x452c54
call fcn.004140bf
add esp, 4
cmp dword [0x452c54], 0xffffffff
jne 0x405921
call fcn.00401770
mov ecx, eax
test ecx, ecx
je 0x4059bb
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x439580
mov dword [0x452c58], eax
call fcn.004144fd
push 0x452c54
call fcn.00414080
add esp, 8
mov eax, dword [0x452c58]
cmp dword [eax - 0xc], 0
jne 0x4059a6
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.004166d0
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 0x44a40c
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x404]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405980
sub ecx, edx
lea eax, [ebp - 0x404]
sar ecx, 1
push ecx
push eax
mov ecx, 0x452c58
call fcn.00407a60
mov eax, dword [0x452c58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004043d0
int3

Function at 0x4059d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0042ba30
mov eax, dword [0x45000c]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.004058b0
test eax, eax
je 0x405a3f
push 0x1000
lea eax, [ebp - 0x1004]
push 0
push eax
call fcn.004166d0
add esp, 0xc
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x1004]
push 0x800
push 0x800
push eax
call fcn.00401eb0
push dword [eax + 4]
push dword [eax]
call fcn.0041b843
add esp, 0x20
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret
Function at 0x405ad0
Capabilities:
Access peb ldr_data
Check if file exists
Get ntdll base address
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43804b
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x45000c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [sym.imp.USER32.dll_DefWindowProcW]
mov dword [edi + 4], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], eax
mov dword [ebp - 4], 0
lea esi, [edi + 0x30]
mov dword [edi], vtable.CProcessWnd.0
mov dword [edi + 0x28], 3
mov dword [ebp - 0x10], esi
mov byte [esi + 8], 0
and dword [esi + 8], 0xfffffeff
mov dword [esi + 0xc], 0
lea ecx, [esi + 0x10]
mov byte [ebp - 4], 2
call fcn.00410240
mov word [esi + 0x80], 0
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 3
push eax
call fcn.004065d0
push dword [ebp - 0x10]
mov esi, dword [edi + 0x28]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405b96
push dword [ebp - 0x10]
push dword [edi + 0x28]
push str.CheckAssocTime
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
mov edx, dword [ebp - 0x10]
or ecx, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x405bb1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov dword [edi + 0x28], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x406230
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
call fcn.004065d0
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406264
push dword [ebp - 4]
push 0xffffffffffffffff
push str.AutoDetectPdfAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
jmp 0x406269
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 0x406284
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 0x406290
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea ecx, [ebp - 4]
call fcn.0040e650
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4062c3
push dword [ebp - 4]
push 1
push str.AutoDetectOfdAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
jmp 0x4062c8
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 0x4062e3
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 0x4062f0
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea ecx, [ebp - 4]
call fcn.0040e650
push dword [ebp - 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406323
push dword [ebp - 4]
push 1
push str.AutoDetectCajAssoc
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
jmp 0x406328
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 0x406343
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 0x406350
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
lea eax, [ebp - 4]
mov edi, ecx
push eax
call fcn.004065d0
push dword [ebp - 4]
mov esi, dword [edi + 0x28]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406389
push dword [ebp - 4]
push dword [edi + 0x28]
push str.CheckAssocTime
push str.masterpdf
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
mov edx, dword [ebp - 4]
or ecx, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4063a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4063b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4380fb
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x45000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov al, byte [0x452bd9]
test al, al
jne 0x406537
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.004166d0
add esp, 0xc
lea eax, [ebp - 0x114]
push 1
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x406532
push 0x14
push str.config_systemprofile
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x130], 0xf
mov dword [ebp - 0x134], 0
mov byte [ebp - 0x144], 0
call fcn.00406fe0
mov dword [ebp - 4], 0
cmp byte [ebp - 0x114], 0
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
jne 0x406475
xor ecx, ecx
jmp 0x406489
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406480
sub ecx, edx
push ecx
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x12c]
call fcn.00406fe0
push dword [ebp - 0x134]
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
push ecx
cmovae eax, dword [ebp - 0x144]
lea ecx, [ebp - 0x12c]
push eax
call fcn.00406830
movzx ecx, byte [0x452bd9]
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x118]
mov edx, 1
cmovne ecx, edx
mov byte [0x452bd9], cl
cmp eax, 0x10
jb 0x4064f9
inc eax
lea ecx, [ebp - 0x12c]
push eax
push dword [ebp - 0x12c]
call fcn.004073c0
mov eax, dword [ebp - 0x130]
mov dword [ebp - 0x118], 0xf
mov dword [ebp - 0x11c], 0
mov byte [ebp - 0x12c], 0
cmp eax, 0x10
jb 0x406532
inc eax
lea ecx, [ebp - 0x144]
push eax
push dword [ebp - 0x144]
call fcn.004073c0
mov al, byte [0x452bd9]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00413f68
mov esp, ebp
pop ebp
ret

Function at 0x407710
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 0x407729
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 0x407766
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x407762
nop word [eax + eax]
cmp esi, edx
jae 0x407766
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x407750
cmp esi, edx
jb 0x40776d
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