Function at 0x40a13c
Capabilities:
Create process on windows
Delete file
Extract resource via kernel32 functions
Set environment variable
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x40a144
push ecx
push ebx
push esi
push edi
mov eax, 0x408fb4
call fcn.00404f54
xor eax, eax
push ebp
push 0x40a700
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40b990]
xor edx, edx
mov dword [eax], edx
lea eax, [ebp - 0x14]
call fcn.00405340
mov edx, dword [ebp - 0x14]
mov eax, 0x4109e8
call fcn.00404084
lea edx, [ebp - 0x18]
mov eax, dword [0x4109e8]
call fcn.00405254
mov edx, dword [ebp - 0x18]
mov eax, 0x4109e8
call fcn.00404084
mov byte [0x4109e4], 1
push 0xa
push 0x40a710
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_FindResourceA
mov edi, eax
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_LoadResource
mov dword [0x4109f4], eax
cmp dword [0x4109f4], 0
je 0x40a2f6
mov byte [0x4109e4], 1
mov eax, dword [0x4109f4]
push eax
call sub.kernel32.dll_LockResource
mov ebx, eax
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_SizeofResource
call fcn.00402c84
mov dword [0x4109f8], eax
mov esi, dword [0x4109f8]
mov eax, 0x40a720
call fcn.00408db4
call fcn.00408ce0
mov dword [0x410a0c], 0
mov dword [0x410a10], 0
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_SizeofResource
xor edx, edx
mov dword [0x410a14], eax
mov dword [0x410a18], edx
jmp 0x40a287
mov edx, 0x4109fc
mov eax, ebx
mov ecx, 0x10
call fcn.00402dfc
mov eax, 0x4109fc
call fcn.00408e30
mov edx, esi
mov eax, 0x4109fc
mov ecx, 0x10
call fcn.00402dfc
add dword [0x410a0c], 0x10
adc dword [0x410a10], 0
add ebx, 0x10
add esi, 0x10
mov eax, dword [0x410a14]
mov edx, dword [0x410a18]
sub eax, dword [0x410a0c]
sbb edx, dword [0x410a10]
cmp edx, 0
jne 0x40a2ab
cmp eax, 0x10
jae 0x40a247
jmp 0x40a2ad
jge 0x40a247
call fcn.00408e24
mov eax, dword [0x4109f8]
xor edx, edx
add eax, dword [0x410a14]
adc edx, dword [0x410a18]
sub eax, 1
sbb edx, 0
mov ebx, eax
movzx ebx, byte [ebx]
movzx eax, bl
mov ecx, dword [0x410a14]
sub ecx, eax
dec ecx
mov edx, 0x4109c4
mov eax, dword [0x4109f8]
call fcn.00402dfc
mov eax, dword [0x4109f4]
push eax
call sub.kernel32.dll_FreeResource
call sub.kernel32.dll_GetCurrentProcessId
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1c]
call fcn.00406240
mov edx, dword [ebp - 0x1c]
mov eax, 0x410a20
call fcn.00404084
call fcn.00402efc
mov eax, 0x2b
call fcn.00402f24
mov ebx, eax
add ebx, 0x2f
mov eax, dword [0x410a20]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40a33c
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jne 0x40a35d
lea eax, [ebp - 0x24]
mov edx, 0x4109c4
call fcn.00404278
mov edx, dword [ebp - 0x24]
mov eax, 0x410a20
call fcn.004042bc
jmp 0x40a382
mov eax, ebx
add al, 0xd0
sub al, 0xa
jb 0x40a36b
add al, 0xf9
sub al, 0x1a
jae 0x40a382
lea eax, [ebp - 0x28]
mov edx, ebx
call fcn.004041fc
mov edx, dword [ebp - 0x28]
mov eax, 0x410a20
call fcn.004042bc
mov eax, dword [0x410a20]
call fcn.004042b0
cmp eax, 0xc
jne 0x40a319
lea eax, [ebp - 0x2c]
mov ecx, dword [0x410a20]
mov edx, dword [0x4109e8]
call fcn.00404308
mov eax, dword [ebp - 0x2c]
call fcn.0040510c
test al, al
jne 0x40a2f6
mov eax, 0x410a20
mov ecx, dword [0x410a20]
mov edx, dword [0x4109e8]
call fcn.00404308
mov eax, 0x4109ec
mov edx, dword [0x410a20]
call fcn.00404084
push 0xa
push 0x40a73c
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_FindResourceA
mov edi, eax
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_LoadResource
mov dword [0x4109f4], eax
cmp dword [0x4109f4], 0
je 0x40a57e
cmp byte [0x4109e4], 0
jne 0x40a41a
xor eax, eax
jmp 0x40a41c
mov al, 1
mov byte [0x4109e4], al
mov eax, dword [0x4109f4]
push eax
call sub.kernel32.dll_LockResource
mov ebx, eax
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_SizeofResource
call fcn.00402c84
mov dword [0x4109f8], eax
mov esi, dword [0x4109f8]
mov eax, 0x40a720
call fcn.00408db4
call fcn.00408ce0
mov dword [0x410a0c], 0
mov dword [0x410a10], 0
push edi
mov eax, dword [0x40e7f0]
push eax
call sub.kernel32.dll_SizeofResource
xor edx, edx
mov dword [0x410a14], eax
mov dword [0x410a18], edx
jmp 0x40a4c9
mov edx, 0x4109fc
mov eax, ebx
mov ecx, 0x10
call fcn.00402dfc
mov eax, 0x4109fc
call fcn.00408e30
mov edx, esi
mov eax, 0x4109fc
mov ecx, 0x10
call fcn.00402dfc
add dword [0x410a0c], 0x10
adc dword [0x410a10], 0
add ebx, 0x10
add esi, 0x10
mov eax, dword [0x410a14]
mov edx, dword [0x410a18]
sub eax, dword [0x410a0c]
sbb edx, dword [0x410a10]
cmp edx, 0
jne 0x40a4ed
cmp eax, 0x10
jae 0x40a489
jmp 0x40a4ef
jge 0x40a489
call fcn.00408e24
mov eax, dword [0x4109f8]
xor edx, edx
add eax, dword [0x410a14]
adc edx, dword [0x410a18]
sub eax, 1
sbb edx, 0
mov ebx, eax
movzx ebx, byte [ebx]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [0x4109ec]
call fcn.00404428
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
push 0
push 0x410a1c
movzx eax, bl
mov edx, dword [0x410a14]
sub edx, eax
dec edx
push edx
mov eax, dword [0x4109f8]
push eax
mov edi, esi
push edi
call sub.kernel32.dll_WriteFile_1
push edi
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x4109f4]
push eax
call sub.kernel32.dll_FreeResource
push 0x102
mov eax, dword [0x4109ec]
call fcn.00404428
push eax
call sub.kernel32.dll_SetFileAttributesA
cmp byte [0x4109e4], 0
je 0x40a6d8
lea eax, [ebp - 0x30]
call fcn.00405450
mov eax, dword [ebp - 0x30]
call fcn.00404428
push eax
push 0x40a744
call sub.kernel32.dll_SetEnvironmentVariableA
push 0x40a754
push dword [0x4109ec]
push 0x40a76c
lea eax, [ebp - 0x34]
mov edx, dword [0x40ba74]
mov edx, dword [edx]
call fcn.0040420c
push dword [ebp - 0x34]
push 0x40a778
mov eax, 0x4109f0
mov edx, 5
call fcn.00404384
cmp dword [0x4109cc], 0x8000
jne 0x40a5fc
push 0x30
push 0x40a77c
push 0x40a794
push 0
call sub.user32.dll_MessageBoxA_1
mov eax, 0x410a34
xor ecx, ecx
mov edx, 0x44
call fcn.00402fec
mov dword [0x410a34], 0x44
mov dword [0x410a60], 1
mov word [0x410a64], 0
mov eax, 0x410a28
xor ecx, ecx
mov edx, 0xc
call fcn.00402fec
mov dword [0x410a28], 0xc
mov dword [0x410a30], 0xffffffff
xor eax, eax
mov dword [0x410a2c], eax
push 0x410a78
push 0x410a34
push 0
push 0
push 0x20
push 0xffffffffffffffff
push 0x410a28
push 0x410a28
mov eax, dword [0x4109f0]
call fcn.00404428
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40a6bb
push 0xffffffffffffffff
mov eax, dword [0x410a78]
push eax
call sub.kernel32.dll_WaitForSingleObject
push 0x410a24
mov eax, dword [0x410a78]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [0x410a78]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x410a7c]
push eax
call sub.kernel32.dll_CloseHandle
mov ebx, dword [0x410a24]
mov eax, dword [0x4109ec]
call fcn.00404428
push eax
call sub.kernel32.dll_DeleteFileA
mov eax, dword [0x40b990]
mov dword [eax], ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a707
lea eax, [ebp - 0x34]
mov edx, 5
call fcn.00404054
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404054
ret