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, dword [0x40baa4]
mov byte [eax], 1
mov eax, 0x408fb4
call fcn.00404f54
xor eax, eax
push ebp
push 0x40a6b7
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 0x40a6c8
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 0x40a2fe
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, 0x40a6d8
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 0x40a28f
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 0x40a2b3
cmp eax, 0x10
jae 0x40a24f
jmp 0x40a2b5
jge 0x40a24f
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 0x40a344
sub eax, 4
mov eax, dword [eax]
cmp eax, 8
jne 0x40a365
lea eax, [ebp - 0x24]
mov edx, 0x4109c4
call fcn.00404278
mov edx, dword [ebp - 0x24]
mov eax, 0x410a20
call fcn.004042bc
jmp 0x40a38a
mov eax, ebx
add al, 0xd0
sub al, 0xa
jb 0x40a373
add al, 0xf9
sub al, 0x1a
jae 0x40a38a
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 0x40a321
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 0x40a2fe
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 0x40a6f4
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 0x40a586
cmp byte [0x4109e4], 0
jne 0x40a422
xor eax, eax
jmp 0x40a424
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, 0x40a6d8
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 0x40a4d1
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 0x40a4f5
cmp eax, 0x10
jae 0x40a491
jmp 0x40a4f7
jge 0x40a491
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 0x40a68f
lea eax, [ebp - 0x30]
call fcn.00405450
mov eax, dword [ebp - 0x30]
call fcn.00404428
push eax
push 0x40a6fc
call sub.kernel32.dll_SetEnvironmentVariableA
push 0x40a70c
push dword [0x4109ec]
push 0x40a724
lea eax, [ebp - 0x34]
mov edx, dword [0x40ba74]
mov edx, dword [edx]
call fcn.0040420c
push dword [ebp - 0x34]
push 0x40a730
mov eax, 0x4109f0
mov edx, 5
call fcn.00404384
mov eax, 0x410a28
xor ecx, ecx
mov edx, 0x44
call fcn.00402fec
mov dword [0x410a28], 0x44
mov dword [0x410a54], 1
mov word [0x410a58], 0
push 0x410a6c
push 0x410a28
push 0
push 0
push 0x20
push 0
push 0
push 0
mov eax, dword [0x4109f0]
call fcn.00404428
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40a672
push 0xffffffffffffffff
mov eax, dword [0x410a6c]
push eax
call sub.kernel32.dll_WaitForSingleObject
push 0x410a24
mov eax, dword [0x410a6c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [0x410a6c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x410a70]
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 0x40a6be
lea eax, [ebp - 0x34]
mov edx, 5
call fcn.00404054
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404054
ret