Function at 0x4e5660
Capabilities:
Clear file content
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x588098
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa14
push esi
push edi
lea eax, [ebp - 0x18]
push eax
xor edi, edi
push 0x5040c0
mov esi, ecx
mov dword [ebp - 0x18], edi
call fcn.00504e20
add esp, 8
test eax, eax
jne 0x4e56a2
mov dword [0x5f7410], edi
mov ecx, dword [ebp - 0x18]
xor ecx, 0xd15d
je 0x4e56cd
mov edx, dword [esi + 4]
push 1
push edx
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
jmp 0x4e56d3
mov ecx, esi
call fcn.004e54c0
test eax, eax
je 0x4e56fe
mov eax, dword [esi + 4]
push 1
push eax
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esi + 4]
push ebx
lea edi, [esi + 4]
push 0x4d7
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
push 0
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.USER32.dll_EnableWindow]
lea eax, [esi + 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.00424e80
mov edx, dword [esi + 0x24]
push 5
push edx
lea eax, [ebp - 0xa20]
push str._s___d_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [ebp - 0xa20]
push ecx
push ebx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov edx, dword [edi]
push 0
push 0x3e8
push 0
push edx
call dword [sym.imp.USER32.dll_SetTimer]
mov ecx, esi
call fcn.004e4b40
cmp eax, 1
jge 0x4e5774
xor eax, eax
push 1
mov dword [0x5f7bf4], eax
push 0x1c
lea eax, [ebp - 0x220]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x5a6184
lea ecx, [ebp - 0x220]
push 0x104
push ecx
call fcn.00556d28
add esp, 0xc
push 0
push 2
push 4
push 0
push 1
push 0x40000000
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [0x5f7bf4]
lea ecx, [eax - 0x13a]
mov dword [ebp - 0x10], eax
cmp ecx, edx
jae 0x4e57f6
test eax, eax
je 0x4e57f6
mov dword [0x5f7bf4], ecx
push ecx
mov ecx, esi
call fcn.004e4ad0
mov esi, dword [ebp - 0x10]
jmp 0x4e57fc
lea esi, [edx + 0x13a]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00555382
add esp, 4
test esi, esi
je 0x4e583c
call fcn.00555394
cdq
mov ecx, 0xff
idiv ecx
push 0
lea eax, [ebp - 0x11]
mov byte [ebp - 0x11], dl
lea edx, [ebp - 0x10]
push edx
push 1
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec esi
jne 0x4e5816
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x5f7bf4], 0xf
pop ebx
jbe 0x4e586c
mov ecx, dword [edi]
push 1
push ecx
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [0x5f5774]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f5774
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov eax, dword [0x5f7bf4]
test eax, eax
je 0x4e58a6
push eax
lea ecx, [ebp - 0x10]
push 0x1ff
push ecx
call fcn.00412c90
add esp, 0xc
jmp 0x4e58c7
push 0
push 0x204
call fcn.004013d0
add esp, 8
test eax, eax
je 0x4e58c7
push 0x204
push eax
lea ecx, [ebp - 0x10]
call fcn.00405fa0
mov edx, dword [edi]
push 0x4d8
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, dword [ebp - 0x10]
push esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x4e58e6
mov eax, dword [edi]
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
mov ecx, edi
call fcn.00401ce0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4e591a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
pop edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10