Function at 0x40aa95
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, 0x44638f
call fcn.004378a5
mov esi, 0x208
xor ebx, ebx
push esi
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call fcn.00435a10
push esi
lea eax, [ebp - 0x42e]
push ebx
push eax
mov word [ebp - 0x430], bx
call fcn.00435a10
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 0x40af4f
push esi
lea eax, [ebp - 0x430]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40af4f
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.0040fa50
test al, al
jne 0x40ab73
push ebx
push 1
lea esi, [ebp - 0x484]
call fcn.004012ba
or dword [ebp - 4], 0xffffffff
jmp 0x40af43
push str..bat
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.00404449
add esp, 0xc
lea eax, [ebp - 0x44c]
lea ecx, [ebp - 0x484]
call fcn.0040de10
test al, al
jne 0x40abb3
push ebx
push 1
lea esi, [ebp - 0x44c]
call fcn.004012ba
jmp 0x40ab5c
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.00403daf
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403daf
push str.___del__0___else__ping_127.0.0.1__n_2del__
lea eax, [ebp - 0x468]
push eax
call fcn.00403daf
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00403daf
push str.__0_
lea eax, [ebp - 0x468]
push eax
call fcn.00403daf
push 4
call fcn.00435aa3
cmp eax, ebx
pop ecx
je 0x40ac42
or dword [eax], 0xffffffff
mov esi, eax
mov dword [ebp - 0x4c4], esi
jmp 0x40ac4a
mov dword [ebp - 0x4c4], ebx
mov esi, ebx
mov dword [ebp - 0x4d0], esi
cmp esi, ebx
mov byte [ebp - 4], 4
je 0x40ac96
push 2
pop eax
call fcn.0040ecc0
cmp dword [ebp - 0x434], 8
mov ecx, dword [ebp - 0x448]
jae 0x40ac75
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 0x40aca9
push esi
call fcn.00435b68
pop ecx
push ebx
push 1
lea esi, [ebp - 0x468]
call fcn.004012ba
jmp 0x40aba3
lea edi, [ebp - 0x468]
lea eax, [ebp - 0x4c0]
call fcn.0040f8c0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x4ac]
cmp ecx, ebx
jne 0x40ad0e
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020e3
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40ace6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435b68
pop ecx
push ebx
push edi
lea esi, [ebp - 0x468]
call fcn.004012ba
push ebx
push edi
lea esi, [ebp - 0x44c]
call fcn.004012ba
push ebx
push edi
jmp 0x40ab5f
cmp dword [ebp - 0x4a8], 0x10
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x4cc], ecx
mov dword [ebp - 0x4c8], ebx
jae 0x40ad2f
lea eax, [ebp - 0x4bc]
or edi, 0xffffffff
cmp eax, ebx
je 0x40aef4
cmp dword [esi], edi
je 0x40aef4
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 0x40aef4
mov eax, dword [ebp - 0x4cc]
cmp eax, dword [ebp - 0x4c8]
jne 0x40aef4
cmp dword [esi], edi
je 0x40ad84
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40aef4
mov dword [esi], edi
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x50c]
push ebx
push eax
call fcn.00435a10
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.004043ff
add esp, 0x18
push edi
lea ecx, [ebp - 0x44c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 6
call fcn.00401318
xor edi, edi
push ebx
inc edi
push edi
lea esi, [ebp - 0x528]
mov byte [ebp - 4], 5
call fcn.004012ba
push 0x449e18
lea eax, [ebp - 0x44c]
push eax
call fcn.00403daf
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
jae 0x40ae0d
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 0x40ae58
push ebx
push edi
lea ecx, [ebp - 0x4c0]
call fcn.004020e3
mov esi, dword [ebp - 0x4c4]
jmp 0x40acd8
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0x4d4]
call esi
test eax, eax
je 0x40ae40
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40ae40
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 0x40ae48
call fcn.004020e3
mov esi, dword [ebp - 0x4c4]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40aeb2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435b68
pop ecx
push ebx
push edi
lea esi, [ebp - 0x468]
call fcn.004012ba
push ebx
push edi
lea esi, [ebp - 0x44c]
call fcn.004012ba
push ebx
push edi
lea esi, [ebp - 0x484]
call fcn.004012ba
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x4a4]
push eax
call fcn.0040f900
mov al, 1
jmp 0x40af51
push ebx
push 1
lea ecx, [ebp - 0x4c0]
call fcn.004020e3
mov eax, dword [esi]
cmp eax, edi
je 0x40af0f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00435b68
pop ecx
push ebx
push 1
lea esi, [ebp - 0x468]
call fcn.004012ba
push ebx
push 1
lea esi, [ebp - 0x44c]
call fcn.004012ba
push ebx
push 1
lea esi, [ebp - 0x484]
call fcn.004012ba
mov dword [ebp - 4], edi
lea eax, [ebp - 0x4a4]
push eax
call fcn.0040f900
xor al, al
call fcn.00437928
ret