Function at 0x40a98d
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, 0x445bdf
call fcn.004372c5
mov esi, 0x208
xor ebx, ebx
push esi
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call fcn.00435430
push esi
lea eax, [ebp - 0x42e]
push ebx
push eax
mov word [ebp - 0x430], bx
call fcn.00435430
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 0x40ae47
push esi
lea eax, [ebp - 0x430]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40ae47
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.0040f7f0
test al, al
jne 0x40aa6b
push ebx
push 1
lea esi, [ebp - 0x484]
call fcn.004012b6
or dword [ebp - 4], 0xffffffff
jmp 0x40ae3b
push str..bat
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.0040438b
add esp, 0xc
lea eax, [ebp - 0x44c]
lea ecx, [ebp - 0x484]
call fcn.0040dca0
test al, al
jne 0x40aaab
push ebx
push 1
lea esi, [ebp - 0x44c]
call fcn.004012b6
jmp 0x40aa54
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.00403d3c
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403d3c
push str.___del__0___else__ping_127.0.0.1__n_2del__
lea eax, [ebp - 0x468]
push eax
call fcn.00403d3c
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403d3c
push str.__0_
lea eax, [ebp - 0x468]
push eax
call fcn.00403d3c
push 4
call fcn.004354c3
cmp eax, ebx
pop ecx
je 0x40ab3a
or dword [eax], 0xffffffff
mov esi, eax
mov dword [ebp - 0x4c4], esi
jmp 0x40ab42
mov dword [ebp - 0x4c4], ebx
mov esi, ebx
mov dword [ebp - 0x4d0], esi
cmp esi, ebx
mov byte [ebp - 4], 4
je 0x40ab8e
push 2
pop eax
call fcn.0040eb50
cmp dword [ebp - 0x434], 8
mov ecx, dword [ebp - 0x448]
jae 0x40ab6d
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 0x40aba1
push esi
call fcn.00435588
pop ecx
push ebx
push 1
lea esi, [ebp - 0x468]
call fcn.004012b6
jmp 0x40aa9b
lea edi, [ebp - 0x468]
lea eax, [ebp - 0x4c0]
call fcn.0040f660
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x4ac]
cmp ecx, ebx
jne 0x40ac06
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020ee
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40abde
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435588
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 0x40aa57
cmp dword [ebp - 0x4a8], 0x10
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x4cc], ecx
mov dword [ebp - 0x4c8], ebx
jae 0x40ac27
lea eax, [ebp - 0x4bc]
or edi, 0xffffffff
cmp eax, ebx
je 0x40adec
cmp dword [esi], edi
je 0x40adec
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 0x40adec
mov eax, dword [ebp - 0x4cc]
cmp eax, dword [ebp - 0x4c8]
jne 0x40adec
cmp dword [esi], edi
je 0x40ac7c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40adec
mov dword [esi], edi
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x50c]
push ebx
push eax
call fcn.00435430
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.00404341
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 0x449e18
lea eax, [ebp - 0x44c]
push eax
call fcn.00403d3c
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x40ad05
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 0x40ad50
push ebx
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020ee
mov esi, dword [ebp - 0x4c4]
jmp 0x40abd0
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0x4d4]
call esi
test eax, eax
je 0x40ad38
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40ad38
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 0x40ad40
call fcn.004020ee
mov esi, dword [ebp - 0x4c4]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40adaa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435588
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.0040f6a0
mov al, 1
jmp 0x40ae49
push ebx
push 1
lea ecx, [ebp - 0x4c0]
call fcn.004020ee
mov eax, dword [esi]
cmp eax, edi
je 0x40ae07
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435588
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.0040f6a0
xor al, al
call fcn.00437348
ret