Function at 0x40913c
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 0x409144
push ecx
push ebx
push esi
push edi
mov eax, dword [0x40aaa0]
mov byte [eax], 1
mov eax, 0x408fa0
call fcn.00404f54
xor eax, eax
push ebp
push 0x4096a1
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40a98c]
xor edx, edx
mov dword [eax], edx
lea eax, [ebp - 0x14]
call fcn.00405340
mov edx, dword [ebp - 0x14]
mov eax, 0x40f9d4
call fcn.00404084
lea edx, [ebp - 0x18]
mov eax, dword [0x40f9d4]
call fcn.00405254
mov edx, dword [ebp - 0x18]
mov eax, 0x40f9d4
call fcn.00404084
mov byte [0x40f9d0], 1
push 0xa
push 0x4096b0
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_FindResourceA
mov edi, eax
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_LoadResource
mov dword [0x40f9e0], eax
cmp dword [0x40f9e0], 0
je 0x4092fe
mov byte [0x40f9d0], 1
mov eax, dword [0x40f9e0]
push eax
call sub.kernel32.dll_LockResource
mov ebx, eax
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_SizeofResource
call fcn.00402c84
mov dword [0x40f9e4], eax
mov esi, dword [0x40f9e4]
mov eax, 0x4096c0
call fcn.00408da0
call fcn.00408ccc
mov dword [0x40f9f8], 0
mov dword [0x40f9fc], 0
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_SizeofResource
xor edx, edx
mov dword [0x40fa00], eax
mov dword [0x40fa04], edx
jmp 0x40928f
mov edx, 0x40f9e8
mov eax, ebx
mov ecx, 0x10
call fcn.00402dfc
mov eax, 0x40f9e8
call fcn.00408e1c
mov edx, esi
mov eax, 0x40f9e8
mov ecx, 0x10
call fcn.00402dfc
add dword [0x40f9f8], 0x10
adc dword [0x40f9fc], 0
add ebx, 0x10
add esi, 0x10
mov eax, dword [0x40fa00]
mov edx, dword [0x40fa04]
sub eax, dword [0x40f9f8]
sbb edx, dword [0x40f9fc]
cmp edx, 0
jne 0x4092b3
cmp eax, 0x10
jae 0x40924f
jmp 0x4092b5
jge 0x40924f
call fcn.00408e10
mov eax, dword [0x40f9e4]
xor edx, edx
add eax, dword [0x40fa00]
adc edx, dword [0x40fa04]
sub eax, 1
sbb edx, 0
mov ebx, eax
movzx ebx, byte [ebx]
movzx eax, bl
mov ecx, dword [0x40fa00]
sub ecx, eax
dec ecx
mov edx, 0x40f9c4
mov eax, dword [0x40f9e4]
call fcn.00402dfc
mov eax, dword [0x40f9e0]
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, 0x40fa0c
call fcn.00404084
call fcn.00402efc
mov eax, 0x2b
call fcn.00402f24
mov ebx, eax
add ebx, 0x2f
mov eax, dword [0x40fa0c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x409344
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jne 0x409365
lea eax, [ebp - 0x24]
mov edx, 0x40f9c4
call fcn.00404278
mov edx, dword [ebp - 0x24]
mov eax, 0x40fa0c
call fcn.004042bc
jmp 0x40938a
mov eax, ebx
add al, 0xd0
sub al, 0xa
jb 0x409373
add al, 0xf9
sub al, 0x1a
jae 0x40938a
lea eax, [ebp - 0x28]
mov edx, ebx
call fcn.004041fc
mov edx, dword [ebp - 0x28]
mov eax, 0x40fa0c
call fcn.004042bc
mov eax, dword [0x40fa0c]
call fcn.004042b0
cmp eax, 0xc
jne 0x409321
lea eax, [ebp - 0x2c]
mov ecx, dword [0x40fa0c]
mov edx, dword [0x40f9d4]
call fcn.00404308
mov eax, dword [ebp - 0x2c]
call fcn.0040510c
test al, al
jne 0x4092fe
mov eax, 0x40f9d8
mov edx, dword [0x40fa0c]
call fcn.00404084
push 0xa
push 0x4096dc
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_FindResourceA
mov edi, eax
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_LoadResource
mov dword [0x40f9e0], eax
cmp dword [0x40f9e0], 0
je 0x409570
cmp byte [0x40f9d0], 0
jne 0x40940c
xor eax, eax
jmp 0x40940e
mov al, 1
mov byte [0x40f9d0], al
mov eax, dword [0x40f9e0]
push eax
call sub.kernel32.dll_LockResource
mov ebx, eax
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_SizeofResource
call fcn.00402c84
mov dword [0x40f9e4], eax
mov esi, dword [0x40f9e4]
mov eax, 0x4096c0
call fcn.00408da0
call fcn.00408ccc
mov dword [0x40f9f8], 0
mov dword [0x40f9fc], 0
push edi
mov eax, dword [0x40d7f0]
push eax
call sub.kernel32.dll_SizeofResource
xor edx, edx
mov dword [0x40fa00], eax
mov dword [0x40fa04], edx
jmp 0x4094bb
mov edx, 0x40f9e8
mov eax, ebx
mov ecx, 0x10
call fcn.00402dfc
mov eax, 0x40f9e8
call fcn.00408e1c
mov edx, esi
mov eax, 0x40f9e8
mov ecx, 0x10
call fcn.00402dfc
add dword [0x40f9f8], 0x10
adc dword [0x40f9fc], 0
add ebx, 0x10
add esi, 0x10
mov eax, dword [0x40fa00]
mov edx, dword [0x40fa04]
sub eax, dword [0x40f9f8]
sbb edx, dword [0x40f9fc]
cmp edx, 0
jne 0x4094df
cmp eax, 0x10
jae 0x40947b
jmp 0x4094e1
jge 0x40947b
call fcn.00408e10
mov eax, dword [0x40f9e4]
xor edx, edx
add eax, dword [0x40fa00]
adc edx, dword [0x40fa04]
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 [0x40f9d8]
call fcn.00404428
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
push 0
push 0x40fa08
movzx eax, bl
mov edx, dword [0x40fa00]
sub edx, eax
dec edx
push edx
mov eax, dword [0x40f9e4]
push eax
mov edi, esi
push edi
call sub.kernel32.dll_WriteFile_1
push edi
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x40f9e0]
push eax
call sub.kernel32.dll_FreeResource
push 0x102
mov eax, dword [0x40f9d8]
call fcn.00404428
push eax
call sub.kernel32.dll_SetFileAttributesA
cmp byte [0x40f9d0], 0
je 0x409679
lea eax, [ebp - 0x30]
call fcn.00405450
mov eax, dword [ebp - 0x30]
call fcn.00404428
push eax
push 0x4096e4
call sub.kernel32.dll_SetEnvironmentVariableA
push 0x4096f4
push dword [0x40f9d8]
push 0x40970c
lea eax, [ebp - 0x34]
mov edx, dword [0x40aa70]
mov edx, dword [edx]
call fcn.0040420c
push dword [ebp - 0x34]
push 0x409718
mov eax, 0x40f9dc
mov edx, 5
call fcn.00404384
mov eax, 0x40fa14
xor ecx, ecx
mov edx, 0x44
call fcn.00402fec
mov dword [0x40fa14], 0x44
mov dword [0x40fa40], 1
mov word [0x40fa44], 0
push 0x40fa58
push 0x40fa14
push 0
push 0
push 0x20
push 0
push 0
push 0
mov eax, dword [0x40f9dc]
call fcn.00404428
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40965c
push 0xffffffffffffffff
mov eax, dword [0x40fa58]
push eax
call sub.kernel32.dll_WaitForSingleObject
push 0x40fa10
mov eax, dword [0x40fa58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [0x40fa58]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x40fa5c]
push eax
call sub.kernel32.dll_CloseHandle
mov ebx, dword [0x40fa10]
mov eax, dword [0x40f9d8]
call fcn.00404428
push eax
call sub.kernel32.dll_DeleteFileA
mov eax, dword [0x40a98c]
mov dword [eax], ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4096a8
lea eax, [ebp - 0x34]
mov edx, 5
call fcn.00404054
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404054
ret