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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xe01c
call fcn.00417820
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x2000
call fcn.00417610
mov dword [0x42285c], eax
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.00404660
push eax
lea esi, [ebp - 0x2000]
push esi
call fcn.00404a4c
add esp, 0x20
add esp, 0xfffffff4
push 0x9e
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x408cc8
mov eax, dword [0x42285c]
mov edx, dword [0x408af8]
mov dword [eax], edx
mov edx, dword [0x408afc]
mov dword [eax + 4], edx
jmp 0x408ce8
mov edx, dword [0x42285c]
mov ecx, 0x408b00
mov eax, dword [0x408b00]
mov dword [edx], eax
movzx eax, word [ecx + 4]
mov word [edx + 4], ax
mov al, byte [ecx + 6]
mov byte [edx + 6], al
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.00408984
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x408d2b
add esp, 0xfffffff4
push 0x2715
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x409084
add esp, 0xfffffff4
push 0x408b07
call fcn.0040874c
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 0x408b30
call fcn.0040874c
add esp, 0x20
cmp ebx, 0xb7
jne 0x409078
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xfffffffc
call fcn.004088d0
mov ebx, eax
add esp, 0xfffffff8
push ebx
push 0x408b55
call fcn.0040874c
add esp, 0x20
add esp, 0xfffffff8
add esp, 0xfffffffe
push 1
push ebx
call fcn.0040a670
add esp, 0x10
cmp byte [ebp + 0xc], 0
je 0x40905b
add esp, 0xfffffff8
push ebx
lea edi, [ebp - 0x4000]
push edi
call fcn.00404ec4
add esp, 0xfffffff8
push edi
push 0x408b62
call fcn.0040874c
add esp, 0x20
add esp, 0xfffffff8
push dword [0x42285c]
lea ebx, [ebp - 0x6000]
push ebx
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push 0x408b76
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 0x408e22
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408b84
call fcn.0040874c
add esp, 0x10
add esp, 0xfffffff4
push 0x408bb0
call fcn.0040874c
add esp, 0xfffffff8
add esp, 0xfffffff8
push 0xffffffffffffffff
push esi
call sub.KERNEL32.dll_WaitForSingleObject
push eax
push 0x408bd3
call fcn.0040874c
add esp, 0x28
call fcn.00408a7c
test al, al
je 0x409031
xor ebx, ebx
mov byte [ebp - 0xe005], 0
jmp 0x408ea0
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 0x408e9f
call fcn.00408a7c
test al, al
jne 0x408e9f
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x408eb8
add esp, 0xfffffff4
push edi
call fcn.004044ac
add esp, 0x10
test al, al
jne 0x408e64
cmp byte [ebp - 0xe005], 0
jne 0x409031
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 0x408f24
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408be4
call fcn.0040874c
add esp, 0xfffffff8
push 0x408bf9
push 0x3f1
call fcn.00403b2c
add esp, 0x20
jmp 0x408fa7
add esp, 0xfffffffc
add esp, 0xfffffff4
call sub.KERNEL32.dll_GetCommandLineW
push eax
call fcn.004089d0
push eax
push 0x408bfc
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 0x408f9b
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408c04
call fcn.004086e0
add esp, 0xfffffff8
push 0x408c18
push 0x3f1
call fcn.00403b2c
add esp, 0x20
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
add esp, 0xfffffff4
push 0x408c1b
call fcn.0040874c
xor ebx, ebx
add esp, 0x10
jmp 0x408ff8
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 0x408ff7
call fcn.00408a7c
test al, al
jne 0x408ff7
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x409016
add esp, 0xfffffff4
mov eax, dword [ebp - 0xe00c]
push eax
call fcn.004044ac
add esp, 0x10
test al, al
jne 0x408fbc
cmp byte [ebp - 0xe005], 0
je 0x409031
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 0x40905b
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x408c35
call fcn.0040874c
add esp, 0x10
add esp, 0xfffffff4
push 0x408c51
call fcn.0040874c
add esp, 0xfffffff4
push 0
call fcn.00403b4c
call fcn.00408838
jmp 0x409119
xor edi, edi
add esp, 0xfffffffc
push 0
push 0x408c59
lea ebx, [ebp - 0xe000]
jmp 0x4090c3
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
inc edi
add esp, 0xfffffff4
push esi
push dword [0x42285c]
call fcn.00408984
add esp, 0x20
add esp, 0xfffffffc
push edi
push 0x408c59
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 0x409102
cmp edi, 0x1869f
jle 0x409098
push ebx
call sub.KERNEL32.dll_GetLastError
push eax
push dword [0x42285c]
push 0x408b30
call fcn.0040874c
lea esp, [ebp - 0xe028]
pop ebx
pop esi
pop edi
leave
ret