Function at 0x40b789
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x528
mov eax, dword [0x44e4ec]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, 0x208
xor ebx, ebx
push esi
mov dword [ebp - 0x4cc], eax
lea eax, [ebp - 0x21a]
push ebx
push eax
mov word [ebp - 0x21c], bx
call fcn.00432360
push esi
lea eax, [ebp - 0x42a]
push ebx
push eax
mov word [ebp - 0x42c], bx
call fcn.00432360
add esp, 0x18
mov esi, 0x104
push esi
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40bbb7
push esi
lea eax, [ebp - 0x42c]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40bbb7
lea eax, [ebp - 0x4bc]
call fcn.0040e53b
push 7
pop esi
lea eax, [ebp - 0x480]
push eax
lea eax, [ebp - 0x4bc]
push eax
mov dword [ebp - 0x468], esi
mov dword [ebp - 0x46c], ebx
mov word [ebp - 0x47c], bx
call fcn.0040e9e0
test al, al
jne 0x40b853
push ebx
push 1
jmp 0x40bba1
lea eax, [ebp - 0x448]
push str..bat
push eax
lea eax, [ebp - 0x480]
call fcn.00401fb3
pop ecx
pop ecx
lea eax, [ebp - 0x448]
lea ecx, [ebp - 0x480]
call fcn.0040d764
test al, al
jne 0x40b891
push ebx
push 1
lea esi, [ebp - 0x448]
call fcn.00401451
jmp 0x40b84b
lea eax, [ebp - 0x4bc]
call fcn.0040e5b1
push str.if_not_exist__
lea eax, [ebp - 0x464]
push eax
mov dword [ebp - 0x44c], esi
mov dword [ebp - 0x450], ebx
mov word [ebp - 0x460], bx
call fcn.0040201c
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x464]
push eax
call fcn.0040201c
push str.___del__0___else__ping_127.0.0.1__n_2del__
lea eax, [ebp - 0x464]
push eax
call fcn.0040201c
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x464]
push eax
call fcn.0040201c
push str.__0_
lea eax, [ebp - 0x464]
push eax
call fcn.0040201c
lea esi, [ebp - 0x4c0]
call fcn.0040ec39
lea eax, [ebp - 0x448]
call fcn.0040ec76
test al, al
jne 0x40b93c
mov eax, esi
call fcn.0040ec51
push ebx
push 1
lea esi, [ebp - 0x464]
call fcn.00401451
jmp 0x40b881
lea ecx, [ebp - 0x464]
lea eax, [ebp - 0x49c]
call fcn.0040f3c4
mov edi, dword [ebp - 0x488]
cmp edi, ebx
je 0x40bb6a
cmp dword [ebp - 0x484], 0x10
mov eax, dword [ebp - 0x498]
mov dword [ebp - 0x4c4], ebx
jae 0x40b976
lea eax, [ebp - 0x498]
push eax
lea esi, [ebp - 0x4c4]
lea eax, [ebp - 0x4c0]
call fcn.0040ecae
test al, al
je 0x40bb6a
mov eax, edi
cmp dword [ebp - 0x4c4], eax
jne 0x40bb6a
lea esi, [ebp - 0x4c0]
call fcn.0040ece0
test al, al
je 0x40bb6a
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x508]
push ebx
push eax
call fcn.00432360
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x524]
push eax
mov eax, str._c__
mov dword [ebp - 0x508], esi
mov dword [ebp - 0x4fc], str.Open
call fcn.0040511b
add esp, 0x14
push 0xffffffffffffffff
lea ecx, [ebp - 0x448]
push ecx
xor ebx, ebx
call fcn.004016e8
xor edi, edi
push edi
push 1
lea esi, [ebp - 0x524]
call fcn.00401451
push 0x442ef0
lea eax, [ebp - 0x448]
push eax
call fcn.0040201c
cmp dword [ebp - 0x430], 8
mov eax, dword [ebp - 0x444]
jae 0x40ba33
lea eax, [ebp - 0x444]
mov ebx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4f4], eax
lea eax, [ebp - 0x42c]
add ebx, 0x344
mov dword [ebp - 0x4f8], eax
mov dword [ebp - 0x4ec], edi
mov dword [ebp - 0x504], 0x8040
call fcn.00406713
mov eax, ebx
call fcn.0040670f
mov esi, eax
xor ebx, ebx
call fcn.004011a7
test eax, eax
jbe 0x40ba93
push ebx
call fcn.004011bd
push eax
call fcn.0040dbb1
pop ecx
mov eax, esi
inc ebx
call fcn.004011a7
cmp ebx, eax
jb 0x40ba7a
lea eax, [ebp - 0x508]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x40bae0
xor ebx, ebx
push edi
inc ebx
push ebx
lea ecx, [ebp - 0x49c]
call fcn.004012ec
lea eax, [ebp - 0x4c0]
call fcn.0040ec51
push edi
push ebx
lea esi, [ebp - 0x464]
call fcn.00401451
push edi
push ebx
lea esi, [ebp - 0x448]
call fcn.00401451
push edi
push ebx
jmp 0x40bba1
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0x4d0]
call esi
test eax, eax
je 0x40baa4
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40baa4
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor ebx, ebx
inc ebx
test eax, eax
push edi
lea ecx, [ebp - 0x49c]
push ebx
je 0x40baaf
call fcn.004012ec
lea eax, [ebp - 0x4c0]
call fcn.0040ec51
push edi
push ebx
lea esi, [ebp - 0x464]
call fcn.00401451
push edi
push ebx
lea esi, [ebp - 0x448]
call fcn.00401451
push edi
push ebx
lea esi, [ebp - 0x480]
call fcn.00401451
lea eax, [ebp - 0x4bc]
call fcn.0040e98d
mov al, bl
jmp 0x40bbb9
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x49c]
call fcn.004012ec
lea eax, [ebp - 0x4c0]
call fcn.0040ec51
push ebx
push edi
lea esi, [ebp - 0x464]
call fcn.00401451
push ebx
push edi
lea esi, [ebp - 0x448]
call fcn.00401451
push ebx
push edi
lea esi, [ebp - 0x480]
call fcn.00401451
lea eax, [ebp - 0x4bc]
call fcn.0040e98d
xor al, al
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043220f
leave
ret 4