Function at 0x405080
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Create process on windows
Create process suspended
Create thread
Extract resource via kernel32 functions
Get common file path
Link many functions at runtime
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x79c
push 0
push 0
push 0
push 0x4071d0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x440], eax
push 0x208
push 0
push 0x412418
call fcn.00404d60
add esp, 0xc
push 0x207
push 0x412418
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x4018b0
push 0x4018c0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d4c], eax
push 0x4018d0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x405106
jmp 0x405446
push 0x4018dc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x4051a0
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4018e4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x412c38], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405151
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp - 0x10], 1
push 4
push 4
lea eax, [ebp - 0x10]
push eax
push 0x401908
call fcn.0040b6d0
add esp, 0x10
push 0x100
push 0
push 0x4131f0
call fcn.00404d60
add esp, 0xc
push 0xff
push 0x4131f0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x4131f0
call fcn.0040b520
add esp, 4
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x412d54], eax
call fcn.00404b30
cmp eax, 1
jne 0x4051c8
mov dword [ebp - 0x31c], 0x29
jmp 0x4051d2
mov dword [ebp - 0x31c], 0x25
push 0x1fe
push 0
lea ecx, [ebp - 0x690]
push ecx
call fcn.00404d60
add esp, 0xc
lea edx, [ebp - 0x690]
push edx
push 0
push 0
mov eax, dword [ebp - 0x31c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x498
push 0
push 0x412d58
call fcn.00404d60
add esp, 0xc
lea ecx, [ebp - 0x690]
push ecx
push 0x412d74
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x401918
push 0x412d74
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x401934
push 0x413170
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x40195c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
push 0x40196c
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d68], eax
push 0x40197c
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d70], eax
push 0x401990
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d6c], eax
push 0x401998
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d58], eax
push 0x4019a8
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d5c], eax
push 0x4019b4
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d60], eax
push 0x4019c4
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412d64], eax
mov dword [0x412c34], 0x498
mov dword [0x4120a8], 0x412d58
mov eax, 0x404da0
sub eax, 0x404c40
mov dword [0x4121b4], eax
mov dword [0x412d50], 0x404c40
push 0x10
push 0
lea ecx, [ebp - 0x32c]
push ecx
call fcn.00404d60
add esp, 0xc
push 0x44
push 0
lea edx, [ebp - 0x488]
push edx
call fcn.00404d60
add esp, 0xc
mov dword [ebp - 0x488], 0x44
push 0x4019d4
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [ebp - 0x32c]
push ecx
lea edx, [ebp - 0x488]
push edx
push 0
push 0
push 4
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ecx, dword [ebp - 0x324]
mov dword [0x4120a4], ecx
push 1
mov edx, dword [ebp - 0x32c]
push edx
push 0x407be0
call fcn.00405ac0
add esp, 0xc
push 3
push 0x4019f0
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x79c], eax
mov eax, dword [ebp - 0x79c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x79c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x43c], eax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
mov dword [ebp - 0x48c], 0
lea eax, [ebp - 0x48c]
push eax
push 4
mov ecx, dword [ebp - 0x43c]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x1fe
push 0
lea eax, [ebp - 0x318]
push eax
call fcn.00404d60
add esp, 0xc
push 0x1fe
lea ecx, [ebp - 0x318]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0x318]
push eax
call fcn.00405460
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]