Function at 0x413260
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 [0x46b21c]
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 0x4132cb
mov edx, ecx
shr edx, 0x10
jne 0x413294
xor eax, eax
mov ax, cx
lea ecx, [ebp - 0xc]
push eax
call fcn.00402fe0
jmp 0x4132cb
push str.:RepeatDEL___s_if_exist___s__goto_RepeatDEL___s_
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4132cb
push esi
lea ecx, [ebp - 0xc]
call fcn.00401ce0
test eax, eax
je 0x4132cb
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 [0x4837e4]
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 [0x46b21c]
push ecx
mov edi, esp
lea eax, [ebp - 0x430]
test eax, eax
mov dword [edi], edx
je 0x41336a
lea ecx, [ebp - 0x430]
shr ecx, 0x10
jne 0x413332
xor edx, edx
lea eax, [ebp - 0x430]
mov dx, ax
mov ecx, edi
push edx
call fcn.00402fe0
jmp 0x41336a
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x41336a
push esi
mov ecx, edi
call fcn.00401ce0
test eax, eax
je 0x41336a
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.00412ee0
mov ecx, dword [0x46b21c]
mov edx, str._selfdestruct.bat
add esp, 8
mov dword [ebp - 4], ecx
test edx, edx
jne 0x41338c
xor eax, eax
jmp 0x413397
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.00401eb0
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00429290
lea ecx, [ebp - 4]
call fcn.00401e80
mov edx, dword [0x4837e4]
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.0045a7b3
add esp, 8
lea eax, [ebp - 0x224]
push 0x104
push eax
push 0
call ebx
mov ecx, dword [0x46b21c]
lea edx, [ebp - 0x224]
test edx, edx
mov dword [ebp - 8], ecx
je 0x4134b5
lea eax, [ebp - 0x224]
shr eax, 0x10
jne 0x41347b
xor ecx, ecx
lea edx, [ebp - 0x224]
mov cx, dx
push ecx
lea ecx, [ebp - 8]
call fcn.00402fe0
jmp 0x4134b5
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4134b5
push esi
lea ecx, [ebp - 8]
call fcn.00401ce0
test eax, eax
je 0x4134b5
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 0x4135bd
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, dword [0x46b21c]
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.004036a0
add esp, 0x14
lea ecx, [ebp - 4]
push 0x46b4d8
push 0x46cea8
call fcn.00403c70
mov eax, dword [ebp - 4]
test eax, eax
mov ebx, eax
jne 0x413523
xor esi, esi
jmp 0x413558
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.0045a1f0
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 [0x46b220]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4135bd
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4135bd
mov edx, dword [ebp - 4]
add edx, 0xfffffff4
push edx
call fcn.00459de2
add esp, 4
mov eax, dword [ebp - 8]
mov edx, dword [0x46b220]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4135ea
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4135ea
mov edx, dword [ebp - 8]
add edx, 0xfffffff4
push edx
call fcn.00459de2
add esp, 4
mov eax, dword [ebp - 0x10]
mov edx, dword [0x46b220]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x413617
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x413617
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff4
push edx
call fcn.00459de2
add esp, 4
lea ecx, [ebp - 0x14]
call fcn.00401e80
lea ecx, [ebp - 0xc]
call fcn.00401e80
lea esp, [ebp - 0x84c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret