Function at 0x401c40
Capabilities:
Get common file path
Print debug messages
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x471155
mov eax, dword fs:[0]
push eax
sub esp, 0x94
push ebx
push esi
push edi
mov eax, dword [0x4811c4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov byte [ebp - 0x15], 0
mov byte [ebp + 0xb], 0
mov dword [ebp - 0x10], eax
mov dword [ebx + 0xc], 0
cmp dword [ebx], eax
je 0x4024e1
mov edi, dword [ebx + 4]
test edi, edi
je 0x4024e1
cmp edi, 0x8000
ja 0x4024e1
inc edi
mov dword [ebp - 0x24], edi
cmp edi, 0x105
ja 0x401cb5
mov edi, 0x105
mov dword [ebp - 0x24], edi
lea eax, [edi + edi]
push eax
call fcn.0042c6bd
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x401ce1
mov eax, 0xe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
push 0
push eax
call fcn.00423060
add esp, 0xc
cmp dword [ebx + 4], 2
jbe 0x401de0
mov eax, dword [ebx]
mov dword [ebp - 0x28], eax
cmp word [eax], 0x5c
je 0x401de0
cmp word [eax + 2], 0x3a
je 0x401de0
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1c]
push eax
push 0x20219
push 0
push str.SoftwareMcAfeeSystemCore
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
neg eax
sbb esi, esi
not esi
and esi, dword [ebp - 0x1c]
je 0x401db1
lea eax, [edi + edi]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x4c]
push eax
push 0
push str.szInstallDir32
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x401da0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x401da0
push 0x472d4c
push edi
push eax
call fcn.00403220
test eax, eax
js 0x401d8f
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401da0
push eax
push edi
push dword [ebp - 0x20]
call fcn.00403220
test eax, eax
jns 0x401da0
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401db1
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], 0
je 0x401e2d
push dword [ebx + 0xc]
call fcn.0042c6a2
add esp, 4
mov dword [ebx + 0xc], 0
mov dword [ebp - 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f
mov dword [ebp - 0x10], 2
setne byte [ebp + 0xb]
jmp 0x401e2d
mov esi, dword [ebx]
mov ecx, dword [ebx + 0xc]
test edi, edi
je 0x401e29
cmp edi, 0x7fffffff
ja 0x401e24
mov eax, 0x7ffffffe
mov edx, edi
sub eax, edi
sub esi, ecx
mov dword [ebp - 0x14], eax
nop
add eax, edx
je 0x401e24
movzx eax, word [esi + ecx]
test ax, ax
je 0x401e1d
mov word [ecx], ax
add ecx, 2
mov eax, dword [ebp - 0x14]
sub edx, 1
jne 0x401e00
jmp 0x401e21
test edx, edx
jne 0x401e24
sub ecx, 2
xor eax, eax
mov word [ecx], ax
mov byte [ebp - 0x15], 1
mov eax, dword [ebx + 8]
xor esi, esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov ecx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], eax
cmp byte [ebp + 0xb], al
je 0x401fb8
push str.NCPrivateLoadAndValidateMPTDll:_Looking_in_current_directory_n
call ecx
xor edi, edi
mov dword [ebp + 8], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], edi
mov byte [ebp - 4], 1
cmp dword [ebx], edi
je 0x401fa4
mov eax, dword [ebx + 4]
test eax, eax
je 0x401fa4
cmp eax, 0x8000
ja 0x401fa4
xor eax, eax
mov dword [ebx + 0xc], edi
push eax
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x401f00
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov edi, eax
add esp, 4
mov dword [ebp + 8], edi
test edi, edi
je 0x401ef7
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, eax
test ecx, ecx
jne 0x401f0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebp - 0x10], eax
call fcn.004067c0
add esp, 4
xor edi, edi
mov dword [ebp + 8], edi
jmp 0x401f09
mov dword [ebp - 0x10], 0xe
jmp 0x401f09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
xor ecx, ecx
test edi, edi
je 0x401f85
mov eax, dword [ebx + 4]
mov edi, 0xe
add eax, 2
mov dword [ebp - 0x10], edi
add eax, ecx
mov dword [ebp - 0x14], eax
add eax, eax
push eax
call fcn.0042c6bd
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je 0x401f88
push dword [ebx]
push dword [ebp + 8]
push str._ls_ls
push dword [ebp - 0x14]
push eax
call fcn.004032e0
add esp, 0x14
test eax, eax
js 0x401f7b
push dword [ebx + 0xc]
lea ecx, [ebp - 0xa0]
call fcn.00401000
push 0
lea ecx, [ebp - 0xa0]
call fcn.00403ee0
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.00401060
jmp 0x401f88
mov edi, 0x6f
mov dword [ebp - 0x10], edi
jmp 0x401f88
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 0
test eax, eax
je 0x401fb0
push eax
call fcn.004067c0
mov ecx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 4
jmp 0x401ff3
mov edi, 0x57
mov byte [ebp - 4], 0
mov dword [ebp - 0x10], edi
mov ecx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x401ff3
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x401ff0
push eax
lea ecx, [ebp - 0xa0]
call fcn.00401000
push 0
lea ecx, [ebp - 0xa0]
call fcn.00403ee0
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.00401060
mov ecx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x401ff3
mov edi, dword [ebp - 0x10]
cmp edi, 2
je 0x402004
cmp edi, 0x80092003
jne 0x4021fe
cmp byte [ebp - 0x15], 0
jne 0x4021fe
push str.NCPrivateLoadAndValidateMPTDll:_Looking_in_EXE_directory_n
call ecx
mov dword [ebp + 8], 0
mov edi, 0x104
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
test esi, esi
je 0x4020a3
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x14], eax
cmp edi, eax
jne 0x402079
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x402076
push esi
add edi, edi
call fcn.004067c0
add esp, 4
mov dword [ebp - 0x40], 0
jmp 0x402021
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x402087
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], eax
xor eax, eax
jmp 0x4020ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [ebp + 8], eax
call fcn.004067c0
mov eax, dword [ebp + 8]
add esp, 4
xor esi, esi
mov dword [ebp - 0x40], esi
jmp 0x4020ab
mov eax, 0xe
mov dword [ebp + 8], eax
mov edi, eax
mov dword [ebp - 0x10], edi
test esi, esi
je 0x402163
push 0x5c
push esi
call fcn.00422030
mov edi, dword [ebp + 8]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x10], edi
test eax, eax
je 0x402165
sub eax, esi
mov edx, 2
sar eax, 1
mov dword [ebp - 0x28], eax
inc eax
mov dword [ebp - 0x14], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov ecx, eax
mov dword [ebp - 0x10], edi
add esp, 4
mov dword [ebp - 0x38], ecx
test ecx, ecx
je 0x402163
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40214b
cmp eax, 0x7fffffff
ja 0x40213d
mov edi, dword [ebp - 0x28]
cmp edi, 0x7ffffffe
jbe 0x402121
xor eax, eax
mov word [ecx], ax
jmp 0x40214b
push edi
push esi
push 0
push eax
push ecx
call fcn.00403360
test eax, eax
js 0x402148
mov ecx, edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x10], edi
jmp 0x402165
test eax, eax
je 0x40214b
xor eax, eax
mov word [ecx], ax
jmp 0x40214b
mov ecx, dword [ebp - 0x38]
mov edi, 0x54f
push ecx
mov dword [ebp - 0x10], edi
call fcn.004067c0
add esp, 4
mov dword [ebp - 0x38], 0
xor ecx, ecx
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x4021fe
mov eax, dword [ebx + 4]
add eax, 2
add ecx, eax
mov eax, dword [ebx + 0xc]
mov dword [ebp + 8], ecx
test eax, eax
je 0x40219c
mov edi, dword [ebp - 0x24]
cmp edi, ecx
jae 0x4021b0
push eax
call fcn.0042c6a2
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [ebx + 0xc], 0
lea eax, [ecx + ecx]
mov edi, ecx
push eax
call fcn.0042c6bd
mov edx, dword [ebp - 0x38]
add esp, 4
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x10], 0xe
test eax, eax
je 0x402231
push dword [ebx]
push edx
push str._ls_ls
push edi
push dword [ebx + 0xc]
call fcn.004032e0
add esp, 0x14
test eax, eax
js 0x402220
push dword [ebx + 0xc]
lea ecx, [ebp - 0xa0]
call fcn.00401000
push 0
lea ecx, [ebp - 0xa0]
call fcn.00403ee0
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.00401060
cmp edi, 0x800b010e
jg 0x402229
je 0x4024a4
cmp edi, 0x80092026
je 0x4024a4
cmp edi, 0x800b0101
jmp 0x40222b
mov dword [ebp - 0x10], 0x6f
jmp 0x402231
test edi, edi
je 0x4024a4
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x402240
mov eax, dword [ebx]
mov dword [ebp - 0x24], eax
test esi, esi
jne 0x4022b7
mov edi, 0x104
lea esp, [esp]
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
test esi, esi
je 0x402457
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x1c], eax
cmp edi, eax
jne 0x4022ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4022a9
push esi
add edi, edi
call fcn.004067c0
add esp, 4
mov dword [ebp - 0x40], 0
jmp 0x402250
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x402355
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x402457
mov ecx, 0x8000
cmp word [eax], 0
je 0x4022d5
add eax, 2
sub ecx, 1
jne 0x4022c7
mov eax, 0x8000
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
mov dword [ebp + 8], edx
test ecx, ecx
je 0x402457
test esi, esi
jne 0x402391
mov edi, 0x104
lea esp, [esp]
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
test esi, esi
je 0x40238e
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x14], eax
cmp edi, eax
jne 0x40236e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40236b
push esi
add edi, edi
call fcn.004067c0
add esp, 4
mov dword [ebp - 0x40], 0
jmp 0x402300
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.004067c0
add esp, 4
xor esi, esi
jmp 0x402457
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40237a
mov edx, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
jmp 0x402394
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.004067c0
add esp, 4
xor esi, esi
mov dword [ebp - 0x40], esi
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
add edx, 0x200
add eax, edx
mov dword [ebp - 0x14], eax
add eax, eax
push eax
call fcn.0042c6bd
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
je 0x402457
test esi, esi
jne 0x40242a
mov edi, 0x104
mov edi, edi
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004067a0
mov esi, eax
add esp, 4
test esi, esi
je 0x40242a
push edi
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp + 8], eax
cmp edi, eax
jne 0x402415
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x402412
push esi
add edi, edi
call fcn.004067c0
add esp, 4
mov dword [ebp - 0x40], 0
jmp 0x4023c0
mov eax, dword [ebp + 8]
test eax, eax
jne 0x40242a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.004067c0
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
push esi
push str.NotComDllGetInterface:__ls_loading__ls__WinVerifyTrust_failed_with__08x_n
push dword [ebp - 0x14]
push edi
call fcn.004032e0
add esp, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call fcn.0042c6a2
add esp, 4
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40246e
push eax
call fcn.0042c6a2
add esp, 4
mov dword [ebx + 0xc], 0
mov edi, dword [ebp - 0x10]
test esi, esi
je 0x40247e
push esi
call fcn.004067c0
add esp, 4
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40248e
push eax
call fcn.004067c0
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0xc]
xor edi, edi
test eax, eax
je 0x4024da
push 8
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x402471
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebx + 0xc]
mov edi, eax
call fcn.0042c6a2
add esp, 4
mov dword [ebx + 0xc], 0
jmp 0x402471
mov edi, 0x54f
jmp 0x402471
mov eax, 0x57
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4