Function at 0x4085a0
Capabilities:
Accept command line arguments
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xe01c
call fcn.004170c4
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x2000
call fcn.00416eb4
mov dword [0x42285c], eax
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.00404278
push eax
lea esi, [ebp - 0x2000]
push esi
call fcn.00404664
add esp, 0x20
add esp, 0xfffffff4
push 0x9e
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x40860c
mov eax, dword [0x42285c]
mov edx, dword [0x40843c]
mov dword [eax], edx
mov edx, dword [0x408440]
mov dword [eax + 4], edx
jmp 0x408614
mov eax, dword [0x42285c]
mov byte [eax], 0
add esp, 0xfffffff8
push esi
mov edx, dword [0x42285c]
mov edi, edx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [edx + ecx - 1]
push eax
call fcn.004082c8
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x408657
add esp, 0xfffffff4
push 0x2715
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x4089b0
add esp, 0xfffffff4
push 0x408444
call fcn.00408090
push dword [0x42285c]
push 1
push 1
push 0
call sub.KERNEL32.dll_CreateSemaphoreA
mov edi, eax
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
push edi
push ebx
push dword [0x42285c]
push 0x408474
call fcn.00408090
add esp, 0x20
cmp ebx, 0xb7
jne 0x4089a4
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xfffffffc
call fcn.00408214
mov ebx, eax
add esp, 0xfffffff8
push ebx
push 0x408499
call fcn.00408090
add esp, 0x20
add esp, 0xfffffff8
add esp, 0xfffffffe
push 1
push ebx
call fcn.00409f94
add esp, 0x10
cmp byte [ebp + 0xc], 0
je 0x408987
add esp, 0xfffffff8
push ebx
lea edi, [ebp - 0x4000]
push edi
call fcn.00404ae8
add esp, 0xfffffff8
push edi
push 0x4084a6
call fcn.00408090
add esp, 0x20
add esp, 0xfffffff8
push dword [0x42285c]
lea ebx, [ebp - 0x6000]
push ebx
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push 0x4084ba
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x20
push ebx
push 1
push 1
push 0
call sub.KERNEL32.dll_CreateSemaphoreA
mov esi, eax
test esi, esi
jne 0x40874e
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x4084c8
call fcn.00408090
add esp, 0x10
add esp, 0xfffffff4
push 0x4084f4
call fcn.00408090
add esp, 0xfffffff8
add esp, 0xfffffff8
push 0xffffffffffffffff
push esi
call sub.KERNEL32.dll_WaitForSingleObject
push eax
push 0x408517
call fcn.00408090
add esp, 0x28
call fcn.004083c0
test al, al
je 0x40895d
xor ebx, ebx
mov byte [ebp - 0xe005], 0
jmp 0x4087cc
add esp, 0xfffffff4
push 0x32
call sub.KERNEL32.dll_Sleep
mov edx, 0x66666667
mov eax, edx
imul ebx
sar edx, 1
mov eax, ebx
sar eax, 0x1f
sub edx, eax
lea eax, [edx + edx*4]
add esp, 0xc
cmp ebx, eax
jne 0x4087cb
call fcn.004083c0
test al, al
jne 0x4087cb
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x4087e4
add esp, 0xfffffff4
push edi
call fcn.004040c4
add esp, 0x10
test al, al
jne 0x408790
cmp byte [ebp - 0xe005], 0
jne 0x40895d
add esp, 0xfffffffc
push 0
push pe_nt_image_headers32
push 1
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x4000]
mov dword [ebp - 0xe00c], eax
push eax
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
add esp, 4
test edi, edi
jne 0x408850
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408528
call fcn.00408090
add esp, 0xfffffff8
push 0x40853d
push 0x3f1
call fcn.004037a0
add esp, 0xfffffffc
add esp, 0xfffffff4
call sub.KERNEL32.dll_GetCommandLineW
push eax
call fcn.00408310
push eax
push 0x408540
lea ebx, [ebp - 0xe000]
push ebx
call sub.msvcrt.dll_swprintf
add esp, 0x20
add esp, 0xfffffff4
push 0
lea eax, [ebp - 0xe004]
push eax
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_wcslen
add esp, 0x10
add eax, eax
push eax
push ebx
push edi
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
jne 0x4088c7
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408548
call fcn.00408024
add esp, 0xfffffff8
push 0x40855c
push 0x3f1
call fcn.004037a0
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
add esp, 0xfffffff4
push 0x40855f
call fcn.00408090
xor ebx, ebx
add esp, 0x10
jmp 0x408924
add esp, 0xfffffff4
push 0x32
call sub.KERNEL32.dll_Sleep
mov edx, 0x66666667
mov eax, edx
imul ebx
sar edx, 1
mov eax, ebx
sar eax, 0x1f
sub edx, eax
lea eax, [edx + edx*4]
add esp, 0xc
cmp ebx, eax
jne 0x408923
call fcn.004083c0
test al, al
jne 0x408923
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x408942
add esp, 0xfffffff4
mov eax, dword [ebp - 0xe00c]
push eax
call fcn.004040c4
add esp, 0x10
test al, al
jne 0x4088e8
cmp byte [ebp - 0xe005], 0
je 0x40895d
add esp, 0xfffffff4
lea eax, [ebp - 0x4000]
push eax
call sub.KERNEL32.dll_DeleteFileA
add esp, 0xc
add esp, 0xfffffffc
push 0
push 1
push esi
call sub.KERNEL32.dll_ReleaseSemaphore
add esp, 4
test eax, eax
jne 0x408987
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408579
call fcn.00408090
add esp, 0x10
add esp, 0xfffffff4
push 0x408595
call fcn.00408090
add esp, 0xfffffff4
push 0
call fcn.004037c0
call fcn.0040817c
jmp 0x408a45
xor edi, edi
add esp, 0xfffffffc
push 0
push 0x40859d
lea ebx, [ebp - 0xe000]
jmp 0x4089ef
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
inc edi
add esp, 0xfffffff4
push esi
push dword [0x42285c]
call fcn.004082c8
add esp, 0x20
add esp, 0xfffffffc
push edi
push 0x40859d
lea ebx, [ebp - 0xdfc0]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff8
push ebx
push dword [0x42285c]
call sub.msvcrt.dll_strcat
add esp, 0x20
push dword [0x42285c]
push 1
push 1
push 0
call sub.KERNEL32.dll_CreateSemaphoreA
mov ebx, eax
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
jne 0x408a2e
cmp edi, 0x1869f
jle 0x4089c4
push ebx
call sub.KERNEL32.dll_GetLastError
push eax
push dword [0x42285c]
push 0x408474
call fcn.00408090
lea esp, [ebp - 0xe028]
pop ebx
pop esi
pop edi
leave
ret