Function at 0x4966e0
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x4d9540]
mov ecx, str.:RepeatDEL___s_if_exist___s__goto_RepeatDEL___s_
push ebx
push esi
test ecx, ecx
push edi
mov dword [ebp - 0xc], eax
je 0x49674b
mov edx, ecx
shr edx, 0x10
jne 0x496714
xor eax, eax
mov ax, cx
lea ecx, [ebp - 0xc]
push eax
call fcn.0040ff70
jmp 0x49674b
push str.:RepeatDEL___s_if_exist___s__goto_RepeatDEL___s_
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x49674b
push esi
lea ecx, [ebp - 0xc]
call fcn.004012f0
test eax, eax
je 0x49674b
mov edi, dword [ebp - 0xc]
lea ecx, [esi + esi]
mov edx, ecx
mov esi, str.:RepeatDEL___s_if_exist___s__goto_RepeatDEL___s_
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4e3a2c]
mov ecx, 0x81
mov dword [ebp - 0x430], eax
xor eax, eax
lea edi, [ebp - 0x42c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x430]
push 0x104
push ecx
push 0
stosw word es:[edi], ax
call ebx
mov edx, dword [0x4d9540]
push ecx
mov edi, esp
lea eax, [ebp - 0x430]
test eax, eax
mov dword [edi], edx
je 0x4967ea
lea ecx, [ebp - 0x430]
shr ecx, 0x10
jne 0x4967b2
xor edx, edx
lea eax, [ebp - 0x430]
mov dx, ax
mov ecx, edi
push edx
call fcn.0040ff70
jmp 0x4967ea
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4967ea
push esi
mov ecx, edi
call fcn.004012f0
test eax, eax
je 0x4967ea
mov edi, dword [edi]
lea ecx, [esi + esi]
mov edx, ecx
lea esi, [ebp - 0x430]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x14]
push eax
call fcn.00448080
mov ecx, dword [0x4d9540]
mov edx, str._selfdestruct.bat
add esp, 8
mov dword [ebp - 4], ecx
test edx, edx
jne 0x49680c
xor eax, eax
jmp 0x496817
push str._selfdestruct.bat
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push str._selfdestruct.bat
push eax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 4]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.004017b0
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401200
lea ecx, [ebp - 4]
call fcn.004014c0
mov edx, dword [0x4e3a2c]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x220]
mov dword [ebp - 0x224], edx
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
rep stosd dword es:[edi], eax
mov ecx, 0x81
lea edi, [ebp - 0x634]
mov dword [ebp - 0x638], edx
mov dword [ebp - 0x840], edx
rep stosd dword es:[edi], eax
lea edx, [ebp - 0x638]
mov ecx, 0x81
lea edi, [ebp - 0x83c]
push edx
rep stosd dword es:[edi], eax
push 0x104
call esi
lea eax, [ebp - 0x840]
push eax
push 0x104
call esi
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x638]
push ecx
push edx
call fcn.004c60da
add esp, 8
lea eax, [ebp - 0x224]
push 0x104
push eax
push 0
call ebx
mov ecx, dword [0x4d9540]
lea edx, [ebp - 0x224]
test edx, edx
mov dword [ebp - 8], ecx
je 0x496935
lea eax, [ebp - 0x224]
shr eax, 0x10
jne 0x4968fb
xor ecx, ecx
lea edx, [ebp - 0x224]
mov cx, dx
push ecx
lea ecx, [ebp - 8]
call fcn.0040ff70
jmp 0x496935
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x496935
push esi
lea ecx, [ebp - 8]
call fcn.004012f0
test eax, eax
je 0x496935
mov edi, dword [ebp - 8]
lea ecx, [esi + esi]
mov edx, ecx
lea esi, [ebp - 0x224]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
push 0x80
push 2
push 0
push 0
lea eax, [ebp - 0x638]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x18], edi
je 0x496a3d
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, dword [0x4d9540]
push edx
push eax
push eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
lea ecx, [ebp - 4]
push eax
push ecx
call fcn.00401a70
add esp, 0x14
lea ecx, [ebp - 4]
push 0x4d9a34
push 0x4d9a3c
call fcn.0040fcd0
mov eax, dword [ebp - 4]
test eax, eax
mov ebx, eax
jne 0x4969a3
xor esi, esi
jmp 0x4969d8
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.004c5440
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 0x18]
mov eax, dword [eax - 8]
lea edx, [ebp - 0x1c]
push 0
push edx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x840]
push 0
push ecx
lea edx, [ebp - 0x638]
push 0
push edx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, dword [ebp - 4]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x496a3d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x496a3d
mov edx, dword [ebp - 4]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [ebp - 8]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x496a6a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x496a6a
mov edx, dword [ebp - 8]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [ebp - 0x10]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x496a97
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x496a97
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.004014c0
lea ecx, [ebp - 0xc]
call fcn.004014c0
lea esp, [ebp - 0x84c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret