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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x415048]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x103
push esi
xor edi, edi
lea eax, [ebp - 0x20b]
push edi
push eax
mov byte [ebp - 0x20c], 0
call fcn.00407ba0
push esi
lea eax, [ebp - 0x107]
push edi
push eax
mov byte [ebp - 0x108], 0
call fcn.00407ba0
push esi
lea eax, [ebp - 0x30f]
push edi
push eax
mov byte [ebp - 0x310], 0
call fcn.00407ba0
mov esi, str.sanfdr.bat
lea edi, [ebp - 0x324]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
lea edi, [ebp - 0x319]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0x24
stosb byte es:[edi], al
lea eax, [ebp - 0x20c]
push eax
mov ebx, 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x324]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ed4
lea edi, [ebp - 0x20c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402ee4
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
lea eax, [ebp - 0x108]
push eax
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x310]
push ebx
push eax
call fcn.0040518d
lea eax, [ebp - 0x310]
push 0x5c
push eax
call fcn.00404d60
add esp, 0x14
test eax, eax
je 0x402f38
mov byte [eax], 0
lea eax, [ebp - 0x20c]
push 0x4136dc
push eax
call fcn.004052a8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x403083
push esi
xor edi, edi
inc edi
push edi
push 9
push str.:Repeat_r_n
call fcn.00404a65
push esi
push edi
push 5
push str.del__
call fcn.00404a65
lea eax, [ebp - 0x108]
add esp, 0x20
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402f80
push esi
sub eax, ecx
push edi
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.00404a65
push esi
push edi
push 2
mov ebx, 0x4136f4
push ebx
call fcn.00404a65
push esi
push edi
push 0xa
push str.if_exist__
call fcn.00404a65
lea eax, [ebp - 0x108]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402fc1
push esi
sub eax, ecx
push edi
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.00404a65
push esi
push edi
push 0xf
push str.__goto_Repeat_r_n
call fcn.00404a65
push esi
push edi
push 7
push str.rmdir__
call fcn.00404a65
lea eax, [ebp - 0x310]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403001
push esi
sub eax, ecx
push edi
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.00404a65
push esi
push edi
push 3
push ebx
call fcn.00404a65
push esi
push edi
push 5
push str.del__
call fcn.00404a65
lea eax, [ebp - 0x20c]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40303d
push esi
sub eax, ecx
push edi
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00404a65
push esi
push edi
push edi
push 0x41371c
call fcn.00404a65
push esi
call fcn.0040489a
add esp, 0x24
xor eax, eax
push eax
push eax
push eax
lea ecx, [ebp - 0x20c]
push ecx
push str.open
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040424e
leave
ret