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

Disassembly:
sub esp, 0x368
mov ecx, 0x41
xor eax, eax
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x170]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x170]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov byte [esp + eax + 0x170], 0
mov ebp, 1
cmp ebp, 1
mov edx, str.HASP01.exe
je 0x401049
mov edx, str.HASP02.exe
lea edi, [esp + 0x170]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x6c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.RESDATA
mov eax, ecx
mov esi, edi
mov edi, ebx
lea ebx, [esp + 0x70]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
cmp ebp, 1
setne al
add eax, 0x89
and eax, 0xffff
push eax
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
push 0
push 2
push 0
push 0
lea ecx, [esp + 0x80]
push 0x40000000
push ecx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea edx, [esp + 0x24]
push 0
push edx
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
mov eax, dword [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov edi, 0x405030
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x274]
mov dword [esp + 0x20], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x274]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x6c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x274]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x405030
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x174]
push ecx
push edx
push 0
push 0
push 0
push 0
lea eax, [esp + 0x290]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0xffffffffffffffff
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
inc ebp
cmp ebp, 2
jle 0x40103a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x368
ret 0x10