Function at 0x4017f9
Capabilities:
Get common file path
Link many functions at runtime
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x470
push edi
lea eax, [ebp - 0x24c]
push eax
push 0x104
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str._update.dat
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [ebp - 0x24c]
push eax
call edi
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x401b0d
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetProcId
push eax
call esi
test eax, eax
je 0x40188c
call eax
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x401b03
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x401880
mov byte [ebp - 1], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401b03
push ebx
call fcn.004011d6
test al, al
je 0x4019ac
push str.psapi.dll
call edi
mov edi, eax
test edi, edi
je 0x401b02
push str.EnumProcesses
push edi
call esi
push str.EnumProcessModules
push edi
mov ebx, eax
call esi
push str.GetModuleBaseNameA
push edi
mov dword [ebp - 0xc], eax
call esi
test ebx, ebx
mov dword [ebp - 0x14], eax
je 0x4019a2
cmp dword [ebp - 0xc], 0
je 0x4019a2
mov esi, 0x1000
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
lea eax, [ebp - 0x10]
push eax
push esi
push edi
call ebx
and dword [ebp - 8], 0
test dword [ebp - 0x10], 0xfffffffc
jbe 0x401996
mov eax, dword [ebp - 8]
push dword [edi + eax*4]
push 0
push 0x411
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x401984
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [ebp - 0xc]
test eax, eax
je 0x40197d
push 0x104
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x18]
push ebx
call dword [ebp - 0x14]
test eax, eax
je 0x40197d
mov esi, str.SysUpd
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
je 0x401974
add esi, 0xf
cmp esi, 0x404515
jl 0x40194d
jmp 0x40197d
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
inc dword [ebp - 8]
shr eax, 2
cmp dword [ebp - 8], eax
jb 0x401906
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x401b02
push str.Failed_to_find_PSAPI.dll_entry_points_n
jmp 0x401afc
push str.kernel32.dll
call edi
mov edi, eax
test edi, edi
je 0x401b02
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32First
push edi
mov dword [ebp - 8], eax
call esi
push str.Process32Next
push edi
mov ebx, eax
call esi
push str.Module32First
push edi
mov dword [ebp - 0xc], eax
call esi
push str.Module32Next
push edi
mov dword [ebp - 0x10], eax
call esi
xor edi, edi
cmp dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
je 0x401af7
cmp ebx, edi
je 0x401af7
cmp dword [ebp - 0xc], edi
je 0x401af7
cmp dword [ebp - 0x10], edi
je 0x401af7
cmp eax, edi
je 0x401af7
push edi
push 2
call dword [ebp - 8]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x401b02
lea ecx, [ebp - 0x148]
push ecx
push eax
mov dword [ebp - 0x148], 0x128
call ebx
jmp 0x401aed
cmp dword [ebp - 0x140], edi
je 0x401ae0
push dword [ebp - 0x140]
push 8
call dword [ebp - 8]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401ae0
lea eax, [ebp - 0x470]
push eax
push ebx
mov dword [ebp - 0x470], 0x224
call dword [ebp - 0x10]
jmp 0x401ab5
mov esi, str.SysUpd
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
je 0x401abb
add esi, 0xf
cmp esi, 0x404515
jl 0x401a85
lea eax, [ebp - 0x470]
push eax
push ebx
call dword [ebp - 0x14]
test eax, eax
jne 0x401a80
jmp 0x401ad9
push dword [ebp - 0x140]
push edi
push 0x411
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, edi
je 0x401ad9
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 0x18]
call dword [ebp - 0xc]
test eax, eax
jne 0x401a4b
jmp 0x401b02
push str.Failed_to_load_find_kernel32.dll_entry_points_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
mov al, byte [ebp - 1]
pop edi
leave
ret