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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c765
mov eax, dword fs:[0]
push eax
sub esp, 0x94
push ebx
push esi
push edi
mov eax, dword [0x45a13c]
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 - 0x1a], 0
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x10], eax
mov dword [ebx + 0xc], 0
cmp dword [ebx], eax
je 0x402ac1
mov edi, dword [ebx + 4]
test edi, edi
je 0x402ac1
cmp edi, 0x8000
ja 0x402ac1
inc edi
mov dword [ebp - 0x20], edi
cmp edi, 0x105
ja 0x4022b5
mov edi, 0x105
mov dword [ebp - 0x20], edi
lea eax, [edi + edi]
push eax
call fcn.00417e8e
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x4022e1
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.0040e0d0
add esp, 0xc
cmp dword [ebx + 4], 2
jbe 0x4023e0
mov eax, dword [ebx]
mov dword [ebp - 0x2c], eax
cmp word [eax], 0x5c
je 0x4023e0
cmp word [eax + 2], 0x3a
je 0x4023e0
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x24]
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 - 0x24]
je 0x4023b1
lea eax, [edi + edi]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x4c]
push eax
push 0
push str.szInstallDir32
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x4023a0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4023a0
push 0x44d864
push edi
push eax
call fcn.00402ce0
test eax, eax
js 0x40238f
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4023a0
push eax
push edi
push dword [ebp - 0x28]
call fcn.00402ce0
test eax, eax
jns 0x4023a0
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4023b1
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x18], 0
je 0x40242d
push dword [ebx + 0xc]
call fcn.00417e73
add esp, 4
mov dword [ebx + 0xc], 0
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f
mov dword [ebp - 0x10], 2
setne byte [ebp - 0x19]
jmp 0x40242d
mov esi, dword [ebx]
mov ecx, dword [ebx + 0xc]
test edi, edi
je 0x402429
cmp edi, 0x7fffffff
ja 0x402424
mov eax, 0x7ffffffe
mov edx, edi
sub eax, edi
sub esi, ecx
mov dword [ebp - 0x18], eax
nop
add eax, edx
je 0x402424
movzx eax, word [esi + ecx]
test ax, ax
je 0x40241d
mov word [ecx], ax
add ecx, 2
mov eax, dword [ebp - 0x18]
sub edx, 1
jne 0x402400
jmp 0x402421
test edx, edx
jne 0x402424
sub ecx, 2
xor eax, eax
mov word [ecx], ax
mov byte [ebp - 0x1a], 1
mov eax, dword [ebx + 8]
xor esi, esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], eax
cmp byte [ebp - 0x19], al
je 0x4025aa
push str.NCPrivateLoadAndValidateMPTDll:_Looking_in_current_directory_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], edi
mov byte [ebp - 4], 1
cmp dword [ebx], edi
je 0x40259c
mov eax, dword [ebx + 4]
test eax, eax
je 0x40259c
cmp eax, 0x8000
ja 0x40259c
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 - 0x18], eax
test eax, eax
je 0x4024fe
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403940
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
test edi, edi
je 0x4024f5
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, eax
test ecx, ecx
jne 0x402509
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebp - 0x10], eax
call fcn.00403960
add esp, 4
xor edi, edi
mov dword [ebp - 0x14], edi
jmp 0x402507
mov dword [ebp - 0x10], 0xe
jmp 0x402507
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
xor ecx, ecx
test edi, edi
je 0x402583
mov eax, dword [ebx + 4]
mov edi, 0xe
add eax, 2
mov dword [ebp - 0x10], edi
add eax, ecx
mov dword [ebp - 0x18], eax
add eax, eax
push eax
call fcn.00417e8e
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je 0x402586
push dword [ebx]
push dword [ebp - 0x14]
push str._ls_ls
push dword [ebp - 0x18]
push eax
call fcn.00402da0
add esp, 0x14
test eax, eax
js 0x402579
push dword [ebx + 0xc]
lea ecx, [ebp - 0xa0]
call fcn.00401790
push 0
lea ecx, [ebp - 0xa0]
call fcn.00402e90
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.004017c0
jmp 0x402586
mov edi, 0x6f
mov dword [ebp - 0x10], edi
jmp 0x402586
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0
test eax, eax
je 0x4025df
push eax
call fcn.00403960
add esp, 4
jmp 0x4025df
mov edi, 0x57
mov byte [ebp - 4], 0
mov dword [ebp - 0x10], edi
jmp 0x4025df
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4025dc
push eax
lea ecx, [ebp - 0xa0]
call fcn.00401790
push 0
lea ecx, [ebp - 0xa0]
call fcn.00402e90
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.004017c0
jmp 0x4025df
mov edi, dword [ebp - 0x10]
cmp edi, 2
je 0x4025f0
cmp edi, 0x80092003
jne 0x4027e4
cmp byte [ebp - 0x1a], 0
jne 0x4027e4
push str.NCPrivateLoadAndValidateMPTDll:_Looking_in_EXE_directory_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x14], 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.00403940
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
test esi, esi
je 0x402693
push edi
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x18], eax
cmp edi, eax
jne 0x402669
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x402666
push esi
add edi, edi
call fcn.00403960
add esp, 4
mov dword [ebp - 0x44], 0
jmp 0x402611
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x402677
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x40], eax
xor eax, eax
jmp 0x40269b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [ebp - 0x14], eax
call fcn.00403960
mov eax, dword [ebp - 0x14]
add esp, 4
xor esi, esi
mov dword [ebp - 0x44], esi
jmp 0x40269b
mov eax, 0xe
mov dword [ebp - 0x14], eax
mov edi, eax
mov dword [ebp - 0x10], edi
test esi, esi
je 0x40274a
push 0x5c
push esi
call fcn.0040db9c
mov edi, dword [ebp - 0x14]
add esp, 8
mov dword [ebp - 0x10], edi
test eax, eax
je 0x40274a
sub eax, esi
xor ecx, ecx
sar eax, 1
mov edx, 2
mov dword [ebp - 0x2c], eax
inc eax
mov dword [ebp - 0x18], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403940
mov edx, eax
mov dword [ebp - 0x10], edi
add esp, 4
mov dword [ebp - 0x3c], edx
test edx, edx
je 0x40274c
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x402732
cmp eax, 0x7fffffff
ja 0x402729
mov edi, dword [ebp - 0x2c]
cmp edi, 0x7ffffffe
ja 0x40272d
push edi
push esi
push 0
push eax
push edx
call fcn.00402e20
mov edx, dword [ebp - 0x3c]
test eax, eax
js 0x402732
mov ecx, edi
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x10], edi
jmp 0x40274e
test eax, eax
je 0x402732
xor eax, eax
mov word [edx], ax
mov edi, 0x54f
push edx
mov dword [ebp - 0x10], edi
call fcn.00403960
add esp, 4
xor edx, edx
mov dword [ebp - 0x3c], edx
jmp 0x40274c
xor edx, edx
xor ecx, ecx
test edx, edx
je 0x4027e4
mov eax, dword [ebx + 4]
add eax, 2
add ecx, eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x402782
mov edi, dword [ebp - 0x20]
cmp edi, ecx
jae 0x402796
push eax
call fcn.00417e73
mov ecx, dword [ebp - 0x18]
add esp, 4
mov dword [ebx + 0xc], 0
lea eax, [ecx + ecx]
mov edi, ecx
push eax
call fcn.00417e8e
mov edx, dword [ebp - 0x3c]
add esp, 4
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x10], 0xe
test eax, eax
je 0x402817
push dword [ebx]
push edx
push str._ls_ls
push edi
push dword [ebx + 0xc]
call fcn.00402da0
add esp, 0x14
test eax, eax
js 0x402806
push dword [ebx + 0xc]
lea ecx, [ebp - 0xa0]
call fcn.00401790
push 0
lea ecx, [ebp - 0xa0]
call fcn.00402e90
mov edi, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x10], edi
call fcn.004017c0
cmp edi, 0x800b010e
jg 0x40280f
je 0x402a84
cmp edi, 0x80092026
je 0x402a84
cmp edi, 0x800b0101
jmp 0x402811
mov dword [ebp - 0x10], 0x6f
jmp 0x402817
test edi, edi
je 0x402a84
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x402826
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
test esi, esi
jne 0x402897
mov edi, 0x104
nop
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403940
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
test esi, esi
je 0x402a37
push edi
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x24], eax
cmp edi, eax
jne 0x40288c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x402889
push esi
add edi, edi
call fcn.00403960
add esp, 4
mov dword [ebp - 0x44], 0
jmp 0x402830
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x402935
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x402a37
mov ecx, 0x8000
cmp word [eax], 0
je 0x4028b5
add eax, 2
sub ecx, 1
jne 0x4028a7
mov eax, 0x8000
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
mov dword [ebp - 0x20], edx
test ecx, ecx
je 0x402a37
test esi, esi
jne 0x402971
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.00403940
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
test esi, esi
je 0x40296e
push edi
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x18], eax
cmp edi, eax
jne 0x40294e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40294b
push esi
add edi, edi
call fcn.00403960
add esp, 4
mov dword [ebp - 0x44], 0
jmp 0x4028e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.00403960
add esp, 4
xor esi, esi
jmp 0x402a37
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40295a
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
jmp 0x402974
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.00403960
add esp, 4
xor esi, esi
mov dword [ebp - 0x44], esi
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
add edx, 0x200
add eax, edx
mov dword [ebp - 0x2c], eax
add eax, eax
push eax
call fcn.00417e8e
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
je 0x402a37
test esi, esi
jne 0x402a0a
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.00403940
mov esi, eax
add esp, 4
test esi, esi
je 0x402a0a
push edi
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x18], eax
cmp edi, eax
jne 0x4029f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4029f2
push esi
add edi, edi
call fcn.00403960
add esp, 4
mov dword [ebp - 0x44], 0
jmp 0x4029a0
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x402a0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.00403960
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
push eax
push esi
push str.NotComDllGetInterface:__ls_loading__ls__WinVerifyTrust_failed_with__08x_n
push dword [ebp - 0x2c]
push edi
call fcn.00402da0
add esp, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call fcn.00417e73
add esp, 4
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x402a4e
push eax
call fcn.00417e73
add esp, 4
mov dword [ebx + 0xc], 0
mov edi, dword [ebp - 0x10]
test esi, esi
je 0x402a5e
push esi
call fcn.00403960
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x402a6e
push eax
call fcn.00403960
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 0x402aba
push 8
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x402a51
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebx + 0xc]
mov edi, eax
call fcn.00417e73
add esp, 4
mov dword [ebx + 0xc], 0
jmp 0x402a51
mov edi, 0x54f
jmp 0x402a51
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