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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xe01c
call fcn.004161a4
push edi
push esi
push ebx
add esp, 0xfffffff4
push 0x2000
call fcn.00415f94
mov dword [0x42185c], eax
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.004034b8
push eax
lea esi, [ebp - 0x2000]
push esi
call fcn.00403860
add esp, 0x20
add esp, 0xfffffff4
push 0x9e
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x40778c
mov eax, dword [0x42185c]
mov edx, dword [0x4075bc]
mov dword [eax], edx
mov edx, dword [0x4075c0]
mov dword [eax + 4], edx
jmp 0x407794
mov eax, dword [0x42185c]
mov byte [eax], 0
add esp, 0xfffffff8
push esi
mov edx, dword [0x42185c]
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.00407448
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x4077d7
add esp, 0xfffffff4
push 0x2715
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x407b30
add esp, 0xfffffff4
push 0x4075c4
call fcn.00407210
push dword [0x42185c]
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 [0x42185c]
push 0x4075f4
call fcn.00407210
add esp, 0x20
cmp ebx, 0xb7
jne 0x407b24
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xfffffffc
call fcn.00407394
mov ebx, eax
add esp, 0xfffffff8
push ebx
push 0x407619
call fcn.00407210
add esp, 0x20
add esp, 0xfffffff8
add esp, 0xfffffffe
push 1
push ebx
call fcn.00409114
add esp, 0x10
cmp byte [ebp + 0xc], 0
je 0x407b07
add esp, 0xfffffff8
push ebx
lea edi, [ebp - 0x4000]
push edi
call fcn.00403ce8
add esp, 0xfffffff8
push edi
push 0x407626
call fcn.00407210
add esp, 0x20
add esp, 0xfffffff8
push dword [0x42185c]
lea ebx, [ebp - 0x6000]
push ebx
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push 0x40763a
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 0x4078ce
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x407648
call fcn.00407210
add esp, 0x10
add esp, 0xfffffff4
push 0x407674
call fcn.00407210
add esp, 0xfffffff8
add esp, 0xfffffff8
push 0xffffffffffffffff
push esi
call sub.KERNEL32.dll_WaitForSingleObject
push eax
push 0x407697
call fcn.00407210
add esp, 0x28
call fcn.00407540
test al, al
je 0x407add
xor ebx, ebx
mov byte [ebp - 0xe005], 0
jmp 0x40794c
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 0x40794b
call fcn.00407540
test al, al
jne 0x40794b
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x407964
add esp, 0xfffffff4
push edi
call fcn.00403304
add esp, 0x10
test al, al
jne 0x407910
cmp byte [ebp - 0xe005], 0
jne 0x407add
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 0x4079d0
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x4076a8
call fcn.00407210
add esp, 0xfffffff8
push 0x4076bd
push 0x3f1
call fcn.004029e0
add esp, 0xfffffffc
add esp, 0xfffffff4
call sub.KERNEL32.dll_GetCommandLineW
push eax
call fcn.00407490
push eax
push 0x4076c0
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 0x407a47
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x4076c8
call fcn.004071a4
add esp, 0xfffffff8
push 0x4076dc
push 0x3f1
call fcn.004029e0
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
add esp, 0xfffffff4
push 0x4076df
call fcn.00407210
xor ebx, ebx
add esp, 0x10
jmp 0x407aa4
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 0x407aa3
call fcn.00407540
test al, al
jne 0x407aa3
mov ebx, 0xc8
mov byte [ebp - 0xe005], 1
inc ebx
cmp ebx, 0xc7
jg 0x407ac2
add esp, 0xfffffff4
mov eax, dword [ebp - 0xe00c]
push eax
call fcn.00403304
add esp, 0x10
test al, al
jne 0x407a68
cmp byte [ebp - 0xe005], 0
je 0x407add
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 0x407b07
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x4076f9
call fcn.00407210
add esp, 0x10
add esp, 0xfffffff4
push 0x407715
call fcn.00407210
add esp, 0xfffffff4
push 0
call fcn.00402a00
call fcn.004072fc
jmp 0x407bc5
xor edi, edi
add esp, 0xfffffffc
push 0
push 0x40771d
lea ebx, [ebp - 0xe000]
jmp 0x407b6f
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
inc edi
add esp, 0xfffffff4
push esi
push dword [0x42185c]
call fcn.00407448
add esp, 0x20
add esp, 0xfffffffc
push edi
push 0x40771d
lea ebx, [ebp - 0xdfc0]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff8
push ebx
push dword [0x42185c]
call sub.msvcrt.dll_strcat
add esp, 0x20
push dword [0x42185c]
push 1
push 1
push 0
call sub.KERNEL32.dll_CreateSemaphoreA
mov ebx, eax
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
jne 0x407bae
cmp edi, 0x1869f
jle 0x407b44
push ebx
call sub.KERNEL32.dll_GetLastError
push eax
push dword [0x42185c]
push 0x4075f4
call fcn.00407210
lea esp, [ebp - 0xe028]
pop ebx
pop esi
pop edi
leave
ret