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

Disassembly:
push ebp
lea ebp, [esp - 0x2210]
mov eax, 0x2290
call fcn.00407670
mov eax, dword [0x40b478]
xor eax, ebp
mov dword [ebp + 0x220c], eax
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call fcn.00401bb9
push eax
call fcn.004013a9
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceW]
pop ecx
pop ecx
push 0x17
push str.129
push ebx
mov byte [ebp - 0x19], bl
call edi
mov esi, eax
cmp esi, ebx
je 0x40107e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x40107e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x40107e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, 2
jne 0x40107e
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0x31
jne 0x40107e
mov byte [ebp - 0x19], 1
lea eax, [ebp + 0x1fec]
push eax
push ebx
push ebx
push 0x801c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.Temp
mov esi, 0x104
lea eax, [ebp + 0x1fec]
push esi
push eax
call fcn.0040132f
add esp, 0xc
push ebx
lea eax, [ebp + 0x1fec]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
cmp eax, ebx
je 0x4010d3
cmp eax, 0xb7
je 0x4010d3
cmp eax, 0x50
je 0x4010d3
xor eax, eax
jmp 0x401315
mov dword [ebp - 0x18], ebx
call fcn.004013b6
cdq
push 0x1a
pop ecx
idiv ecx
mov eax, dword [ebp - 0x18]
add edx, 0x41
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xa
mov word [ebp + eax*2 + 0x21f4], dx
jl 0x4010d6
push 0x409a18
lea eax, [ebp + 0x1fec]
push esi
push eax
mov word [ebp + 0x2208], bx
call fcn.0040132f
lea eax, [ebp + 0x21f4]
push eax
lea eax, [ebp + 0x1fec]
push esi
push eax
call fcn.0040132f
push 0x409a1c
lea eax, [ebp + 0x1fec]
push esi
push eax
call fcn.0040132f
add esp, 0x24
push 0x17
push str.130
push ebx
call edi
mov esi, eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x4011d9
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
lea eax, [ebp + 0x1fec]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x4010cc
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x20]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x4011d0
lea eax, [esi + 1]
push eax
call fcn.00401436
push esi
push dword [ebp - 0x24]
mov edi, eax
push edi
call fcn.004014a0
add esp, 0x10
push ebx
lea eax, [ebp - 0x2c]
push eax
push esi
push edi
push dword [ebp - 0x18]
mov byte [edi + esi], bl
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FreeResource]
push str.wscript.exe
mov esi, 0x1000
lea eax, [ebp - 0x14]
push esi
push eax
mov word [ebp - 0x14], bx
call fcn.0040132f
add esp, 0xc
cmp byte [ebp - 0x19], bl
je 0x40120b
push str.___B
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
add esp, 0xc
mov edi, 0x409a58
push edi
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
lea eax, [ebp + 0x1fec]
push eax
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
push 0x409a60
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
xor eax, eax
inc eax
add esp, 0x24
cmp dword [0x40bd68], eax
mov dword [ebp - 0x18], eax
jle 0x40128c
push edi
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
mov eax, dword [0x40bd70]
mov ecx, dword [ebp - 0x18]
push dword [eax + ecx*4]
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
push 0x409a68
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0040132f
add esp, 0x24
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x40bd68]
jl 0x40124c
push 0x40
lea eax, [ebp - 0x7c]
push ebx
push eax
mov dword [ebp - 0x80], ebx
call fcn.00401b30
push 0x10
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.00401b30
add esp, 0x18
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x80]
push ecx
push ebx
push ebx
push 0x20
xor eax, eax
inc eax
push eax
push ebx
mov dword [ebp - 0x54], eax
push ebx
lea eax, [ebp - 0x14]
push eax
push ebx
mov dword [ebp - 0x80], 0x44
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x4c], ebx
mov word [ebp - 0x4e], bx
mov dword [ebp - 0x78], ebx
mov word [ebp - 0x50], 5
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4012ed
or eax, 0xffffffff
jmp 0x401315
push 0xffffffffffffffff
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
lea eax, [ebp + 0x1fec]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x220c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401baa
add ebp, 0x2210
leave
ret 0x10