Function at 0x4a59e0
Capabilities:
Delete file
Print debug messages
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x289c
call fcn.004fe1a0
mov eax, dword [0x5a4aa8]
xor eax, esp
mov dword [esp + 0x2898], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, edx
test ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov byte [esp + 0x13], 0
mov byte [esp + 0x12], 0
jne 0x4a5a37
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2898]
xor ecx, esp
call fcn.004fa103
mov esp, ebp
pop ebp
ret 4
push 0x50
lea ecx, [esp + 0x4c]
push 0
push ecx
call fcn.004fd670
add esp, 0xc
push 0x400
lea edx, [esp + 0x8a4]
push 0
push edx
call fcn.004fd670
add esp, 0xc
push 0x400
lea eax, [esp + 0x1ca4]
push 0
push eax
call fcn.004fd670
add esp, 0xc
push ebx
lea eax, [esp + 0x1ca4]
lea ecx, [esp + 0x8a4]
lea esi, [esp + 0x4c]
call fcn.004a8ab0
add esp, 4
test eax, eax
jne 0x4a5a1e
test byte [esp + 0x7c], 0x10
je 0x4a5aa1
mov byte [esp + 0x12], 1
lea eax, [esp + 0x8a0]
lea edx, [eax + 1]
jmp 0x4a5ab0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4a5ab0
sub eax, edx
js 0x4a5ad7
lea ecx, [ecx]
cmp byte [esp + eax + 0x8a0], 0x2f
jne 0x4a5ad2
mov byte [esp + eax + 0x8a0], 0x5c
sub eax, 1
jns 0x4a5ac0
push 0x800
lea ecx, [esp + 0x20a4]
push 0
push ecx
call fcn.004fd670
add esp, 0xc
push 0x400
lea edx, [esp + 0x20a4]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x8ac]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4a5b29
push 0x800
push eax
lea ecx, [esp + 0xca8]
push ecx
call fcn.004fd670
add esp, 0xc
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a5b30
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x5c
jne 0x4a5b57
lea edx, [esp + 0x20a0]
push edx
push edi
push 0x54ffb0
jmp 0x4a5b65
lea eax, [esp + 0x20a0]
push eax
push edi
push 0x535a74
lea edx, [esp + 0xcac]
call fcn.00404380
mov edx, dword [esp + 0x20]
add esp, 0xc
cmp byte [esp + 0x12], 0
lea ecx, [esp + 0xca0]
je 0x4a5ba4
push 1
call fcn.004a57d0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2898]
xor ecx, esp
call fcn.004fa103
mov esp, ebp
pop ebp
ret 4
push 0
call fcn.004a57d0
test al, al
je 0x4a5a1e
lea ecx, [esp + 0xca0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea edx, [esp + 0xcb8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a5c18
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x56ac04
call esi
lea eax, [esp + 0xca0]
push eax
call esi
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2898]
xor ecx, esp
call fcn.004fa103
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.004a8f10
add esp, 4
test eax, eax
jne 0x4a5d79
push 0x800
push eax
lea ecx, [esp + 0x14a8]
push ecx
mov dword [esp + 0x24], eax
call fcn.004fd670
lea edx, [esp + 0x14ac]
add esp, 0xc
push edx
mov eax, ebx
call fcn.004a90e0
mov esi, eax
add esp, 4
test esi, esi
jle 0x4a5cc3
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x1c]
push eax
push esi
lea ecx, [esp + 0x14ac]
push ecx
push edi
call ebx
test eax, eax
je 0x4a5d75
cmp dword [esp + 0x18], esi
jne 0x4a5d75
push 0x800
lea edx, [esp + 0x14a4]
push 0
push edx
call fcn.004fd670
lea eax, [esp + 0x14ac]
add esp, 0xc
push eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], 0
call fcn.004a90e0
mov esi, eax
add esp, 4
test esi, esi
jg 0x4a5c61
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x48]
push eax
push edi
mov byte [esp + 0x23], 1
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x4a5d22
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x28]
push ecx
push eax
shr eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
test eax, eax
je 0x4a5d22
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x4a5d22
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
mov eax, ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4a5d79
push 0x800
lea ecx, [esp + 0x9c]
push 0
push ecx
call fcn.004fd670
add esp, 0xc
lea edx, [esp + 0xca0]
push edx
lea eax, [esp + 0x9c]
push 0x400
push eax
mov byte [esp + 0x8a4], 0
call fcn.004fa94e
add esp, 0xc
lea ecx, [esp + 0x98]
push ecx
call fcn.004a5dc0
jmp 0x4a5d79
mov ebx, dword [esp + 0x1c]
test edi, edi
je 0x4a5d84
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004a9390
mov bl, byte [esp + 0x13]
test bl, bl
jne 0x4a5d9f
lea edx, [esp + 0xca0]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x28a4]
pop edi
pop esi
mov al, bl
pop ebx
xor ecx, esp
call fcn.004fa103
mov esp, ebp
pop ebp
ret 4