Function at 0x408d80
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x28], 0xc
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x24], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], 0xfffffff6
mov esi, eax
call sub.KERNEL32.dll_GetStdHandle
sub esp, 4
mov ebx, eax
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], eax
mov edx, 2
mov ecx, 1
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x2c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
call sub.KERNEL32.dll_DuplicateHandle
sub esp, 0x1c
test eax, eax
je 0x408d24
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], 0xfffffff4
mov esi, eax
call sub.KERNEL32.dll_GetStdHandle
sub esp, 4
mov ebx, eax
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [esp], eax
mov ecx, 2
mov edx, 1
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x30]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
call sub.KERNEL32.dll_DuplicateHandle
sub esp, 0x1c
test eax, eax
je 0x408d42
xor eax, eax
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x28]
mov dword [esp + 8], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_CreatePipe
sub esp, 0x10
test eax, eax
je 0x408d56
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.0041fd10
test eax, eax
mov ebx, eax
je 0x408d6a
call fcn.0041c270
xor eax, eax
mov dword [esp + 0x10], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00420880
test eax, eax
je 0x408ce5
mov dword [esp], ebx
call fcn.00420510
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x30]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x38]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x34]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov dword [edi + 4], 0xffffffff
mov edx, dword [ebp + 0xc]
sub esp, 4
mov dword [edi], 0xffffffff
mov dword [edx], 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call fcn.0041faf0
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.msvcrt.dll__open_osfhandle
mov dword [edi], eax
mov eax, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.msvcrt.dll__open_osfhandle
mov dword [edi + 4], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 8], eax
mov ebx, str.create_child_process:_DuplicateHandle_In__failed__e_ld__n
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.00411b20
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 8], eax
mov edx, str.create_child_process:_DuplicateHandle_Err__failed__e_ld__n
mov dword [esp + 4], edx
jmp 0x408d36
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 8], eax
mov eax, str.CreatePipe___failed__e_ld__n
mov dword [esp + 4], eax
jmp 0x408d36
mov dword [esp], 0
mov eax, str.windows32_openpipe___:_process_init_fd___failed_n
mov dword [esp + 4], eax
call fcn.00411b20
nop
push ebp
mov ebp, esp
lea eax, [ebp - 0x14]
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [ebp - 0x14], 0
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0040d130
test eax, eax
mov esi, eax
je 0x408f3f
call sub.msvcrt.dll___p__environ
mov ebx, dword [0x42a840]
mov edi, dword [eax]
test ebx, ebx
jne 0x408ed1
mov dword [esp + 0xc], edi
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 8], esi
call fcn.00408b40
mov eax, dword [ebp - 0x20]
test eax, eax
js 0x408f4a
mov eax, dword [ebp - 0x18]
xor edi, edi
mov ebx, 0xc8
mov dword [0x42af30], edi
mov dword [0x42a290], eax
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov dword [esp], 0xc9
call fcn.00411c90
mov dword [ebp - 0x24], 0
mov esi, eax
mov edx, dword [ebp - 0x24]
cmp edx, ebx
je 0x408eb2
mov eax, ebx
sub eax, edx
mov dword [esp + 8], eax
lea eax, [esi + edx]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
jne 0x408ea0
jmp 0x408e70
call sub.msvcrt.dll__errno
cmp dword [eax], 4
jne 0x408f5f
mov edx, dword [ebp - 0x24]
mov eax, ebx
sub eax, edx
mov dword [esp + 8], eax
lea eax, [esi + edx]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, 0xffffffff
je 0x408e70
test eax, eax
jle 0x408f5f
add dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
cmp edx, ebx
jne 0x408e42
mov dword [esp], esi
lea eax, [edx + 0x201]
lea ebx, [edx + 0x200]
mov dword [esp + 4], eax
call fcn.00411e00
mov edx, dword [ebp - 0x24]
mov esi, eax
jmp 0x408e81
mov eax, dword [ebx]
test eax, eax
je 0x408dcf
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add eax, 0x2d
and eax, 0xfffffff0
call fcn.004217a0
mov eax, dword [ebx + 4]
lea edx, [esp + 0x1f]
and edx, 0xfffffff0
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp], edx
mov dword [esp + 8], eax
mov eax, 0x425bc1
mov dword [esp + 4], eax
call sub.msvcrt.dll_sprintf
jmp 0x408dcf
inc edx
mov byte [edx], 0
sub edx, esi
mov dword [ebp - 0x24], edx
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00404540
mov dword [ebp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xffffffff
mov dword [0x42af30], eax
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [0x42af30]
test eax, eax
jne 0x408f9b
lea esi, [esi]
mov dword [esp], 1
xor ebx, ebx
mov dword [esp + 4], ebx
call fcn.0040d950
mov eax, dword [0x42af30]
test eax, eax
je 0x408f80
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x408fc3
test byte [0x42a408], 2
jne 0x409013
mov dword [esp], edx
call sub.msvcrt.dll_remove
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x42af30]
xor ecx, ecx
inc eax
mov dword [0x42a290], ecx
je 0x40903b
mov eax, dword [ebp - 0x24]
mov ebx, esi
mov ecx, esi
lea edx, [esi - 1]
mov byte [esi + eax], 0
movzx eax, byte [esi]
nop
test al, al
je 0x408f18
cmp al, 0xd
je 0x408ffd
cmp al, 0xa
je 0x409009
mov byte [ebx], al
inc ecx
mov edx, ebx
movzx eax, byte [ecx]
lea ebx, [ebx + 1]
jmp 0x408fe0
cmp byte [ecx + 1], 0xa
jne 0x408ff0
inc ecx
movzx eax, byte [ecx]
jmp 0x408fe0
mov byte [ebx], 0x20
inc ecx
inc ebx
movzx eax, byte [ecx]
jmp 0x408fe0
mov dword [esp + 4], edx
mov dword [esp], str.Cleaning_up_temporary_batch_file__s_n
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call fcn.00422040
mov edx, dword [ebp - 0x14]
jmp 0x408fab
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], esi
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00422040
jmp 0x408f37